how define in matlab like c++

14 ビュー (過去 30 日間)
nitzan netzer
nitzan netzer 2018 年 8 月 15 日
編集済み: James Tursa 2018 年 8 月 15 日
hi i am new on matlab, i want to know who i define Constants like gravitation. in c++ it was super easy (define g=9.8) but in matlab i don't understand it.
  1 件のコメント
James Tursa
James Tursa 2018 年 8 月 15 日
編集済み: James Tursa 2018 年 8 月 15 日
If you mean something equivalent to the "const" keyword attribute for a variable, then no MATLAB does not have this capability for basic numeric variables.

サインインしてコメントする。

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2018 年 8 月 15 日
even easier
>> g=9.8
g =
9.8000
  5 件のコメント
nitzan netzer
nitzan netzer 2018 年 8 月 15 日
ok,thank you very much for solution and fast answer very much. it's help me
Walter Roberson
Walter Roberson 2018 年 8 月 15 日
編集済み: Walter Roberson 2018 年 8 月 15 日

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by