Re: [Scilab-users] The application "scilab-branch-6.1.app" is not open any more.

2020-05-07 Thread Heinz Nabielek
--> getversion()
 ans  =   "scilab-branch-6.1"

but it still says Created: Tuesday, 28. May 2019 at 19:28 after complete reload 
and re-installation.

In any case, everything works perfectly fine, I just a completely upset iMac 
for a few hours...

Heinz


> On 07.05.2020, at 21:08, Stéphane Mottelet  wrote:
> 
> Do you have the latest build (20/04/2020) ?
> 
> S.
> 
>> Le 7 mai 2020 à 20:13, Heinz Nabielek  a écrit :
>> 
>> Suddenly I cannot start. It says
>> The application "scilab-branch-6.1.app" is not open any more.
>> 
>> What to do?
>> 
>> Had worked nicely for a week
>> Heinz
>> 
>> System Version:macOS 10.15.4 (19E287)
>> Kernel Version:Darwin 19.4.0
>> ___
>> users mailing list
>> users@lists.scilab.org
>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
> 
> ___
> 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


[Scilab-users] The application "scilab-branch-6.1.app" is not open any more.

2020-05-07 Thread Heinz Nabielek
Suddenly I cannot start. It says
The application "scilab-branch-6.1.app" is not open any more.

What to do?

Had worked nicely for a week
Heinz

  System Version:   macOS 10.15.4 (19E287)
  Kernel Version:   Darwin 19.4.0
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Variables visibility in functions

2020-05-07 Thread Stéphane Mottelet

Hi again,

Le 07/05/2020 à 21:28, Jakub Kopac a écrit :

Dear Stephane,

thanks for tip, slint can help, but for me it looks like a manual bypass.


Sorry but you were not that clear;

> I need to be sure, that function which I convert from script file, 
will not
> use any variable, which is not in it input, or defined inside the 
function

> itself.
>
I thought you just wanted to identify functions using this sort of 
variable scoping before conversion (to what software ?)
What I need, is that for function in level_1 
(https://wiki.scilab.org/howto/global%20and%20local%20variables 
)

variables from level_0 are not visible.


This is a fundamental feature of variable scope in Scilab. You may find 
it useful or dangerous, but this is just the way it is and cannot be 
disactivated...


S.




is this possible?

BR

JK


št 7. 5. 2020 o 14:40 Stéphane Mottelet > napísal(a):


Hi,

Use Scilab slint tool:

https://help.scilab.org/docs/6.1.0/en_US/slint.html



S.

Le 07/05/2020 à 14:01, kjubo a écrit :
> Dear all,
>
> I would like to ask you, how can I disable visibility of
variables from
> workspace for functions.
>
> I need to be sure, that function which I convert from script
file, will not
> use any variable, which is not in it input, or defined inside
the function
> itself.
>
> Please see examples below.
>
> Is this possible?
>
> Thank you
>
> BR
>
> JK
>
>          example 1:
>
>          a = 3
>          function fx = some_fun(x,a)
>              fx = x+a
>          endfunction
>
>          calling some_fun(5) now return 3+5, but I need to be an
error.
>
>
>          example 2:
>
>          a = 3
>          function fx = some_fun(x)
>              fx = x+a
>          endfunction
>
>          I need also error, as variable a should be passed as
input argument
> or defined inside some_fun body
>
>
>
> --
> Sent from:

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html


> ___
> users mailing list
> users@lists.scilab.org 
>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users



-- 
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@lists.scilab.org 
http://lists.scilab.org/mailman/listinfo/users




___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
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@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Variables visibility in functions

2020-05-07 Thread Jakub Kopac
Dear Stephane,

thanks for tip, slint can help, but for me it looks like a manual bypass.
What I need, is that for function in level_1 (
https://wiki.scilab.org/howto/global%20and%20local%20variables)
variables from level_0 are not visible.

is this possible?

BR

JK


št 7. 5. 2020 o 14:40 Stéphane Mottelet 
napísal(a):

> Hi,
>
> Use Scilab slint tool:
>
> https://help.scilab.org/docs/6.1.0/en_US/slint.html
>
> S.
>
> Le 07/05/2020 à 14:01, kjubo a écrit :
> > Dear all,
> >
> > I would like to ask you, how can I disable visibility of variables from
> > workspace for functions.
> >
> > I need to be sure, that function which I convert from script file, will
> not
> > use any variable, which is not in it input, or defined inside the
> function
> > itself.
> >
> > Please see examples below.
> >
> > Is this possible?
> >
> > Thank you
> >
> > BR
> >
> > JK
> >
> >  example 1:
> >
> >  a = 3
> >  function fx = some_fun(x,a)
> >  fx = x+a
> >  endfunction
> >
> >  calling some_fun(5) now return 3+5, but I need to be an error.
> >
> >
> >  example 2:
> >
> >  a = 3
> >  function fx = some_fun(x)
> >  fx = x+a
> >  endfunction
> >
> >  I need also error, as variable a should be passed as input
> argument
> > or defined inside some_fun body
> >
> >
> >
> > --
> > Sent from:
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> > ___
> > users mailing list
> > users@lists.scilab.org
> >
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>
> --
> 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@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] The application "scilab-branch-6.1.app" is not open any more.

