[Scilab-users] unique instruction

2020-05-12 Thread Carrico, Paul
Dear All
In the matrix here after, I want to remove duplicate values in the first column 
but while keeping the second one as it stands ; I guess Scilab while keep the 
first occurrence but it's fine.
I do not remember how to use correctly  "unique" and all my trials failed: can 
somebody help me?
Thanks
Paul

Before :

M = [

0 2

0 6

1 8

2 9

]
After :

M = [

0 2

1 8

2 9

]

 Or

M = [

0 6

1 8

2 9

]


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


Re: [Scilab-users] [EXTERNAL] Count specific values in text file

2020-02-11 Thread Carrico, Paul
Hi

Is that what you're expecting i.e. a way to reshape your matrix among other 
things ?

Paul
##
mode(0)
A=[1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 4 4 5 5 5 5 8 8];

loc = find(A == 1);
occ = size(loc, "*");
printf("Number of occurences = %d",occ);

// reshaping
B=[1 2 3 4 5 6 7 8 9 1 1 1 ;
   1 1 1 4 4 5 5 5 5 8 8 0];
[n,m] = size(B);
C = matrix(B,(n*m),1);

// then look for your specific values



-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de arctica1963
Envoyé : mardi 11 février 2020 13:11
À : users@lists.scilab.org
Objet : [EXTERNAL] [Scilab-users] Count specific values in text file

Hello all,

Basic query. I have text files of Pi and e to a million places and I want to
scan the number for the occurrences of particular values and the separation
of those values in the number.

This code snippet works on a vector:

// create vector of elements

A=[1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 4 4 5 5 5 5 8 8];

// Count number of values, e.g. 1

Val_count1= sum(A==1)

disp(Val_count1) // answer 7

I can open the text file with pinum=mopen('pi-million.txt','rt') - but does
it need to be changed to a vector where each value is an element?. At the
moment the text file is just a single line of numbers (no decimal pint at
the start (e.g. 314159...etc).

Any pointers would be good. Sorry if this is basic one!

Thanks



--
Sent from: 
https://urldefense.com/v3/__http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html__;!!Cn2zSGkVug!dS2Fn2dKbFa5OF5GfEkOTNYlP5qA1dPf0ClsKnbfRbq7V6EWja6b9vP-OaWfFOX5zIqjbi3g$
 
___
users mailing list
users@lists.scilab.org
https://urldefense.com/v3/__http://lists.scilab.org/mailman/listinfo/users__;!!Cn2zSGkVug!dS2Fn2dKbFa5OF5GfEkOTNYlP5qA1dPf0ClsKnbfRbq7V6EWja6b9vP-OaWfFOX5zLxxkxMH$
 
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] gamma function overloading

2019-08-09 Thread Carrico, Paul
Dear All

In the Scilab doc it's mentioned that gamma function can be overloaded by 
complex number, but how to proceed?

A = complex(4,4)
gamma_A = gamma(A)


à la ligne12 de la fonction %s_gamma ( 
C:\scilab-6.0.2\modules\special_functions\macros\%s_gamma.sci ligne 22 ) dans 
la fonction native gamma
%s_gamma: Function not defined for the given argument type.
Check arguments or define function %s_gamma_user() for overloading.




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


[Scilab-users] Scilab and gmsh to plot surfaces

2019-06-27 Thread Carrico, Paul
Dear All

After a tesselation using cgal library (delaunay_2), I used gmsh 
(http://gmsh.info/) to plot the triangles ... just an idea of sharing about 2 
powerful tools :-)
(useful with a huge amount of nodes)

A basic "saddle" surface has been used to test it

Hope it help

Paul

###
clc, mode(0), clear

PATH = get_absolute_file_path("saddle.sce");
fich = mopen(PATH + "/saddle.msh","w");

// saddle surface
function [z]=saddle(x, y)
z = x^2 - y^2
endfunction

n = 100;
x = linspace(-2,2,n)'; // (n,1) matrix
y = linspace(-1,3,n)'; // (n,1) matrix

i = (1:n)'; j = ones(n,1);
X = x .*. j;
Y = j .*. y;
Z = saddle(X,Y);

// ### plot in gmsh ###
// Surface number
SurfaceNumber = 1;

//tri = delaunay_2(X,Y);
triangles = delaunay_2(X',Y');
NumberOfTriangles = size(triangles,"r");

mfprintf(fich,"$MeshFormat\n");
mfprintf(fich,"2.2 0 8\n");
mfprintf(fich,"$EndMeshFormat\n");
// Nodes
mfprintf(fich,"$Nodes\n");
mfprintf(fich,"%d\n",n*n);
i = (1:n*n)';
mfprintf(fich,"%d %g %g %g\n",i,X(i),Y(i),Z(i));
mfprintf(fich,"$EndNodes\n");

// elements
mfprintf(fich,"$Elements\n")
mfprintf(fich,"%d\n",NumberOfTriangles);
i = (1 : NumberOfTriangles)';
SurfaceNumber = SurfaceNumber*ones(NumberOfTriangles,1);
mfprintf(fich,"%d 2 2 %d %d %d %d 
%d\n",i,SurfaceNumber,SurfaceNumber,triangles(i,1),triangles(i,2),triangles(i,3));
mfprintf(fich,"$EndElements\n")
mclose(fich);

// ### plot in scilab ###
scf(0);
drawlater();
f = gcf();
f.figure_size = [1000, 1000];
f.background = color(255,255,255);
a = gca();
a.font_size = 2;
a.x_label.text = '$X$';
a.x_label.font_size = 4;
a.y_label.text = '$Y$';
a.Y_label.font_size = 4;
a.z_label.text = "$\sigma$";
a.z_label.font_size = 4;
plot3d(x, y, feval(x, y, saddle));
drawnow();

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


Re: [Scilab-users] [EXTERNAL] Re: plots remain white under CentOS (redhat based OS) and Scilab 6.0.2

2019-06-27 Thread Carrico, Paul
I’m under CentOS Linux release 7.6.1810 (Core) where all the updates have been 
done … issue with a graphical library?



De : users [mailto:users-boun...@lists.scilab.org] De la part de Adelson 
Oliveira
Envoyé : jeudi 27 juin 2019 11:23
À : International users mailing list for Scilab.
Objet : [EXTERNAL] Re: [Scilab-users] plots remain white under CentOS (redhat 
based OS) and Scilab 6.0.2

Doesn't happen with Scilab 6.01 and Centos 6.9. I'll try with Scilab 6.02.

Em qui, 27 de jun de 2019 5:46 AM, Carrico, Paul 
mailto:paul.carr...@auxitrolweston.com>> 
escreveu:
Dear All

When I’m trying to use either plot2D or plot3D under CentOS, all the figures 
remains white ; I guess it’s a library issue and I think it has ever been 
noticed in the past, but I do not remember what or I cannot find the 
workaround: what it is?

Thanks for your help

Paul
___
users mailing list
users@lists.scilab.org<mailto:users@lists.scilab.org>
http://lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwMFaQ=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=f21cOmHru9hIDDUfkNbFBZu2yH-WXai7E8f7zLYGoO8=1QcN6oQB3T-i5UX27HRxhBBHoGe_Tv5o6YTNBgEJOlw=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] plots remain white under CentOS (redhat based OS) and Scilab 6.0.2

2019-06-27 Thread Carrico, Paul
Dear All

When I'm trying to use either plot2D or plot3D under CentOS, all the figures 
remains white ; I guess it's a library issue and I think it has ever been 
noticed in the past, but I do not remember what or I cannot find the 
workaround: what it is?

Thanks for your help

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


Re: [Scilab-users] [EXTERNAL] How to count pixels

2019-06-03 Thread Carrico, Paul
Hi

Maybe using SIP toolbox and "imread" to convert your image into a matrix?

Paul

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Jean-Philippe 
Grivet
Envoyé : lundi 3 juin 2019 12:08
À : users@lists.scilab.org
Objet : [EXTERNAL] [Scilab-users] How to count pixels

Hello everybody,

Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines 
and arcs, within a region with irregular borders. The backround is 
white, all lines are black. Now I would like to count the number of 
black and white pixels. Any idea on how I could do that ?

Thank you for your help

JP Grivet



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.avast.com_antivirus=DwIGaQ=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=fnhdow1R1g4ghBZVYqlZ-oWAMu6-rfvUuVAPggoe2K4=P96Vk81d-MbQNmiUYSYQz7XQrrkHJlFei0XhAvzFQA8=
 

___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwIGaQ=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=fnhdow1R1g4ghBZVYqlZ-oWAMu6-rfvUuVAPggoe2K4=YltZFEFwlhpEXGIsF8--PjOTA3vikgSNudE5IKAlTh8=
 
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] [EXTERNAL] Re: issue with h5close?

2019-05-28 Thread Carrico, Paul
Thanks Antoine,

I ran the same code under Windows 10 and Scilab crashes, whereas I've no issue 
under Linux (Ubuntu 16.04); I cannot share the files as it stands, but let me 
working on an example to reproduce the issue

Paul

De : users [mailto:users-boun...@lists.scilab.org] De la part de Antoine 
Monmayrant
Envoyé : mardi 28 mai 2019 09:36
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] issue with h5close?

Hello Paul,


Two comments:

1) Could you provide us with a minimum crashing script + h5file to try and 
replicate the issue?
2) It might not be relevant, but in your script "h5" is first a string then a 
h5 handle (after the call to h5open). Did you try using two different variable 
names (h5fname and h5), just in case it is related to your crash?
I remember having weird issues back in the days with graphic handles being 
reused for other kind of variables inside loops or function calls.

Antoine


Le 28/05/2019 à 09:10, Carrico, Paul a écrit :
Hi All

I'm using the latest stable release (6.0.2) in conjunction with cgal add-on for 
Delaunay_2 tessellation, based on data previously recorded in a hdf5 file.

I've been noticing that after a first tessellation, and while the h5 file is 
closed in the routine (h5close(name)), if I rerun a second one Scilab crashes; 
that's the case either under Windows 7 or 10.

h5 = "toto.h5";
h5 = h5open(PATH_DATA + h5,"r");

h5close(h5);

But I've noticed if I manually close the file directly in the console (i.e. a 
second time), then Scilab does not crash anymore.

It is just an observation, and I'm not able to tell more about the issue, but 
it's systematic on my side.

Hope it help

Paul



___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=4fnFEAKm7XnaYWj8I9AMsDSeMi68i06k3wuWMEiebIc=mW1QvoEQR-45_i2gcqy3Dh9SDOpbxXG5Z0lWcJqiOyg=>



--

+++



 Antoine Monmayrant LAAS - CNRS

 7 avenue du Colonel Roche

 BP 54200

 31031 TOULOUSE Cedex 4

 FRANCE



 Tel:+33 5 61 33 64 59



 email : antoine.monmayr...@laas.fr<mailto:antoine.monmayr...@laas.fr>

 permanent email : 
antoine.monmayr...@polytechnique.org<mailto:antoine.monmayr...@polytechnique.org>



+++


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


[Scilab-users] issue with h5close?

2019-05-28 Thread Carrico, Paul
Hi All

I'm using the latest stable release (6.0.2) in conjunction with cgal add-on for 
Delaunay_2 tessellation, based on data previously recorded in a hdf5 file.

I've been noticing that after a first tessellation, and while the h5 file is 
closed in the routine (h5close(name)), if I rerun a second one Scilab crashes; 
that's the case either under Windows 7 or 10.

h5 = "toto.h5";
h5 = h5open(PATH_DATA + h5,"r");

h5close(h5);

But I've noticed if I manually close the file directly in the console (i.e. a 
second time), then Scilab does not crash anymore.

It is just an observation, and I'm not able to tell more about the issue, but 
it's systematic on my side.

Hope it help

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


Re: [Scilab-users] [EXTERNAL] Re: {EXT} unexpected result

2019-05-23 Thread Carrico, Paul
Hi all for the feedback

Indeed it's logical afterward, and it has been made to be fast and efficient 
... but I spent a lot of time in finding my mistake that it uses a 
"local/temporary" index than a "global" one.

I share your suggestion in adding an example in the doc to prevent Scilab 
users, but the question is "where" ?

Paul



-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Dang Ngoc 
Chan, Christophe
Envoyé : jeudi 23 mai 2019 09:14
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] {EXT} unexpected result

Hello Paul,

> De : Carrico, Paul
> Envoyé : mercredi 22 mai 2019 09:51
>
> In the following code,
> I was thinking that the provided index was the one on the “global”
> matrix, but I was wrong ☺ […]
> a2 = find(B(i-1:$,1) < 1); disp(a2);

I would have made the same mistake (-:

Now if we look at the documentation
https://urldefense.proofpoint.com/v2/url?u=https-3A__help.scilab.org_docs_6.0.2_en-5FUS_extraction.html=DwIGaQ=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=h_9KPbMv5WwpOSsz29HjgLF8hOXdEKk2R2dkyVy334w=zrjH9zC_wmeR2sNsnm6LqAH5OhklVr2sn_50F2Z1Fjo=
we read "r=x(i,j) builds the matrix r such as […]"

and
https://urldefense.proofpoint.com/v2/url?u=https-3A__help.scilab.org_docs_6.0.2_en-5FUS_find.html=DwIGaQ=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=h_9KPbMv5WwpOSsz29HjgLF8hOXdEKk2R2dkyVy334w=OYg1le1-U4zV-uuw5ELo1kH_6ne9heq4jXFovUh3B0o=
"If x is a boolean matrix, ii=find(x) returns […]"

so the behaviour seems quite logical.

But it might be a good idea to provide an example such as yours in the 
documentation, at least to preserve our injured self-esteem (we are not the 
only two who have been fooled).

Regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwIGaQ=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=h_9KPbMv5WwpOSsz29HjgLF8hOXdEKk2R2dkyVy334w=X2P0bkSUBEv9LsNxFZbxr_BvXqso_YMPWQxb7TWdNgw=
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] unexpected result

2019-05-22 Thread Carrico, Paul
Hi All,

In the following code, I was thinking that the provided index was the one on 
the "global" matrix, but I was wrong :)
(I guess a copy is performed first in order to be more efficient and to 
speed-up the calculation)

Paul

n = 10;
B = ones(n,1);
i = 6;
B(i,1)=0.55;
a1 = find(B(:,1) < 1); disp(a1);
a2 = find(B(i-1:$,1) < 1); disp(a2);



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


Re: [Scilab-users] [EXTERNAL] Re: feedback on removing 1 row and 1 column

2019-05-03 Thread Carrico, Paul
Thanks Stéphane for your support

Paul

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : vendredi 3 mai 2019 14:35
À : users@lists.scilab.org
Objet : Re: [Scilab-users] [EXTERNAL] Re: feedback on removing 1 row and 1 
column

Hello Paul,

A fix is under review for master at 
https://codereview.scilab.org/#/c/20965/<https://urldefense.proofpoint.com/v2/url?u=https-3A__codereview.scilab.org_-23_c_20965_=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=VqyKaR193dESQu5tjaSxhI_TxGd3wG2--Wc2XKjfM_E=kb-kZMye_5VnWJlIio3o-IPg95SyG_5m_DrfMy59Rks=>,
 I hope it will be reviewed and merged soon (timings are done on my machine, an 
old mid-2010 MacPro) :

--> MAT=rand(2.3e6,6);
--> tic;MAT(:,$)=[];toc
 ans  =

   0.051402

--> MAT=rand(2.3e6,6);
--> tic;MAT(:,[1 3])=[];toc
  ans  =

   0.046928

S.

Le 30/04/2019 à 14:04, Carrico, Paul a écrit :
Thanks all

Indeed, getting the complete block works fine and it's instantaneous

Paul

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : mardi 30 avril 2019 12:41
À : users@lists.scilab.org<mailto:users@lists.scilab.org>
Objet : [EXTERNAL] Re: [Scilab-users] feedback on removing 1 row and 1 column

Le 30/04/2019 à 08:44, Carrico, Paul a écrit :
Dear All

I've been using successfully Scilab for years, to develop my projects; I do not 
remember if I've ever had to deal with huge matrixes but that's the case today.

Using "csvRead", I got a matrix with 2.3 million of rows and 6 columns (it took 
about 240 seconds to read it :)); nevertheless I've been surprised when I tried 
to remove the first row and the last column using basically:
MAT(1,:) = []; MAT(:,$) = [];

in the meantime (before we fix this), you can do

MAT = MAT(:,1:$-1);

which will be way faster !

S.

Indeed I needed to kill the process after about 10 minutes (same result both 
under Windows 10 and Linux - RAM not fully used).

By comparison, the same process is instantaneous under Python using Numpy 
(numpy.delete) using of course the same matrix.

A feedback I wanted to share 

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






___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_2_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_urldefense.proofpoint.com_v2_url-3Fu-3Dhttps-2D3A-5F-5Fantispam.utc.fr-5Fproxy-5F1-5Fc3RlcGhhbmUubW90dGVsZXRAdXRjLmZy-5Flists.scilab.org-5Fmailman-5Flistinfo-5Fusers-26d-3DDwMD-2Dg-26c-3D0hKVUfnuoBozYN8UvxPA-2Dw-26r-3D2R-5FEyw3woK4XVPnEug-5F8oZFQfCE8Ul6UYufxQizYx6k-26m-3D8u-5Fkv9vrBYRsyNeOuOx1-2D8PC4J3mnOk3lTxHZb9M1Ag-26s-3D3ChVco-2DXbUA6A2leK09txfCP6iuWYrDHPV0kJQ-5FfNRo-26e-3D=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=VqyKaR193dESQu5tjaSxhI_TxGd3wG2--Wc2XKjfM_E=USwzfFXxjl2q6TiBJuPeEiPW0oWBm-0vuiJUFRyCKG0=>



--

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<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_2_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_urldefense.proofpoint.com_v2_url-3Fu-3Dhttp-2D3A-5F-5Fwww.utc.fr-5F-2D7Emottelet-26d-3DDwMD-2Dg-26c-3D0hKVUfnuoBozYN8UvxPA-2Dw-26r-3D2R-5FEyw3woK4XVPnEug-5F8oZFQfCE8Ul6UYufxQizYx6k-26m-3D8u-5Fkv9vrBYRsyNeOuOx1-2D8PC4J3mnOk3lTxHZb9M1Ag-26s-3DlgW8LxCQDNlDkDXz-5FlaFa3r-5FBQoToZw3IAT2XDiJNf0-26e-3D=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=VqyKaR193dESQu5tjaSxhI_TxGd3wG2--Wc2XKjfM_E=_zqEBFOwW6L4kO9dyovzAWIo-L92GaEP4TZcRQPMqTI=>



___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=VqyKaR193dESQu5tjaSxhI_TxGd3wG2--Wc2XKjfM_E=5_w9kt1c9r0wdIhGFHL-RDEMO1LWu8EWE2Iwq8IaaTk=>



--

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<https://urldefense.proofpoint.com/v2/

Re: [Scilab-users] [EXTERNAL] Re: feedback on removing 1 row and 1 column

2019-04-30 Thread Carrico, Paul
Thanks all

Indeed, getting the complete block works fine and it's instantaneous

Paul

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : mardi 30 avril 2019 12:41
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] feedback on removing 1 row and 1 column

Le 30/04/2019 à 08:44, Carrico, Paul a écrit :
Dear All

I've been using successfully Scilab for years, to develop my projects; I do not 
remember if I've ever had to deal with huge matrixes but that's the case today.

Using "csvRead", I got a matrix with 2.3 million of rows and 6 columns (it took 
about 240 seconds to read it :)); nevertheless I've been surprised when I tried 
to remove the first row and the last column using basically:
MAT(1,:) = []; MAT(:,$) = [];

in the meantime (before we fix this), you can do

MAT = MAT(:,1:$-1);

which will be way faster !

S.

Indeed I needed to kill the process after about 10 minutes (same result both 
under Windows 10 and Linux - RAM not fully used).

By comparison, the same process is instantaneous under Python using Numpy 
(numpy.delete) using of course the same matrix.

A feedback I wanted to share 

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





___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=8u_kv9vrBYRsyNeOuOx1-8PC4J3mnOk3lTxHZb9M1Ag=3ChVco-XbUA6A2leK09txfCP6iuWYrDHPV0kJQ_fNRo=>



--

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.utc.fr_-7Emottelet=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k=8u_kv9vrBYRsyNeOuOx1-8PC4J3mnOk3lTxHZb9M1Ag=lgW8LxCQDNlDkDXz_laFa3r_BQoToZw3IAT2XDiJNf0=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] feedback on removing 1 row and 1 column

2019-04-30 Thread Carrico, Paul
Dear All

I've been using successfully Scilab for years, to develop my projects; I do not 
remember if I've ever had to deal with huge matrixes but that's the case today.

