'Plotting the Average Vertical Line

3 ビュー (過去 30 日間)
bozheng
bozheng 2024 年 4 月 1 日
編集済み: Voss 2024 年 4 月 1 日
above is my horizontal Line (picture size: 869×375),but i want change to 178:198
center_row_data = img(415:435, 1:755);
plot(center_row_data);
title('Central Horizontal Line');
xlabel('Pixel Position');
ylabel('Pixel Value')
what should i change
  2 件のコメント
Steven Lord
Steven Lord 2024 年 4 月 1 日
Your question is unclear. You say your picture size is [869 375] but then you tell MATLAB to use columns 1 through 755 of img. Does your image have 375 columns or 755? It's also not clear how 178:198 are relevant: do you want to use those rows of img instead of rows 415:435?
And what do you mean by "average vertical line" -- do you want the line whose data is represented by the center row of your img, do you want the line that is the mean of your data, or do you have some other meaning in mind?
bozheng
bozheng 2024 年 4 月 1 日
I started by analyzing horizontal lines (415-435) and now want "columns" (178-198) instead of horizontal lines,thanks

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

採用された回答

Voss
Voss 2024 年 4 月 1 日
編集済み: Voss 2024 年 4 月 1 日
center_col_data = img(:, 178:198);
And whether you should
plot(center_col_data)
or
plot(center_col_data.')
is not clear to me.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by