Print a Matlab Expression as Text

9 views (last 30 days)
Benjamin Gutierrez
Benjamin Gutierrez on 23 Dec 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 Comments
Walter Roberson
Walter Roberson on 25 Dec 2019
str2func() is more robust than eval()
Benjamin Gutierrez
Benjamin Gutierrez on 25 Dec 2019
Perfect, I'll switch to using that function.
Thank you.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!