פורסם 2005 במאי 2220 שנים I want to compute the fourier transform of a given vector in time using the fft commandthis is how my code looks like right nown1 = -25:-1;n2 = 1:25;x1 = [(2 * sin(0.125*pi*n1) ./ n1).^2 0.6165 (2 * sin(0.125*pi*n2) ./ n2).^2];N = 1024;X = abs(fft(x1,N));X = fftshift(X);F = [-N/2 : N/2 - 1] / N;plot(F,X);%axis([-2*pi 2*pi 0 5]);questions are:is there a less ugly way to define the value in n=0?i want the resulting plot to streach from -2*pi to 2*pi. commenting the axis command, it only goes from -0.5 to 0.5, while uncommenting it just cuts the plot at +-0.5, and it doesnt look too realistic. anyway to fix it?]
פורסם 2005 במאי 2220 שנים לא אין דרך יותר יפה לעשות את זהבקשר לצירים אז נדמה לי שצריך לעשותaxis equal או AXIS MANUALכן זה ניראה יותר טוב(לא מתוח)זה לא אמור להיות בפורום שפות תיכנות?
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.