Plotting 1000 signals into one graph
3 views (last 30 days)
Show older comments
Hello,
I am currently doing research at my university. Until now, I have been given a signal (which is 1x321 in length), added noise to it, filtered it, and then plotted the output. I was recenly given a set of signals (1000x321) and I am trying to figure out how to go through, doing the above mentioned steps and then plotting them. I know I will need something like:
for (i=1,i<=1000, i++),
to get started but I am not sure exactly how to make it step through and plot each one to the same graph. Any help would be greatly appreciated!
0 Comments
Answers (1)
Constantino Carlos Reyes-Aldasoro
on 26 Oct 2020
First of all:
for (i=1,i<=1000, i++),
This is not Matlab, looks like java, in Matlab it would be
for i=1:1000
end
Now, you have a 1D vector [1x321] (say it is OneDVector) and will now have 1000 of those, you could do something like this
for i=1:1000
TwoD_vector(i,:)= OneDVector; %here you add the noise
end
And you will have a [1000x321] matrix, then you can display like this
mesh(TwoD_vector)
surf(TwoD_vector)
ribbon(TwoD_vector)
ribbon(TwoD_vector')
etc.
0 Comments
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!