How can i change this plot to be be in this form
1 view (last 30 days)
Show older comments
Please, how can i make the 2D plot (attached image -row plot) appear like any of the signal plots(attached image -signal) in the other image. kindly simplify codes, as I am new to MAtlab
0 Comments
Answers (1)
Adam Danz
on 23 Jul 2018
Edited: Adam Danz
on 23 Jul 2018
If you'd like to make a subplot,
figure
subplot(4,1,1) % see help subplot
plot(row_data)
title('My row plot')
xlabel('time (ms)')
ylabel('Amplitude (v)')
8 Comments
Adam Danz
on 24 Jul 2018
M is a 3D array but the size of each dimension is (10,10,30). An RGB matrix would have 3 columns, not 10.
Here's a plot of your code (in blue) and my code (in red). The only thing I changed in my code was the line style.
It plots the peaks in a straight line.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/192719/image.jpeg)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!