Make an average curve graph
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1603686/image.jpeg)
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('温度');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1603691/image.jpeg)
4 commentaires
Dyuman Joshi
le 30 Jan 2024
Modifié(e) : Dyuman Joshi
le 22 Mar 2024
Unless mentioned specifically, MATLAB selects the limits on the axes based on the range of your data.
Réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!