How to evaluate a partial derivative.
15 ビュー (過去 30 日間)
古いコメントを表示
I am trying to do propagation of uncertainty for an experiment. I am able to define the derivatives, but I cant figure out how to input the actual values of the variables after the differentiation.
Code starts here:
syms P1 P2 P3 T1 T3
Cp=R_air*((log(P2/P1))/(log((T*(P2/P3))/(T))))
DCp_DP1=diff(Cp,P1)
DCp_DP2=diff(Cp,P2)
DCp_DP3=diff(Cp,P3)
DCp_DT1=diff(Cp,T1)
DCp_DT3=diff(Cp,T3)
Now that MATLAB has taken the partial derivatives, I want to evaluate these derivatives at
P1=16.243, P2=11.595, P3=12.575, T1=293.25, and T3=293.25
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 9 月 30 日
vars = {P1, P2, P3, T1, T3};
vals = {16.243, 11.595, 12.575, 293.25, 293.25};
subs(DCp_DP1, vars, vals)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Function Creation についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!