How to show results for curves in a graph?

1 vue (au cours des 30 derniers jours)
Mr. 206
Mr. 206 le 5 Fév 2019
Commenté : KSSV le 5 Fév 2019
I have a graph with 5 curves. I have certain results for each curve. How can i print them in the graph just like legend?
  2 commentaires
madhan ravi
madhan ravi le 5 Fév 2019
Not sure what you mean by print but see subplot().
Mr. 206
Mr. 206 le 5 Fév 2019
Modifié(e) : Mr. 206 le 5 Fév 2019
For example, If i calculate Sum of Squared error for five curves, i want to see the values in the graph.

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 5 Fév 2019
A = rand(3,10) ;
M = mean(A,2) ;
plot(A')
str = cell(3,1) ;
for i = 1:3
str{i} = strcat('mean=',num2str(A(i))) ;
end
legend(str)
  2 commentaires
Mr. 206
Mr. 206 le 5 Fév 2019
Great!
How can i put "M1", "M2", "M3"...... istead of "mean"?
KSSV
KSSV le 5 Fév 2019
str = cell(3,1) ;
for i = 1:3
str{i} = strcat('M',num2str((i))) ;
end

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by