Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.43 KB | None | 0 0
  1. function res = Lab1()
  2.   U = [1 0];
  3.   V = [0 1];
  4.   T = 2 * pi / 3;
  5.   t = linspace(0, T, 1000);
  6.   x_u = lsode("F", U, t);
  7.   x_v = lsode("F", V, t);
  8.   C = [ transpose(x_u(1000, :)) transpose(x_v(1000, :))];
  9.   m = 1000;
  10.   C
  11.   for i = 1:m
  12.     C = C * C;
  13.   endfor
  14.   C
  15.  
  16.   function res = F(x,t)
  17.     res(1) = 0.5 * x(1) + 0.1 * sin(2 * t / 3) * x(2);
  18.     res(2) = e ^(sin(0.4 * t)) * x(1) + x(2) * 2;
  19.   endfunction
  20. endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement