format compact
format long
clear
y=[-0.003, 0.197, 0.3, 0.402, 0.496, 0.603, 0.7, 0.797, 0.996, 1.02];
Y=fft(y);
%% Display F[k]
fmt=strcat(['%d',' ','%-14.10f','+i(','%-14.10f',')']);
disp(sprintf('\nk F[k]'));
for ic=1:length(Y)
disp(sprintf(fmt,ic-1,real(Y(ic)),imag(Y(ic))));
end
%%
format compact
format long
clear
y=[-0.011, 0.688, 0.983, 0.717, -0.001, -0.687, -0.952, -0.701,
0.01];
Y=fft(y);
%%Display F[k]
fmt=strcat(['%d',' ','%-14.10f','+i(','%-14.10f',')']);
disp(sprintf('\nk F[k]'));
for ic=1:length(Y)
disp(sprintf(fmt,ic-1,real(Y(ic)),imag(Y(ic))));
end
%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%
format compact format long clear y=[-0.003, 0.197, 0.3, 0.402, 0.496, 0.603, 0.7, 0.797, 0.996, 1.02]; Y=fft(y);...
format compact format long clear y=[-0.003, 0.197, 0.3, 0.402, 0.496, 0.603, 0.7, 0.797, 0.996, 1.02]; Y=fft(y); %% Display F[k] fmt=strcat(['%d',' ','%-14.10f','+i(','%-14.10f',')']); disp(sprintf('\nk F[k]')); for ic=1:length(Y) disp(sprintf(fmt,ic-1,real(Y(ic)),imag(Y(ic)))); end %% WebLearn Mathematice and Statistics for Manufacturing Engineers (MATH2185 1910) Student Test Page-Fourier series and DFT C 29 Question Σί,. -2injk /N k0,1,2 ..,N-1 the discrete Fourier transform is defined as: Fr= 1 0 The following nine data values are measured at evenly spaced time intervals: -0.002, 0.203, 0.303, 0.395, 0.495, 0.598, 0.699,...