フィルターのクリア

how to assign values to a large array of symbolic variables in matlab ?

5 ビュー (過去 30 日間)
mahmood hassan
mahmood hassan 2018 年 10 月 9 日
コメント済み: mahmood hassan 2018 年 10 月 9 日
Hi, I want to assign values to symbolic array let values of V=[5 4 5 2 .....4] to X=[x1 x2 x3 .... xn]. as I can get the result like this x1=5, x2=4 and so on.
Can anyone guide me? Thanks in Advance
  1 件のコメント
Stephen23
Stephen23 2018 年 10 月 9 日
編集済み: Stephen23 2018 年 10 月 9 日
You should read this:
And then use subs with a vector (this being the efficient, recommended way to use MATLAB).

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

採用された回答

Walter Roberson
Walter Roberson 2018 年 10 月 9 日
This is possible but firmly recommended against. In nearly any context you are likely to encounter, it is better to subs() the values rather than assign them.
  5 件のコメント
Walter Roberson
Walter Roberson 2018 年 10 月 9 日
X = sym('x', [1,3])
Y = X(1)/5 + cos(X(2))^X(3)
XV = [26, pi/11, 3]
Ynew = subs(Y, X, XV)
mahmood hassan
mahmood hassan 2018 年 10 月 9 日
Thanks alot

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by