How to print mathematical equations in menu
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
Walter Roberson
2020 年 12 月 29 日
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()
回答 (1 件)
Les Beckham
2020 年 12 月 29 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!