Variable in title is appearing as random string characters.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Joe Pashley
le 4 Sep 2019
Commenté : Walter Roberson
le 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:
0 commentaires
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 4 Sep 2019
title( sprintf('Form Removed Data %d x %d',og_rows, og_cols) )
1 commentaire
Steven Lord
le 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 commentaire
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!