Print a Matlab Expression as Text

8 visualizzazioni (ultimi 30 giorni)
Benjamin Gutierrez
Benjamin Gutierrez il 23 Dic 2019
Hey,
I am creating a GUI in which I would like to display an equation as text.
For example, I have the expression:
z = (z).^2+c;
I would like to print the '(z).^2+c' part of this expression so the user knows which equation is selected.
Is this possible to do?
Thanks,
Ben G
  7 Commenti
Walter Roberson
Walter Roberson il 25 Dic 2019
str2func() is more robust than eval()
Benjamin Gutierrez
Benjamin Gutierrez il 25 Dic 2019
Perfect, I'll switch to using that function.
Thank you.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by