I am trying to solve a non linear equation

1 view (last 30 days)
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

Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!