How to evaluate a partial derivative.
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Walter Roberson
le 30 Sep 2016
vars = {P1, P2, P3, T1, T3};
vals = {16.243, 11.595, 12.575, 293.25, 293.25};
subs(DCp_DP1, vars, vals)
0 commentaires
Voir également
Catégories
En savoir plus sur Function Creation dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!