Grab 20 lines and make a graph

3 ビュー (過去 30 日間)
bozheng
bozheng 2024 年 1 月 18 日
移動済み: Dyuman Joshi 2024 年 1 月 18 日
center_row_data = img(415:435, 1:755);
plot(center_row_data);
title('Central Horizontal Line');
xlabel('Pixel Position');
ylabel('Pixel Value')
But the picture presented looks like there are many strips. Can anyone tell me?
  7 件のコメント
bozheng
bozheng 2024 年 1 月 18 日
移動済み: Dyuman Joshi 2024 年 1 月 18 日
Dyuman Joshi
Dyuman Joshi 2024 年 1 月 18 日
移動済み: Dyuman Joshi 2024 年 1 月 18 日
Try imagesc or image

サインインしてコメントする。

採用された回答

Voss
Voss 2024 年 1 月 18 日
Maybe you want to transpose center_row_data when plotting it.
img = peaks(1000); % some img
center_row_data = img(415:435, 1:755);
subplot(2,1,1)
plot(center_row_data);
title('Plotting each Column as a Line');
subplot(2,1,2)
plot(center_row_data.');
title('Plotting each Row as a Line');

その他の回答 (1 件)

Steven Lord
Steven Lord 2024 年 1 月 18 日
I would suggest looking through the MATLAB Plot Gallery to determine if one of those thumbnail pictures look similar to the type of visualization you want to show. If they do, click the "Open and explore" link below the thumbnail to see an example Live Script in MATLAB Online that shows how to create that type of visualization. Use that as a model to visualize your data.
The example may not create the exact visualization you want, but it should help serve as a good starting point for your own code.

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by