필터 지우기
필터 지우기

Label scatter data points.

조회 수: 1 (최근 30일)
dipak sanap
dipak sanap 2015년 12월 4일
댓글: dipak sanap 2015년 12월 4일
I have a matrix C as follows;
1 3 0.454 54
3 4 0.478 0.356
7 8 4.564 1546
And I plot, scatter(C(:,3),C(:,4))
I want to label every data point as first two columns of matrix. Like, label (0.454,54) as 1 3, (0.478,0.356) as 3 4 and so on.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 12월 4일
text( C(:,3),C(:,4), cellstr(str2num(C(:,1:2))) )
  댓글 수: 3
Walter Roberson
Walter Roberson 2015년 12월 4일
Sorry, I have been up all night ;-(
text( C(:,3),C(:,4), cellstr(num2str(C(:,1:2))) )
dipak sanap
dipak sanap 2015년 12월 4일
Hey thanks, it worked. And get some sleep.

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

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by