Filter löschen
Filter löschen

Symbols in matlab output

10 Ansichten (letzte 30 Tage)
Sarah Smith
Sarah Smith am 25 Jun. 2020
Bearbeitet: Walter Roberson am 25 Jun. 2020
I want to have the +/- symbol as well as cm ^3 symbol in my code output. I don't know how to code the symbols with fprintf rather than code just the typed out version. My current code reads "fprintf('Body mass changes by = %.5f +/- %.5f cm^3'" which in turn only gives these typed out in the output
  1 Kommentar
madhan ravi
madhan ravi am 25 Jun. 2020

How can we be sure that you won’t edit the question after getting an answer like you did in your previous question?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 25 Jun. 2020
Bearbeitet: Walter Roberson am 25 Jun. 2020
fprintf('Body mass changes by = %.5f ± %.5f cm³\n', value1, value2);
The symbols you can output are those in the "primary plane" of Unicode -- those with unicode position up to U+FFFF . There are a lot of things that does not allow you to output -- for example you would have trouble outputing Γ compared to Γ .

Kategorien

Mehr zu Symbolic Math Toolbox 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!

Translated by