フィルターのクリア

How can I evaluate a multivariable symbolic function for certain input values?

23 ビュー (過去 30 日間)
Baldemy
Baldemy 2017 年 11 月 1 日
コメント済み: Baldemy 2017 年 11 月 1 日
For example, say I've taken the partial derivative of a multivariable expression with variables x1, x2, x3... How can I evaluate that partial derivative by substituting certain values for those variables (the values could be assigned to non symbolic variables or in a matrix)? I realize this can be solved by repeating subs(function, variable, value) until all the variables but a new method would save a lot of time for repeated iterations.

採用された回答

Walter Roberson
Walter Roberson 2017 年 11 月 1 日
subs(symbolic_expression, list_of_variables, list_of_values)
If each value being substituted is a scalar, then list_of_variables can be a symbolic vector and list_of_values can be a numeric vector. If any of the values being substituted are non-scalar then list_of_variables needs to be a cell array of variables, and list_of_values needs to be a cell array of corresponding values.
  1 件のコメント
Baldemy
Baldemy 2017 年 11 月 1 日
Thank you so much. I really should have tried that out first.

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

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by