Error using sym/subsindex (line 796)

1 回表示 (過去 30 日間)
Nate Mahorner
Nate Mahorner 2017 年 10 月 19 日
コメント済み: Star Strider 2017 年 10 月 19 日
t1 = 588; %k
do = 3.5; % in
di = 3.0; % in
kp = 21.6; %W/(m*K)
ta = 294; % K
ts = 255.4; %k
h = 48.3; %W/(m^2*K)
deltar = 1; % in of calcium silicate insulation
e = .76;
at = pi*(do+2*deltar);
alm1 = (pi*(do-di))/(log(do/di));
alm2 = (2*pi*deltar)/log(do+2*deltar/do);
o = .0000000567; %W/(M^2*k^4)
d = .5; %do-di(in)
syms t2 t3 ki
eq1 = ki==.044+.0001144*(.5*(t2+t3)-283.333)
eq2 = 1/((d/(2*kp*alm1))+(deltar/ki*alm2))==(h*at(t3-ta)+e*o*at(t3^4-ts^4))/(t1-t3)
eq3 = (2*kp*alm1*(t1-t2))/((d)==h*at(t3-ta)+e*o*at(t3^4-ts^4))
[t2,t3,ki] = vpasolve([eq1,eq2,eq3],[t2,t3,ki],[0 inf;0 1])
t2 = double(t2)
t3 = double(t3)
ki = double(ki)
the error is in the eq2 line, eq1 seems to work fine.
  4 件のコメント
Nate Mahorner
Nate Mahorner 2017 年 10 月 19 日
@star strider I figured it out right before you answered! Thank you so much for the quick help!
Star Strider
Star Strider 2017 年 10 月 19 日
The mystery nevertheless continues, since ‘s’ — either as a function or an array — appears nowhere in your code (that I can see).
Resolved it seems, regardless.

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

採用された回答

Birdman
Birdman 2017 年 10 月 19 日
You forgot to put an operator in front of your at variables in eq2 and eq3. Also, in the vpasolve function, choose your initial guess wisely. If you don't indicate an initial guess for your equations, MATLAB still finds answers. Hope this helps.
  1 件のコメント
Nate Mahorner
Nate Mahorner 2017 年 10 月 19 日
I figured it out right before you answered! Thank you so much for the quick help!

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 10 月 19 日
You have at(t3-ta) and at(t3^4-ts^4) in that line, but at is not a function and and t3-ta and t3^4-ts^4 are not valid indices into the at variable

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by