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

Click For Summary

Discussion Overview

The discussion revolves around understanding a specific line of code in Matlab related to signal processing, particularly the expression freq=(0:79)/(2*n*dt). Participants are exploring the meaning of the notation and the rationale behind selecting 80 samples.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification

Main Points Raised

  • One participant seeks clarification on the meaning of freq=(0:79)/(2*n*dt), specifically the significance of the 0:79 range.
  • Another participant explains that (0:79) represents a sequence of numbers from 0 to 79, indicating that "freq" is defined as these numbers divided by a denominator.
  • A participant questions the choice of using 80 samples, prompting a discussion about the reasoning behind this selection.
  • One response suggests that the choice of 80 samples may be for convenience, as plotting all points could make certain peaks indistinguishable, thus focusing on a region of interest.
  • A later reply expresses agreement with the convenience reasoning provided.
  • Another participant requests access to the Matlab lecture notes referenced in the discussion.

Areas of Agreement / Disagreement

Participants generally agree on the interpretation of the (0:79) notation and the convenience of choosing 80 samples, but the discussion does not reach a consensus on the broader implications of this choice.

Contextual Notes

The discussion does not address potential limitations or assumptions regarding the choice of samples or the context of the signal being processed.

Who May Find This Useful

Individuals new to Matlab or signal processing, particularly those interested in understanding sample selection and frequency representation in signal analysis.

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.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K