How can i change this plot to be be in this form

조회 수: 1 (최근 30일)
Folakemi Omotoye
Folakemi Omotoye 2018년 7월 23일
댓글: Adam Danz 2018년 7월 24일
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

답변 (1개)

Adam Danz
Adam Danz 2018년 7월 23일
편집: Adam Danz 2018년 7월 23일
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
Folakemi Omotoye
Folakemi Omotoye 2018년 7월 24일
it is a 3D matrix because it represents the RGB values of an image and the single value changing is done for simplicity sake. k changes in value for every iteration. The code did not plot the peaks in a straight line though, it only highlighted the peak in red.thanks for the effort
Adam Danz
Adam Danz 2018년 7월 24일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by