MATLAB Matlab for Signal Processing: Understanding 0:79 in Freq=(0:79)/(2*n*dt)

AI Thread Summary
The discussion centers around a user seeking clarification on a MATLAB signal processing topic, specifically the meaning of the expression "freq=(0:79)/(2*n*dt)" in the context of reducing noise in a signal. The "0:79" segment defines a range of numbers from 0 to 79, indicating a selection of 80 samples. The choice of 80 samples is noted as a matter of convenience, allowing for a focused analysis on the relevant part of the spectrum while avoiding indistinguishable peaks in a larger dataset. Additionally, another participant expresses interest in obtaining the MATLAB lecture notes referenced in the discussion.
babistopher
Messages
15
Reaction score
0
Hi,

I am pretty new to Matlab and am trying to reduce the noise of a particular signal. I found this pdf online and found it to be helpful. However, I am having trouble figuring out what the freq=(0:79)/(2*n*dt) means. More specifically the 0:79 bit. Any help would be much appreciated.

Referring to: http://www.math.uic.edu/~jan/mcs320s07/matlec7.pdf
 
Physics news on Phys.org
(0:79) defines a string of the numbers from 0 to 79. The line defines "freq" as these numbers divided by the denominator.
 
Thanks for the reply. I apologize that my question wasn't clear. I meant why are they choosing 80 samples?
 
I think it's just a choice of convenience. If you plotted all 401 points in the spectrum, the peaks at bins 2 and 4 would be indistinguishable from the y axis. He's just zooming in on the region of interest.
 
that's exactly what i figured. thank you.
 
Hi, jus came across this thresd, noticed your MATLAB lecture notes seems very handy. I'm wondering if I would be able to get my hands on the set of notes your using. Wil be much apreciated if so. Thanks.
 
Back
Top