Solving a system of two nonlinear equatios
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hello,
I'm new to MatLab and I'm trying to write a program that solves a system of two nonlinear equations in two variables, d and n. The parameters in the two equations are typed by the user with a GUI.
Ds=str2double(get(handles.edit_D,'String'));
P=str2double(get(handles.edit_P,'String'));
H1=str2double(get(handles.edit_H,'String'));
s=str2double(get(handles.edit_s,'String'));
G=81500;
E=206000;
%Now i need to do some operations first, with d and n, so I put syms
syms n d;
H2=H1-s;
sp=H1-Hp;
Di=Ds/0.96;
Dm=Di+d;
%the equations are
(G*d^4)/(8*Dm^3*n)-P/s==0
(G*d*sp)/(pi*n*Dm^2)-0.56*Rm==0
How can I obtain the values of n and d? I need to write an external .m file and use fsolve? In this case, how can I get in the function file the values of the parameters Dm, s, etc.?
Thanks,
Daniele
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!