From: michael scheinfeild on
hi i have vector
e.g
vec = [1+2*j ,1+3*j ..] length 64


i use fft of the vector
vecFreq = fftshift(fft(fftshift(vec),64));

now i want to take only first coefficients of the vector and restore it is it possible ?
vecFreq=vecFreq(1:4); first 4 coeff

[ what to do with the negative values ?>]

vecRestored= fftshift(ifft(fftshift(vecFreq),64));

[ what to do with the negative values ?>]
From: nanren888 on
"michael scheinfeild" <yomholedet(a)gmail.com> wrote in message <hlrvap$cpo$1(a)fred.mathworks.com>...
> hi i have vector
> e.g
> vec = [1+2*j ,1+3*j ..] length 64
>
>
> i use fft of the vector
> vecFreq = fftshift(fft(fftshift(vec),64));
>
> now i want to take only first coefficients of the vector and restore it is it possible ?
> vecFreq=vecFreq(1:4); first 4 coeff
>
> [ what to do with the negative values ?>]
>
> vecRestored= fftshift(ifft(fftshift(vecFreq),64));
>
> [ what to do with the negative values ?>]

Michael,
What are you trying to do?
How do you know that you don't want negative values?
Give a hint of the aim & the problem?
For example, why do you fftshift the original?
If you are taking only the first 4 values, then this is equivalent to a window with 4 ones & the rest zeros, in the other domain, this means smoothing the signal by convolution with the transform of that window, vaguely low-pass.
Where are you wanting to go?