[Scilab-users] solve a system of equations in scilab

Rafael Guerra jrafaelbguerra at hotmail.com
Sun Sep 17 13:02:31 CEST 2017


Schlumberger-Private

As suspected you have an obvious typo in your equations, there is a plus that should be a minus:



Sys(1)=(x(1)-2)^2+(x(2) - 2)^2+z^2-9;



-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Hermes
Sent: Sunday, September 17, 2017 12:56 PM
To: users at lists.scilab.org
Subject: Re: [Scilab-users] solve a system of equations in scilab



I've tried migrating the Maple code to Scilab:



<http://mailinglists.scilab.org/file/t497622/from_Maple_fsolve.jpg>



And this is how I do it:

clear;

function Sys=Q(x,z)

Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9;

Sys(2)=x(1)^6+x(2)^6+z^6-12;

endfunction

z=0;

[j,v,info]=fsolve([1.5;-0.9],list(Q,z))

disp(j,v,info)



is there a better way for Scilab?

I would like to get the three result [x1 x2 x3] with x3 = 0.

I am venturing into Scilab for the first time. My experience, not much, is

in Maple!

GRACIAS







--

Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html

_______________________________________________

users mailing list

users at lists.scilab.org<mailto:users at lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170917/29a56682/attachment.htm>


More information about the users mailing list