Solving equations that are first parametrically solved

4 ビュー (過去 30 日間)
farzad
farzad 2014 年 12 月 5 日
コメント済み: farzad 2014 年 12 月 7 日
Hi All
if I solve a set of equations first parametrically and I end in something like : C = a^2 + 2 * b +1/R
and then I want to put numbers in a and b and R and get a result for C , how do I do that ?
I mean the code is initiated with
syms a , b , R

採用された回答

Mischa Kim
Mischa Kim 2014 年 12 月 7 日
Farzad, you want to use the subs command
syms a b R
C = a^2 + 2 * b + 1/R;
C_num = subs(C,{a,b,R},{1,2,3})
C_num =
16/3
  1 件のコメント
farzad
farzad 2014 年 12 月 7 日
awesome thaaanks a lot

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by