Borrar filtros
Borrar filtros

How to show results for curves in a graph?

3 visualizaciones (últimos 30 días)
Mr. 206
Mr. 206 el 5 de Feb. de 2019
Comentada: KSSV el 5 de Feb. de 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 comentarios
madhan ravi
madhan ravi el 5 de Feb. de 2019
Not sure what you mean by print but see subplot().
Mr. 206
Mr. 206 el 5 de Feb. de 2019
Editada: Mr. 206 el 5 de Feb. de 2019
For example, If i calculate Sum of Squared error for five curves, i want to see the values in the graph.

Iniciar sesión para comentar.

Respuesta aceptada

KSSV
KSSV el 5 de Feb. de 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 comentarios
Mr. 206
Mr. 206 el 5 de Feb. de 2019
Great!
How can i put "M1", "M2", "M3"...... istead of "mean"?
KSSV
KSSV el 5 de Feb. de 2019
str = cell(3,1) ;
for i = 1:3
str{i} = strcat('M',num2str((i))) ;
end

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by