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 commentaire

John D'Errico
John D'Errico le 23 Mai 2023
Modifié(e) : John D'Errico le 23 Mai 2023
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Produits

Version

R2016a

Question posée :

le 23 Mai 2023

Modifié(e) :

le 23 Mai 2023

Community Treasure Hunt

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

Start Hunting!

Translated by