フィルターのクリア

Plotting solutions with symbolic variables

1 回表示 (過去 30 日間)
Valerie
Valerie 2023 年 9 月 27 日
コメント済み: Valerie 2023 年 9 月 27 日
I keep getting a syms/sub error for this code. Everything is a constant except for km & Tsp1. How do I solve this error? Very new to MATLAB.
syms Tsp1 km;
xb = (h * P)/ (km * Ac);
mb = sqrt((h*P)/(km*Ac));
neffb = tanh(mb*Lc)/(mb*Lc);
Rthfb = 1/(h*neffb*aff);
Funcb = ((Tw - Ta)*((Li)/(km * Ac))/(Rthfb + ((Li)/(km * Ac)))==(Tw-Tsp1));
Tsp1 = solve(Funcb,Tsp1);
km = linspace(0,100,50);
plot (km,subs(Tsp1,'km',km))

採用された回答

David Hill
David Hill 2023 年 9 月 27 日
h=10;P=100;Ac=5;Lc=17;aff=19;Tw=7;Ta=5;Li=11;%have no idea what your constants are
syms Tsp1 km;
xb = (h * P)/ (km * Ac);
mb = sqrt((h*P)/(km*Ac));
neffb = tanh(mb*Lc)/(mb*Lc);
Rthfb = 1/(h*neffb*aff);
Funcb = ((Tw - Ta)*((Li)/(km * Ac))/(Rthfb + ((Li)/(km * Ac)))==(Tw-Tsp1));
Tsp1 = solve(Funcb,Tsp1);
%km = linspace(.1,100,50);
%plot (km,subs(Tsp1,'km',km))
fplot(Tsp1,[0,100])
  1 件のコメント
Valerie
Valerie 2023 年 9 月 27 日
Hi David, thank you so much for your response! This helped! Thank you!!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by