Variable in title is appearing as random string characters.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Joe Pashley
am 4 Sep. 2019
Kommentiert: Walter Roberson
am 4 Sep. 2019
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 4 Sep. 2019
title( sprintf('Form Removed Data %d x %d',og_rows, og_cols) )
1 Kommentar
Steven Lord
am 4 Sep. 2019
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)
1 Kommentar
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!