How do I create a Greek letter in live editor?

41 visualizzazioni (ultimi 30 giorni)
Jack
Jack il 23 Mar 2022
Commentato: Jack il 23 Mar 2022
When I input \omega or \Omega I get the following error message "Error using syms (line 296) Invalid varialbe name. My check of valid variables: exist('omega') comes back 0. Inputing \omega in the command window gets invalid operator for the backslash.
  8 Commenti
Walter Roberson
Walter Roberson il 23 Mar 2022
Omega__dot probably. Single underscore for subscript, double underscore for superscript

Accedi per commentare.

Risposta accettata

Rik
Rik il 23 Mar 2022
Matlab variable names are not allowed to contain rich text. They must start with a-z or A-Z, after which up to 62 characters are allowed, but only a-z, A-Z, 0-9, and the underscore symbol.
All other character sequences are not valid variable names.
  1 Commento
Walter Roberson
Walter Roberson il 23 Mar 2022
That said:
If you use the Symbolic Toolbox with Livescript then results will be rendered. Symbolic names which match Greek letters will be rendered as Greek letters.
This will not happen for traditional matlab command window and will not happen when matlab is displaying the name of the variable.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Labels and Annotations in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by