Re: [Scilab-users] Booeleans : irrelevant results ?

2015-08-27 Thread Pierre Vuillemin
 

Dear Paul, 

The behaviour of test 2 may come from the order in which the operations
are performed : 

Note that (a  c  b) ~= (b  c  a), indeed : 

- a  c  b performs a  c which returns [] and then []  b which
returns [], 

- b  c  a performs b  c which returns %t and then %t  [] which
returns %t. 

You can obtain the desired behaviour by adding parenthesis 

b  (c  a) returns [] 

but it may be safer to use isempty() to check whether a variable is
empty or not. 

Best regards, 

Pierre 

Le 27.08.2015 12:29, Carrico, Paul a écrit : 

 Dear All, 
 
 I wondering what I'm doing wrong in the examples here bellow: 
 
 - Test 1 à M returns False that's ok for me 
 
 - Test 2 à should return False as well, shouldn't be ? 
 
 - Test 3 à another test using directly a Boolean instead of an empty form [] 
 
 - Test 4 à as expected, it returns F 
 
 Thanks for any highlight 
 
 Paul 
 
 ##
  
 
 mode(0) 
 
 _// test 1_ 
 
 M = []; 
 
 if M then 
 
 printf(M returns T\n); 
 
 else 
 
 printf(M returns F\n); 
 
 end 
 
 _// test 2_ 
 
 a=[]; 
 
 b=30; 
 
 c=200; 
 
 if (b  c  a) then 
 
 printf(val = 6\n); 
 
 else printf(val = []\n); _// should return [] ??_ 
 
 end 
 
 _// test 3_ 
 
 tmp = %f; 
 
 _//tmp = %t;_ 
 
 if (tmp) then 
 
 printf(tmp returns T\n); 
 
 else 
 
 printf(tmp returns F\n); 
 
 end 
 
 _// test 4_ 
 
 t1 = %t; 
 
 t2 = %t; 
 
 _//t3 = %t;_ 
 
 t3 = %f; 
 
 if (t1  t2  t3) then 
 
 printf((t1,t2,t3) returns T\n); 
 
 else 
 
 printf((t1,t2,t3) returns F\n); 
 
 end 
 
 EXPORT CONTROL : 
 Cet email ne contient pas de données techniques
 This email does not contain technical data 
 
 ___
 users mailing list
 users@lists.scilab.org
 http://lists.scilab.org/mailman/listinfo/users [1]

 

Links:
--
[1] http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Typo in Help File

2015-08-27 Thread Keith Smith
Sirs: I just downloaded 5.5.2 for Linux, which I'm running on Scientific Linux.

I opened the Help File (?) and looked for numderivative.

Scilab Help  Optimization and Simulation  numderivative

Under Arguments

f
  a function or a list, the function to differenciate

differenciate

should be

differentiate

Hope you find this useful.

Keith Smith

-- 
Coincidence is what is leftover when the theory isn't good enough -
quoted by John Cleese

Science is the belief in ignorance of experts - Richard Fenyman
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Limit command

2015-08-27 Thread Samuel Gougeon

This likely comes from/with a symbolic toolbox.
For Scilab, the Scimax module interfaces Scilab with Maxima.

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Error while calling 'builder gateway function' using bash script

2015-08-27 Thread Clément David
Hello Lavitha,

Why are you using such a small timeout duration `timeout 1` ? Do you
really expect a 1s scilab startup + compilation ?

 Dear All,
 
 I am trying to call OpenCV codes from scilab and for this I need a
 builder gateway function. While calling the function on the scilab
 console, I do not face any problems, loader gets generated and and I
 am able to call the functions. Now I am trying to call the builder
 file using bash script. It executes and runs till make file as shown
 below:
 
 Generate a gateway file
 Generate a loader file
 Generate a Makefile
 ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to
 TMPDIR
 ilib_gen_Make: Copy libskeleton_cpp9990.c to TMPDIR
 ilib_gen_Make: Copy opencv_imread.cpp to TMPDIR
 ilib_gen_Make: configure : Generate Makefile.
 
 where as the below 3 lines are not generated as it does on Scilab
 console.
 
 ilib_gen_Make: Modification of the Makefile in TMPDIR
 Running the makefile
 Generate a cleaner file

