SHARE
TWEET

Scilab, trace2 function

SilLAwNeD Oct 16th, 2018 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function [] = trace2(N, T, cc)
  2.     exec('**/calcg.sci', -1)
  3.     n = size(T, 1);
  4.  
  5.     // Si le vecteur T n'est pas un vecteur colonne
  6.     if (n == 1) then
  7.         T = T';
  8.         n = size(T, 1)
  9.     end
  10.  
  11.     g = zeros(1, N);
  12.     t = linspace(T(1), T(n), N);
  13.  
  14.     for i = 1:N
  15.         g(1, i) = calcg(t(i), T, cc)
  16.     end
  17.    
  18.     plot(t, g);
  19. endfunction
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top