Re: [Scilab-users] Optimization

2018-10-25 Thread CRETE Denis
Hello
Is this any better ?
Out=[];
for im=1:3,
alpha=tokens(M(im,6));
numbers=tokens(M(im,7));
for jm=1:size(alpha,'r'),
Out=[Out;[M(im,1:5),alpha(jm),numbers(jm)]];
end;
end;

Note : I dont know of any repeat_vector_string function that would be useful to 
eliminate the inner loop: Out=[Out; [ 
repeat_vector_string(M(im,1:5),size(alpha)),alpha,numbers]]
(equivalent of kronecker operator for strings...)

HTH
Denis

De : users [mailto:users-boun...@lists.scilab.org] De la part de FIXED-TERM 
Nacer Mohamed Ikbal (ETAS/ESY)
Envoyé : jeudi 25 octobre 2018 15:53
À : users@lists.scilab.org
Objet : [Scilab-users] Optimization

Hi,

I have a simple task to split a element of a matrix into rows where remaining 
columns are duplicated. I have achieved that with loops.
I am sure there is an efficient way to do it using matrix functions. Can you 
please help?

The data contains both numbers and strings
the column 6 and 7 has equal numbers of elements delimited by '~'


Given Matrix

1  2  3  4  5  a~b~c~d  
 111~222~333~444
4  5  6  7  6  e~f~g~h~i 
555~666~777~888~999
8  9  10 11 12 j~k~l~m
112~223~334~445
.
.

Output after processing

1  2  3  4  5  a  111
1  2  3  4  5  b  222
1  2  3  4  5  c  333
1  2  3  4  5  d  444
4  5  6  7  6  e  555
4  5  6  7  6  f   666
4  5  6  7  6  g  777
4  5  6  7  6  h  888
4  5  6  7  6  i   999
8  9  10 11 12 j   112
8  9  10 11 12 k  223
8  9  10 11 12 l   334
8  9  10 11 12 m 445
..
..
Mit freundlichen Grüßen / Best regards

Mohamed Ikbal Nacer

Engineering of Systems (ETAS/ESY)
Tel. +49 711 3423-0 | Fax +49 711 3423-300 | 
fixed-term.mohamedikbal.na...@etas.com

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


[Scilab-users] Optimization

2018-10-25 Thread FIXED-TERM Nacer Mohamed Ikbal (ETAS/ESY)
Hi,

I have a simple task to split a element of a matrix into rows where remaining 
columns are duplicated. I have achieved that with loops.
I am sure there is an efficient way to do it using matrix functions. Can you 
please help?

The data contains both numbers and strings
the column 6 and 7 has equal numbers of elements delimited by '~'


Given Matrix

1  2  3  4  5  a~b~c~d  
 111~222~333~444
4  5  6  7  6  e~f~g~h~i 
555~666~777~888~999
8  9  10 11 12 j~k~l~m
112~223~334~445
.
.

Output after processing

1  2  3  4  5  a  111
1  2  3  4  5  b  222
1  2  3  4  5  c  333
1  2  3  4  5  d  444
4  5  6  7  6  e  555
4  5  6  7  6  f   666
4  5  6  7  6  g  777
4  5  6  7  6  h  888
4  5  6  7  6  i   999
8  9  10 11 12 j   112
8  9  10 11 12 k  223
8  9  10 11 12 l   334
8  9  10 11 12 m 445
..
..
Mit freundlichen Grüßen / Best regards

Mohamed Ikbal Nacer

Engineering of Systems (ETAS/ESY)
Tel. +49 711 3423-0 | Fax +49 711 3423-300 | 
fixed-term.mohamedikbal.na...@etas.com


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


Re: [Scilab-users] How to Install SCILAB 5.5.2 on Ubuntu 18.04

2018-10-25 Thread philippe
Hi,

Le 18/10/2018 à 13:23, Samuel Enibe a écrit :
> I have installed SCILAB 6.0.1 on Ubuntu 18.04 but it is experiencing so
> many problems. One of these is the inability to Install modules from ATOMS. 

Each time there is a major upgrade the first versions scilab-*.0.* have
always been bugged and waited toolboxes upgrade for a long time. It's
probably normal for a major upgrade and we have to wait for scilab-6.1.0
release to get something more stable.

> 
> To circumvent this problem, I downloaded the binary version of 5.5.2 and
> installed it using the instructions on SCILAB wiki. Unfortunately, the
> installation does not work at all. 

On the contrary to other major upgrades that's the first time I face the
impossibility to downgrade to older version of scilab. It's a big
problem for me too.
> 
> Is there another way of doing the installation of 5.5.2?

the only way I found is to install the windows binaries on linux with wine :

wine scilab-5.5.2_x64.exe

and then launch scilab with the command line :

wine ~/.wine/drive_c/Program Files/scilab-5.5.2/bin/WScilex.exe

It looks to work until you don't need to increase stacksize.

Best regards,

Philippe

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