2020-05-07 Thread Stéphane Mottelet
Do you have the latest build (20/04/2020) ?

S.

> Le 7 mai 2020 à 20:13, Heinz Nabielek  a écrit :
> 
> Suddenly I cannot start. It says
> The application "scilab-branch-6.1.app" is not open any more.
> 
> What to do?
> 
> Had worked nicely for a week
> Heinz
> 
>  System Version:macOS 10.15.4 (19E287)
>  Kernel Version:Darwin 19.4.0
> ___
> users mailing list
> users@lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

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


Re: [Scilab-users] Corona modelling

2020-05-07 Thread Heinz Nabielek
And how does it compare with Johns Hopkins?
Heinz



> On 07.05.2020, at 13:49, hdf  wrote:
> 
> and here are the results, with parameters given:  
> 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] Scilab integrator

2020-05-07 Thread hdf
Hi Steve,
If I were you, I would try to use the following Xcos blocks:
 
Hope this helps
HdF



-
Hervé de Foucault

--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Variables visibility in functions

2020-05-07 Thread Stéphane Mottelet
Here is a small example. Although the name of fields of returned struct 
is very cryptic, the information you need can be easily recovered.



mputl(["function [y] = foo(x)"
"y = x + a"
"y = y + b"
"endfunction"],"slint_test.sci")
out  =  slint("slint_test.sci",%f)
if  isfield(out.info,"3.Uninitialized")
s  =  out.info("3.Uninitialized");
for  i=1:length(s)
disp(s(i).msg)
end
end

S.

Le 07/05/2020 à 14:40, Stéphane Mottelet a écrit :

Hi,

Use Scilab slint tool:

https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.1.0/en_US/slint.html 



S.

Le 07/05/2020 à 14:01, kjubo a écrit :

Dear all,

I would like to ask you, how can I disable visibility of variables from
workspace for functions.

I need to be sure, that function which I convert from script file, 
will not
use any variable, which is not in it input, or defined inside the 
function

itself.

Please see examples below.

Is this possible?
 Thank you
 BR
 JK

 example 1:

 a = 3
 function fx = some_fun(x,a)
 fx = x+a
 endfunction

 calling some_fun(5) now return 3+5, but I need to be an error.


 example 2:

 a = 3
 function fx = some_fun(x)
 fx = x+a
 endfunction

 I need also error, as variable a should be passed as input 
argument

or defined inside some_fun body



--
Sent from: 
https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html

___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users 




--
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@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Corona modelling

2020-05-07 Thread hdf
Hello Heinz,
Before comparing with John Hopkins' data and try to identify the different
parameters I wanted to 'improve' the model. I have read several interesting
articles on the web.  One of them
 
, written by David Madore, explains (in french) that the recovery model
would be better at a "constant recovery time" instead of using an
"exponential distribution of probability whose expected value is 1/γ" like
in the traditional SIR model. 
I agree with him because I could recognized a "simple time delay" in his
explanations 
So in the below diagram I replaced the gamma (γ) feedback on the infected
integrator by a variable delay and add a super function diagram  to model
the healthcare system with:
 - One input: infected people per day.
 - Two outputs: Recovered and unfortunately dead people per day.
The other parameters are percentages of 'symtomatic', 'hospitabized',
'Reanimated' and 'dead' people on one hand and delays before being 'healed',
'hopitalized' and 'reanimated', but also 'incubation' time on the other
hand.
 
Here are some of my results:

 
Funny 'infected' curve and its derive right ?
I am thinking of studying the FFT of the real John Hopkings' curves to
identify the delays to put inside my healthcare system model.
But I'm running out of time before I have to work back next monday.
Hervé de Foucault




--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Variables visibility in functions

2020-05-07 Thread Antoine Monmayrant

Hello,

I am not sure to understand what you want to achieve here.
It is not really clear for me.
You might be able to hack something using 'exists" but I am not sure 
that it would fit nicely with the way Scilab is designed...



Antoine


On 07/05/2020 14:01, kjubo wrote:

Dear all,

I would like to ask you, how can I disable visibility of variables from
workspace for functions.

I need to be sure, that function which I convert from script file, will not
use any variable, which is not in it input, or defined inside the function
itself.

Please see examples below.

Is this possible?
 
Thank you
 
BR
 
JK


 example 1:

 a = 3
 function fx = some_fun(x,a)
 fx = x+a
 endfunction

 calling some_fun(5) now return 3+5, but I need to be an error.


 example 2:

 a = 3
 function fx = some_fun(x)
 fx = x+a
 endfunction

 I need also error, as variable a should be passed as input argument
or defined inside some_fun body



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
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] Overloading "inv" and/or "p" does not seem to work with Scilab 6.1.0

2020-05-07 Thread Stéphane Mottelet

Hi,

Le 07/05/2020 à 14:58, CRETE Denis a écrit :

Hello,

