String scalar or character vector must have valid interpreter syntax
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gookki Jeong
am 31 Jul. 2020
Kommentiert: Walter Roberson
am 31 Jul. 2020
Rx(1)= "(cos(seta)-0.3 * sin(seta)) * Rx_" ;
Ry(1)= "(0.3*cos(seta) + sin(seta)) * Ry_";
there are my variable and
I wrote the plot title like this
title(Rx(1)+" + "+Ry(1));
but I recieve this error message,' String scalar or character vector must have valid
interpreter syntax' . How can I fix it?
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 31 Jul. 2020
Bearbeitet: Adam Danz
am 31 Jul. 2020
You probably want something like
title(sprintf('%.2f + %.2f', Rs(1), Ry(1)))
Update
Set interpretter to 'none',
title(Rx(1)+" + "+Ry(1),'Interpreter','none');
3 Kommentare
Adam Danz
am 31 Jul. 2020
I didn't see that the Rx and Ry values had quotes. In the furture, it would be helpful if you format your code using the [>] button in the question/comment editor.
I've updated my answer with the solution.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Argument Definitions 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!