Using "csvRead", I got a matrix with 2.3 million of rows and 6 columns (it took 
about 240 seconds to read it :)); nevertheless I've been surprised when I tried 
to remove the first row and the last column using basically:
MAT(1,:) = []; MAT(:,$) = [];

Indeed I needed to kill the process after about 10 minutes (same result both 
under Windows 10 and Linux - RAM not fully used).

By comparison, the same process is instantaneous under Python using Numpy 
(numpy.delete) using of course the same matrix.

A feedback I wanted to share 

PaulEXPORT 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] [EXTERNAL] Re: ?==?utf-8?q? images in hdf5 format

2019-03-20 Thread Carrico, Paul
Hello Antoine,



Thanks for this feedback;



As you know, the hdf5 file format is just wonderful to record information's in 
a general way, through the dataset, the attributs and so on, and I'm quite 
happy to use Scilab to manage it. You also have the opportunity to insert 
images (a lot of images) and so on : the hdf5 format becomes self-consistent 
and I particularly appreciate it.



(In addition, on would say that the hdf5 format is becoming the first level of 
another format such as the XDMF, NETCDF for example, very promising for 
visualization topics …



Currently I can insert pictures/fig manually using hdfview, but with dozens of 
images, I'm wondering if I can do it directly with Scilab (inserted in my 
current modelling workflow) ... so this post ; of course the h5 file must be 
“readable” with hdfview/Vitables for example in order to share it with my 
colleagues.



Nb: One thing is missing in my mind (or maybe I missed it), the opportunity to 
compress the data as we can do with h5py libraries for example, in order to 
reduce the final file size (in conjunction with the float format).



Regards



Paul








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




-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Antoine 
Monmayrant
Envoyé : mardi 19 mars 2019 23:53
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] ?==?utf-8?q? images in hdf5 format



Hello Paul,



We do it all the time in our group, from scilab, julia or Labview (and other 
field specific languages).

But as you said, it's just a matter of saving it using h5write (or equivalent) 
either as a matrix (grayscale image) or hypermatrix (rgb, multispectral or 
hyperspectral images).

The only issue with Scilab is to get a proper way to read the image in the 
first place.

Most of the image related atom modules are just unreliable (I mean that if by 
chance one of them is installing and working ok on a specific version of Linux 
or Windows, you have almost no change to get it running on another Linux or 
another Windows version).

But maybe I did not really undertand your question...



Feel free to ask for more specific details.



Cheers,



Antoine





Le Vendredi, Mars 15, 2019 15:12 CET, "Carrico, Paul" 
 a écrit:



> Dear All

>

> I'm currently digging on the net in order to find how to convert (and then 
> insert) images in hdf5 format ... of course using Scilab (an image remains no 
> more no less than a matrix). I can do it manually using hdfview, or I can use 
> h5py library, but I'm wondering if somebody has ever experienced it  using 
> Scilab ?

>

> Thanls

>

> Paul



___

users mailing list

users@lists.scilab.org

https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwIGaQ=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=dhPKDUyUt9zvLnlaGkOF0IVVrbzwsU4BErQRHSfenLs=PChMgzKwd7NNux7IPBnAgJseCS4q5in9aj3YUmUwqPU=
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] images in hdf5 format

2019-03-15 Thread Carrico, Paul
Dear All

I'm currently digging on the net in order to find how to convert (and then 
insert) images in hdf5 format ... of course using Scilab (an image remains no 
more no less than a matrix). I can do it manually using hdfview, or I can use 
h5py library, but I'm wondering if somebody has ever experienced it  using 
Scilab ?

Thanls

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


Re: [Scilab-users] [EXTERNAL] Re: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found

2019-03-01 Thread Carrico, Paul
Well good suggestion and now it works ... but strange since I've 2 machines 
both under Centos 7, and it works on the first one without doing anything, and 
using this workaround on the second one.

