필터 지우기
필터 지우기

Plot multiple lines from a matrix

조회 수: 9 (최근 30일)
Ivy Chen
Ivy Chen 2017년 11월 28일
댓글: Ivy Chen 2017년 11월 28일
I have a 14X897 matrix and I would like to plot 14 lines with individual label (each has the 897 values in Y axis) against the same X axis. Here is the code I have and it generate the "Error using matlab.graphics.chart.primitive.Stair/set Invalid parameter/value pair arguments." error. In this example, PD_G_GLOCA_dBW is the 14*897 matrix.
for gloca_plot=1:size(PD_G_GLOCA_dBW,1)
g_(gloca_plot)=stairs(x5,PD_G_GLOCA_dBW(gloca_plot,:));
end;
hold off;
set(g_(gloca_plot),'DisplayName','GLONASS L1_%s',gloca_plot);

채택된 답변

Walter Roberson
Walter Roberson 2017년 11월 28일
set(g_(gloca_plot),'DisplayName', sprintf('GLONASS L1_%s',gloca_plot));
  댓글 수: 1
Ivy Chen
Ivy Chen 2017년 11월 28일
thanks, I realize making a mistake on the %s, too. After fixing it with %d, it works well.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by