--
Clément
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Limit command

2015-08-27 Thread duce
I have Scimax installed, and it recognizes *syms* but only if i type *Syms*.
However, it doesn't suggest anything on *limit*



--
View this message in context: 
http://mailinglists.scilab.org/Limit-command-tp4032725p4032738.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Booeleans : irrelevant results ?

2015-08-27 Thread Carrico, Paul
Dear All,

I wondering what I'm doing wrong in the examples here bellow:

-  Test 1 -- M returns False that's ok for me

-  Test 2 -- should return False as well, shouldn't be ?

-  Test 3 -- another test using directly a Boolean instead of an empty 
form []

-  Test 4 -- as expected, it returns F

Thanks for any highlight

Paul

##
mode(0)

// test 1
M = [];
if M then
printf(M returns T\n);
else
printf(M returns F\n);
end

// test 2
a=[];
b=30;
c=200;

if (b  c  a) then
printf(val = 6\n);
else printf(val = []\n); // should return [] ??
end

// test 3
tmp = %f;
//tmp = %t;

if (tmp) then
printf(tmp returns T\n);
else
printf(tmp returns F\n);
end

// test 4
t1 = %t;
t2 = %t;
//t3 = %t;
t3 = %f;

if (t1  t2  t3) then
printf((t1,t2,t3) returns T\n);
else
printf((t1,t2,t3) returns F\n);
end

EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Booeleans : irrelevant results ?

2015-08-27 Thread Carrico, Paul
Effectively it is much better to use isempty() function (or ~isempty() in the 
current case) … I didn’t know it so far

Many thanks for your help

Paul

EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data

De : Pierre Vuillemin [mailto:cont...@pierre-vuillemin.fr]
Envoyé : jeudi 27 août 2015 13:08
À : Users mailing list for Scilab
Cc : Carrico, Paul
Objet : Re: [Scilab-users] Booeleans : irrelevant results ?


Dear Paul,

The behaviour of test 2 may come from the order in which the operations are 
performed :



Note that (a  c  b) ~= (b  c  a), indeed :

- a  c  b performs a  c which returns [] and then []  b which returns [],

- b  c  a performs b  c which returns %t and then %t  [] which returns %t.

You can obtain the desired behaviour by adding parenthesis

b  (c  a) returns []

but it may be safer to use isempty() to check whether a variable is empty or 
not.



Best regards,



Pierre



Le 27.08.2015 12:29, Carrico, Paul a écrit :
Dear All,

I wondering what I’m doing wrong in the examples here bellow:

-  Test 1 -- M returns False that’s ok for me

-  Test 2 -- should return False as well, shouldn’t be ?

-  Test 3 -- another test using directly a Boolean instead of an empty 
form []

-  Test 4 -- as expected, it returns F

Thanks for any highlight

Paul

##”
mode(0)

// test 1
M = [];
if M then
printf(M returns T\n);
else
printf(M returns F\n);
end

// test 2
a=[];
b=30;
c=200;

if (b  c  a) then
printf(val = 6\n);
else printf(val = []\n); // should return [] ??
end

// test 3
tmp = %f;
//tmp = %t;

if (tmp) then
printf(tmp returns T\n);
else
printf(tmp returns F\n);
end

// test 4
t1 = %t;
t2 = %t;
//t3 = %t;
t3 = %f;

if (t1  t2  t3) then
printf((t1,t2,t3) returns T\n);
else
printf((t1,t2,t3) returns F\n);
end

EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data


___
users mailing list
users@lists.scilab.orgmailto:users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/usershttps://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_usersd=AwMFaQc=0hKVUfnuoBozYN8UvxPA-wr=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLom=CsJzSea7OehSm_fgX8J6czbmq4kUd-ws1o3meFqpHeks=EFhyGA5WXCbkAbKVE545SI6VDStjViqsaNYDJ3bW3uwe=



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Limit command

2015-08-27 Thread Pablo Fonovich
Hi:

i looked in the scilab help with scimax toolbox loaded, and it finds limit 
function! its a scimax function...
Can you send me what errors appears in the console when you try to execute that 
script? I'm having some troubles with the scilab function roots...

