Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t0=[0;1/6;1/3;1/2;2/3;5/6];
- y0=[0;2;0;-1;1;1];
- A=[t0.^0 cos(2*pi*t0) sin(2*pi*t0)];
- c=(A'*A)\(A'*y0)
- e=y0-A*c;
- n=norm(e)
- A=[t0.^0 cos(2*pi*t0) sin(2*pi*t0) cos(4*pi*t0)];
- c=(A'*A)\(A'*y0)
- e=y0-A*c;
- n=norm(e)
Add Comment
Please, Sign In to add comment