Problem of Symbolic function evaluation
5 ビュー (過去 30 日間)
古いコメントを表示
syms u [2 1]
f(u) = u'*u;
f(1,2) % Correct syntax the ans is 5
f([1;2]) %Incorrect syntax Symbolic function expected 2 input arguments but received 1.
Why can the input of a function only be two variables, not a vector? What if there are many variables, such as 100 variables? It is too troublesome to input 100 values one by one during evaluation.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Variables, Expressions, Functions, and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
