MATLAB Answers

# Plotting 1000 signals into one graph

1 view (last 30 days)
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 CommentsShowHide -1 older comments

Sign in to comment.

### Answers (1)

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 CommentsShowHide -1 older comments

Sign in to comment.

### Community Treasure Hunt

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

Start Hunting!