Entering a formula by user

Is there a function which allows me to ask for a formula, while the prgram is beeing used, and subsequently use that formula?

 採用された回答

Nirmal
Nirmal 2012 年 7 月 25 日

0 投票

aMatrix = magic(5);
expression = input('Enter the name of a matrix: ','s');
if (exist(expression,'var'))
mesh(eval(expression))
end

1 件のコメント

Karel
Karel 2012 年 7 月 25 日
thanks, yust what i needed

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

製品

タグ

質問済み:

2012 年 7 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by