I redefined a few functions in Scilab 6.1.0 to extend them to arrays 
with 3 dimensions (formerly called hypermatrix). Overloading works 
with "clean", "multiply", "left division" and "element by element 
division" (after defining functions %s_clean, %s_m_s, %s_l_s and %s_d_s).


clean and element by element division do not need overloading:

--> clean(ones(2,2,2))
 ans  =

(:,:,1)

   1.   1.
   1.   1.
(:,:,2)

   1.   1.
   1.   1.

--> ones(2,2,2)./ones(2,2,2)
 ans  =

(:,:,1)

   1.   1.
   1.   1.
(:,:,2)

   1.   1.
   1.   1.

S.



I tried to overload function "inv" with the following code:

function y=%s_inv(x),
    if ndims(x)>2 then
        for k=1:size(x,3),
            y(:,:,k)=inv(x(:,:,k));
        end;
    else
        y=inv(x);
    end;
endfunction

expecting that each layer of y is the reciprocal of corresponding 
layer of x. Instead,
inv(ones(1,1,2).*.rand(2,2)) returns the reciprocal of x layer 1 in y 
layer 1 AND x LAYER n IN y LAYER n, WHEN n>1. I use "layer" to 
designate the matrix obtain for a fixed value the index along the 3rd 
dimension.


Code to reproduce the problem:

n=4; m=3;
M=ones(1,1,n).*.rand(m,m);
inv(M)

Attempts to circumvent this problem by using M^(-1) instead of inv(M) 
run into the same problem (after redefining function %s_p). Is this a 
bug or did I miss something ?


In the mean time, I avoided overloading the function "inv" and renamed 
"%s_inv" to "inverse" to do successfully call "inverse(M)"...


Best regards
Denis


___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
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@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Overloading "inv" and/or "p" does not seem to work with Scilab 6.1.0

2020-05-07 Thread CRETE Denis
Hello,

I redefined a few functions in Scilab 6.1.0 to extend them to arrays with 3 
dimensions (formerly called hypermatrix). Overloading works with "clean", 
"multiply", "left division" and "element by element division" (after defining 
functions %s_clean, %s_m_s, %s_l_s and %s_d_s).

I tried to overload function "inv" with the following code:

function y=%s_inv(x),
if ndims(x)>2 then
for k=1:size(x,3),
y(:,:,k)=inv(x(:,:,k));
end;
else
y=inv(x);
end;
endfunction

expecting that each layer of y is the reciprocal of corresponding layer of x. 
Instead,
inv(ones(1,1,2).*.rand(2,2)) returns the reciprocal of x layer 1 in y layer 1 
AND x LAYER n IN y LAYER n, WHEN n>1. I use "layer" to designate the matrix 
obtain for a fixed value the index along the 3rd dimension.

Code to reproduce the problem:

n=4; m=3;
M=ones(1,1,n).*.rand(m,m);
inv(M)

Attempts to circumvent this problem by using M^(-1) instead of inv(M) run into 
the same problem (after redefining function %s_p). Is this a bug or did I miss 
something ?

In the mean time, I avoided overloading the function "inv" and renamed "%s_inv" 
to "inverse" to do successfully call "inverse(M)"...

Best regards
Denis

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


Re: [Scilab-users] Variables visibility in functions

2020-05-07 Thread Stéphane Mottelet

Hi,

Use Scilab slint tool:

https://help.scilab.org/docs/6.1.0/en_US/slint.html

S.

Le 07/05/2020 à 14:01, kjubo a écrit :

Dear all,

I would like to ask you, how can I disable visibility of variables from
workspace for functions.

I need to be sure, that function which I convert from script file, will not
use any variable, which is not in it input, or defined inside the function
itself.

Please see examples below.

Is this possible?
 
Thank you
 
BR
 
JK


 example 1:

 a = 3
 function fx = some_fun(x,a)
 fx = x+a
 endfunction

 calling some_fun(5) now return 3+5, but I need to be an error.


 example 2:

 a = 3
 function fx = some_fun(x)
 fx = x+a
 endfunction

 I need also error, as variable a should be passed as input argument
or defined inside some_fun body



--
Sent from: 
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
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@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Variables visibility in functions

2020-05-07 Thread kjubo
Dear all,

I would like to ask you, how can I disable visibility of variables from
workspace for functions.

I need to be sure, that function which I convert from script file, will not
use any variable, which is not in it input, or defined inside the function
itself.

Please see examples below.

Is this possible?

Thank you 

BR

JK

example 1:

a = 3
function fx = some_fun(x,a)
fx = x+a
endfunction

calling some_fun(5) now return 3+5, but I need to be an error.


example 2:

a = 3
function fx = some_fun(x)
fx = x+a
endfunction

I need also error, as variable a should be passed as input argument
or defined inside some_fun body



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Corona modelling

2020-05-07 Thread hdf
and here are the results, with parameters given:

 



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Corona modelling

2020-05-07 Thread hdf
Hello,My contribution, I've done it with Xcos:

where you can play with other parameters like a limited immunization
(delta), deaths (Mu) etc ...I'm thinking to modelize the healthcare system
showing the number of beds saturation effect. But time is missing ...



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users