solving nonlinear equations
Mostrar comentarios más antiguos
Hello,
i tried to work on solving the following equations, so that the code returns values for w and theta. However this does not work in the desired way. I even tried to work with fminsearch. Does somebody know how to solve this problem?
syms w theta;
eq1 = '-0.0889=(-w^0.5*(w-1)^2*(w*(w+2)*sinh(3*theta)+3*sinh(theta)))/(sqrt(2)*(w-1)*(w*cosh(2*theta)+1)^1.5)';
eq2 = '7.2191 =(w^2*((w^4+2*w^+3*w^2-3)*cosh(4*theta)+4*(w+2)*cosh(2*theta))+3*(2*w+1))/(2*(w*cosh(2*theta)+1)^2)';
[w theta]=solve(eq1,eq2,w,theta)
thank you for your help.
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 25 de Abr. de 2012
The expressions do nto need to be strings:
syms w theta;
eq1 = 0.0889+(-w^0.5*(w-1)^2*(w*(w+2)*sinh(3*theta)+3*sinh(theta)))/(sqrt(2)*(w-1)*(w*cosh(2*theta)+1)^1.5); %=0
eq2 = -7.2191 +(w^2*((w^4+2*w^+3*w^2-3)*cosh(4*theta)+4*(w+2)*cosh(2*theta))+3*(2*w+1))/(2*(w*cosh(2*theta)+1)^2); %=0
[w theta]=solve(eq1,eq2,w,theta)
Categorías
Más información sobre Numeric Solvers en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!