How to print mathematical equations in menu
1 view (last 30 days)
Show older comments
I'm having trouble with how to print mathematical equation in menu:
Here's my code:
choice = menu("I want to print equation here", 'Plot trajectory', 'Calculate acceleration');
And this is equations i want to print:
x = 3*t - t^3
y = 4*t^2
Any idea how to do this? Thank you very much
1 Comment
Walter Roberson
on 29 Dec 2020
Do they need to be formatted somehow, such as raised exponent? If so then that cannot be done with menu(). Also line break cannot be done with menu()
Answers (1)
Les Beckham
on 29 Dec 2020
I expect that what you want is not as simple as this, but as an initial guess at what you are looking for, try this.
I don't believe that you can get pretty LaTex equations in a menu.
choice = menu(sprintf('%s\n%s', 'x = 3*t - t^3', 'y = 4*t^2'), 'Plot trajectory', 'Calculate acceleration')
0 Comments
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!