Plotting 1000 signals into one graph
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Constantino Carlos Reyes-Aldasoro
2020년 10월 26일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!