Im using scilab 5.5.2 however...

 Date: Thu, 27 Aug 2015 03:23:06 -0700
 From: dool...@gmail.com
 To: users@lists.scilab.org
 Subject: Re: [Scilab-users] Limit command
 
 I have Scimax installed, and it recognizes *syms* but only if i type *Syms*.
 However, it doesn't suggest anything on *limit*
 
 
 
 --
 View this message in context: 
 http://mailinglists.scilab.org/Limit-command-tp4032725p4032738.html
 Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
 Nabble.com.
 ___
 users mailing list
 users@lists.scilab.org
 http://lists.scilab.org/mailman/listinfo/users
  ___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Limit command

2015-08-27 Thread duce




--
View this message in context: 
http://mailinglists.scilab.org/Limit-command-tp4032725p4032744.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Limit command

2015-08-27 Thread duce
Actually, you're right, it does recognize it. However, there is a problem
with the line with roots command which you mentioned if I'm not mistaking.
This is the error

exec('/home/xubuntu/Desktop/primer.sce', -1)
zp = roots (X1);
!--error 246 
Function not defined for given argument type(s),

  check arguments or define function %sym_roots for overloading.

at line   6 of exec file called by :
exec('/home/xubuntu/Desktop/primer.sce', -1)



--
View this message in context: 
http://mailinglists.scilab.org/Limit-command-tp4032725p4032745.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Limit command

2015-08-27 Thread Pablo Fonovich

]Im sorry, i forgot to tell you that every polynomial in my final script should 
be defined the same way that the first one... 

But the corrected script i send you first should work fine

From: pablo_...@hotmail.com
To: users@lists.scilab.org
Date: Thu, 27 Aug 2015 21:45:46 -0300
Subject: Re: [Scilab-users] Limit command




Hi:
Limit IS a scimax function... i used your script and it worked with some 
modifications...

First of all, the scilab function roots need a variable type polinomial as 
argument... and the symbolic polynomial made by scimas is not this type of 
variable, so we need to use scimax's function sym2poly...
However, sym2poly needs an expanded polynomial as argument... so we first need 
to use expand on the polynomial we want to calculate the roots... So your 
final script should be:

z = %z;
Syms n z1;
z = z1
X =z *(3*z -(5/6) ) /((z -(1/4) )*(z -(1/3) ))
X1 = expand(denom (X));
X1=sym2poly(X1,'z1');
zp = roots(X1);
X1 = z1 *(3* z1 -(5/6) ) /(( z1 -(1/4) )*(z1 -(1/3) ))
F1 = X1 *( z1 ^(n -1) )*(z1 -zp (1) );
F2 = X1 *( z1 ^(n -1) )*(z1 -zp (2) );
h1 = limit (F1 ,z1 ,zp (1) );
disp (h1 , ' h1 [ n]= ' )
h2 = limit (F2 ,z1 ,zp (2) );
disp (h2 , ' h2 [ n]= ' )
h = h1+h2;
disp (h, ' h [ n]= ' )

Now, the differences in your script and mine could be because the version of 
scilab or scimax in which the author programmed that script may not be the 
lasts ones...

I would recommend you to define polynomials with the native scilab functions... 
scilab has enough functions for polynomials... the script would be:

X =poly([0 1],'z','coeff')*poly([-5/6 3],'z','coeff') /(poly([-1/4 
1],'z','coeff')*poly([-1/3 1],'z','coeff') )
X1 = denom (X);
zp = roots(X1);
X1 = z1 *(3* z1 -(5/6) ) /(( z1 -(1/4) )*(z1 -(1/3) ))
F1 = X1 *( z1 ^(n -1) )*(z1 -zp (1) );
F2 = X1 *( z1 ^(n -1) )*(z1 -zp (2) );
h1 = limit (F1 ,z1 ,zp (1) );
disp (h1 , ' h1 [ n]= ' )
h2 = limit (F2 ,z1 ,zp (2) );
disp (h2 , ' h2 [ n]= ' )
h = h1+h2;
disp (h, ' h [ n]= ' )

and the only function from scimax is the limit command
  

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users  
  ___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users