How do I create a Greek letter in live editor?

41 views (last 30 days)
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 Comments
Walter Roberson
Walter Roberson on 23 Mar 2022
Omega__dot probably. Single underscore for subscript, double underscore for superscript

Sign in to comment.

Accepted Answer

Rik
Rik on 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 Comment
Walter Roberson
Walter Roberson on 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.

Sign in to comment.

More Answers (0)

Categories

Find more on Labels and Annotations in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!