How can a put a variable into a text string
이전 댓글 표시
I want to put a variable onto a graph.
I have tried text(x,y,'Text ' num2str(variable) ' moretext') with no luck.
The only information I can find is how to put a variable in the title of a graph. I simply want it to be displayed at a location of my choosing on the graph.
댓글 수: 1
Antonia Ciocoiu
2018년 7월 6일
편집: Antonia Ciocoiu
2018년 7월 6일
a=(['Testing',num2str(2)]);
plot(x,y) %% plot your variables
xlabel(a)
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
