Problem with undefined variable
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I'd like to construct a function Q that has a symbolic expression f(u1,u2,...,ui) as an argument.
The thing is that I don't want to declare f as being an expression of symbolic variables u1,...,ui.
I want Q to do this for me: it receives some expression with u1,...,ui (without these being defined anything) and then it declares these all as symbolic.
Is this possible?
Greets,
Jan
2 件のコメント
Naz
2011 年 11 月 26 日
http://www.mathworks.com/matlabcentral/answers/22107-create-a-function-from-user-input-string
Walter Roberson
2011 年 11 月 26 日
Right, but the solutions referenced there all require passing the expression as a string.
採用された回答
Walter Roberson
2011 年 11 月 26 日
No, in order to do anything close to that, you would have to pass the expression as a string (or as a function handle, or as an inline function)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!