How to show results for curves in a graph?

조회 수: 2 (최근 30일)
Mr. 206
Mr. 206 2019년 2월 5일
댓글: KSSV 2019년 2월 5일
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
madhan ravi
madhan ravi 2019년 2월 5일
Not sure what you mean by print but see subplot().
Mr. 206
Mr. 206 2019년 2월 5일
편집: Mr. 206 2019년 2월 5일
For example, If i calculate Sum of Squared error for five curves, i want to see the values in the graph.

댓글을 달려면 로그인하십시오.

채택된 답변

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Directed Graphs에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by