Not able to solve a differentiation
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dhruv Sangal
am 14 Feb. 2017
Beantwortet: Walter Roberson
am 14 Feb. 2017
Hello all I am trying to use fsolve to solve multiple equations. In one of the equation I am using differentiation with respect to the variable I am solving for for every previous time step. I am getting an error saying Difference N must be a scalar positive integer. I tried using sym but I am not sure how I should proceed with it. I have attached the file with associated text kindly have a look and help me figuring this out.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 14 Feb. 2017
Your code appears to be attempting to differentiate with respect to a numeric value.
syms Tgc1
pq_sym = simplify( diff(0.622*610.78*Rh*exp(a*(Tgc1-273.16)/(Tgc1-b))/(Pa - 610.78*Rh*exp(a*(Tgc1-273.16)/(Tgc1-b))),Tgc1) );
pq = double( subs(pq_sym, Tgc1, Tg(c-1,1)) );
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!