필터 지우기
필터 지우기

plotting matrix of unknown size

조회 수: 2 (최근 30일)
Gun Min Song
Gun Min Song 2018년 11월 22일
댓글: Gun Min Song 2018년 11월 23일
Hi, I am programming a semiconductor characterization system and I need to plot a matrix consisted of data.
The problem is that my script does not know how many curves it should plot before the program execute.
For example if the user decides to have k curves, then the program will generate matrix M of size 255 by 3*k.
Now I need to tell Matlab to plot curves where X is M(:,3*i+2) and Y is M(:,3*i+1) for i = 0 : k-1.
Is there a simple way to tell this to Matlab? Maybe for loop inside the plot function?
I hope my explanation was clear.

채택된 답변

Walter Roberson
Walter Roberson 2018년 11월 22일
plot( M(:,2:3:3*k-1), M(:, 1:3:3*k-2) )
  댓글 수: 1
Gun Min Song
Gun Min Song 2018년 11월 23일
Thanks for your help!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by