フィルターのクリア

How to parameterize function.

5 ビュー (過去 30 日間)
abdulsamed kaymakci
abdulsamed kaymakci 2022 年 12 月 3 日
コメント済み: Star Strider 2022 年 12 月 5 日
hi, i created a vector form like given below and i want to replace x y z with t variable like this. P = [t^2 +2*t +3*t; t*t -2*t^2] . but this is a case where x = y = z =t. how can i replace x y and z with t .
syms x y z
P = [x^2 +2*y +3*z; x*y -2*z^2]

採用された回答

Star Strider
Star Strider 2022 年 12 月 3 日
Try something like this —
syms t x y z
P{1} = x^2 +2*y +3*z;
P{2} = x*y -2*z^2;
P = subs(P,{x,y,z},{t,t,t})
P = 
See the documentation on subs for details.
Another option is to create it as a symfun, then choose the arguments to assign to ‘t’.
.
  2 件のコメント
abdulsamed kaymakci
abdulsamed kaymakci 2022 年 12 月 5 日
thanks sir.
Star Strider
Star Strider 2022 年 12 月 5 日
As always, my pleasure!
Also, to get them as a column vector —
syms t x y z
P{1,:} = x^2 +2*y +3*z;
P{2,:} = x*y -2*z^2;
P = subs(P,{x,y,z},{t,t,t})
P = 
.

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

その他の回答 (1 件)

VBBV
VBBV 2022 年 12 月 3 日
syms x y z
P = [x^2 +2*y +3*z; x*y -2*z^2]
subs(P,{x,y,z},{t,t,t})
  1 件のコメント
abdulsamed kaymakci
abdulsamed kaymakci 2022 年 12 月 5 日
thanks sir.

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

カテゴリ

Help Center および File ExchangeFormula Manipulation and Simplification についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by