Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- L = 4;
- nu = (2.*pi)./L;
- x = [ -3.1 9.9 6.5 -8.3 ];
- res = [ 0 0 0 ];
- for p=0:2
- sum = 0;
- for k=0:(L-1)
- sum = sum + (x(k+1).*exp(-1i.*p.*k.*nu));
- end
- sum = sum ./ L;
- res(p+1) = sum;
- end
- disp("U1 = ");
- disp(res(1));
- disp("U2 = ");
- disp((x(1)-res(1)-res(3))./cos(angle(res(2))));
- disp("U3 = ");
- disp(res(3));
- disp("phi = ");
- disp(angle(res(2)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement