I am trying to solve a non linear equation
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to solve a non linear equation. To solve I am using solve function, for which I am using symbolic variable. My question is how to save that value in numeric. I am solving for temperature it gives me four values in terms of real and imaginary values but I need only one real value, how to do it? the code is as follows for t = 1:nmax Eaa = RH*(610.78*exp(17.27*((Tamb-273.15)/Tamb-36))); ecs = 0.23 + 0.433*((Eaa/Tamb)^(1/8)); I_ir = (ecs*(1 - (nc^2)) + 0.976*(nc^2))*sig*(Tamb^4); if W>1.75 Qc = h1*(W^(0.8)) * (Tg - Tamb); else Qc = h2*(Tg - Tamb); end A = I_s - alp_g*I_s + I_ir - eps_g*sig*Tg^4 - Qc - K*(Tg - 297.15)/0.25; ns = solve(A,Tg); end
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!