i am a student in china.
i get diffrent result when i run the code below:
fft([1,2,3,4],4).'
fft([1,2,3,4],4)'
the first:
10.0000 + 0.0000i
-2.0000 + 2.0000i
-2.0000 + 0.0000i
-2.0000 - 2.0000i
the 2th
10.0000 + 0.0000i
-2.0000 - 2.0000i
-2.0000 + 0.0000i
-2.0000 + 2.0000i
but i think it should be the same
could you tell me where is wrong?

 Akzeptierte Antwort

dpb
dpb am 5 Aug. 2019
Bearbeitet: dpb am 5 Aug. 2019

1 Stimme

See the documentation for
doc transpose % .'
doc ctranspose % '
You're transposing the output of the fft() which is complex; in Matlab the ' operator is the complex transpose whereas the "dot" version .' is non-complex transpose.
So, it is doing exactly what is documented to do--
ADDENDUM
And, to emphasize what SS said, the output of fft() itself is identical as would be expected--it was given identical inputs.
The transpose operators are applied to the output of fft(); it (fft, that is) has actually nothing whatsoever to do with the result at that point; its job was done and over before the interesting action occurred.
Same as if had written
>> complex(-2,2)
ans =
-2.0000 + 2.0000i
>> complex(-2,2)'
ans =
-2.0000 - 2.0000i
>> complex(-2,2).'
ans =
-2.0000 + 2.0000i
>>
which clearly demonstrates the properties of the transpose operators has nothing to do with the source of the data (and vice versa); it simply has to be a complex value before one can observe the difference since w/o an imaginary component the complex conjugate is a "do nothing" operation.
>> [1:4]
ans =
1 2 3 4
>> [1:4]'
ans =
1
2
3
4
>> [1:4].'
ans =
1
2
3
4
>>

Weitere Antworten (0)

Kategorien

Mehr zu Fourier Analysis and Filtering finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2019a

Gefragt:

am 5 Aug. 2019

Bearbeitet:

dpb
am 5 Aug. 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by