I am using the following command in scatter plot
uisng the following code
for i = 1:6
text(X(i),Y(i),sprintf('(%d)',Y(i)))
end
I am getting the values in E3 format ...I want only like 2500 instead of 2.5E3 easy to interpet any inputs will be highly helpful .Thank you in advance . I have used format shortG but it change for number not the plots

 채택된 답변

Simon Chan
Simon Chan 2022년 1월 18일

0 개 추천

Another option as follows:
for i = 1:6
text(X(i),Y(i),sprintf('(%.0f)',Y(i)))
end

추가 답변 (1개)

Yusuf Suer Erdem
Yusuf Suer Erdem 2022년 1월 18일

0 개 추천

Before 'text()' command add 'format long' command. it should be hepful.

댓글 수: 1

Prasad Joshi
Prasad Joshi 2022년 1월 18일
No Yusuf same it's showing.... Thank you by the way

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

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

질문:

2022년 1월 18일

댓글:

2022년 1월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by