input 100 signals spaced at 50 hz

1 view (last 30 days)
how can i input 100 signals in MATLAB? starting with frequency 1000Hz spaced at 50 hz.. therefore signals start from frequency 1000 hz to 50000 hz. what should be the sampling frequency? i have to implement energy detection for spectrum sensing in cognitive radio. please help
  2 Comments
Patrik Ek
Patrik Ek on 6 Mar 2014
Edited: Patrik Ek on 6 Mar 2014
Could you please explain this more thoroughly? There facts does not seem consistent since fmax seemingly should be,
1000+100*50 = 6000,
for your example. Explain and tell me if I have misinterpreted the question.
parul
parul on 7 Mar 2014
you are right. i am sorry for the wrong values.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 6 Mar 2014
You may wish to consider linspace(start_frequency,end_frequency,number_of_points)
but be sure that you really want 100 points and not 101 points (one extra point is needed surprisingly often, but certainly not always.)
  2 Comments
parul
parul on 7 Mar 2014
Thankyou for replying. yes i need 100 points. i tried your answer in Matlab and it works same as the for loop that i implemented. what i wish is that in the output each frequency is displayed as: f1=1000 f2=1050 . . . f100=5950
how can that be done?
Patrik Ek
Patrik Ek on 7 Mar 2014
Edited: Patrik Ek on 7 Mar 2014
Ok so you want 100 different variables, 1 per frequency that does not make sense? And also you say display, but that is a quite wide scope. I you want I can provide code to display the frequencies randomly scattered in a text image, but I guess you want something else?

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!