Solving system of nonlinear euations
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Kashif
el 14 de En. de 2015
Comentada: Shoaibur Rahman
el 15 de En. de 2015
In mathematica we use the command NSolve[{x^2 + y^3 == 1, 2 x + 3 y == 4}, {x, y}, Reals] without needing any initial guess to solve a system of non-linear equations. I need the same command in Matlab to solve system of non-linear equations BUT without needing the initial guess. THANKS
4 comentarios
Sara
el 14 de En. de 2015
I don't think you can. You'll have to use fsolve, which requires an initial guess. If it's a mathematical exercise, I'd go with an array of zeros; otherwise, if the eqn represent a physical system, you can use some reasonable values (e.g. mass is usually >= 0).
Respuesta aceptada
Shoaibur Rahman
el 14 de En. de 2015
syms x y
[x,y] = vpasolve(x^2 + y^3 == 1, 2*x + 3*y == 4, x,y)
2 comentarios
Shoaibur Rahman
el 15 de En. de 2015
I see an extra comma (,) in the very last part of the code. ,,x,y,z,s --- remove one comma. It also seems that you have to define Aphi, Bphi........ with n
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!