(I cannot use plot2d on both, but it's another issue)

Thanks for the suggestion

Paul



De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : vendredi 1 mars 2019 15:24
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] /lib64/libstdc++.so.6: version 
`CXXABI_1.3.8' not found

Hello,

Can you try to load version 2.3.1 version instead ?

atomsInstall(["cglab" "2.3.1"]);

S.

Le 01/03/2019 à 15:17, Carrico, Paul a écrit :
Dear All

Not sure that the issue comes from Scilab itself, but I cannot fix it ; so far 
I've had not trouble using cgal libraries, but on a new machine under Centos 7, 
the error detailed here below occurs and I do not understand why ; I've update 
the profile but it still fails.

Does somebody has ever met it?

Thanks for any feedback

Paul

### Scilab ##
Initialisation :
  Chargement de l'environnement de travail

Start CG-lab
Load macros
Load thirdparties
Load gateways
atomsLoad : Une erreur est survenue au cours du chargement de 'cglab-2.3.2':
exec: error on line #13: "link : La bibliothèque partagée n'a 
pas été chargée: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found 
(required by 
/opt/scilab-6.0.2/share/scilab/contrib/cglab/2.3.2/sci_gateway/c//../../src/cpp/libcgal_cpp.so)"


# profile ##
export 
LD_LIBRARY_PATH=/usr/lib64/libstdc++.so.6:/lib64/libstdc++.so.6:$LD_LIBRARY_PATH



___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=dlTTgGl_hNLUuyRNP2AWWohxR8Arfs-4TW1Wbys0mII=abjNsaaLcB07qZ5BbB8nVRtHMgk9peAFnJxr_RLC9ps=>



--

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.utc.fr_-7Emottelet=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=dlTTgGl_hNLUuyRNP2AWWohxR8Arfs-4TW1Wbys0mII=Fzrqi036g3qlggpSJSbfWI57Z4I0x-eA1sZbfrFcdZU=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found

2019-03-01 Thread Carrico, Paul
Dear All

Not sure that the issue comes from Scilab itself, but I cannot fix it ; so far 
I've had not trouble using cgal libraries, but on a new machine under Centos 7, 
the error detailed here below occurs and I do not understand why ; I've update 
the profile but it still fails.

Does somebody has ever met it?

Thanks for any feedback

Paul

### Scilab ##
Initialisation :
  Chargement de l'environnement de travail

Start CG-lab
Load macros
Load thirdparties
Load gateways
atomsLoad : Une erreur est survenue au cours du chargement de 'cglab-2.3.2':
exec: error on line #13: "link : La bibliothèque partagée n'a 
pas été chargée: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found 
(required by 
/opt/scilab-6.0.2/share/scilab/contrib/cglab/2.3.2/sci_gateway/c//../../src/cpp/libcgal_cpp.so)"


# profile ##
export 
LD_LIBRARY_PATH=/usr/lib64/libstdc++.so.6:/lib64/libstdc++.so.6:$LD_LIBRARY_PATH
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] delaunay_2 issue on windows (feedback)

2019-02-15 Thread Carrico, Paul
Dear all

First of all thanks to Scilab team for the new release.

In the example at the end of this post, I'm wondering why Scilab crashes when 
using tessellation, but only on Windows 7 Professional service pack 1 OS ? It's 
not the first time I'm using it (with success), but here with these new data, 
it fails (it's the case with the previous release as well).

NB: It's work on a previous  "branch" release under Linux but now with the new 
6.0.2 release I've a trouble when loading cgal:

A feedback

Paul

#
Initialisation :
  Chargement de l'environnement de travail

Start CG-lab
Load macros
Load thirdparties
Load gateways
atomsLoad : Une erreur est survenue au cours du chargement de 'cglab-2.3.2':
exec: error on line #13: "link : La bibliothèque partagée n'a pas 
été chargée: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required 
by 
/opt/scilab-6.0.2/share/scilab/contrib/cglab/2.3.2/sci_gateway/c//../../src/cpp/libcgal_cpp.so)"

#
clc, clear, mode(0)

data = [
6.283185307179587 8.60381469727
6.283185307179587 8.725000381469727
6.283185307179587 8.85381469727
6.283185307179587 8.975000381469727
6.283185307179587 9.10381469727
6.283185307179587 9.225000381469727
6.283185307179587 9.35381469727
6.283185307179587 9.475000381469727
6.283185307179587 9.60381469727
6.283185307179587 9.69809265137
6.283185307179587 9.80190734863
6.1766729953605575 8.60381469727
6.1766729953605575 8.725000381469727
6.1766729953605575 8.85381469727
6.1766729953605575 8.975000381469727
6.1766729953605575 9.10381469727
6.1766729953605575 9.225000381469727
6.1766729953605575 9.35381469727
6.1766729953605575 9.475000381469727
6.1766729953605575 9.60381469727
];

triangles_index = delaunay_2(data(:,1)', data(:,2)');

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


[Scilab-users] Scilab crash on a Windows server

2019-02-11 Thread Carrico, Paul
Dear Scilab developers

While my code works on my workstation, I've met the current issue when running 
it on a Windows server 2007 using the current Scilab stable release.

In addition, the troubles come when I'm using h5 instructions (h5ls, h5read and 
so on)

Does this issue have ever been fixed ? if so I guess that a nightly build 
release can be used

Thanks

Paul

Nb: I absolutely need to run it on that server !



Problem signature:
  Problem Event Name:APPCRASH
  Application Name: wscilex.exe
  Application Version:   6.0.1.0
  Application Timestamp: 5a8551b5
  Fault Module Name:  MSVCR120.dll
  Fault Module Version:12.0.21005.1
  Fault Module Timestamp:  524f83ff
  Exception Code:  c01d
  Exception Offset:00093143
  OS Version:  6.0.6002.2.2.0.272.36
  Locale ID: 2057
  Additional Information 1:  6ada
  Additional Information 2:  fca3fe733ee7ca1410f98f05e229e12c
  Additional Information 3:  8be5
  Additional Information 4:  d88bc67e3ca5f123dc5350e3d08104a7

Read our privacy statement:
  http://go.microsoft.com/fwlink/?linkid=50163=0x0409

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


[Scilab-users] nightly build (latest) release

2019-01-31 Thread Carrico, Paul
Just a feedback on the latest branch/nightly build release I downloaded this 
moring:

-  Scilab opens and immediately closes under Windows 7 (64 bits)

-  It does not open and remains blocked without opening  under CentOS 7 
(64 bits)

I'm going back to the old one

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


Re: [Scilab-users] [EXTERNAL] Re: Scilab nighly builds

2019-01-31 Thread Carrico, Paul
Ah yes ...

+1 for Stephane proposal

Paul

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : jeudi 31 janvier 2019 09:27
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] Scilab nighly builds

They are here (bottom of the page)

https://www.scilab.org/about/scilab-open-source-software<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.scilab.org_about_scilab-2Dopen-2Dsource-2Dsoftware=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=j5sYT0RTEH1q_mfar8vsRdgHIcTImKYc-Sh7vf32wi0=hp_Bn3OLHdhj2AcMtepcdgmbHGajAKXwUfI945qAkGo=>

We could suggest to ESI to move them in the download page !

S.

Le 31/01/2019 à 09:07, Carrico, Paul a écrit :
Hi All,

A recent post reminded me that I do not see for a while the nightly builds in 
the download page (since the website has been updated) ; the 6.01 one is nearly 
1 year old

Thus I'm wondering how to get a newer release, even in development ?

Paul




___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=j5sYT0RTEH1q_mfar8vsRdgHIcTImKYc-Sh7vf32wi0=8vLF_OC6hIHP2lpAaIqY-2w2Qr0XxmulnkMaDYzFBAI=>



--

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.utc.fr_-7Emottelet=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=j5sYT0RTEH1q_mfar8vsRdgHIcTImKYc-Sh7vf32wi0=QZSk1-zcM4snBCK8MimeT4OegtGqtsiwaPScbfTOgxY=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Scilab nighly builds

2019-01-31 Thread Carrico, Paul
Hi All,

A recent post reminded me that I do not see for a while the nightly builds in 
the download page (since the website has been updated) ; the 6.01 one is nearly 
1 year old

Thus I'm wondering how to get a newer release, even in development ?

Paul

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


Re: [Scilab-users] [EXTERNAL] Re: acos leads to complex values

2019-01-29 Thread Carrico, Paul
Stephane pointed out on the issue : after calculation and prior to the Acos 
one, some values were "1.0002220446" leading to "acos = 2.107D-08i" 
; in addition he suggested me to use something like 
"acos(max(-1,min(1,-1.0002220446)))" or 
"acos(max(-1,min(1,1.0002220446)))" ... very smart :)

Thanks

Paul





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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : mardi 29 janvier 2019 16:59
À : users@lists.scilab.org
Objet : Re: [Scilab-users] [EXTERNAL] Re: acos leads to complex values

It is the same if x is slightly > 1:

--> x=1+%eps
 x  =

   1.


--> acos(x)
 ans  =

   2.107D-08i

--> format(25); x
 x  =

   1.00000002220446

Le 29/01/2019 à 16:55, Carrico, Paul a écrit :
When I scroll to the list, the lowest (positive) value is 8.4E-08 (works fine) 
and no %eps .

How Can I check if %eps is in?


De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : mardi 29 janvier 2019 16:50
À : users@lists.scilab.org<mailto:users@lists.scilab.org>
Objet : [EXTERNAL] Re: [Scilab-users] acos leads to complex values

Le 29/01/2019 à 16:45, Carrico, Paul a écrit :
Dear All

I spent some time in looking for a mistake in my code ; finally I've found that 
the ACOS of a real vector leads to some complex values (???)


acos(Scar_P(:,1) ./ CM_x_CN(:,1))

Are your really sure, because we may have

--> x=-1-%eps
 x  =

  -1.


--> acos(x)
 ans  =

   3.1415927 - 2.107D-08i

S.




(the formula worked so far)


I checked that the input values are correct:

-  Comprised between [-1; 1] using MIN and MAX

-  Composed only of real values using ISREAL (all the vectors are 
correct)

Thus I do not understand why complex values appear ?

May it come from the vectorization ?

Paul







___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_2_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_urldefense.proofpoint.com_v2_url-3Fu-3Dhttps-2D3A-5F-5Fantispam.utc.fr-5Fproxy-5F1-5Fc3RlcGhhbmUubW90dGVsZXRAdXRjLmZy-5Flists.scilab.org-5Fmailman-5Flistinfo-5Fusers-26d-3DDwMG-2Dg-26c-3D0hKVUfnuoBozYN8UvxPA-2Dw-26r-3D4TCz-2D-2D8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo-26m-3DrN8DsnGalih7CBHModSb9evOi3rmZRFFYcBFHTC71gU-26s-3DRgKyyESZ7uSTxlU7V0nR42XTJybjC0Ar5fDcrouQThE-26e-3D=DwMG-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=gwQYJePMwf66Qkf2heyo1UqhkxA31D8XuF0dNsmnvOg=WFlVbPNytDi1qDLq35P7qeSGnwD6PCRMRL4tKAtS9no=>



--

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<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_2_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_urldefense.proofpoint.com_v2_url-3Fu-3Dhttp-2D3A-5F-5Fwww.utc.fr-5F-2D7Emottelet-26d-3DDwMG-2Dg-26c-3D0hKVUfnuoBozYN8UvxPA-2Dw-26r-3D4TCz-2D-2D8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo-26m-3DrN8DsnGalih7CBHModSb9evOi3rmZRFFYcBFHTC71gU-26s-3D34gC0H3RYWxwcKp7fr4bR5XFfy1acxO72YI9AYJJFhA-26e-3D=DwMG-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=gwQYJePMwf66Qkf2heyo1UqhkxA31D8XuF0dNsmnvOg=Z35_aByfKODglW8yDddkINmGp0XVNG2FnCHehVQ_xic=>



___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMG-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=gwQYJePMwf66Qkf2heyo1UqhkxA31D8XuF0dNsmnvOg=DUbP9Ae1PnplwVsabbz8k-6A-ZRz3dLu7e5o5GI9yqU=>



--

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.utc.fr_-7Emottelet=DwMG-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=gwQYJePMwf66Qkf2heyo1UqhkxA31D8XuF0dNsmnvOg=gdmVN-2pjNdKfA0yL_jVwCc5aMSV0eTSd7Qdt4ClIBo=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] [EXTERNAL] Re: acos leads to complex values

2019-01-29 Thread Carrico, Paul
When I scroll to the list, the lowest (positive) value is 8.4E-08 (works fine) 
and no %eps .

How Can I check if %eps is in?


De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : mardi 29 janvier 2019 16:50
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] acos leads to complex values

Le 29/01/2019 à 16:45, Carrico, Paul a écrit :
Dear All

I spent some time in looking for a mistake in my code ; finally I've found that 
the ACOS of a real vector leads to some complex values (???)


acos(Scar_P(:,1) ./ CM_x_CN(:,1))

Are your really sure, because we may have

--> x=-1-%eps
 x  =

  -1.


--> acos(x)
 ans  =

   3.1415927 - 2.107D-08i

S.




(the formula worked so far)


I checked that the input values are correct:

-  Comprised between [-1; 1] using MIN and MAX

-  Composed only of real values using ISREAL (all the vectors are 
correct)

Thus I do not understand why complex values appear ?

May it come from the vectorization ?

Paul






___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMG-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=rN8DsnGalih7CBHModSb9evOi3rmZRFFYcBFHTC71gU=RgKyyESZ7uSTxlU7V0nR42XTJybjC0Ar5fDcrouQThE=>



--

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.utc.fr_-7Emottelet=DwMG-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=rN8DsnGalih7CBHModSb9evOi3rmZRFFYcBFHTC71gU=34gC0H3RYWxwcKp7fr4bR5XFfy1acxO72YI9AYJJFhA=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] acos leads to complex values

2019-01-29 Thread Carrico, Paul
Dear All

I spent some time in looking for a mistake in my code ; finally I've found that 
the ACOS of a real vector leads to some complex values (???)


acos(Scar_P(:,1) ./ CM_x_CN(:,1))


(the formula worked so far)


I checked that the input values are correct:

-  Comprised between [-1; 1] using MIN and MAX

-  Composed only of real values using ISREAL (all the vectors are 
correct)

Thus I do not understand why complex values appear ?

May it come from the vectorization ?

Paul



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


[Scilab-users] vectorization difficulty

2019-01-15 Thread Carrico, Paul
Dear All

May I ask you advices in order to use vectorization instead of the loop? All 
the  trials I did have failed - the problem I'm confront to comes from the S 
matrix

Thanks for your feedback

Paul



clc
mode(0)
clear

function V=eigen_val(S11, S12, S13, S22, S23, S33)
S_u = [0 S12 S13 ; 0 0 S23 ; 0. 0. 0.];
S_d = [S11 ; S22 ; S33];
S = S_u + S_u' + diag(S_d);
V = gsort(spec(S),'lr','d')'; clear S; clear S_u; clear S_d;
endfunction

n = 10; m = 1;
S11 = rand(n,m);
S22 = rand(n,m);
S33 = rand(n,m);
S12 = rand(n,m);
S23 = rand(n,m);
S13 = rand(n,m);
princ = zeros(n,3);

// with a loop
tic();
princ1 = zeros(n,3*m);
for i = 1 : n
S_u = [0 S12(i,m) S13(i,m) ; 0 0 S23(i,m) ; 0. 0. 0.];
S_d = [S11(i,m) ; S22(i,1) ; S33(i,m)];
S = S_u + S_u' + diag(S_d);
princ1(i,:) = gsort(spec(S),'lr','d')'; clear S; clear S_u; clear S_d;
end
duration1 = toc(); printf("Duration 1 = %g\n",duration1);

// using a function
tic();
princ2 = zeros(n,3*m);
for i = 1 : n
princ2(i,:) = 
eigen_val(S11(i,m),S12(i,m),S13(i,m),S22(i,m),S23(i,m),S33(i,m));
end
duration2 = toc(); printf("Duration 2 = %g\n",duration2);

isequal(princ1,princ2)

// using vectorization (in combination with the function ?)
i = (1:n)';

S = zeros(3,3,n)

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


[Scilab-users] h5write data in a compressed format

2019-01-11 Thread Carrico, Paul
Dear All
Some months ago I used h5py library to write compressed h5 file (using native 
gzip) and Scilab to read it; it worked fine and allowed to deal with several Go 
of data.
Now I would like to write/read huge amount of data using mainly Scilab 
(typically after several csvRead), but I'm wondering if it's to optimize h5 
file size using gzip capability?
HDFview can confirm that using h5write the data are not compressed, and I do 
not see such feature in the help doc.
Thanks for a feedback
Paul

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


Re: [Scilab-users] How to remove 'Nan' in a matrix

2018-11-08 Thread Carrico, Paul
M(isnan(M)) = []
:-)

Thanks Christophe it works fine


-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Dang Ngoc 
Chan, Christophe Envoyé : jeudi 8 novembre 2018 16:04 À : Users mailing list 
for Scilab Objet : [EXTERNAL] Re: [Scilab-users] How to remove 'Nan' in a matrix

Hello Paul,

> De : users [mailto:users-boun...@lists.scilab.org] De la part de 
> Carrico, Paul Envoyé : jeudi 8 novembre 2018 15:54
>
> I'm wondering how I can, remove the 'Nan' that appears in a matrix ( with 
> "find" I guess)?

Not sure what you mean by "remove" but for the matrix M, you can try something 
like

M(isnan(M)) = 0

HTH

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

Public
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwIFAw=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=5MxZksxnKDdWnigvfYU0vPineJ_MKUtJA04CMbCl-BU=PEPq0FNRlHdknIM99pZwt3ax1jO9FxoOeT98mj8DrXE=

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


[Scilab-users] How to remove 'Nan' in a matrix

2018-11-08 Thread Carrico, Paul
Dear All

I'm wondering how I can, remove the 'Nan' that appears in a matrix ( with 
"find" I guess)?

I'm nearly sure it comes from a div with 0. and I think I know why, but I've 2 
options:

-  I can easily remove it and it's not an issue and not relevant for 
the final result (out of scope),

-  Or I can add conditions to avoid this, but it'll drastically speed 
down the CPU time (I'm using vectorization)

Thanks for your support

Paul

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] [EXTERNAL] Re: function and vectorization

2018-11-07 Thread Carrico, Paul
Thanks Stéphane

Works fine and fast (I'm speaking about my application :-) )

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : mercredi 7 novembre 2018 13:40
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] function and vectorization

Hello,

Try:

function [Scar_P]=Scalar_product(C, N, M) // Scalar product



Scar_P = (M(:,1) - C(:,1)).*(N(:,1) - C(:,1)) + (M(:,2) - C(:,2)).*(N(:,2) 
- C(:,2));



//printf("C = (%g,%g)\n",C(1),C(2)); printf("N = (%g,%g)\n",N(1),N(2)); 
printf("M = (%g,%g)\n",M(1),M(2));



endfunction



with (do not transpose N(i,1:2))
i = 1 : n;
Scal(i) = Scalar_product(C(i,:),N(i,1:2),M(i,:))

S.

Le 07/11/2018 à 12:35, Carrico, Paul a écrit :

#
mode(0)
clear

function [Scar_P]=Scalar_product(C, N, M) // Scalar product
Scar_P = (M(1) - C(1))*(N(1) - C(1)) + (M(2) - C(2))*(N(2) - C(2));
printf("C = (%g,%g)\n",C(1),C(2)); printf("N = (%g,%g)\n",N(1),N(2)); 
printf("M = (%g,%g)\n",M(1),M(2));
endfunction

n = 10;

C = rand(n,2);
M = rand(n,2);
N = rand(n,5);

Scal = zeros(n); Scal2 = Scal

printf(" \n");
i = 1 : n;
Scal(i) = Scalar_product(C(i,:),N(i,1:2)',M(i,:))

printf("\n \n");

for i = 1 : n
Scal2(i) = Scalar_product(C(i,:),N(i,1:2)',M(i,:));
end



--

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.utc.fr_-7Emottelet=DwMG-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=4nq72IuY_O4BD4bc-E25iQkCiD8-ZEBjCl6xzxjHbWw=9-ZrmcA1S1rslVYW5SkH4zF_TANcPxDeWItXi95Gqls=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] function and vectorization

2018-11-07 Thread Carrico, Paul
Dear All

Most of the time I've no issue in mixing functions and vectorization, but here 
I don't know why it does not work - one can see that using a vector I, the loop 
is called only ounce and I do not understand why?

I've spent hours in such case  showing I'm not fully at ease with it :-) :-)

Any explanation?

Thanks for your support

Paul

#
mode(0)
clear

function [Scar_P]=Scalar_product(C, N, M) // Scalar product
Scar_P = (M(1) - C(1))*(N(1) - C(1)) + (M(2) - C(2))*(N(2) - C(2));
printf("C = (%g,%g)\n",C(1),C(2)); printf("N = (%g,%g)\n",N(1),N(2)); 
printf("M = (%g,%g)\n",M(1),M(2));
endfunction

n = 10;

C = rand(n,2);
M = rand(n,2);
N = rand(n,5);

Scal = zeros(n); Scal2 = Scal

printf(" \n");
i = 1 : n;
Scal(i) = Scalar_product(C(i,:),N(i,1:2)',M(i,:))

printf("\n \n");

for i = 1 : n
Scal2(i) = Scalar_product(C(i,:),N(i,1:2)',M(i,:));
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] [EXTERNAL] Re : plot3d and param3d

2018-11-06 Thread Carrico, Paul
Indeed, thanks to all

Still there're some aspects I'veto go deeper in under to master it

Paul

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de 
sgoug...@free.fr Envoyé : mardi 6 novembre 2018 12:56 À : Users mailing list 
for Scilab Objet : [EXTERNAL] [Scilab-users] Re : plot3d and param3d

Hello Paul,

Your polyline is directly e2, not any child p2.

Samuel
___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwICAg=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=06xjdU3im4DE2mvBZxSuYXRyj8lt8TS2dyTCsEsq1z4=ViFKyLfML08_3_lTNfsFMm6wOq8_vdGAM4Qg8IBGLd8=

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


[Scilab-users] plot3d and param3d

2018-11-06 Thread Carrico, Paul
Dear All

I'm trying to superimpose a basic line onto a 3D surface, but none of the 
parameters (color, thickness and so on)  I'm trying to implement works: what 
I'm doing wrong?

Thanks for your support

Paul


mode(0);
clear

function [z]=saddle(x, y)
z = x^2 - y^2
endfunction

n = 100;
x = linspace(-2,2,n)'; // (n,1) matrix
y = linspace(-1,3,n)'; // (n,1) matrix
z = feval(x, y, saddle); // (n,n) matrix

Line = [1 -2 -3 ; -2 -2 -3];

// plot
scf(0);
drawlater();
f = gcf();
f.figure_size = [1000, 1000];
f.background = color(255,255,255);
a = gca();
a.font_size = 2;
a.x_label.text = '$X$';
a.x_label.font_size = 4;
a.y_label.text = '$Y$';
a.Y_label.font_size = 4;
a.z_label.text = "$\sigma$";
a.z_label.font_size = 4;
plot3d(x, y, feval(x, y, saddle));
surf = gce();
curve=gce();

param3d(Line(:,1),Line(:,2),Line(:,3));
e2 = gce();
p2 = e2.children;
p2.thickness = 2 ;
p2.foreground = color(255,0,0);
p2.line_Style = 1;
p2.mark_mode="on";
p2.mark_style = 0;
p2.mark_size_unit="tabulated";
p2.mark_size = 1;
p2.mark_foreground = color(255,0,0);
p2.mark_background = color(255,0,0);

drawnow();

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] parallel_run

2018-10-30 Thread Carrico, Paul
Scilab is not probably the best tool to deal with big files (except maybe csv 
ones – but without addition information’s from your side); for your study, I 
suggest you to have a look to python …

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de FIXED-TERM 
Nacer Mohamed Ikbal (ETAS/ESY)
Envoyé : mardi 30 octobre 2018 10:51
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] parallel_run



I think the fact that there is no Multi-Threading system within scilab 
framework is a big drawback.

From: users  On Behalf Of Stéphane Mottelet
Sent: Tuesday, October 30, 2018 10:49 AM
To: Users mailing list for Scilab 
Subject: Re: [Scilab-users] parallel_run

Use Scilab 5.5.2 under Linux.

S.

Le 30 oct. 2018 à 10:44, FIXED-TERM Nacer Mohamed Ikbal (ETAS/ESY) 
mailto:fixed-term.mohamedikbal.na...@etas.com>>
 a écrit :

Hello Again,

In that case what should I do  I want to run code paralley because I have a 
very big file ?



From: users 
mailto:users-boun...@lists.scilab.org>> On 
Behalf Of Arvid Rosén
Sent: Tuesday, October 30, 2018 10:39 AM
To: Users mailing list for Scilab 
mailto:users@lists.scilab.org>>
Subject: Re: [Scilab-users] parallel_run

parallel_run has also been broken on macOS for ages unfortunately. I don’t 
think it was removed though.

Cheers,
Arvid


From: Scilab Users List 
mailto:users-boun...@lists.scilab.org>> on 
behalf of "Carrico, Paul" 
mailto:paul.carr...@esterline.com>>
Reply-To: Users mailing list for Scilab 
mailto:users@lists.scilab.org>>
Date: Tuesday, 30 October 2018 at 10:15
To: 'Users mailing list for Scilab' 
mailto:users@lists.scilab.org>>
Subject: Re: [Scilab-users] parallel_run

Hi

I do not know if it’s still the case, but some time ago, parallel runs were 
only available under Linux and not under Windows

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de FIXED-TERM 
Nacer Mohamed Ikbal (ETAS/ESY)
Envoyé : mardi 30 octobre 2018 10:13
À : users@lists.scilab.org<mailto:users@lists.scilab.org>
Objet : [EXTERNAL] [Scilab-users] parallel_run

Hello Sir\M’m

I am trying to execute parallel_run method but even with I have tried by copy 
pasting the example in the forum

function a=g(arg1)
  a=arg1*arg1
endfunction

res = parallel_run(1:10, g);


but I have the following error: “ Undefined variable: parallel_run”

Thanks in advance.
___
users mailing list
users@lists.scilab.org<mailto:users@lists.scilab.org>
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMGaQ=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=Blvo1n7SxDimsoEOWU_VJPW88Hpdz3AXvr547C6Hbjc=TxShEIqz0kVTe25aefsqQCjAyDxzxeii4TrnU5XMil8=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] parallel_run

2018-10-30 Thread Carrico, Paul
What do you want to do exactly ?



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

De : users [mailto:users-boun...@lists.scilab.org] De la part de FIXED-TERM 
Nacer Mohamed Ikbal (ETAS/ESY)
Envoyé : mardi 30 octobre 2018 10:45
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] parallel_run


Hello Again,

In that case what should I do  I want to run code paralley because I have a 
very big file ?


From: users  On Behalf Of Arvid Rosén
Sent: Tuesday, October 30, 2018 10:39 AM
To: Users mailing list for Scilab 
Subject: Re: [Scilab-users] parallel_run

parallel_run has also been broken on macOS for ages unfortunately. I don’t 
think it was removed though.

Cheers,
Arvid


From: Scilab Users List 
mailto:users-boun...@lists.scilab.org>> on 
behalf of "Carrico, Paul" 
mailto:paul.carr...@esterline.com>>
Reply-To: Users mailing list for Scilab 
mailto:users@lists.scilab.org>>
Date: Tuesday, 30 October 2018 at 10:15
To: 'Users mailing list for Scilab' 
mailto:users@lists.scilab.org>>
Subject: Re: [Scilab-users] parallel_run

Hi

I do not know if it’s still the case, but some time ago, parallel runs were 
only available under Linux and not under Windows

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de FIXED-TERM 
Nacer Mohamed Ikbal (ETAS/ESY)
Envoyé : mardi 30 octobre 2018 10:13
À : users@lists.scilab.org<mailto:users@lists.scilab.org>
Objet : [EXTERNAL] [Scilab-users] parallel_run

Hello Sir\M’m

I am trying to execute parallel_run method but even with I have tried by copy 
pasting the example in the forum

function a=g(arg1)
  a=arg1*arg1
endfunction

res = parallel_run(1:10, g);


but I have the following error: “ Undefined variable: parallel_run”

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


Re: [Scilab-users] parallel_run

2018-10-30 Thread Carrico, Paul
Hi

I do not know if it's still the case, but some time ago, parallel runs were 
only available under Linux and not under Windows

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de FIXED-TERM 
Nacer Mohamed Ikbal (ETAS/ESY)
Envoyé : mardi 30 octobre 2018 10:13
À : users@lists.scilab.org
Objet : [EXTERNAL] [Scilab-users] parallel_run

Hello Sir\M'm

I am trying to execute parallel_run method but even with I have tried by copy 
pasting the example in the forum

function a=g(arg1)
  a=arg1*arg1
endfunction

res = parallel_run(1:10, g);


but I have the following error: " Undefined variable: parallel_run"

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


Re: [Scilab-users] [EXTERNAL] Re: mgetl -> diffrent number of lines

2018-10-16 Thread Carrico, Paul
Unfortunately Scilab crashes now with my ascii file ... the developers can 
contact me to get the later one + the log file generated by Scilab if they are 
interested by

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Samuel Gougeon
Envoyé : lundi 15 octobre 2018 23:26
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] mgetl -> diffrent number of lines

Le 15/10/2018 à 12:40, Carrico, Paul a écrit :
Dear All

I spent some time in finding a mistake in my code ; I finally noticed where the 
issue comes from ...

I'm reading a text file and if I use the windows release instead of the linux 
one, the number of lines is different, even if I use "dos2unix" tool: any idea 
of the origin?

Hello Paul,

This is/was a known issue, for which a complementary fix was included in Scilab 
6.0 branch 3 days ago!
https://codereview.scilab.org/20547<https://urldefense.proofpoint.com/v2/url?u=https-3A__codereview.scilab.org_20547=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=B3nytoPZbARhep7s1mDLyMLJzgPSeDI9yc21MvUBZvY=bspdOMjDRnE-f93U2_v_K6cwWNoMO-E8MTC05CyzRt0=>
So, you shall instal a 6.0 "nightly" built
http://www.scilab.org/en/development/nightly_builds/branch60<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.scilab.org_en_development_nightly-5Fbuilds_branch60=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=B3nytoPZbARhep7s1mDLyMLJzgPSeDI9yc21MvUBZvY=1auJTq1q3Ov-GZyqZTjMdMWeuVKozfyXXFfMaN7mzfM=>
after it will be actually rebuilt after Oct 12, 2018 4:44 PM
(please check the date of the NB sources. It looks OK for the instantaneous 
build:
https://build.scilab.org/view/Scilab%206.0/job/scilab-6.0-windows-64/3811/<https://urldefense.proofpoint.com/v2/url?u=https-3A__build.scilab.org_view_Scilab-25206.0_job_scilab-2D6.0-2Dwindows-2D64_3811_=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=B3nytoPZbARhep7s1mDLyMLJzgPSeDI9yc21MvUBZvY=4RTepZlMWf5V58EwiVJutg4t7uIH8_O1XZS-qcmP_DQ=>)
and try with it.

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


Re: [Scilab-users] [EXTERNAL] Re: mgetl -> diffrent number of lines

2018-10-16 Thread Carrico, Paul
Tanks all for the answers

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Samuel Gougeon
Envoyé : lundi 15 octobre 2018 23:26
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] mgetl -> diffrent number of lines

Le 15/10/2018 à 12:40, Carrico, Paul a écrit :
Dear All

I spent some time in finding a mistake in my code ; I finally noticed where the 
issue comes from ...

I'm reading a text file and if I use the windows release instead of the linux 
one, the number of lines is different, even if I use "dos2unix" tool: any idea 
of the origin?

Hello Paul,

This is/was a known issue, for which a complementary fix was included in Scilab 
6.0 branch 3 days ago!
https://codereview.scilab.org/20547<https://urldefense.proofpoint.com/v2/url?u=https-3A__codereview.scilab.org_20547=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=B3nytoPZbARhep7s1mDLyMLJzgPSeDI9yc21MvUBZvY=bspdOMjDRnE-f93U2_v_K6cwWNoMO-E8MTC05CyzRt0=>
So, you shall instal a 6.0 "nightly" built
http://www.scilab.org/en/development/nightly_builds/branch60<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.scilab.org_en_development_nightly-5Fbuilds_branch60=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=B3nytoPZbARhep7s1mDLyMLJzgPSeDI9yc21MvUBZvY=1auJTq1q3Ov-GZyqZTjMdMWeuVKozfyXXFfMaN7mzfM=>
after it will be actually rebuilt after Oct 12, 2018 4:44 PM
(please check the date of the NB sources. It looks OK for the instantaneous 
build:
https://build.scilab.org/view/Scilab%206.0/job/scilab-6.0-windows-64/3811/<https://urldefense.proofpoint.com/v2/url?u=https-3A__build.scilab.org_view_Scilab-25206.0_job_scilab-2D6.0-2Dwindows-2D64_3811_=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=B3nytoPZbARhep7s1mDLyMLJzgPSeDI9yc21MvUBZvY=4RTepZlMWf5V58EwiVJutg4t7uIH8_O1XZS-qcmP_DQ=>)
and try with it.

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


[Scilab-users] mgetl -> diffrent number of lines

2018-10-15 Thread Carrico, Paul
Dear All

I spent some time in finding a mistake in my code ; I finally noticed where the 
issue comes from ...

I'm reading a text file and if I use the windows release instead of the linux 
one, the number of lines is different, even if I use "dos2unix" tool: any idea 
of the origin?

Thanks

Paul

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] export to Excel with several sheets

2018-10-02 Thread Carrico, Paul
Hi

Thanks for the feedback, nevertheless I think it's not what I would like to do, 
I mean to create a xls file with several sheets to share it.

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Clément DAVID
Envoyé : lundi 1 octobre 2018 12:27
À : Users mailing list for Scilab
Cc : Clément David
Objet : [EXTERNAL] Re: [Scilab-users] export to Excel with several sheets

Dear Paul,

XLS_link [1] could be used to interact with Excel. This basically offer you the 
Excel OLE Automation API inside Scilab [2] and let you drive an Excel runtime 
using Scilab functions. Drawbacks : it requires an Excel licence and is Windows 
only.

[1] : https://atoms.scilab.org/toolboxes/xls_link/
[2] 
https://support.microsoft.com/en-us/help/219151/how-to-automate-microsoft-excel-from-visual-basic

Thanks,

--
Clément

From: users  On Behalf Of Carrico, Paul
Sent: Monday, October 1, 2018 11:20 AM
To: International users mailing list for Scilab. (users@lists.scilab.org) 

Subject: [Scilab-users] export to Excel with several sheets

Dear All

I'm wondering if we can export matrixes from Scilab into Excel, in a single 
file but with several sheets? Obviously the csv format cannot be used here.

Not sure that the (quite old now) XLL project answers to it (I've not seen any 
doc)

Thanks

Paul

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


[Scilab-users] export to Excel with several sheets

2018-10-01 Thread Carrico, Paul
Dear All

I'm wondering if we can export matrixes from Scilab into Excel, in a single 
file but with several sheets? Obviously the csv format cannot be used here.

Not sure that the (quite old now) XLL project answers to it (I've not seen any 
doc)

Thanks

Paul


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] A plane intersecting a surface

2018-09-10 Thread Carrico, Paul
Dear all



Thanks Christophe, Rafael and Stéphane for the first feedback;



Only obvious things in the code hereafter, but it highlights I guess what I 
would like to do (to cross section the surface); the results are not really 
noisy and their number is of about few hundred.



Concerning the Delaunay approach, I thought about it but I've been thinking a 
simplest solution may exist if I can plot the surface (interpolation from the 
grid) ?



Paul



###
mode(0)

function [z]=saddle(x, y)
z = x^2 - y^2
endfunction

function [z]=x_square(x, d)
z = x^2 - d^2
endfunction

function [z]=y_square(y, d)
z = y^2 - d^2
endfunction

// surface making ... of course in the real life the surface comes from 
experimental data (no Cartesian equation is attached on))
n = 50;
x = linspace(-2,2,n)';
y = linspace(-1,3,n)';
z = feval(x,y,saddle);
scf(0);
plot3d(x,y,z);

// obvious cases
// n = (0 1 0) then z = x^2 - d^2
d = 0;
z1 = x_square(x,d);
scf(1);
plot(x,z1);

// n = (1 0 0) then z = d^2 - y^2
d = 0;
z2 = y_square(y,d);
scf(2);
plot(x,z2);









-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Dang Ngoc 
Chan, Christophe
Envoyé : lundi 10 septembre 2018 09:15
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] A plane intersecting a surface



Hello,



> De : users [mailto:users-boun...@lists.scilab.org] De la part de Rafael Guerra

> Envoyé : samedi 8 septembre 2018 14:52

>

> If your cloud of points behaves well enough, you can interpolate it first 
> into a dense



If nobody is expert in this field, then I could invoke a memory when I was a 
student.

I've heard about an algorithm using intercept with tetrahedrons,

it was used for surface rendering.



So you might perform a Delaunay tessellation of your cloud,

determine which tetrahedrons are cut

and determine the coordinates of the intercepts.



Or ask some CGI  specialists.



HTH



Regards





--

Christophe Dang Ngoc Chan

Mechanical calculation engineer



This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.

___

users mailing list

users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwIFAw=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=P1df3Jy1yla9yY6mABJopK4mYcW7v-fqNLKDRWKGljw=Rx09ENmvHowtyMmodOUeRVEG2RZPKzK3Sy4zc7Mw0VM=

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


[Scilab-users] A plane intersecting a surface

2018-09-06 Thread Carrico, Paul
Dear All
I've not been using scilab for a while, but I've a good opportunity to dive 
into it once again ;-)
Is there a tool implemented into Scilab to determine the cross section of a 3D 
(experimental) surface and a plane?
Note that :

-  the curve has not a Cartesian equation and it is composed of a point 
cloud coming for experimental measurement,

-  ideally the tool looks for the closest out of plane points in order 
to perform interpolations
Before reinventing the wheel, I'm wondering if something exists.
Nb: I built a saddle surface, but of course only points (not necessary equally 
spaced) exist in the real life.
Thanks for any advice and suggestion
Paul
function [z]=saddle(x, y)
z = x^2 - y^2
endfunction

// surface making ... of course in the real life the surface comes from 
exprimental data (no cartesian equation is attached on))
n = 50;
x = linspace(-2,2,n)';
y = linspace(-1,3,n)';
z = feval(x,y,saddle);
plot3d(x,y,z);

// plane equation: ax + by + cz + d = 0




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] [EXTERNAL] Re: submatrix issue

2018-06-01 Thread Carrico, Paul
Evstr(resu(k)) is a paste error - I'm reading an asci file :)

Without using a loop, I would like to get the n th component of the vector 
resu(k) ... k is no more no less than the index of specific lines I'm trying to 
get ...

Through your answers I'm understanding that I'm thinking on a bad way

Paul



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

De : users [mailto:users-boun...@lists.scilab.org] De la part de antoine 
monmayrant
Envoyé : vendredi 1 juin 2018 11:55
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] submatrix issue


Hello,



What do you wan to achieve exactly?
As Stéphane pointed out, the sizes are not the same.
When you assign something like:

A=B;

You have two different situations:

1) size(A)==size(B)
2) size(B)=[1,1]

In the first case, you assign each element of B to each element of A. In the 
latter case (which corresponds to your commented line), B is just a scalar that 
gets assigned to each element of A.

In the current situation, you are neither in case 1) nor in case 2).
As you have size(NodesMatrix2(i,j+1))=[300,300] and size(resu(k))=[300,1], you 
might want to replicate resu(k) 300 times and fill NodesMatrix2(i,j+1) with 
these 300 copies. If this what you want to do, here is the code:

NodesMatrix2(i,j+1)=resu(k)*ones(1,300);



By the way, why do you use "evstr(resu(k))" instead of "resu(k)"?



Antoine

Le 01/06/2018 à 11:45, Stéphane Mottelet a écrit :
It cannot work since

--> size(k)
 ans  =

   300.   1.


--> length(i)*length(j)
 ans  =

   9.

i.e. NodesMatrix2(i,j+1) has 9 elements and resu(k) has 300

S.

Le 01/06/2018 à 11:07, Carrico, Paul a écrit :


Dear all

I've a submatrix issue on the following example, and I do not remember (or 
understand) why : how can I do this ?

(the goal is to extract and to store within a matrix results from an Ascii file)

Thanks for any help

Paul

###

mode(0)

clearall

StartNodeLine= 1;

NumberOfNodes= 100;

DimCoordinates= 3;

resu= rand(1000,1);

tic();

NodesMatrix2= zeros(NumberOfNodes,DimCoordinates+1);

i= [1 : NumberOfNodes]'; NodesMatrix2(i,1) = _evstr_(resu(StartNodeLine + 
(DimCoordinates+2)*(i-1)+2));

i= [1 : NumberOfNodes]'.*.ones(1,DimCoordinates)';

j= ones(1,NumberOfNodes)'.*.[1 : DimCoordinates]';

k= StartNodeLine + (DimCoordinates+2)*(i-1)+3+j;

a= _evstr_(resu(k));

NodesMatrix2(i,j+1)= _evstr_(resu(k)); /// does not work/

///NodesMatrix2(i,j+1) = 1; // work(basic assignement)/

Duration2= toc()

*/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<mailto:users@lists.scilab.org>
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=fOPIPj4x1fd9eOUJD7v02ZTsRx2YJgno3lkgkK1O5b8=jzcapXMklHaIuDt_60w1DlJCIqVOV-xY54WDwPzYsNY=>






___

users mailing list

users@lists.scilab.org<mailto:users@lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=fOPIPj4x1fd9eOUJD7v02ZTsRx2YJgno3lkgkK1O5b8=qWqrTkz0H8OBLBxbPldRtat8qjyFFW2cf-apUFUk8wM=>

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


Re: [Scilab-users] [EXTERNAL] Re: submatrix issue

2018-06-01 Thread Carrico, Paul
Thanks Stephane for your answer, nonetheless:

size i = size j = size k = 300. 1.

And if you uncomment the line with assignment to 1, the final size is (100x4) 
as expected
//NodesMatrix2(i,j+1) = 1; // work(basic assignment)

Am I wrong to think that "evstr(resu(k)" assign the n th value of the k vector 
? it has worked for "NodesMatrix2(i,j+1)" ...

Paul
###
mode(0)
clear all

StartNodeLine = 1;
NumberOfNodes = 100;
DimCoordinates = 3;
resu = rand(1000,1);

tic();
NodesMatrix2 = zeros(NumberOfNodes,DimCoordinates+1);
//i = [1 : NumberOfNodes]'; NodesMatrix2(i,1) = evstr(resu(StartNodeLine + 
(DimCoordinates+2)*(i-1)+2));
i = [1 : NumberOfNodes]'.*.ones(1,DimCoordinates)';
j = ones(1,NumberOfNodes)'.*.[1 : DimCoordinates]';
k = StartNodeLine + (DimCoordinates+2)*(i-1)+3+j;

a = evstr(resu(k));

//NodesMatrix2(i,j+1) = evstr(resu(k)); // does not work
NodesMatrix2(i,j+1) = 1; // work
Duration2 = toc()


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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : vendredi 1 juin 2018 11:45
À : users@lists.scilab.org
Objet : [EXTERNAL] Re: [Scilab-users] submatrix issue

It cannot work since

--> size(k)
 ans  =

   300.   1.


--> length(i)*length(j)
 ans  =

   9.

i.e. NodesMatrix2(i,j+1) has 9 elements and resu(k) has 300

S.

Le 01/06/2018 à 11:07, Carrico, Paul a écrit :
Dear all
I've a submatrix issue on the following example, and I do not remember (or 
understand) why : how can I do this ?
(the goal is to extract and to store within a matrix results from an Ascii file)
Thanks for any help
Paul
###
mode()
clear all

StartNodeLine = 1;
NumberOfNodes = 100;
DimCoordinates = 3;
resu = rand(1000,1);

tic();
NodesMatrix2 = zeros(NumberOfNodes,DimCoordinates+1);
i = [1 : NumberOfNodes]'; NodesMatrix2(i,1) = evstr(resu(StartNodeLine + 
(DimCoordinates+2)*(i-1)+2));
i = [1 : NumberOfNodes]'.*.ones(1,DimCoordinates)';
j = ones(1,NumberOfNodes)'.*.[1 : DimCoordinates]';
k = StartNodeLine + (DimCoordinates+2)*(i-1)+3+j;

a = evstr(resu(k));

NodesMatrix2(i,j+1) = evstr(resu(k)); // does not work
//NodesMatrix2(i,j+1) = 1; // work(basic assignement)
Duration2 = toc()




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<mailto:users@lists.scilab.org>

https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=https-3A__antispam.utc.fr_proxy_1_c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy_lists.scilab.org_mailman_listinfo_users=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=04fPhT_QbpiN8oBoi6JwWDBRtpUgIuY5s4aUq3ieOfg=y8LL_brV9V6sopAHxT2aQP3hmtESeECf25ZAXAizixU=>



--

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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.utc.fr_-7Emottelet=DwMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=04fPhT_QbpiN8oBoi6JwWDBRtpUgIuY5s4aUq3ieOfg=T0ehMnqKVv6p0BcBqBHILev-kfq88WBC6ipqAf7pS3s=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] submatrix issue

2018-06-01 Thread Carrico, Paul
Dear all
I've a submatrix issue on the following example, and I do not remember (or 
understand) why : how can I do this ?
(the goal is to extract and to store within a matrix results from an Ascii file)
Thanks for any help
Paul
###
mode(0)
clear all

StartNodeLine = 1;
NumberOfNodes = 100;
DimCoordinates = 3;
resu = rand(1000,1);

tic();
NodesMatrix2 = zeros(NumberOfNodes,DimCoordinates+1);
i = [1 : NumberOfNodes]'; NodesMatrix2(i,1) = evstr(resu(StartNodeLine + 
(DimCoordinates+2)*(i-1)+2));
i = [1 : NumberOfNodes]'.*.ones(1,DimCoordinates)';
j = ones(1,NumberOfNodes)'.*.[1 : DimCoordinates]';
k = StartNodeLine + (DimCoordinates+2)*(i-1)+3+j;

a = evstr(resu(k));

NodesMatrix2(i,j+1) = evstr(resu(k)); // does not work
//NodesMatrix2(i,j+1) = 1; // work(basic assignement)
Duration2 = toc()




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] [EXTERNAL] Problem with solving this elegantly

2018-02-27 Thread Carrico, Paul
Maybe I'm mistaken, but the first matrix sounds like an eigenvalue problem, 
isn't it ?
(I'm not familiar with German ...

If so, did you tried "eigs"?

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Pascal Buehler
Envoyé : mardi 27 février 2018 10:18
À : users
Objet : [EXTERNAL] [Scilab-users] Problem with solving this elegantly

Hello there, i searched in scilab a macro, that can solve me this in an 
elegantly matrix way?

I've really searched something similar to A*X=0, but no linsolver gave me the 
right answer?
[cid:image001.gif@01D3AFB6.6DF1FB00]

with best regards / mit freundlichen Grüssen / cordialement

Pascal Bühler
Qualität-Hardware / Prüfingenieur
SAUTER HeadOffice
Fr. Sauter AG
Im Surinam 55, CH-4016 Basel
Telefon +41 (0)61 695 5646
Telefax +41 (0)61 695 5619
http://www.sauter-controls.com

DISCLAIMER:
This communication, and the information it contains is for the sole use of
the intended recipient. It is confidential, may be legally privileged and
protected by law. Unauthorized use, copying or disclosure of any part
thereof may be unlawful. If you have received this communication in error,
please destroy all copies and kindly notify the sender.

Before printing out this e-mail or its attachments, please consider whether
it is really necessary to do so.
Using less paper helps the environment.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] string and excestr

2018-01-22 Thread Carrico, Paul
Dear All

In the past, I used the following structure to develop my code on several lines 
(until the release 5.5.2) ; in the new one, the 3 dots do not work anymore.

What's now the right sentence ?

Thanks for your help

Paul


s = "...
printf(""Hello !\n""), ...
";
execstr(s)


leads to
s = "...
^^
Erreur : Unexpected end of line in a string.

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


[Scilab-users] Numderivative and integrate

2017-12-11 Thread Carrico, Paul
Dear All,

I'm wondering if there's a way to speed up the following code using both 
"numderivative" and "integrate" ?

I tried to replace the loops by vectors, but it fails ...

Of course this basic example has been put in place in order to test the code - 
I'm working with test results with more than 200 000 measurements.

Thanks for any help and/or suggestions.

Regards

Paul


###
mode(0)

clear

PATH = get_absolute_file_path("test_signal.sce");

// here we generate a sin signal just for testing
Gamma_ampl = 10; // in [g]
Frequency = 100; // in [Hz]
Omega = 2 * %pi * Frequency;
Number_of_periods = 10;

t = [0 : (1/(20 * Frequency)) : (Number_of_periods / Frequency)];
Acceleration = Gamma_ampl *sin(Omega * t);
Signal = [t ; Acceleration];

scf()
plot(t,Acceleration,'g');
xtitle('Ref curve - accelerogram','t','$\gamma \mbox{[m/s$^{2}$]}$');
xs2png(gcf(),'Accelerogram.png');

// signal first derivation : y' = (Omega * Gamma_ampl)*cos(Omega * t)
Acceleration_prime = (Omega * Gamma_ampl) * cos(Omega * t);

// calculation of the jerk -> numerical derivative
function y=Gamma_function(x)
y = interpln(Signal,x)
endfunction

n = size(t,'*');
Numl_Gamma_derrivative = zeros(2,n);
Numl_Gamma_derrivative(1,:) = t;

tic();
for i = 1 : n
Numl_Gamma_derrivative(2,i) = numderivative(Gamma_function, 
Numl_Gamma_derrivative(1,i),1e-3,order=4);
end
Numederivative_duration = toc();

scf()
plot(Numl_Gamma_derrivative(1,:),Numl_Gamma_derrivative(2,:),'b')
plot(t,Acceleration_prime,'ro')
xtitle('Jerk - numerical derivation vs derivative formula','t','$\mbox{J 
[m/s}^{3}\mbox{]}$');
legend('Numerical','Reference',opt=1);
xs2png(gcf(),'Jerk.png');

// calculation of the speed
Speed_ref = (Gamma_ampl / Omega) * (1 - cos(Omega * t));

Speed_num_integration = zeros(2,n);
Speed_num_integration(1,:) = t;
tic();
Speed_num_integration(2,:) = integrate('Gamma_function','x',0,t);
First_integrate_duration = toc();

scf()
plot(Speed_num_integration(1,:),Speed_num_integration(2,:),'m')
plot(t,Speed_ref,'cd')
xtitle('Speed - numerical integration vs antiderivative formula','t','v [m/s]');
legend('Numerical','Reference',opt=1);
xs2png(gcf(),'Speed.png');


// calculation of the displacement
Displ_ref = (Gamma_ampl / Omega) * (t - (sin(Omega * t)/Omega));

function y=Speed_function(x)
y = interpln(Speed_num_integration,x)
endfunction

Displ_num_integration = zeros(2,n);
Displ_num_integration(1,:) = t;
tic();
Displ_num_integration(2,:) = integrate('Speed_function','x',0,t);
Second_integrate_duration = toc();

scf()
plot(Displ_num_integration(1,:),Displ_num_integration(2,:),'r')
plot(t,Displ_ref,'b>');
xtitle('Displacement - numerical integration vs antiderivative 
formula','t','$\delta \mbox{ [m]}$');
legend('Numerical','Reference',opt=4);
xs2png(gcf(),'Displacements.png');

// information's
printf("The duration for Numederivative = %g\n",Numederivative_duration);
printf("The duration for 1rst integration = %g\n",First_integrate_duration);
printf("The duration for 2nd integration = %g\n",Second_integrate_duration);

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] my loop faster than vectorization (???)

2017-06-29 Thread Carrico, Paul
Here is the correct code - loop faster here (68 time faster with n = 100 000)

I'm confuse

Paul
#
mode(0)
clear

n = 1;
lower_bound = 0.1*n;
upper_bound = 0.6*n;

a = rand(n,1);
b = string(a);

// case 1 : eval on each row

tic();

i=1:(upper_bound-lower_bound+1)';

c(i,1) = zeros((upper_bound-lower_bound+1),1);

c(i,1) = eval(b(lower_bound:upper_bound,1));

duration1 = toc()

// case 2 : eval on the complete matrix
tic();
d = zeros((upper_bound-lower_bound+1),1);
d = string(d);
d = b(lower_bound:upper_bound,1);
d = eval(d);
duration2 = toc()

// case 3 :with an uggly loop
tic();
e = zeros((upper_bound-lower_bound+1),1);
for i = 1 : (upper_bound - lower_bound+1)
e(i,1) = eval(b(i+lower_bound-1,1));
end
duration3 = toc()

// case 4 :with an uggly loop (eval on the complete matrix)
tic();
f = zeros((upper_bound-lower_bound+1),1);
f = string(f);
for i = 1 : (upper_bound - lower_bound)
f(i,1) = b(i+lower_bound-1,1);
end
f = eval(f);
duration3 = toc()


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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Carrico, Paul
Envoyé : jeudi 29 juin 2017 09:29
À : International users mailing list for Scilab. (users@lists.scilab.org)
Objet : [EXTERNAL] [Scilab-users] my loop faster than vectorization (???)

Hi all

I'm facing a case where a loop is faster than vectorization (at least I hope 
I'm using vectorization) ... I'm necessarily doing something wrong but I don't 
see what

Hope somebody will point out my mistake

Thanks for your time

Paul


mode(0)
clear

n = 1;
lower_bound = 0.1*n;
upper_bound = 0.6*n;

a = rand(n,1);
b = string(a);

// case 1 : eval on each row
tic();
c = zeros((upper_bound-lower_bound),1);
c(1:(upper_bound-lower_bound),1) = eval(b(1:(upper_bound-lower_bound),1));
duration1 = toc()

// case 2 : eval on the complete matrix
tic();
d = zeros((upper_bound-lower_bound),1);
d = string(d);
d = b([1:(upper_bound-lower_bound)],1);
d = eval(d);
duration2 = toc()

// case 3 :with an uggly loop
tic();
e = zeros((upper_bound-lower_bound),1);
for i = 1 : (upper_bound - lower_bound)
e(i,1) = eval(b(i+lower_bound-1,1));
end
duration3 = toc()

// case 4 :with an uggly loop (eval on the complete matrix)
tic();
f = zeros((upper_bound-lower_bound),1);
f = string(f);
for i = 1 : (upper_bound - lower_bound)
f(i,1) = b(i+lower_bound-1,1);
end
f = eval(f);
duration3 = toc()

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


[Scilab-users] my loop faster than vectorization (???) : please wait

2017-06-29 Thread Carrico, Paul
Please wait, copy/paste errors - my example is stupid (so I am)

sorry


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


[Scilab-users] my loop faster than vectorization (???)

2017-06-29 Thread Carrico, Paul
Hi all

I'm facing a case where a loop is faster than vectorization (at least I hope 
I'm using vectorization) ... I'm necessarily doing something wrong but I don't 
see what

Hope somebody will point out my mistake

Thanks for your time

Paul


mode(0)
clear

n = 1;
lower_bound = 0.1*n;
upper_bound = 0.6*n;

a = rand(n,1);
b = string(a);

// case 1 : eval on each row
tic();
c = zeros((upper_bound-lower_bound),1);
c(1:(upper_bound-lower_bound),1) = eval(b(1:(upper_bound-lower_bound),1));
duration1 = toc()

// case 2 : eval on the complete matrix
tic();
d = zeros((upper_bound-lower_bound),1);
d = string(d);
d = b([1:(upper_bound-lower_bound)],1);
d = eval(d);
duration2 = toc()

// case 3 :with an uggly loop
tic();
e = zeros((upper_bound-lower_bound),1);
for i = 1 : (upper_bound - lower_bound)
e(i,1) = eval(b(i+lower_bound-1,1));
end
duration3 = toc()

// case 4 :with an uggly loop (eval on the complete matrix)
tic();
f = zeros((upper_bound-lower_bound),1);
f = string(f);
for i = 1 : (upper_bound - lower_bound)
f(i,1) = b(i+lower_bound-1,1);
end
f = eval(f);
duration3 = toc()

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] [EXTERNAL] Re: {EXT} ugly code improvement (with vectorization)

2017-06-27 Thread Carrico, Paul
Hi Christophe,

Thanks for your suggestion - you were in the right way (good mind), I do not :-)

It works on the test here after, I just have to adapt it

Paul



mode(0)

Elements = [  
1. 1. 29. 8. 81. 82. 83. 124. 165. 164. 163. 122. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0. 0.
2. 1. 29. 8. 83. 84. 85. 126. 167. 166. 165. 124. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0. 0.
3. 1. 29. 8. 85. 86. 87. 128. 169. 168. 167. 126. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0. 0.
4. 1. 29. 8. 87. 88. 89. 130. 171. 170. 169. 128. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0. 0.
5. 1. 29. 8. 89. 90. 91. 132. 173. 172. 171. 130. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0. 0.
797. 1. 8. 20. 2193. 2194. 2195. 2219. 2257. 2256. 2255. 2218. 3515. 3516. 
3517. 3541. 3579. 3578. 3577. 3540. 2854. 2856. 2918. 2916. 0 0 0 0 0.
798. 1. 8. 20. 2195. 2196. 2197. 2220. 2259. 2258. 2257. 2219. 3517. 3518. 
3519. 3542. 3581. 3580. 3579. 3541. 2856. 2858. 2920. 2918. 0 0 0 0 0.
799. 1. 8. 20. 2197. 2198. 2199. 2221. 2261. 2260. 2259. 2220. 3519. 3520. 
3521. 3543. 3583. 3582. 3581. 3542. 2858. 2860. 2922. 2920. 0 0 0 0 0.
800. 1. 8. 20. 2199. 2200. 2201. . 2263. 2262. 2261. 2221. 3521. 3522. 
3523. 3544. 3585. 3584. 3583. 3543. 2860. 2862. 2924. 2922. 0 0 0 0 0.
1047. 999. 3. 2. 3587. 3582. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0.
1048. 999. 3. 2. 3587. 3583. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0.
1049. 999. 3. 2. 3587. 3584. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0.
1050. 999. 3. 2. 3587. 3585. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 
0. 0. 0. 0. 0. 0.];

Elements2 = Elements;
Elements2(:,[1:4])=[];
n = size(Elements2,"*")
Elements2 = matrix(Elements2',n,1);
a = find(Elements2 == 0);
Elements2(a,1) = [];
Elements2

 

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Dang Ngoc 
Chan, Christophe Envoyé : mardi 27 juin 2017 11:34 À : Users mailing list for 
Scilab Objet : [EXTERNAL] Re: [Scilab-users] {EXT} ugly code improvement (with 
vectorization)

Hello Paul,

> De : Carrico, Paul
> Envoyé : mardi 27 juin 2017 09:06
>
> -  to capture the non-null values of each line from the 5th column - each row 
> can have different "length"
> - the 4th column indicates how many values there're i.e the length
> - Then to put this values in a vector previously initialized  [ 
> Elements = [...]
>1. 1.29.8.81.82. 83. 124.165.164.
> 163.122.0.0.0.0.0.0.0.0.0.0.
> 0.0. 0.0.0.0.
[...]

I suggest:

1. Extract foo = Elements(:, 5:$)'

2. Use foo2 = foo(:) to have a vector.

3. Remove the zeros with something like index = (foo2 == 0) ; foo2(index) = []

Would this work?

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DwIFAw=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=-jeS6eg34X1wOu7rjJUdp4_D6gD1unEepLJULOYTLo0=SdwDp7jNLsTyZClNObJsllYvRnaUOft504Nxbq4aSxo=
 

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


[Scilab-users] ugly code improvement (with vectorization)

2017-06-27 Thread Carrico, Paul
Dear All,

Can I ask advice to correct this ugly/slow code (using vectorization)?

In the example here bellow, I want

-  to capture the non-null values of each line from the 5th column - 
each row can have different "length"

-  the 4th column indicates how many values there're i.e the length

-  Then to put this values in a vector previously initialized

If I can extract the values with ''Elements(k,[5: Elements (k,4)]'', I do not 
know how to put it the ''View'' matrix without using dynamic allocation ([View 
; Elements (k,4) ... indeed I'm using block and not explicit index

Thanks for your time

Paul



View = zeros(dim,2); // dim previously calculated

n = 1;
for k = 1 : size(Elements,1)
for m = 1 : Elements (k,4)
View(n,1) = Elements (k,4+m);
n = n+1;
end
end

with
Elements = [
1. 1.29.8.81.82. 83. 124.165.164.
163.122.0.0.0.0.0.0.0.0.0.0.0.  
  0. 0.0.0.0.
2. 1.29.8.83.84. 85. 126.167.166.
165.124.0.0.0.0.0.0.0.0.0.0.0.  
  0. 0.0.0.0.
3. 1.29.8.85.86. 87. 128.169.168.
167.126.0.0.0.0.0.0.0.0.0.0.0.  
  0. 0.0.0.0.
4. 1.29.8.87.88. 89. 130.171.170.
169.128.0.0.0.0.0.0.0.0.0.0.0.  
  0. 0.0.0.0.
5. 1.29.8.89.90. 91. 132.173.172.
171.130.0.0.0.0.0.0.0.0.0.0.0.  
  0. 0.0.0.0.

797.1.8.20.2193.2194.2195.2219.2257.
2256.2255.2218.3515.3516.3517.3541.3579.3578.   
 3577.  3540.2854.2856.2918.2916.
798.1.8.20.2195.2196.2197.2220.2259.
2258.2257.2219.3517.3518.3519.3542.3581.3580.   
 3579.  3541.2856.2858.2920.2918.
799.1.8.20.2197.2198.2199.2221.2261.
2260.2259.2220.3519.3520.3521.3543.3583.3582.   
 3581.  3542.2858.2860.2922.2920.
800.1.8.20.2199.2200.2201..2263.
2262.2261.2221.3521.3522.3523.3544.3585.3584.   
 3583.  3543.2860.2862.2924.2922.
...
1047.999.3.2.3587.3582.0.0.0.0.0.   
 0.0.0.0.0.0.0.0.0.0.0.0.0.
0.0.0.0.0.
1048.999.3.2.3587.3583.0.0.0.0.0.   
 0.0.0.0.0.0.0.0.0.0.0.0.0.
0.0.0.0.0.
1049.999.3.2.3587.3584.0.0.0.0.0.   
 0.0.0.0.0.0.0.0.0.0.0.0.0.
0.0.0.0.0.
1050.999.3.2.3587.3585.0.0.0.0.0.   
 0.0.0.0.0.0.0.0.0.0.0.0.0.
0.0.0.0.0.];


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] [EXTERNAL] Re: Optim & NelderMead use [closed]

2017-01-16 Thread Carrico, Paul
Hi Stéphane

I used the sqrt function in the idea of the  "Sum of the Square Error" (while 
there's not sum here) .. but I understand your remarks

Thanks

Paul

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Stéphane 
Mottelet
Envoyé : lundi 16 janvier 2017 10:45
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] Optim & NelderMead use [closed]


Hi Paul,

your cost function

f = sqrt((val_lin - val_rac)^2);

hasn't  changed, since sqrt(x^2)=abs(x). What I meant before is replacing

f = abs(val_lin - val_rac);

by

   f = (val_lin - val_rac)^2;
in order to make it differentiable. When using a non-differentiable cost 
function together with numderivative, it seems logical that tweaking the step 
size could artificially help convergence.

S.

Le 16/01/2017 à 10:30, Carrico, Paul a écrit :
Hi all

After  performing tests (and modifying the target function as it should have 
been done first), I can better understand how to use 'optim' and 'Neldermead' 
procedures.

For my needs the mean flags are :

-  Step h in numderivative --> usefull reading as "EE 221 Numerical 
Computing" Scott Hudson

-  The threshold epsg in optim (%eps is the default value - such high 
accuracy is not necessary for my application - furthermore using a value such 
as 1e-5 leads to err=1 that is correct for checking)

-  Ditto for Nelder-Mead and '-tolfunrelative' & '-tolxrelative'



Now it works fine :-)



Thanks all for the support



Paul

#

mode(0)

clear



global count_use;

count_use = 0;



// 

function f=lineaire(x, a2, b2)

f = a2*x+b2;

endfunction



// 

function g=racine(x, a1, b1)

g = sqrt(a1*x) + b1;

endfunction



// 

function f=target(x, a1, b1, a2, b2)

val_lin = lineaire(x,a2,b2);

val_rac = racine(x,a1,b1);

f = sqrt((val_lin - val_rac)^2);



global count_use;

count_use = count_use +1;

endfunction



// Cost function:

function [f, g, ind]=cost(x, ind, a1, b1, a2, b2)

f = target(x);

//g = numderivative(target, x.',order = 4);

g = numderivative(target, x.',1e-3, order = 4);  // 1E-3 => see EE 221 
"Numerical Computing" Scott Hudson

// Study of the influence of h on the number of target function calculation & 
the fopt accuracy:

// (epsg = %eps here)

// h = 1.e-1 => number = 220 & fopt = 2.242026e-05

// h = 1.e-2 => number = 195 & fopt = 2.267564e-07

// h = 1.e-3 => number = 170 & fopt = 2.189495e-09 ++

// h = 1.e-4 => number = 190 & fopt = 1.941203e-11

// h = 1.e-5 => number = 215 & fopt = 2.131628e-13

// h = 1.e-6 => number = 235 & fopt = 0.

// h = 1.e-7 => number = 255 & fopt = 7.105427e-15

// h = 1.e-8 => number = 275 & fopt = 0.



endfunction



// *

// optimisation with optim

initial_parameters = [10]

lower_bounds = [0];

upper_bounds = [1000];

nocf = 1000;  // number max of call of f

niter = 1000;// number max of iterations

a1 = 30;

b1 = 2.5;

a2 = 1;

b2 = 2;



epsg = 1e-5;// gradient norm threshold (%eps by defaut) --> lead to err = 1 
!!!

//epsg = %eps; // lead to Err = 13

epsf = 0;   //threshold controlling decreasing of f (epsf = 0 by defaut)



costf = list (cost, a1, b1, a2, b2);

[fopt, xopt, gopt, work, iters, evals, err] = 
optim(costf,'b',lower_bounds,upper_bounds,initial_parameters,'qn','ar',nocf,niter,epsg,epsf);

printf("Optimized value : %g\n",xopt);

printf("min cost function value (should be as closed as possible to 0) ; 
%e\n",fopt);

printf('Number of calculations = %d !!!\n',count_use);





// Curves definition

x = linspace(0,50,1000)';

plot_raci = racine(x,a1,b1);

plot_lin = lineaire(x,a2,b2);



scf(1);

drawlater();

xgrid(3);

f = gcf();

//f

f.figure_size = [1000, 1000];

f.background = color(255,255,255);

a = gca();

//a

a.font_size = 2;

a.x_label.text = "X axis" ;

a.x_location="bottom";

a.x_label.font_angle=0;

a.x_label.font_size = 4;

a.y_label.text = "Y axis";

a.y_location="left";

a.y_label.font_angle=-90;

a.Y_label.font_size = 4;

a.title.text = "Title";

a.title.font_size = 5;

a.line_style = 1;



// Curves plot

plot(x,plot_lin);

e1 = gce();

p1 = e1.children;

p1.thickness = 1;

p1.line_style = 1;

p1.foreground = 3;



plot(x,plot_raci);

e2 = gce();

p2 = e2.children;

p2.thickness = 1;

p2.line_style = 1;

p2.foreground = 2;

drawnow();

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<mailto:users@lists.scilab.org>

http://lists.scilab.org/mailm

[Scilab-users] Optim & NelderMead use [closed]

2017-01-16 Thread Carrico, Paul
Hi all

After  performing tests (and modifying the target function as it should have 
been done first), I can better understand how to use 'optim' and 'Neldermead' 
procedures.

For my needs the mean flags are :

-  Step h in numderivative --> usefull reading as "EE 221 Numerical 
Computing" Scott Hudson

-  The threshold epsg in optim (%eps is the default value - such high 
accuracy is not necessary for my application - furthermore using a value such 
as 1e-5 leads to err=1 that is correct for checking)

-  Ditto for Nelder-Mead and '-tolfunrelative' & '-tolxrelative'



Now it works fine :-)



Thanks all for the support



Paul

#

mode(0)

clear



global count_use;

count_use = 0;



// 

function f=lineaire(x, a2, b2)

f = a2*x+b2;

endfunction



// 

function g=racine(x, a1, b1)

g = sqrt(a1*x) + b1;

endfunction



// 

function f=target(x, a1, b1, a2, b2)

val_lin = lineaire(x,a2,b2);

val_rac = racine(x,a1,b1);

f = sqrt((val_lin - val_rac)^2);



global count_use;

count_use = count_use +1;

endfunction



// Cost function:

function [f, g, ind]=cost(x, ind, a1, b1, a2, b2)

f = target(x);

//g = numderivative(target, x.',order = 4);

g = numderivative(target, x.',1e-3, order = 4);  // 1E-3 => see EE 221 
"Numerical Computing" Scott Hudson

// Study of the influence of h on the number of target function calculation & 
the fopt accuracy:

// (epsg = %eps here)

// h = 1.e-1 => number = 220 & fopt = 2.242026e-05

// h = 1.e-2 => number = 195 & fopt = 2.267564e-07

// h = 1.e-3 => number = 170 & fopt = 2.189495e-09 ++

// h = 1.e-4 => number = 190 & fopt = 1.941203e-11

// h = 1.e-5 => number = 215 & fopt = 2.131628e-13

// h = 1.e-6 => number = 235 & fopt = 0.

// h = 1.e-7 => number = 255 & fopt = 7.105427e-15

// h = 1.e-8 => number = 275 & fopt = 0.



endfunction



// *

// optimisation with optim

initial_parameters = [10]

lower_bounds = [0];

upper_bounds = [1000];

nocf = 1000;  // number max of call of f

niter = 1000;// number max of iterations

a1 = 30;

b1 = 2.5;

a2 = 1;

b2 = 2;



epsg = 1e-5;// gradient norm threshold (%eps by defaut) --> lead to err = 1 
!!!

//epsg = %eps; // lead to Err = 13

epsf = 0;   //threshold controlling decreasing of f (epsf = 0 by defaut)



costf = list (cost, a1, b1, a2, b2);

[fopt, xopt, gopt, work, iters, evals, err] = 
optim(costf,'b',lower_bounds,upper_bounds,initial_parameters,'qn','ar',nocf,niter,epsg,epsf);

printf("Optimized value : %g\n",xopt);

printf("min cost function value (should be as closed as possible to 0) ; 
%e\n",fopt);

printf('Number of calculations = %d !!!\n',count_use);





// Curves definition

x = linspace(0,50,1000)';

plot_raci = racine(x,a1,b1);

plot_lin = lineaire(x,a2,b2);



scf(1);

drawlater();

xgrid(3);

f = gcf();

//f

f.figure_size = [1000, 1000];

f.background = color(255,255,255);

a = gca();

//a

a.font_size = 2;

a.x_label.text = "X axis" ;

a.x_location="bottom";

a.x_label.font_angle=0;

a.x_label.font_size = 4;

a.y_label.text = "Y axis";

a.y_location="left";

a.y_label.font_angle=-90;

a.Y_label.font_size = 4;

a.title.text = "Title";

a.title.font_size = 5;

a.line_style = 1;



// Curves plot

plot(x,plot_lin);

e1 = gce();

p1 = e1.children;

p1.thickness = 1;

p1.line_style = 1;

p1.foreground = 3;



plot(x,plot_raci);

e2 = gce();

p2 = e2.children;

p2.thickness = 1;

p2.line_style = 1;

p2.foreground = 2;

drawnow();

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


[Scilab-users] scilab and "parallelization" objectives

2016-10-20 Thread Carrico, Paul
Dear All,

My internship had an interesting request and I'm not able to answer to him   
:):)

The context is the following one:

-  We are using a parallel finite element solver on 4 processors (under 
Linux),

-  We are performing optimization with an external optimizer,

-  Scilab has been interfaced with both the optimizer and the solver,

-  For the moment, the optimization loops are "basically" performed 
using the parallelization capabilities of the solvers.

In practice, Scilab "runs" the solver and "waits" the end of the simulation 
(always using 4 processors) before calculating the cost function value, giving 
the later value to the optimizer and then closing.

Imagine that now we would like to run 4 different simulations each on 1 
processor in order to determine the gain (CPU time) ... how to proceed ?

In practice Scilab must be able to :

-  Launch 1rst calculation and to handback ...

-  ... to launch the 2nd one ... and so on

We can imagine creating a function per calculation (and I prefer in order to 
mix stuffs), then running independently but at the same time the different 
functions.

Honestly I've never done this before and I'm wondering how to proceed ... or if 
it is possible : any feedback on it ?

Thanks and regards

Paul


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] [EXTERNAL] !--error 21

2016-10-06 Thread Carrico, Paul
Without launching the code, I would say :
C = 1 : 30
And
A(c-1,3)

If c = 1 then A(0,3) that is not possible since the index start to 1 ... no ?


-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Frieder 
Nikolaisen Envoyé : jeudi 6 octobre 2016 08:18 À : Users mailing list for 
Scilab Objet : [EXTERNAL] [Scilab-users] !--error 21

Hello everybody,

I do have a code, I cannot find the mistake. I get the error:

"if A(c-1,3)==0 then
 !--error 21
ungültiger Index.
at line  11 of exec file called by :
exec('M:\CAD\Abteilungen\Praktikanten\Nikolaisen,
Frieder\Fahrdaten\Testprogramm\Archive\test2.sce', -1)"

My minimal example Code with random Matrix instead of the real used
one:

//example code

for c=1:10
A=rand(10:30)
dm=0
vor_starter=0
starter=0

//start of buggy code
if c>=2 then
 if A(c-1,3)==0 then
 if A(c,7)>0 then
 beginnZ=c
 vor_starter=1   /
 end
 end
 //Endzeile festlegen
 if vor_starter==1 then
 if A(c-1,7)>0 then  /
 if A(c,7)<=0 then
 endZ=c-1
 starter=1
 vor_starter=0
 end
 end
 end

 //Berechnung der Zugmasse
 if starter==1 then
 time3=datevec(A(beginnZ,1))
 time4=datevec(A(endZ,1))
 delta_t=etime(time3, time4)
 delta_v=(A(endZ,3)-A(beginnZ,3)*3.6) // m/s
 length_F=length(beginnZ:endZ)
 mittel_F=sum(A(beginnz:endZ,6)/length_F)
 dm= (delta_t/delta_v) / mittel_F
 starter=0
 end
end

if dm~=0 then
 disp(dm)
end

// end of buggy code

end



The real Matrix Looks like These:
ZeitDistanz Geschwindigkeit 1   Drehzahl
Getriebeausgangsleistung 
[Watt]  Zugkraft [N]Beschleunigung [m/s^2]  Cv-DruckRichtung
Lokbremse 
anlegen Lokbremse lösen Zugbremse anlegen   Zugbremse lösen Kupplung 
betätigtBremsen  aktiv
734962.404654   46476.494   0.001150.71 141700  0   0.000   
0   0   0   1   0   0
734962.404900   46476.494   0.001059.06 110500  0   0.000   
0   1   0   1   0   0
734962.404902   46476.494   0.001059.06 110500  0   0.000   
0   1   1   1   1   0
734962.404971   46476.495   1.701059.06 110500  234000  1.040   
0   1   1   1   1   0
...


Best regards
Frieder
___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DQIGaQ=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN-0=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo=
 

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] [EXTERNAL] Re: scilab 6.00 beta2 crash (feedback)

2016-09-28 Thread Carrico, Paul
Ok for bugzilla (sorry for that)

Nota :  k is a vector . at least in Scilab 5.5.4

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Paul Bignier
Envoyé : mercredi 28 septembre 2016 15:57
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] scilab 6.00 beta2 crash (feedback)




Hi Paul,

The line "k = [1:n]'.*.ones(n,1);" intends to produce a 50001x50001 (total 2.5 
billion) matrix, which goes over the int32 limit of 2147483647 (2.147 billion), 
that provokes the inner sizes to wrap and become negative, leading to the crash.

If you try k = [1:n/2]'.*.ones(n/2,1); it will work but eat up your ram. If you 
try it a few times a message will say "Can not allocate 'XXX' MB memory." 
because it can still deal with such sizes.

So are you sure about what you want to do?

In the future when you get crashes, please report them on the 
bugzilla<https://urldefense.proofpoint.com/v2/url?u=http-3A__bugzilla.scilab.org_=DQMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=H6mcS5tjsl64h14eEzr1mZ3dh6VLpl9do8_bq2DWILQ=5d-roj75J3VoA5OprGpyNJA3SfhZiZGqF1lXCP2jaV8=>.

Thank you,

Best regards,

Paul


On 09/28/2016 03:34 PM, Carrico, Paul wrote:
Hi all,

Here is a feedback of a crash of  scilab 6.00 beta2; I used the code here 
bellow on a 32 Go CentOS 7 machine.

Ligne 951 : 2650 Erreur de segmentation (core dumped)  ''$SCILABBIN'' ''$@''

t = [0:2e-5:1]';
n = size(t,"*");
X = zeros(n,1);
k = [1:n]'.*.ones(n,1);
m = ones(n,1).*.[1:n]';
nl = size(m,"*");
tmp = zeros(nl,1);

Paul

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<mailto:users@lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users=DQMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=H6mcS5tjsl64h14eEzr1mZ3dh6VLpl9do8_bq2DWILQ=dnJofXzj7NyZG7QXqcTSn30H7WkBPh5om0isqviRAb4=>



--

Paul BIGNIER

Development engineer

---

Scilab Enterprises

143bis rue Yves Le Coz - 78000 Versailles, France

Phone: +33.1.80.77.04.68

http://www.scilab-enterprises.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.scilab-2Denterprises.com=DQMD-g=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=H6mcS5tjsl64h14eEzr1mZ3dh6VLpl9do8_bq2DWILQ=sWu3WWE_ZcDi0mguC2OpFqOnGtk9yNIw3jkwFadEpQo=>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] scilab 6.00 beta2 crash (feedback)

2016-09-28 Thread Carrico, Paul
Hi all,

Here is a feedback of a crash of  scilab 6.00 beta2; I used the code here 
bellow on a 32 Go CentOS 7 machine.

Ligne 951 : 2650 Erreur de segmentation (core dumped)  ''$SCILABBIN'' ''$@''

t = [0:2e-5:1]';
n = size(t,"*");
X = zeros(n,1);
k = [1:n]'.*.ones(n,1);
m = ones(n,1).*.[1:n]';
nl = size(m,"*");
tmp = zeros(nl,1);

Paul

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] how to detect complex solution in "root finding" ?

2016-08-25 Thread Carrico, Paul
I found on internet ... with isreal ... sorry

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Carrico, Paul
Envoyé : jeudi 25 août 2016 11:15
À : International users mailing list for Scilab. (users@lists.scilab.org)
Objet : [EXTERNAL] [Scilab-users] how to detect complex solution in "root 
finding" ?

Hi all,

In an automatic way, how can I ask Scilab to detect complex root (in order to 
sort them) ; indeed I only want real roots (and to print them in an Ascii file) 
!

Thanks

Paul

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


[Scilab-users] how to detect complex solution in "root finding" ?

2016-08-25 Thread Carrico, Paul
Hi all,

In an automatic way, how can I ask Scilab to detect complex root (in order to 
sort them) ; indeed I only want real roots (and to print them in an Ascii file) 
!

Thanks

Paul

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


[Scilab-users] Whay False

2016-08-23 Thread Carrico, Paul
Hi All,

I spent a lot of time in looking for an issue in my code ; finally I found the 
origin but I do not understand why ... probably a very basic reason :|

Any suggestion regarding the code here after ?

Thanks

Paul
#
mode(0)

a = 2.05

entier = int(a)
reel = modulo(a,2)

if ( reel == 0.05) then
chaine = '05'
elseif (reel == 0.5) then
chaine = '50'
else
   chaine = '00'
end

printf("chaine = %s\n',chaine)

// Nota
reel == 0.05 // whay False ?

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


[Scilab-users] parallel_run mixed with vectorization

2016-06-14 Thread Carrico, Paul
Hi again

In the following new example, there's something I do not caught ; I cannot 
figure out what I'm misunderstanding

Am I right to say that n calculations are splitted on the available processors?

Paul

"
mode(0);
stacksize('max');
clear;

function U=fct(R1, i1, R2, i2)
U1 = R1. * i1;
U2 = R2. * i2;
U = [U1 U2]'; // matrice (2x1) a chaque iteration  apres tansposition
clear U1; clear U2;
endfunction

n = 1000;

// les vecteurs doivent etre en ligne pour la parallelisation
i1 = grand(1,n,'unf',0,0.1);
R1 = grand(1,n,'unf',0,500);
i2 = grand(1,n,'unf',0,0.1);
R2 = grand(1,n,'unf',0,1000);

// using parallel_run
Result = zeros(2,n); // au final, on a une matrice de dim (2xn)
tic()
Result = parallel_run([R1,i1,R2,i2], fct,[2,1]); // pour les n calculs, on sont 
un vecteur de dim (2x1) = meme dimension que U en sortie
disp(Result);
time = toc(); printf("time = %g\n",time);

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


[Scilab-users] issue with parallel_run

2016-06-14 Thread Carrico, Paul
Dear All

The current is inspired from a development I'm trying ; Scilab 5.5.2 (under 
Linux - 8 processors) crashes but is it because I'm doing something wrong (it 
is my first attempt of using such feature) ?

Thanks

Paul

#"
mode(0);
clear;

function random_matrix=fct(n)

M = grand(n,12,'unf',-1,1);
M = gsort(M,"lr","d");
random_matrix = M(1,:);

clear M;

endfunction

num = 10;
n = 1000;

// classical calculation
Result = zeros(num,12);

tic()
for i = 1 : num
Result(i,:) = fct(n);
end
disp(Result);
time1 = toc(); printf("time 1 = %g\n",time1);

// using parallel_run
Result2 = zeros(num,12);
vect_n = n*ones(1,num);

tic()
Result2 = parallel_run(vect_n, fct);
disp(Result2);
time2 = toc(); rintf("time 2 = %g\n",time2);

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


[Scilab-users] create random values between [-1,1]

2016-06-10 Thread Carrico, Paul
Hi

In order to simulate dimensional tolerances in +/-, I'm using the following 
workaround :
n = 100;
a = rand(n,1) - rand(n,1);

Of course I need to increase the N value to the domain ... is there a more 
"clever" way ?

Thanks

Paul

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] [EXTERNAL] Re: matrix of combinations

2016-06-10 Thread Carrico, Paul
Hi Buk,

You're right when saying that I do not need to keep in memory the whole matrix; 
nevertheless I've to find the best solution (in term of cost calculation in 
time) between :
- performing loops that is time consuming (but probably need less memory),
- using intensively the vectorization in order to perform fast calculations.

I worked in order to reduce the number of variables from 16 to 10, so I've 10 
billion of combinations (and 11 calculations per case by calling functions) ... 
so yes the cost is quite high (and not reasonable) but it is what I've been 
requested :-)

Paul

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de 
scilab.20.browse...@xoxy.net Envoyé : vendredi 10 juin 2016 09:15 À : 
users@lists.scilab.org Objet : [EXTERNAL] Re: [Scilab-users] matrix of 
combinations

What are you going to do with this data once you've produced it?

If you are not going to use it straight away, then you would have to store it 
to disk, in which case there is no point in filling memory prior to writing it 
all out; just do one row at a time.

Conversely, if you are going to use it in the same run, do you actually need it 
all at any given time?

In many (even most) cases, depending how you are using the data, it is better 
to produce some subset -- say one row or other subdivision -- then use it, 
before discarding and looping back to produce the next subset.

If your application for this data is, or can be made to be, conducive to being 
subsetted this way, the effects on runtime can be dramatic. 
(Once recent application fell from 2 weeks to less than 12 hours.)

Just food for thought.

Buk

> -Original Message-
> From: scilab.browseruk.fa1c38e59e.paul.carrico#free...@ob.0sg.net
> Sent: Thu, 9 Jun 2016 18:47:58 +0200 (CEST)
> To: users@lists.scilab.org
> Subject: Re: [Scilab-users] matrix of combinations
exclusive)
> 
> Hi samuel,
> 
> (thanks)
> 
> I'm still under the latest stable Scilab release 5.5.x ... but it 
> sounds a good opportunity to move to 6.0 one.
> 
> I've 2 servers (both under CentOS) having different features :
> - 2 CPU-s with 120 Go of memory
> - 8 CPU's with 30 Go of memory
> 
> the latest one is probably the more interesting for the current 
> application :-)
> 
> I'll have a look to the scidoe module
> 
> Paul
> 
> - Mail original -
> De: "Samuel Gougeon" <sgoug...@free.fr>
> À: "Users mailing list for Scilab" <users@lists.scilab.org>
> Envoyé: Jeudi 9 Juin 2016 18:10:36
> Objet: Re: [Scilab-users] matrix of combinations
> 
> 
> 
> Hello Paul,
> 
> Le 09/06/2016 17:28, Carrico, Paul a écrit :
> 
> 
> 
> 
> 
> Dear all
> 
> 
> 
> (not sure to really master the topic but …)
> 
> 
> 
> In my current study, I’ve 16 variables that I would like to perturbate
> 10 times ; of course each variable is different from the others.
> 
> A1 = 10 + 2*rand(10,1,”uniform”)
> 
> A2 = 5 + 0.5*rand(10,1,”uniform”)
> 
> …
> 
> A16 = 0.2 +0.01**rand(10,1,”uniform”)
> 
> 
> 
> 
> 
> Except if I’m mistaken, I’ve about 16^10=1E12 combinations that is a
> (16xn) huge matrix M (n greater than 6E10) : how can I create such 
> matrix ? It depends how you build a sample: is a sample a {A1(i), 
> A2(j),..., A16(x)} set?
> Then, there are 10^16 possibilities.
> You can build them with ndgrid(), provided that you have hexabytes of 
> RAM, (really) many processors, and of course Scilab 6. Do you? :) Or 
> you may have a look at DOE theory, and tools:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__atoms.scilab.org_
> toolboxes_scidoe=DQIGaQ=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJhZZvIx
> JAemAJyz7Vfx78XvgYu3LN7eLo=24hBUpkgEwY9JeYopyT8M0K8mtU8gnlvJTZHEIZgz
> vw=VPtpJ1kp6QiU045WhJZj_n3JqeHSyyJt9V_b7r0hHnk=
> 
> BR
> Samuel
> 
> 
> ___
> users mailing list
> users@lists.scilab.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_m
> ailman_listinfo_users=DQIGaQ=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJh
> ZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=24hBUpkgEwY9JeYopyT8M0K8mtU8gnlvJTZH
> EIZgzvw=x74xUs-VbpdqMo69HE5Wsop75ZM0b5zBl9C7GP0JQ7s=
> ___
> users mailing list
> users@lists.scilab.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_m
> ailman_listinfo_users=DQIGaQ=0hKVUfnuoBozYN8UvxPA-w=4TCz--8bXfJh
> ZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo=24hBUpkgEwY9JeYopyT8M0K8mtU8gnlvJTZH
> EIZgzvw=x74xUs-VbpdqMo69HE5Wsop75ZM0b5zBl9C7GP0JQ7s=


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.in

Re: [Scilab-users] [EXTERNAL] Re: Vectorization issue

2016-05-26 Thread Carrico, Paul
Obviously ... newbie error !!

Thanks

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Rafael Guerra
Envoyé : jeudi 26 mai 2016 13:27
À : 'Users mailing list for Scilab'
Objet : Re: [Scilab-users] [EXTERNAL] Re: Vectorization issue

Hi Paul,

'b' seems to be already used in the Km and Km2 formulas and so, it cannot be 
used at the same time as an auxiliary variable with different meaning.
Only 'b' needs to be changed.

Regards,
Rafael

From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Carrico, Paul
Sent: Thursday, May 26, 2016 12:38 PM
To: 'Users mailing list for Scilab' 
<users@lists.scilab.org<mailto:users@lists.scilab.org>>
Subject: Re: [Scilab-users] [EXTERNAL] Re: Vectorization issue

Thanks Rafael for the answer

One explanation of the error is that I used a and b letter instead of aa and bb 
in your example; your code, if I change aa -> a and bb -> it fails again ... 
why ? (I do not understand)


De : users [mailto:users-boun...@lists.scilab.org] De la part de Rafael Guerra
Envoyé : jeudi 26 mai 2016 12:26
À : 'Users mailing list for Scilab'
Objet : [EXTERNAL] Re: [Scilab-users] Vectorization issue


Hi Paul,

It seems that there may be some issues with the .*, .^ syntax and also the use 
of the same variable in different context (b).

Editing the vectorization part of your code as follows:

// using vectorization
aa = [0:n]';
bb = ones(n,1);
i = aa.*.bb;
j = bb.*.aa;

Km2 = zeros(n*(n+1),1);
Km2 = %pi^6*((2*i+1).^2 .* j.^2).*((2*i+1).^2.*(b/2*d)^2 + j.^2) ;
Km2 = (144*(b/d).^4)/ sum(Km2);
Km2 = 1.2 + (nu/(1+nu))*Km2;
k2 = 1/Km2

produces:
   k  =0.8333090
   k2  =  0.833

A small difference. I did not check the formulas but it might be numerical 
error only.

Regards,
Rafael

From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Carrico, Paul
Sent: Thursday, May 26, 2016 11:30 AM
To: International users mailing list for Scilab. 
(users@lists.scilab.org<mailto:users@lists.scilab.org>) 
<users@lists.scilab.org<mailto:users@lists.scilab.org>>
Subject: [Scilab-users] Vectorization issue

Dear
I failed in using vectorization in the example immediately bellow; but I do not 
remember if it's possible : any advice ?
Thanks
Paul


mode(0)

n = 20

Km = 0;

b = 100;

d = 20;

nu = 0.3;



// using loops

for i = 0 : n

for j = 1 : n

Km = Km + (144*(b/d)^4)/(  
%pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2)  );

end

end



Km = 1.2 + (nu/(1+nu))*Km

k = 1/Km



// using vectorization

a = [0:n]';

b = ones(n,1);

i = a.*.b;

j = b.*.a;



Km2 = zeros(n*(n+1),1);

Km2 = (  %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2)  )

Km2 = (144*(b/d).^4)/ Km2

Km2 = 1.2 + (nu/(1+nu))*Km2

k2 = 1/Km2

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


Re: [Scilab-users] [EXTERNAL] Re: Vectorization issue

2016-05-26 Thread Carrico, Paul
Thanks Rafael for the answer

One explanation of the error is that I used a and b letter instead of aa and bb 
in your example; your code, if I change aa -> a and bb -> it fails again ... 
why ? (I do not understand)

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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Rafael Guerra
Envoyé : jeudi 26 mai 2016 12:26
À : 'Users mailing list for Scilab'
Objet : [EXTERNAL] Re: [Scilab-users] Vectorization issue


Hi Paul,

It seems that there may be some issues with the .*, .^ syntax and also the use 
of the same variable in different context (b).

Editing the vectorization part of your code as follows:

// using vectorization
aa = [0:n]';
bb = ones(n,1);
i = aa.*.bb;
j = bb.*.aa;

Km2 = zeros(n*(n+1),1);
Km2 = %pi^6*((2*i+1).^2 .* j.^2).*((2*i+1).^2.*(b/2*d)^2 + j.^2) ;
Km2 = (144*(b/d).^4)/ sum(Km2);
Km2 = 1.2 + (nu/(1+nu))*Km2;
k2 = 1/Km2

produces:
   k  =0.8333090
   k2  =  0.833

A small difference. I did not check the formulas but it might be numerical 
error only.

Regards,
Rafael

From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Carrico, Paul
Sent: Thursday, May 26, 2016 11:30 AM
To: International users mailing list for Scilab. 
(users@lists.scilab.org<mailto:users@lists.scilab.org>) 
<users@lists.scilab.org<mailto:users@lists.scilab.org>>
Subject: [Scilab-users] Vectorization issue

Dear
I failed in using vectorization in the example immediately bellow; but I do not 
remember if it's possible : any advice ?
Thanks
Paul
##

mode(0)



n = 20

Km = 0;



b = 100;

d = 20;

nu = 0.3;



// using loops

for i = 0 : n

for j = 1 : n

Km = Km + (144*(b/d)^4)/(  
%pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2)  );

end

end



Km = 1.2 + (nu/(1+nu))*Km

k = 1/Km



// using vectorization

a = [0:n]';

b = ones(n,1);

i = a.*.b;

j = b.*.a;



Km2 = zeros(n*(n+1),1);

//toto = i. *j

Km2 = (  %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2)  )

Km2 = (144*(b/d).^4)/ Km2

Km2 = 1.2 + (nu/(1+nu))*Km2

k2 = 1/Km2




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


[Scilab-users] Vectorization issue

2016-05-26 Thread Carrico, Paul
Dear
I failed in using vectorization in the example immediately bellow; but I do not 
remember if it's possible : any advice ?
Thanks
Paul
##

mode(0)



n = 20

Km = 0;



b = 100;

d = 20;

nu = 0.3;



// using loops

for i = 0 : n

for j = 1 : n

Km = Km + (144*(b/d)^4)/(  
%pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2)  );

end

end



Km = 1.2 + (nu/(1+nu))*Km

k = 1/Km



// using vectorization

a = [0:n]';

b = ones(n,1);

i = a.*.b;

j = b.*.a;



Km2 = zeros(n*(n+1),1);

//toto = i. *j

Km2 = (  %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2)  )

Km2 = (144*(b/d).^4)/ Km2

Km2 = 1.2 + (nu/(1+nu))*Km2

k2 = 1/Km2




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


[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] eigs calculation

2015-06-26 Thread Carrico, Paul
U = eigenvalues - matrix (nx1)
V = eigenvectors - matrix (nxn)

NB: n = 12 since I'm foccusing of the n first natural frequencies 

Paul

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Antoine 
Monmayrant Envoyé : vendredi 26 juin 2015 12:26 À : International users mailing 
list for Scilab.
Objet : Re: [Scilab-users] eigs calculation

 
Le Vendredi 26 Juin 2015 11:16 CEST, Carrico, Paul 
paul.carr...@esterline.com a écrit: 
 
 Hi Antoine,
 
 Thanks for the comments; In attachment the results of the calculations 
 (note that the modal effective depends on the eigenvectors)
 
 The calculation for the difference calculations are described herebellow ..

I'm confused, who's who:
u = value or vector
v = value or vector ?

Antoine

 
 
 Paul
 
 ###
 // prog principal
 nbre = 10;
 for k = 1 : nbre
 printf(\n***\nIteration num %d\n,k);
 s1 =   ...
 [u + string(k) + ,v + string(k) + ,K + string(k) + ,M + string(k) 
 + ] = calcul_v() , ...
 [nl,nc] = size(v + string(k) + ) , ...
 save(''u + string(k) + .bin'',''u + string(k) + '') , ...
 save(''v + string(k) + .bin'',''v + string(k) + '') , ...
 clear nl , ...
 clear nc , ...
 save(''K + string(k) + .bin'',''K + string(k) + '') , ...
 save(''M + string(k) + .bin'',''M + string(k) + '') , ...
 ;
 execstr(s1) ;
   
 end
 
 printf(\n\n);
 
 // difference v1 - v2
 for k = 2 : nbre
 s2 =  ...
 printf((eigenvalues) Max delta u%d - u1 = %g\n,k,abs(max(u + 
 string(k) +  - u1))) , ...
 printf((eigenvectors) Max delta v%d - v1 = %g\n,k,abs(max(v + 
 string(k) +  - v1))) , ...
 printf((input matrix) Max delta K%d - K1 = %g\n,k,abs(max(K + 
 string(k) +  - K1))) , ...
 printf((input matrix) Max delta M%d - M1 = %g\n,k,abs(max(M + 
 string(k) +  - M1))) , ...
 ;
 execstr(s2) ;
 printf(\n);
 end
 ##
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 -Message d'origine-
 De : users [mailto:users-boun...@lists.scilab.org] De la part de Antoine 
 Monmayrant Envoyé : vendredi 26 juin 2015 10:50 À : International users 
 mailing list for Scilab.
 Objet : Re: [Scilab-users] eigs calculation
 
 Hi Paul,
 
 I don't really like a function that gives different answers for the very same 
 input.
 That sounds like a bug to me.
 That being said, from the data you showed, it is not clear that your 
 eigenvector are really different.
 If what you show is just a difference in the norm of the difference between 
 the eigenvalue at iteration 1 and N, that might be OK.
 Indeed, if v is an eigenvector, a.v with a non zero-scalar, is also an 
 eigenvector.
 You should check whether v1 and vN are colinear: if they are, the results are 
 not really different, they just differ by a scaling factor.
 But I would still call it a bug, as a function should always give the same 
 answer when given the same input parameters.
 
 Cheers,
 
 Antoine
 
  
 Le Jeudi 25 Juin 2015 17:17 CEST, Carrico, Paul 
 paul.carr...@esterline.com a écrit: 
  
  Dear all
  
  I'm still working on my eigs issue topic and I'm still trying to 
  understand what's going wrong;
  
  I run a test case :
  - same function is launched 10 times
  - each time the input data are recorded (K,M)
  - for each loop the eigenvalues u and the eigenvectors v are 
  recorded
  
  Then the values of each loop are compared with the values of the 
  loop
  1
  
  If K,M,u remains strictly identical, it is not the case for u (the 
  eigenvectors) ... why ?
  
  I've ever check any initialization issue, but everything seems to be 
  ok
  
  Paul
  
  PS : the results of this case
  
  Max delta v2 - v1 = 453.857
  Max delta K2 - K1 = 0
  Max delta M2 - M1 = 0
  
  Max delta v3 - v1 = 549.214
  Max delta K3 - K1 = 0
  Max delta M3 - M1 = 0
  
  Max delta v4 - v1 = 585.95
  Max delta K4 - K1 = 0
  Max delta M4 - M1 = 0
  
  Max delta v5 - v1 = 379.702
  Max delta K5 - K1 = 0
  Max delta M5 - M1 = 0
  
  Max delta v6 - v1 = 489.844
  Max delta K6 - K1 = 0
  Max delta M6 - M1 = 0
  
  Max delta v7 - v1 = 439.221
  Max delta K7 - K1 = 0
  Max delta M7 - M1 = 0
  
  Max delta v8 - v1 = 432.406
  Max delta K8 - K1 = 0
  Max delta M8 - M1 = 0
  
  Max delta v9 - v1 = 351.752
  Max delta K9 - K1 = 0
  Max delta M9 - M1 = 0
  
  Max delta v10 - v1 = 554.515
  Max delta K10 - K1 = 0
  Max delta M10 - M1 = 0
  
  -Message d'origine-
  De : Carrico, Paul
  Envoyé : mercredi 17 juin 2015 22:18 À : International users mailing 
  list for Scilab.
  Objet : RE: [Scilab-users] eigs calculation
  
  Dear All
  
  Thanks for the answers.
  
  To give more information's on what I'm doing (That's quite new I confess), 
  I'm performing  a (basic) finite element calculation with beams using 
  sparse matrix (stiffness matrix K and mass matrix M).
  [u,v] =
  eigs(K((ddl_elem+1

Re: [Scilab-users] eigs calculation

2015-06-25 Thread Carrico, Paul
Dear all

I'm still working on my eigs issue topic and I'm still trying to understand 
what's going wrong;

I run a test case :
- same function is launched 10 times
- each time the input data are recorded (K,M)
- for each loop the eigenvalues u and the eigenvectors v are recorded

Then the values of each loop are compared with the values of the loop 1

If K,M,u remains strictly identical, it is not the case for u (the 
eigenvectors) ... why ?

I've ever check any initialization issue, but everything seems to be ok

Paul

PS : the results of this case

Max delta v2 - v1 = 453.857
Max delta K2 - K1 = 0
Max delta M2 - M1 = 0

Max delta v3 - v1 = 549.214
Max delta K3 - K1 = 0
Max delta M3 - M1 = 0

Max delta v4 - v1 = 585.95
Max delta K4 - K1 = 0
Max delta M4 - M1 = 0

Max delta v5 - v1 = 379.702
Max delta K5 - K1 = 0
Max delta M5 - M1 = 0

Max delta v6 - v1 = 489.844
Max delta K6 - K1 = 0
Max delta M6 - M1 = 0

Max delta v7 - v1 = 439.221
Max delta K7 - K1 = 0
Max delta M7 - M1 = 0

Max delta v8 - v1 = 432.406
Max delta K8 - K1 = 0
Max delta M8 - M1 = 0

Max delta v9 - v1 = 351.752
Max delta K9 - K1 = 0
Max delta M9 - M1 = 0

Max delta v10 - v1 = 554.515
Max delta K10 - K1 = 0
Max delta M10 - M1 = 0

-Message d'origine-
De : Carrico, Paul
Envoyé : mercredi 17 juin 2015 22:18
À : International users mailing list for Scilab.
Objet : RE: [Scilab-users] eigs calculation

Dear All

Thanks for the answers.

To give more information's on what I'm doing (That's quite new I confess), I'm 
performing  a (basic) finite element calculation with beams using sparse matrix 
(stiffness matrix K and mass matrix M).
[u,v] = 
eigs(K((ddl_elem+1):$,(ddl_elem+1):$),M((ddl_elem+1):$,(ddl_elem+1):$),n,SM);

Nota: ddl means dof

I'm calculated first the natural frequencies using (K - omega^2.M).x=0 ... the 
pulse (or circular frequencies)  are no more and no less than the eigenvalues 
of the above system (u = omega^2).

Just a mechanical remark: since the beam is clamped in one side (and free on 
the tip),  it is absolutely normal that you find twice the same natural 
frequency (1rst mode in one direction, the second one in a new direction at 
90°)  I've been really surprised to find it, but happy at the same time ...

The origin of my question was: since it obvious that the results are strongly 
sensitive to the units (i.e. the numbers), I'm wondering if there is a way to 
control the accuracy of the eigenvalues calculation using eigs keywords ... 

In any way, thanks for the debate

Paul

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] eigs calculation

2015-06-22 Thread Carrico, Paul
Dear Tim,

Thanks for the enlightenment, but unfortunately I confess I don't know how to 
proceed now; 

I feel that I need to fix such issue; another example if needed (see screenshot 
in attachment), the product herebellow should lead to the Identity matrix

Verif1 = u' * M * u 

(vhere u is the eigenvector matrix)



Paul


-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Tim Wescott 
Envoyé : vendredi 19 juin 2015 18:38 À : International users mailing list for 
Scilab.
Objet : Re: [Scilab-users] eigs calculation

Normalization refers to jiggering the numbers around in a way that does not 
change the problem in a strictly mathematical sense, but which makes it more 
tractable.

d = eigs(A, B) computes the solutions to

A * v = lambda * B * v

So any nonsingular square matrix N won't change the problem if it's multiplied 
in:

N * A * v = N * lambda * B * v

Because lambda is a scalar (well, I hope I'm getting that right) you can change 
the problem to

A_ = N * A, B_ = N * B, and

d = eigs(A_, B_)

will, theoretically, get the same answers as with the original matrices, but 
possibly with better numerical conditioning.  This is what you're doing when 
you change units.

If you don't mind the meaning of your eigenvectors changing, you can do a 
similarity transform.  Start with

N * A * N^(-1) * N * v = N * lambda * B * N^(-1) * N * v

Now set

A_ = N * A * N^(-1)
B_ = N * B * N^(-1)
v_ = N * v

[d, v_] = eigs(A_, B_); v = N^(-1) * v_;

will, again, theoretically give you the same numbers as before, but it may be 
better conditioned numerically.

Actually _finding_ N, or giving you advise on how to do so, is beyond my powers 
-- but maybe this will set you on a better road.

-- 

Tim Wescott
www.wescottdesign.com
Control  Communications systems, circuit  software design.
Phone: 503.631.7815
Cell:  503.349.8432


___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_usersd=AwIGaQc=0hKVUfnuoBozYN8UvxPA-wr=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLom=qhzR7ofb8i_twSz_CIbw-knVke_-DuytzJ4yEXImbIos=pz1Y6NzKAzCPEEaszY2aGRyCKq2L1x-sRi5OiI2QgKMe=
 

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] eigs calculation

2015-06-17 Thread Carrico, Paul
Dear All

Thanks for the answers.

To give more information's on what I'm doing (That's quite new I confess), I'm 
performing  a (basic) finite element calculation with beams using sparse matrix 
(stiffness matrix K and mass matrix M).
[u,v] = 
eigs(K((ddl_elem+1):$,(ddl_elem+1):$),M((ddl_elem+1):$,(ddl_elem+1):$),n,SM);

Nota: ddl means dof

I'm calculated first the natural frequencies using (K - omega^2.M).x=0 ... the 
pulse (or circular frequencies)  are no more and no less than the eigenvalues 
of the above system (u = omega^2).

Just a mechanical remark: since the beam is clamped in one side (and free on 
the tip),  it is absolutely normal that you find twice the same natural 
frequency (1rst mode in one direction, the second one in a new direction at 
90°)  I've been really surprised to find it, but happy at the same time ...

The origin of my question was: since it obvious that the results are strongly 
sensitive to the units (i.e. the numbers), I'm wondering if there is a way to 
control the accuracy of the eigenvalues calculation using eigs keywords ... 

In any way, thanks for the debate

Paul

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de 
roger.corm...@ncf.ca
Envoyé : 17 June 2015 19:50
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] eigs calculation

Paul:

Did you consider checking the condition number of the matrix?

What I sometimes do, for problems that are ill conditioned by their very 
nature, is normalise the entries in an attempt to be as far away from 
singularity (i.e. to keep the rows and columns as orthogonal as possible) and 
then do a check on the condition number to see if there is an improvement. The 
lower the condition number the better. Once your calculations are done you can 
convert back to the un-normalised entries, does improve a bit when inverting 
matrices of ill-conditioned problems such as target-motion analysis.

I'm willing to bet that the condition number of the second matrix is a bit 
lower than of the first one. Also, I'm noticing that there are  four double 
poles, possibly six in total (resonnances 5 and 6, and 11 and 12), in the 
second calculation. You knowing your system, that could provide you with some 
hints as to which calculation to trust.

Let me know how you make out.

Regards,


Roger.
 

___
Dr. Roger Cormier, P.Eng.


Le mer. 17 juin 2015 à 11:55, t...@wescottdesign.com a écrit :

 On 2015-06-17 06:50, Carrico, Paul wrote:
 Dear All,
 I'm performing a (mechanical) calculation using the eigs and I've been
 noticing that the results are strongly sensitive on the unit system
 I'm using; I can understand that high numbers can lead to some
 numerical issues .
 Is there a way to increase the accuracy ?
 Paul
 PS: the 2 types of results
 _NB_:
 1 (MPa) = 1E6 (Pa)
 1 (mm) = 1E-3 (m)
 1 (Kg/m^3) = 1E12 (T/mm^3)
 [u,v] =
 eigs(K((ddl_elem+1):$,(ddl_elem+1):$),M((ddl_elem+1):$,(ddl_elem+1):$),n,SM);
 a) calculation 1 in Pa, m, Kg/m^3
 Natural frequency calculation:
 - Resonance 1 : 497.956 Hz
 - Resonance 2 : 3120.64 Hz
 - Resonance 3 : 5277.8 Hz
 - Resonance 4 : 6948.69 Hz
 - Resonance 5 : 8737.88 Hz
 - Resonance 6 : 15832.1 Hz
 - Resonance 7 : 17122.8 Hz
 - Resonance 8 : 20847.8 Hz
 - Resonance 9 : 26382.5 Hz
 - Resonance 10 : 28305.1 Hz
 - Resonance 11 : 34752 Hz
 - Resonance 12 : 36926.4 Hz
 b) Calculation in MPa, mm, T/mm^3 ..
 Natural frequency calculation:
 - Resonance 1 : 497.955 Hz
 - Resonance 2 : 497.956 Hz
 - Resonance 3 : 3120.59 Hz
 - Resonance 4 : 3120.64 Hz
 - Resonance 5 : 6948.69 Hz
 - Resonance 6 : 7463.93 Hz
 - Resonance 7 : 8737.56 Hz
 - Resonance 8 : 8737.88 Hz
 - Resonance 9 : 17121.6 Hz
 - Resonance 10 : 17122.8 Hz
 - Resonance 11 : 20847.8 Hz
 - Resonance 12 : 22390 Hz
 
 Hi Paul:
 
 I can't tell you about the innards of Scilab specifically, but eigenvalue 
 calculation in general can be very sensitive to numerical issues.  If you're 
 entering the data by hand or otherwise truncating the source data your entire 
 difference in results may just be from rounding error in your source data.
 
 If you're starting from one set of source data and multiplying by conversion 
 constants, then you can try changing the tolerance (if it's not in the 
 function then there's a global one, called, I think, %TOL).
 
 There are ways to make the matrices more numerically stable.  I am absolutely 
 positively not an expert on this, but I think that the more you can make your 
 matrix into something with a band of non-zero numbers around the main 
 diagonal and zeros elsewhere, the more stable the problem will be.
 
 If mechanical systems are like control systems, then the numerical stability 
 of the matrix that describes the system dynamics is just a reflection of the 
 real sensitivity of the real system to manufacturing variations -- it may be 
 that, in a group of several physical units all assembled to the same 
 specification, you'll find

[Scilab-users] eigs calculation

2015-06-17 Thread Carrico, Paul
Dear All,

I'm performing a (mechanical) calculation using the eigs and I've been noticing 
that the results are strongly sensitive on the unit system I'm using; I can 
understand that high numbers can lead to some numerical issues ...

Is there a way to increase the accuracy ?

Paul

PS: the 2 types of results


NB:
1 (MPa) = 1E6 (Pa)
1 (mm) = 1E-3 (m)
1 (Kg/m^3) = 1E12 (T/mm^3)

[u,v] = 
eigs(K((ddl_elem+1):$,(ddl_elem+1):$),M((ddl_elem+1):$,(ddl_elem+1):$),n,SM);



a) calculation 1 in Pa, m, Kg/m^3
Natural frequency calculation:
- Resonance 1 : 497.956 Hz
- Resonance 2 : 3120.64 Hz
- Resonance 3 : 5277.8 Hz
- Resonance 4 : 6948.69 Hz
- Resonance 5 : 8737.88 Hz
- Resonance 6 : 15832.1 Hz
- Resonance 7 : 17122.8 Hz
- Resonance 8 : 20847.8 Hz
- Resonance 9 : 26382.5 Hz
- Resonance 10 : 28305.1 Hz
- Resonance 11 : 34752 Hz
- Resonance 12 : 36926.4 Hz
b) Calculation in MPa, mm, T/mm^3 
Natural frequency calculation:
- Resonance 1 : 497.955 Hz
- Resonance 2 : 497.956 Hz
- Resonance 3 : 3120.59 Hz
- Resonance 4 : 3120.64 Hz
- Resonance 5 : 6948.69 Hz
- Resonance 6 : 7463.93 Hz
- Resonance 7 : 8737.56 Hz
- Resonance 8 : 8737.88 Hz
- Resonance 9 : 17121.6 Hz
- Resonance 10 : 17122.8 Hz
- Resonance 11 : 20847.8 Hz
- Resonance 12 : 22390 Hz

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


[Scilab-users] advice on a pseudo-bandwidth calculation

2015-06-09 Thread Carrico, Paul
Dear all

I'm currently thinking  in a way to compare experimental have a bell shape, 
composed of points and not connected to any parametric curve (the bell shape 
assumption could answer to the need in a first step).

A way I can imagine is to calculate a kind of  bandwidth (-3 db).

I add a look in the Scilab help but nothing obvious appears

what is the best way to proceed to:
- calculate/determine the intersection points with the pseudo-curves,
- the number of points may change and may have different abscissa ?
- the points could not necessarily by expressed by a parametric curve (to fit 
on before calculating the intersection),

Any suggestion are welcome


NB: please find hereafter a basic example using a gauss curve (just to 
illustrate the purpose)


Thanks

Paul

##

mode(0)



// gauss curve

coef = 10;

x = [-6 : 0.1 : 6]';

[nl,nc]=size(x);

y1 = coef*(1/sqrt(2*%pi))*exp(-0.5*x.^2);



// -3db line

top_ = max(y1);

three_db = top_/sqrt(2);

y2=three_db*ones(nl,1);



plot2d(x,y1); // gausse curve

plot2d(x,y2); // -3db line


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] Comments displayed on Console

2014-07-11 Thread Carrico, Paul
Add “Mode(0)” (without the quotes

Paul



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

De : users [mailto:users-boun...@lists.scilab.org] De la part de Luís Felipe 
Rosa
Envoyé : jeudi 10 juillet 2014 17:42
À : users@lists.scilab.org
Objet : [Scilab-users] Comments displayed on Console

Hi everyone,

I'm trying to change from Matlab to Scilab and I'm having a doubt that is 
apparently simple.

When I run a .sce file, Scilab displays my comments in the Console, which makes 
the screen get very full of information. Is it possible that Scilab do not 
display comments in the console when running a .sce file?

Thanks a lot.

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


[Scilab-users] Old Nigthtly build release

2014-04-01 Thread Carrico, Paul
Dear All,

I would like to know if it's possible to get an old nightly build release 
(typically the one of the august-29th 2013) ? ... but  I'm a bit pessimistic; I 
removed it by error.

NB:

-  The new releases (and the one I'm interested in) corrected some 
troubles in the current stable one (5.4.1)

-  The latest releases need glibc2.14 (or higher)  that is not in my 
CentOS

-  The release I was using so far worked fine ... :(:(

Thus I cannot use Scilab under linux 

Thanks for any help from the developers

Paul


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] Interfacing fortran code with scilab

2014-02-05 Thread Carrico, Paul
All

 before using fortan code, did you have a look to the vectorization in order 
to avoid loops (that drastically decrease speed)  and to increase speedup 
consequently ?

Just an advice

Paul

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Pierre 
Vuillemin
Envoyé : mercredi 5 février 2014 09:56
À : users@lists.scilab.org
Objet : [Scilab-users] Interfacing fortran code with scilab

Hello all,

I am currently learning fortran in order to speed up some part o my code and I 
would like to interface it with Scilab.

To make some tests, I have used this fortran code :

subroutine matmul(C,A,B,m,n,p)
integer ::m,n,p,i,j,k
real(kind=8),dimension(m,n),intent(in)::A
real(kind=8),dimension(n,p),intent(in)::B
real(kind=8),dimension(m,p),intent(out)::C
real(kind=8):: temp
C = 0
do j =1,p
  do k=1,n
temp = B(k,j)
do i=1,m
C(i,j)=C(i,j) + A(i,k)*temp
end do
  end do
end do
end subroutine matmul

which performs a matrix multiplication. Then I have used 'ilib_for_link'
to create the link.
It works but I have some questions : 

- I did the same thing in Python with f2py and the code is seemingly faster in 
python, I was wondering why ? (the precision is the same)

- If I change the 'kind = 8' to 'kind = 4' in the fortran code, the function 
returns a result which completely wrong.
I expected it to be wrong, but not that much : for instance, with A = 10 and B 
= 20, the call to the fortran function gives me '6.36D-314'  
What is the reason? (My comprehension of how fortran types work with the kind 
parameter is still limited, I know that kind=8 and kind=4 is not a very 
portable expression though)

- If I replace
real(kind=8),dimension(m,p),intent(out)::C
by
real(kind=8),dimension(:,:),intent(out)::C
I get a segfault in Scilab or it just closes. I was wondering why ? (I thought 
it was something valid since gfortran still compiles)

- Is it possible to keep the upper case in the name of fortran functions when 
linked to scilab ? (At the beginning, my function was called 'matMul' and it 
took me some time to figure out what the error message 'matMul is not an entry 
point' meant)

Best regards,

Pierre Vuillemin

___
users mailing list
users@lists.scilab.org
https://urldefense.proofpoint.com/v1/url?u=http://lists.scilab.org/mailman/listinfo/usersk=b2vlTQszY8VIpYRvaG%2By2A%3D%3D%0Ar=SzPQe21KEY%2BPdUhJge5w%2FdtbtLgIXw5YTsnbzx%2F7JYE%3D%0Am=ULVia0lWcxnisV%2BYAJ894mfD5PBI7UEZDeqeSqE9PQw%3D%0As=4501ea13ac011e234cb1dd1cdf1810c4388736b832cf43301a84c41f80b767f5



Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] Advice from Scilab community

2013-10-22 Thread Carrico, Paul
Thanks everybody for the advances ... let me now having a look on it

Paul

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Dang, 
Christophe
Envoyé : mardi 22 octobre 2013 15:29
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Advice from Scilab community

 In the second case, I'm afraid you'll have to sort the matrix...

Or you might generate a hashcode for every row, that is not sensitive to the 
order of the elements.

You spend time computing this hashcode,
but it makes the search faster because you only have to scan one value, and 
then discriminate the false results (collisions).

A very simple, and probably not so efficient, solution would be to compute the 
sum of every line.

You should investigate which solution is less worse.

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

__

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
__
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


[Scilab-users] Matrix of characters conversion

2013-10-21 Thread Carrico, Paul
Dear All

 

How can I convert a matrix of characters into integers when the
separator has different number of spaces ?

 

The spaces come probably  from a printf format such as :
printf(%10d\n,var)

 

I 'm currently using csvTextScan and I've some troubles/errors  with
csvRead ...

 

Example :

! 36 12799 24678 17504 21558212801 24680
17508 21560 !

 

NB:

-  I read first an ascii file

-  I removed some specific lines directly in the matrix

-  Then I'm trying to convert the matrix of characters into a
matrix of intergers

 

Thanks for any suggestion

 

Paul

 

#

PATH_FILE = get_absolute_file_path(lecture.sce); 
FILE_NAME = 'topology_elem.rad';
 
stacksize('max'); 
M = mopen(PATH_FILE + / + FILE_NAME,'r');
record = mgetl(M);
[nl,nc] = size(record);
 
nbre_elem = (nl / 3);
Nodes_char(1:nbre_elem) = record(1:3:nl);
 
// convert
Nodes = csvTextScan(Nodes_char, ); //
!
 
mclose(M)

 

 

 





Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] Matrix of characters conversion

2013-10-21 Thread Carrico, Paul
It works well with one line, but I do not figure out how to use it with a 
matrix without using a loop ?

 

//i = [1 : nbre_elem]';

//A = zeros(nbre_elem,9);

//A(i,:) = evstr(tokens(Nodes_char(i)))' è doesn't work

 

// works

for i = 1 : 10

A(i,:) = evstr(tokens(Nodes_char(i)))';

end

 

 

NB: I've some troubles with csvTextScan for example when the first character is 
a separator ...

 

 

 

De : users [mailto:users-boun...@lists.scilab.org] De la part de Samuel Gougeon
Envoyé : lundi 21 octobre 2013 15:21
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Matrix of characters conversion

 

Hello,

Le 21/10/2013 14:29, Carrico, Paul a écrit :

Dear All

 

How can I convert a matrix of characters into integers when the 
separator has different number of spaces ? 



The spaces come probably  from a printf format such as : 
printf(%10d\n,var)

I 'm currently using csvTextScan and I've some troubles/errors  with 
csvRead ...

Example :

! 36 12799 24678 17504 21558212801 24680
 17508 21560 !

ligne = 36 12799 24678 17504 21558212801 24680 
17508 21560
evstr(tokens(ligne))  // yields:

--evstr(tokens(ligne))
 ans  = 
36.  
12799.   
24678.   
17504.   
21558.   
212801.  
24680.   
17508.   
21560.   

HTH
Samuel





Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] Matrix of characters conversion

2013-10-21 Thread Carrico, Paul
Hi Osvaldo

 

I absolutely want to avoid a loop in order to convert fast my ascii file into a 
matrix of integer ... I might be possible to use vectorization 

 

For example, my matrix has more than a 100 000 lines .

 

De : users [mailto:users-boun...@lists.scilab.org] De la part de Osvaldo Sergio 
Farhat de Carvalho
Envoyé : lundi 21 octobre 2013 16:05
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Matrix of characters conversion

 

Hi Paul,

 

Suppose lines is a column vector of strings, each element being a meaningful 
line of your input file. Try

m = [];

[nl,nc] = lines;

for i = 1:nl

  tks = tokens(lines(i));

  intValues = (eval(tks))'; // transpose in order to get a row

  m = [m;intValues];

end

 

Hope it works.

 

Osvaldo




-users users-boun...@lists.scilab.org escreveu: - 

Para: International users mailing list for Scilab. users@lists.scilab.org
De: Adrien Vogt-Schilb 
Enviado por: users 
Data: 21/10/2013 11:32 AM
Assunto: Re: [Scilab-users] Matrix of characters conversion

I would read the string matrix, trying to obtain a 1x1 string matrix (or at 
least a 1 column string matri, eg with csvRead)

then use regexp to replace several spaces by only one, i guess you have to 
replace  * by * (without the quotes: replace [SPACE][STAR] by [SPACE])

then split the matrix where the single spaces are separtors with csvTextScan 




On 21/10/2013 09:02, Carrico, Paul wrote:

Dear Paul

 

Yes, you're right ...  it can be done easily under vi for example ...  
but it remains a trick ! 

 

Is it out of Scilab scope to directly manage the number of spaces (as 
separator) ? 

 

Paul

  

De : Paul BIGNIER [ mailto:paul.bign...@scilab-enterprises.com 
mailto:paul.bign...@scilab-enterprises.com ] 
Envoyé : lundi 21 octobre 2013 14:51
À : International users mailing list for Scilab.; Carrico, Paul
Objet : Re: [Scilab-users] Matrix of characters conversion 

 

Dear Paul,

How about manually editing your file to standardize the spacing between 
the numbers?

For instance, using your editor's Find and Replace tool to replace 
two spaceswith one space   until you get only one space between each 
number?

Hope this helps,
Have a good day,
Paul.


On 10/21/2013 02:29 PM, Carrico, Paul wrote: 

Dear All

 

How can I convert a matrix of characters into integers when the 
separator has different number of spaces ? 

  

The spaces come probably  from a printf format such as : 
printf(%10d\n,var) 

  

I 'm currently using csvTextScan and I've some troubles/errors  
with csvRead ...

 

Example :

! 36 12799 24678 17504 21558212801 
24680 17508 21560 ! 

  

NB:

!--[if !supportLists]---   !--[endif]-- I read 
first an ascii file

!--[if !supportLists]---   !--[endif]-- I removed 
some specific lines directly in the matrix

!--[if !supportLists]---   !--[endif]-- Then I'm 
trying to convert the matrix of characters into a matrix of intergers 

  

Thanks for any suggestion 

  

Paul

 

#

PATH_FILE =   get_absolute_file_path ( lecture.sce ) ; 

FILE_NAME =   'topology_elem.rad' ;

 

stacksize ( 'max' ) ; 

M =   mopen ( PATH_FILE +   /   +  FILE_NAME, 'r' ) ;

record =   mgetl ( M ) ;

[ nl,nc ]   =   size ( record ) ;

 

nbre_elem =   ( nl /   3 ) ;

Nodes_char ( 1 : nbre_elem )   = record ( 1 : 3 : nl ) ;

 

// convert

Nodes =   csvTextScan ( Nodes_char,   ) ; // 
! 

  

mclose ( M )

  

  

 



 

 

 

Le présent mail et ses pièces jointes sont confidentiels et 
destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu 
cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer 
le message de votre système. Toute divulgation, copie ou distribution de cet 
e-mail est strictement interdite. 

 

This email and any files transmitted with it are confidential 
and intended solely

Re: [Scilab-users] Matrix of characters conversion

2013-10-21 Thread Carrico, Paul
Thanks

 

It works for small matrix ... but troubles with huge ones  L

 

De : users [mailto:users-boun...@lists.scilab.org] De la part de Serge Steer
Envoyé : lundi 21 octobre 2013 16:20
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Matrix of characters conversion

 

You can use evstr for that
example
M=[1 2   5.54
3.45 8 -123
0   -432.512  -0.435]

--evstr(M)
 ans  =
 
1.  2. 5.54   
3.458.   - 123.   
0.- 432.512  - 0.435  
 
Serge

Le 21/10/2013 14:29, Carrico, Paul a écrit :

Dear All

 

How can I convert a matrix of characters into integers when the 
separator has different number of spaces ?

 

The spaces come probably  from a printf format such as : 
printf(%10d\n,var)

 

I 'm currently using csvTextScan and I've some troubles/errors  with 
csvRead ...

 

Example :

! 36 12799 24678 17504 21558212801 24680
 17508 21560 !

 

NB:

-  I read first an ascii file

-  I removed some specific lines directly in the matrix

-  Then I'm trying to convert the matrix of characters into a 
matrix of intergers

 

Thanks for any suggestion

 

Paul

 

#

PATH_FILE = get_absolute_file_path(lecture.sce); 
FILE_NAME = 'topology_elem.rad';
 
stacksize('max'); 
M = mopen(PATH_FILE + / + FILE_NAME,'r');
record = mgetl(M);
[nl,nc] = size(record);
 
nbre_elem = (nl / 3);
Nodes_char(1:nbre_elem) = record(1:3:nl);
 
// convert
Nodes = csvTextScan(Nodes_char, ); // 
!
 
mclose(M)

 

 

 



 
 
Le présent mail et ses pièces jointes sont confidentiels et destinés à 
la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail 
par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message 
de votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.
 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this email in error, please contact the sender 
and delete the email from your system. If you are not the named addressee you 
should not disseminate, distribute or copy this email.
 
 
 
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
 
 

 





Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] Matrix of characters conversion

2013-10-21 Thread Carrico, Paul
Erreur de l'API :

dans getAllocatedSingleString : Type erroné de l'argument 
d'entrée n°1 : Une seule chaîne de caractères attendue.

 

toto = fscanfMat(Nodes_char)

 !--error 999 

fscanfMat : Erreur d'allocation mémoire.

 

De : users [mailto:users-boun...@lists.scilab.org] De la part de Adrien 
Vogt-Schilb
Envoyé : lundi 21 octobre 2013 16:43
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Matrix of characters conversion

 

Did you try fscanfMat? It could work 


On 21/10/2013 10:30, Carrico, Paul wrote:

Thanks

 

It works for small matrix ... but troubles with huge ones  L

 

De : users [mailto:users-boun...@lists.scilab.org] De la part de Serge 
Steer
Envoyé : lundi 21 octobre 2013 16:20
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Matrix of characters conversion

 

You can use evstr for that
example
M=[1 2   5.54
3.45 8 -123
0   -432.512  -0.435]

--evstr(M)
 ans  =
 
1.  2. 5.54   
3.458.   - 123.   
0.- 432.512  - 0.435  
 
Serge

Le 21/10/2013 14:29, Carrico, Paul a écrit :

Dear All

 

How can I convert a matrix of characters into integers when the 
separator has different number of spaces ?

 

The spaces come probably  from a printf format such as : 
printf(%10d\n,var)

 

I 'm currently using csvTextScan and I've some troubles/errors  
with csvRead ...

 

Example :

! 36 12799 24678 17504 21558212801 
24680 17508 21560 !

 

NB:

-  I read first an ascii file

-  I removed some specific lines directly in the matrix

-  Then I'm trying to convert the matrix of characters 
into a matrix of intergers

 

Thanks for any suggestion

 

Paul

 

#

PATH_FILE = get_absolute_file_path(lecture.sce); 
FILE_NAME = 'topology_elem.rad';
 
stacksize('max'); 
M = mopen(PATH_FILE + / + FILE_NAME,'r');
record = mgetl(M);
[nl,nc] = size(record);
 
nbre_elem = (nl / 3);
Nodes_char(1:nbre_elem) = record(1:3:nl);
 
// convert
Nodes = csvTextScan(Nodes_char, ); // 
!
 
mclose(M)

 

 

 



 
 
Le présent mail et ses pièces jointes sont confidentiels et 
destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu 
cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer 
le message de votre système. Toute divulgation, copie ou distribution de cet 
e-mail est strictement interdite.
 
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this email in error, please contact the sender 
and delete the email from your system. If you are not the named addressee you 
should not disseminate, distribute or copy this email.
 
 
 
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
 
 

 



 
 
Le présent mail et ses pièces jointes sont confidentiels et destinés à 
la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail 
par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message 
de votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.
 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this email in error, please contact the sender 
and delete the email from your system. If you are not the named

Re: [Scilab-users] Double y-axis on a single plot!

2013-09-27 Thread Carrico, Paul
The link doesn't work

 

De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Eric Dubois
Envoyé : vendredi 27 septembre 2013 08:09
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Double y-axis on a single plot!

 

Hello.

In my toolbox grocer, available on Atoms or my web site, 
dubois.ensae.net/grocee.html, you will find a function pltseries that provides 
this, among manu other things.

Éric

Le 26 sept. 2013 23:05, Debola Abduljeleel boljel...@yahoo.com a écrit :


Hi everyone,
Please how can I plot a graph with 2 y-axes i.e. Left  right with just one 
single x-axis.
Regards.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] [PUB] Image correlation

2013-09-20 Thread Carrico, Paul
I'm a complete newby on that topic, and have no idea about the complexity of 
the issue ; ideally I would like to compare a photograph BEFORE and AFTER a 
test in order to measure the differences (accurate enough ?)
 
through some documents I found on the net, it seems to be a hard topic ...
 
Paul



De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Antoine Monmayrant
Envoyé : vendredi 20 septembre 2013 14:11
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] [PUB] Image correlation


Le 20/09/13 13:58, Carrico, Paul a écrit :


Dear all,
 
A personal reflexion: does somebody have ever used Scilab and tools for
image correlation (2D) ? typically for mechanical topics ...

I did it to illustrate some lessons on Fourier Transform and convolution 
filtering.
It's quite efficient.
I think some of the image processing toolboxes offer convolution filters 
dedicated to image filtering (for my lesson, I imported my images as double 
matrices).

Antoine


 
Paul





Le présent mail et ses pièces jointes sont confidentiels et destinés à 
la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail 
par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message 
de votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this email in error, please contact the sender 
and delete the email from your system. If you are not the named addressee you 
should not disseminate, distribute or copy this email.


 

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






Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] [PUB] Image correlation

2013-09-20 Thread Carrico, Paul
More or less ... Basically on a plate 

-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Dang, Christophe
Envoyé : vendredi 20 septembre 2013 14:27
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] [PUB] Image correlation

Hello, 

 De la part de Carrico, Paul
 Envoyé : vendredi 20 septembre 2013 14:17

 does somebody have ever used Scilab and tools for
 image correlation (2D) ? typically for mechanical topics ...
 [...]
 ideally I would like to compare a photograph BEFORE and AFTER a test
 in order to measure the differences (accurate enough ?)

Do you mean something like evaluating the plastic deformation?

-- 
Christophe Dang Ngoc Chan
Mechanical calculation engineer

__

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
__
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] Sequential Quadratic Programming in Scilab

2013-08-29 Thread Carrico, Paul
I downloaded the latest nlopt-2.3 tarball, unpacked scinlopt in a temporary 
repertory, updated the loader.sce file and executed it directly in scilab ... 
the compilation seemed to run fine ...
 
While help files exist in the unpacked repertory, i do not figure out how to 
have access to it in the help browser    neither nlopt nor slsqp leads to 
any help page 
 
Am I mistaken ?
 
Paul



De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Rakhi Warriar
Envoyé : jeudi 29 août 2013 08:33
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Sequential Quadratic Programming in Scilab


Hi, I could install scinlopt through atomsInstall(scinlopt). I am not sure if 
this is the latest version. The atoms page says that it is still being 
packaged.  
But am still trying to figure out how to use it. There aren't any help files. 

Rakhi


On Thu, Aug 29, 2013 at 11:49 AM, Carrico, Paul paul.carr...@esterline.com 
wrote:



maybe have a look to NLOPT including SQP algorithm (among others) ... 
but it's not linked to Scilab so far  
 



De : users-boun...@lists.scilab.org 
[mailto:users-boun...@lists.scilab.org] De la part de Rakhi Warriar
Envoyé : jeudi 29 août 2013 07:58
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Sequential Quadratic Programming in Scilab


Thanks for the info! I shall revert back if I have any further queries. 

Rakhi


On Tue, Aug 20, 2013 at 5:40 PM, Stéphane Mottelet 
stephane.motte...@gmail.com wrote:


Hello, 

I have updated the fsqp toolbox for Scilab 5.4 an can provide 
the package (without the cfsqp.c file which has to be obtained from the 
authors).


S.


2013/8/19 Michael BAUDIN michael.bau...@edf.fr


Hi, 

What kind of optimization problem are you willing to 
solve ? SQP is typical for nonlinear programming (with constraints), but this 
is just a guess an may not correspond to your specific issue. 

If you have a constrained optimization problem, I 
suggest to try : 

http://atoms.scilab.org/toolboxes/sci_ipopt 
http://atoms.scilab.org/toolboxes/sci_ipopt  

If you are searching for a smoothier interface, please 
try : 

http://atoms.scilab.org/toolboxes/fmincon 
http://atoms.scilab.org/toolboxes/fmincon  

but this is still in pre-alpha state. 

The toolbox : 

http://atoms.scilab.org/toolboxes/scinlopt 
http://atoms.scilab.org/toolboxes/scinlopt  

might be helpful. But, as far as I can see, there are 
packaging issues (the previous release was not available on Windows, and the 
latest release is not packaged on atoms). 

The FSQP toolbox was never released publicly for 
license reasons. It was available upon request to the authors, for research 
only. The code is simple and efficient. My guess is that it is not maintained 
anymore, except, perhaps, by Scilab Enterprises. 

Hope this helps. 

Best regards, 

Michaël 



De :rakhiwarr...@gmail.com 
A :users@lists.scilab.org 
Date :19/08/2013 09:49 
Objet :[Scilab-users] Sequential Quadratic 
Programming in Scilab 
Envoyé par :users-boun...@lists.scilab.org 






Hello 

How can one do SQP using Scilab? I found a pdf that 
explains about an fsqp toolbox in Scilab, but the link given does not work 
anymore. Could someone tell me of any toolboxes available for SQP in Scilab?  

Thanks! 

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

Re: [Scilab-users] Scilab compilation

2013-08-28 Thread Carrico, Paul
Hi

Sounds good ... Thanks

NB: I've some warnings I would like to swich off, but it seems to work

scilab-cli-bin: /opt/scilab-master-1377263957/lib/thirdparty/libcurl.so.4: no 
version information available (required by 
/opt/scilab-master-1377263957/lib/scilab/libscilab-cli.so.0)
scilab-cli-bin: 
/opt/scilab-master-1377263957/lib/thirdparty/libcrypto.so.0.9.8: no version 
information available (required by 
/opt/scilab-master-1377263957/lib/thirdparty/libcurl.so.4)
Paul

PS: I didn't know for the different mailing list



-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Sylvestre Ledru
Envoyé : mardi 27 août 2013 17:54
À : users@lists.scilab.org
Objet : Re: [Scilab-users] Scilab compilation

On 27/08/2013 17:49, Carrico, Paul wrote:
 Dear All
 
  
 
 The nightly build release binary (Linux OS) asks for glibc-2.14 whereas
 only the 2.12 is installed under my CentOS ... I've a doubt : if I try
 (once again) to compile scilab(with all the dependencies) , will it work
 using this library of the 2.14 is absolutely requested ?
No. It is not at all require.

Sylvestre
PS: you should ask the -dev mailing list for such question.


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



Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] scilab and Centos

2013-07-26 Thread Carrico, Paul
I'm speaking about the latest NB (i.e. Scilab  5.5.0) release that should 
correct a bug in the stable release (ok under Windows but I need the linux 
release) 
 
the 5.5.0 asks for glibc 2.14 (maybe newer) ...
 
Paul


De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Antoine Monmayrant
Envoyé : vendredi 26 juillet 2013 13:51
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] scilab and Centos


On 26/07/2013 12:49, Carrico, Paul wrote:


Dear All
 
Is there in the community somebody who's using Scilab under CentOS 6.4 ?


I am using 5.4.1 under Centos 5.9 and 6.2 without any issue.
I don't have access to a 6.4 to try my install on it.

Antoine


 
The lastest Nightly build needs glibc2.14 (or ever newer) and the
package is in 2.12 release ... any workaround ? (have see nothing in the
devtools)
 
Thanks for any support
 
Paul





Le présent mail et ses pièces jointes sont confidentiels et destinés à 
la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail 
par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message 
de votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you have received this email in error, please contact the sender 
and delete the email from your system. If you are not the named addressee you 
should not disseminate, distribute or copy this email.


 

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






Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


[Scilab-users] Nightly build release ?

2013-06-06 Thread Carrico, Paul
All,
 
A bug on the call_scilab function were highlighted and it has been
corrected, asking for installing a nightly build release, but between
the Master one and the YaSp one, which is the right one ?
 
Another (non negligible) step will be the compilation .
 
Thanks
 
Paul
 




Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


[Scilab-users] scilab nightly build : installation problems

2013-06-06 Thread Carrico, Paul
Scilab team,
 
Connection refused when I try to download the prerequirements 
(I checked to proxy and no problem with it) 
 
NB: when I launch scilab from the master binary, I've a lack of
libquadmath.so.5 libraries .. that's why I'm thinking in
compilling scilab (with pain)
 
Paul
 

Some packages are missing when I compile Scilab console module. Where
can I find them ?

All needed packages to compile Scilab under Linux can be found in Scilab
SVN pre-requirements directory:

mkdir Prerequirements
cd Prerequirements
svn co --username anonymous --password Scilab
svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/
So, to download scilab and the prerequirements packages :

git clone git://git.scilab.org/scilab scilab.sources
svn export --force --username anonymous --password Scilab
svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/bin
scilab.sources/scilab/bin
svn export --force --username anonymous --password Scilab
svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/thi
rdparty scilab.sources/scilab/thirdparty
 




Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


[Scilab-users] How to mix strings and doubles in a matrix ?

2013-06-05 Thread Carrico, Paul
Dear All
 
How can I mix strings and doubles in a matrix ?
 
Example :
string_matrix = [ 'a' ; 'b' ; 'c']
double_matrix = [ 1 ; 2 ; 3]

mixed_matrix = [string_matrix double_matrix]
 
 
NB : how to initialize a matrix of string ? equivalent to zeros(n)

 
Thanks
 
Paul




Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


[Scilab-users] favor

2013-05-30 Thread Carrico, Paul
Dear All,
 
This is not directly a scilab request by it has to be intended to be
used within ...
 
I'm trying to find an equivalent to @ECHO OFF (under Windows) in a
shell under linux OS ... I want to echo precious information's (thus I
want to avoid /dev/null)
 
Thanks for any advice
 
Paul
 




Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


Re: [Scilab-users] echo with bash [was: favor]

2013-05-30 Thread Carrico, Paul
Thanks first for the answers, 

In order to temporary hide some information's, I used a pseudo-encryption using 
shc tool ... My shell becames a binary and I cannot use sh

Of course I tried something like 1spy_file but everything appears in the 
spy_file, not in the scilab console 

Paul

 

-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Sylvestre Ledru
Envoyé : jeudi 30 mai 2013 09:47
À : users@lists.scilab.org
Objet : [Scilab-users] echo with bash [was: favor]

On 30/05/2013 09:41, Carrico, Paul wrote:
 Dear All,
  
 This is not directly a scilab request by it has to be intended to be
 used within ...
  
 I'm trying to find an equivalent to @ECHO OFF (under Windows) in a
 shell under linux OS ... I want to echo precious information's (thus I
 want to avoid /dev/null)
sh -x yourscript.sh

Sylvestre



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



Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


[Scilab-users] unix_g in interactive mode

2013-05-28 Thread Carrico, Paul
Dear All,
 
I wrote a shell script that is launched into Scilab using unix_g
function ; this script contains some echo in order to get precious
information's.
 
Unfortunatly I've noticed that all these information's are printed after
the script ended ... is there a way to use it in interactive mode i.e.
to print the echo in real time ?
 
Thanks
 
Paul




Le présent mail et ses pièces jointes sont confidentiels et destinés à la 
personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par 
erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de 
votre système. Toute divulgation, copie ou distribution de cet e-mail est 
strictement interdite.

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error, please contact the sender and delete the 
email from your system. If you are not the named addressee you should not 
disseminate, distribute or copy this email.

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


  1   2   >