Re: [Scilab-users] numderivative Heart function

2017-12-09 Thread Hermes
Thanks Rafael, with your solution the final script, it seems to me more elegant, and it is of the following form: * funcprot(0); function val = Hxy(x,y) val=(1.25*y-sqrt(abs(x))).^2+x.^2-1; endfunction; x = -1:0.01:1; contour2d(x, 2*x, Hxy, [0 0]); replot([-1.415,-1,1.415,1.415]); function

Re: [Scilab-users] numderivative Heart function

2017-12-08 Thread Rafael Guerra
Hi Hermes, Very confusing problem formulation... To find solutions of Hxy(x,y) with fsolve along the x=0 slice, it might be easier to use a sliced function H0y as input: clear all; function val=Hxy(x, y) val=(1.25*y-sqrt(abs(x))).^2+x.^2-1; endfunction; function z=H0y(y) //

Re: [Scilab-users] numderivative Heart function

2017-12-07 Thread Hermes
Hi, I have interverted x and y in the arguments list of Hxy function (y is the unknown and x the parameter) And I get the expected values. But the graph of the function rotates to the right 90 degrees. How to correct it?

Re: [Scilab-users] numderivative Heart function

2017-12-07 Thread Stéphane Mottelet
Hello, As y is your unknown, you have interverted x and y in the arguments list of Hxy function (y is the unknown and x the parameter) : function val = Hxy(y,x) val=(1.25*y-sqrt(abs(x))).^2+x.^2-1; // switched .^ to ^ to handle vectors endfunction; will dot it. S. Le 07/12/2017 à

Re: [Scilab-users] numderivative Heart function

2017-12-07 Thread Hermes
I wish in this case that x passes as a parameter: function val = Hxy(x,y) val=(1.25*y-sqrt(abs(x))).^2+x.^2-1; // switched .^ to ^ to handle vectors endfunction; x=0.0; yint1=fsolve(1,list(Hxy,x)) ---> (25/16)*y^2-1 disp(yint1) yint2=fsolve(-1,list(Hxy,x)) disp(yint2) the expected value

Re: [Scilab-users] numderivative Heart function

2017-12-05 Thread Hermes
Hello;in this way we can find the extreme or critical points of the Heart function, in Maple: function val = Heart(x1, x2) val=(1.25*x2-sqrt(abs(x1))).^2+x1.^2-1;endfunction;First function resolved with respect to

Re: [Scilab-users] numderivative Heart function

2017-12-01 Thread Rafael Guerra
Hi Hermes, I think you may have a Heart problem: [cid:image001.png@01D36AD7.4286F4D0] The two Hearts do not seem to match. Regards, Rafael ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

Re: [Scilab-users] numderivative Heart function

2017-12-01 Thread Hermes
Help me, why the same function with different procedures to determine the critical points; these differ in the results. What am I not doing correctly or interpreted? * function val = Heart(x1, x2) val=(1.25*x2-sqrt(abs(x1))).^2+x1.^2-1; endfunction; function y = heart_up(x1) y = 4/5 *

Re: [Scilab-users] numderivative Heart function

2017-11-30 Thread Rafael Guerra
Hi Hermes, I do not recall your problem and it would help some explanation. To plot the contours of a gradient with contour2d, you have to make it a scalar (otherwise look at champ, etc.). Check out the edited code below. Note that your gradient does not reach 0 and so a contour |g|=5 is

Re: [Scilab-users] numderivative Heart function

2017-11-30 Thread sgougeon
Hello Hermes, - Mail original - >.../... >function m=g(x1,x2) > > m=[2*x1-(x1.*(1.25*x2-sqrt(abs(x1/abs(x1).^(3/2),2.5*(1.25*x2-sqrt(abs(x1)))]; .. or ./abs(x1) // instead? >.../... >I receive the following alert: > "Function not defined for given argument type (s), check

Re: [Scilab-users] numderivative Heart function

2017-11-30 Thread Hermes
Hi Rafael, This is how I have reproduced your guidelines: * funcprot(0); function val = H(x1, x2) val=(1.25*x2-sqrt(abs(x1))).^2+x1.^2-1; endfunction; function m=g(x1,x2) m=[2*x1-(x1.*(1.25*x2-sqrt(abs(x1/abs(x1).^(3/2),2.5*(1.25*x2-sqrt(abs(x1)))]; endfunction function val

Re: [Scilab-users] numderivative Heart function

2017-10-02 Thread Rafael Guerra
Message- From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Hermes Sent: Monday, October 02, 2017 9:42 AM To: users@lists.scilab.org Subject: [Scilab-users] numderivative Heart function Hola, I would like to find the values of the function for which its derivative is equal to zero

[Scilab-users] numderivative Heart function

2017-10-02 Thread Hermes
Hola, I would like to find the values of the function for which its derivative is equal to zero. function val = Heart(x1, x2) val=(1.25*x2-sqrt(abs(x1))).^2+x1.^2-1; endfunction; I've tried it with the numderivative function. Gracias -- Sent from:

[Scilab-users] numderivative Heart

2017-10-02 Thread Hermes
Hola,I would like to find the values of the function for which its derivative is equal to zero.function val = Heart(x1, x2) val=(1.25*x2-sqrt(abs(x1))).^2+x1.^2-1; // switched ^ to .^ to handle vectorsendfunction;I've tried it with the numderivative function.Gracias -- Sent from: