Cryston13

E6

Mar 21st, 2018
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. t0=[0;1/6;1/3;1/2;2/3;5/6];
  2. y0=[0;2;0;-1;1;1];
  3. A=[t0.^0 cos(2*pi*t0) sin(2*pi*t0)];
  4. c=(A'*A)\(A'*y0)
  5. e=y0-A*c;
  6. n=norm(e)
  7. A=[t0.^0 cos(2*pi*t0) sin(2*pi*t0) cos(4*pi*t0)];
  8. c=(A'*A)\(A'*y0)
  9. e=y0-A*c;
  10. n=norm(e)
Add Comment
Please, Sign In to add comment