'/' used for creating an axis, DFT
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sprklspring
am 27 Okt. 2017
Beantwortet: Steven Lord
am 27 Okt. 2017
How does building an axis in that way: 'freq= [-pi+pi/L:2*pi/L:pi-pi/L];' work exactly? Why so many '/' signs and what do they exactly do? DFT
0 Kommentare
Akzeptierte Antwort
Star Strider
am 27 Okt. 2017
This assignment:
freq = [-pi+pi/L:2*pi/L:pi-pi/L];
is apparently for a two-sided Fourier transform, where ‘L’ is the length of the Fourier transform vector. The increment of the vector is ‘pi/L’, where the ‘/’ is right division (specifically, ‘matrix right division’, see the mrdivide (link) documentation for details). The vector goes from ( -pi + the increment ) to ( pi - the increment ). Supply an integer value for ‘L’ and run that line to see how it works.
0 Kommentare
Weitere Antworten (1)
Steven Lord
am 27 Okt. 2017
The / operator performs division.
>> x = 1/3
x =
0.333333333333333
>> from1To7InStepsOf2 = 1:2:7
from1To7InStepsOf2 =
1 3 5 7
0 Kommentare
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!