solving 5 nonlinear equations and getting error
이전 댓글 표시
so i was solving some equations but i keep getting this error
Error using symengine
DOUBLE cannot convert the input expression into a double array.
Error in sym/double (line 613)
Xstr = mupadmex('symobj::double', S.s, 0);
here is the code:
eq1 = (gcr*10^5)/gamma + z(1) - h2...
- (q3^2 - qt^2)/(2*gravity*A^2) - (0.81*f1*(leqtheo1+sum(l(1:5)))*q1^2)/(gravity*(Di*10^-3)^5);
eq2 = qt - (1+sqrt((leqtheo1+sum(l(1:5)))/(leqtheo2+sum(l))))*q3;
eq3 = v3 - q3/A;
eq4 = re3 - (density*v3*Di*10^-3)/viscosity;
eq5 = f3 - 0.316*re3^-0.25;
x3 = solve(eq1,eq2,eq3,eq4,eq5);
Qtheo(3) = double(x3.qt);
Vtheo(3) = double(x3.v3);
Retheo(3) = double(x3.re3);
Ftheo(3) = double(x3.f3);
댓글 수: 1
John D'Errico
2023년 5월 23일
편집: John D'Errico
2023년 5월 23일
That is not the code, since we cannot execute it. there are many, many undefined variables. How can we know what is in them? And since some of them may contain symbolic expressions themselves, we cannot easily help you.
Make it easy to get help, not difficult. Unless, of course, that is your goal.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!