Can someone help me understanf how to plot the next partial column in MATLAB:
while N=2001
|M|<700
ak =
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityCan someone help me understanf how to plot the next partial column in MATLAB:
while N=2001
|M|<700
ak =
N = 2001;
M = 600 ;
vectorOfK = (-M:M)';
vectorOfN = (0:N-1);
%%% For a given n
% n = 314;
vectorOfAk = sin(199*pi*vectorOfK/2001)./(2001*sin(pi*vectorOfK/2001));
% Modify the NaN value (0/0 division) at k = 0;
vectorOfAk(M+1) = 199/2001;
matrixOfExpo = exp(1i*2*pi/N*(vectorOfK*vectorOfN));
matrixOfAkExpoProduct = repmat(vectorOfAk,1,N).*matrixOfExpo;
vectorOfATilde = sum(matrixOfAkExpoProduct)/N;
subplot(2,1,1)
plot(vectorOfN,real(vectorOfATilde));
xlabel('Real part (index)');xlabel('Amplitude (a. u.)');
subplot(2,1,2)
plot(vectorOfN,imag(vectorOfATilde));
xlabel('Imaginary part (index)');xlabel('Amplitude (a. u.)');
plot(am)` or
plot(real(am))` whenam
is computed should work $\endgroup$ – Laurent Duval Apr 25 '20 at 15:38