コマンドウィンドウの数式表示

7 views (last 30 days)
充 澤村
充 澤村 on 18 May 2020
Answered: Toshinobu Shintai on 18 May 2020
数式の結果を出力したとき,sinやintのような数式が含まれた表示がされるのですが,
1.73205...のように具体的な数値で表示させたい場合はどのようにプログラムを書くといいのでしょうか?
現在表示は,数式にセミコロンをつけない形での表示方法をとっています.

Answers (1)

Toshinobu Shintai
Toshinobu Shintai on 18 May 2020
数式というのは、Symbolic Math Toolboxで使える数式のことでしょうか。
例えば、以下の画像のように「double」という関数でキャストすることで具体的な数値にすることができます。
この画像の元ファイルも添付しています。

Categories

Find more on Symbolic Math Toolbox 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!