I am trying to solve a non linear equation
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!