Variable in title is appearing as random string characters.
조회 수: 5 (최근 30일)
이전 댓글 표시
Running matlab R2019a
Im creating a mesh plot.
Here is my code for the title:
og_rows = 15360
og_cols = 1024
title(['Form Removed Data ',og_rows, 'x', og_cols])
This is following the matlab guidelines here: https://uk.mathworks.com/help/matlab/ref/title.html
This strangely results in this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/236980/image.png)
댓글 수: 0
채택된 답변
추가 답변 (2개)
Steven Lord
2019년 9월 4일
Another option (instead of str2num or sprintf) is to use string operations.
og_rows = 15360;
og_cols = 1024;
title("Form Removed Data " + og_rows + " x " + og_cols)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!