>>i am using the following signal
>>a=[-.0621 .0039 .4132 .5466 .1479 -.0670 .0010 .0165]
>>b=fliplr(a)
>>x=-3:1:4;
>>plot(x,a,'r')
>>hold on;
>>plot(x,b,'b')
>>hold off
>>axis([-3 4 -1.0 1.0 ])
>> t=a+(i*b);
>>here i need to get the spectrum of real signal
>> a and b
>>and then complex signal t....
>>how to get the spectrum of those signals....
>>the spectrum i needed is double sided... with reducing side lobes amplitudes (like >>sinc pulse) ...
>>i tried with fft .. but i am not getting double side spectrum.....
>>please if any known about the spectrum of signal , help me to get progress in >>my work...
>>thanks for Ur advance help.............
help fftshift
doc fftshift
Hope this helps.
Greg
Hi Jagdeesh, In addition to Greg's fine suggestion, if you have the Signal Processing Toolbox, you can use spectrum objects with 'SpectrumType' 'Twosided' with or without 'CenterDC' set to true.
x = randn(1e3,1)+1j*randn(1e3,1);
hper = spectrum.periodogram;
plot(psd(hper,x,'SpectrumType','twosided','CenterDC',true));
% to get the output
psdest = psd(hper,x,'SpectrumType','twosided','CenterDC',true);
Wayne