[Scilab-users] Help me plot y = x^(1/3);

Hector R. Lepez lepezhr at yahoo.com.ar
Fri Mar 9 13:58:15 CET 2018


 This solution worked, could you explain how you put it together? What does it mean to put a sign (x) * ?? Thank you

Héctor Lépez Cel: 154137337 

    El viernes, 9 de marzo de 2018 09:25:18 ART, Stéphane Mottelet <stephane.mottelet at utc.fr> escribió:  
 
  Le 09/03/2018 à 11:57, Hector R. Lepez a écrit :
  
   I have problems to graph the function
        
x=[-10:1:10]

y = x^(1/3);

plot(x,y);

the same in plot of google gives a graph but scilab does anything with the sign.  
  Héctor Lépez
          
  
 _______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
 
 
By default in scilab non-integer power elevation of negative number is made in the complex domain. The particular case of the real cubic root can be treated like this :
 
y = sign(x).*abs(x)^(1/3);
 
otherwise (-1)^(1/3) gives you one of the complex cubic root of -1, namely exp(%i*%pi*1/3)
 
 
S.
 
 -- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet _______________________________________________
users mailing list
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/20180309/80d40dbf/attachment.htm>


More information about the users mailing list