Make an average curve graph

i wrote two code one is 20 line trend another i want to creat an average curve graph , but there is a little strange, It feels like the average will be between 4-6
code1----------------------------
img1 = imread('20230814.jpg');
img = (-0.2./ (-0.3 ./ (46 ./ double(img1) - 1)) + 1) * 5;
center_row_data = img(415:435, 1:755);
subplot(2,1,2)
plot(center_row_data.');
title('Plotting each Row as a Line');
code2---------------------------
img1 = imread('20230814.jpg');
img = (-0.2./ (-0.3 ./ (45.39 ./ double(img1) - 1)) + 1) * 5.3;
center_row_data = img(415:435, 1:755);
average_data = mean(center_row_data, 2);
subplot(2, 1, 2);
plot(average_data);
title('average trend');
xlabel('列');
ylabel('温度');

4 件のコメント

Dyuman Joshi
Dyuman Joshi 2024 年 1 月 30 日
編集済み: Dyuman Joshi 2024 年 1 月 30 日
"but there is a little strange, It feels like the average will be between 4-6"
The average values are, in fact, in between 4 and 6, as can be seen from the plot.
bozheng
bozheng 2024 年 1 月 30 日
well i mean is picture two didn't show it it show 4.3 to 4.6
Dyuman Joshi
Dyuman Joshi 2024 年 1 月 30 日
編集済み: Dyuman Joshi 2024 年 3 月 22 日
Unless mentioned specifically, MATLAB selects the limits on the axes based on the range of your data.
You can change the limits shown on the y-axis via ylim.
Dyuman Joshi
Dyuman Joshi 2024 年 2 月 25 日
移動済み: Dyuman Joshi 2024 年 3 月 22 日
Any updates, @bozheng?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

製品

リリース

R2020a

質問済み:

2024 年 1 月 30 日

編集済み:

2024 年 3 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by