Re: [Scilab-users] Get filename by script command

2024-01-18 Thread CRETE Denis
Classified as: {OPEN}

Hello ,
get_absolute_file_path("script.sce");
gives only the full path of the script under execution ...
HTH
Denis



{OPEN}
De : users  De la part de Jens Simon Strom
Envoyé : jeudi 18 janvier 2024 11:42
À : International users mailing list for Scilab. 
Objet : [Scilab-users] Get filename by script command

Hi,
I look for a command which -- as part of a script -- returns  a string 
containing the file name or full path name of the current script.

uigetfile() seemed to be close but does something else.



Regards

Jens

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Noise canceling with playsnd( )

2023-12-20 Thread CRETE Denis
Marked as: {PRIVATE & PERSONAL}

I trie your code And it sounds right !-)
First on the left, then on the right, finally both simultaneously. I looks like 
it is what is expected; isn't it ?
Denis

De : users  De la part de Jens Simon Strom
Envoyé : mardi 19 décembre 2023 19:52
À : Users mailing list for Scilab 
Objet : [Scilab-users] Noise canceling with playsnd( )

Hallo Scilab friends,
My question is at the end of the comment.

fs=20050;

t=0:1/fs:1;

f=440;

a=sin(2*%pi*f*t); // harmonic

a_=asin(a); // distorted

silence=zeros(1,length(a));

y=[a,  silence, a;

 silence, a_,   -a];

playsnd(y,fs);

// The 1st section (channel 2 silent) and

// the 2nd one (channel 1 silent) sound as expected.

// The 3rd section sounds like the 1st, no silence!

// Why?



Regards Jens

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Noise canceling with playsnd( )

2023-12-20 Thread CRETE Denis
Marked as: {PRIVATE & PERSONAL}

Hello Jens,


De : users  De la part de Jens Simon Strom
Envoyé : mardi 19 décembre 2023 19:52
À : Users mailing list for Scilab 
Objet : [Scilab-users] Noise canceling with playsnd( )

Hallo Scilab friends,
My question is at the end of the comment.

fs=20050;

t=0:1/fs:1;

f=440;

a=sin(2*%pi*f*t); // harmonic

a_=asin(a); // distorted

silence=zeros(1,length(a));

y=[a,  silence, a;

 silence, a_,   -a];

playsnd(y,fs);

// The 1st section (channel 2 silent) and

// the 2nd one (channel 1 silent) sound as expected.

// The 3rd section sounds like the 1st, no silence!

// Why?



Regards Jens

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Header in txt file for read command

2023-05-25 Thread CRETE Denis
Hello
Did you try fscanfMat ?
HTH
Denis

De : users  De la part de Jens Simon Strom
Envoyé : jeudi 25 mai 2023 13:07
À : International users mailing list for Scilab. 
Objet : [Scilab-users] Header in txt file for read command

Hi Scilab insiders,

My minimum example text file has 5 lines:


These data are used in a.sce
and also in b.sce
0 1
1 2
2 3


The read command shall only read the numerical data as a matrix, ignoring the 
two header lines.
How can I do that?

Regards
Jens


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Graphics: Highlighted Entity

2022-06-09 Thread CRETE Denis
Thank you for your answer. Actually I was essentially interested in clicking on 
a polyline (or may be other graphic elements like Arcs, Rectangles, etc… rather 
than Axes), which makes it change its color (for grey in my Scilab 6.1.0 on 
Ubuntu 20.04). I understand that this concerns the java engine rather than the 
Scilab one.
Once you have one such highlighted object, (and if this has been obtained in a 
“pause” mode, after typing “resume” on the console), I would like the 
subsequent code to identify which of the object has been highlighted by the 
click.

Best regards
Denis

De : users  De la part de Samuel Gougeon
Envoyé : mardi 7 juin 2022 21:19
À : users@lists.scilab.org
Objet : Re: [Scilab-users] Graphics: Highlighted Entity

Le 07/06/2022 à 11:08, CRETE Denis a écrit :
Hello,

In several occasions, I considered that it would be useful to get a handle on a 
highlighted entity.
Does a function which might be called “get_hilited_entity” exist ? I did not 
find either in the properties of basic entities like “Polyline” something 
related to the highlighted state of a polyline…



It depends on what  highlighted means to you. There is the Scilab's meaning -- 
as the current axes or figure are the default targets for forthcoming plots -- 
; and the java meaning -- as the elements that have the java focus, as when we 
click on a figure, or in an axes, on a curve, etc. Both meanings do not match:

  *   just clicking an an axes does not make it as the new default target for 
plotting
  *   making a figure or axes the active ones for Scilab does not move and put 
the mouse's pointer on them.
For the Scilab meaning, gce() is made for your request.

twinkle() helps a lot to visually identify the current active entity gce().

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


Re: [Scilab-users] Inquiry

2021-10-26 Thread CRETE Denis
Hello,
This question is too vague to get a single answer: it depends a lot on what you 
want to do.
I like Scilab for its simplicity and efficiency, in particular for handling 
matrices. But I had to develop part of my code with Python when I started to do 
parallel processing on GPU because of a Windows environment… (I did not have 
the opportunity to try Scilab on GPU under Linux nor Mac).
HTH
Denis

De : users  De la part de onyeka ogbonna
Envoyé : mardi 26 octobre 2021 14:25
À : users@lists.scilab.org
Objet : [Scilab-users] Inquiry

Which is advisable to learn now, Scilab or Python
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] datatips in multiple axes plot

2021-09-30 Thread CRETE Denis
Hello,
I tried to use the example of "newaxes" in the help files, but I can't create 
any datatip (because of frames ???)...
With the example of "sca" in the help files, I can create datatips on all 3 
curves (distributed on 2 different sets of axes). In this case, the subplots do 
not overlap.
If the axes_bounds vectors are changed to [0,0,1,1] for both sets of axes, so 
that now they overlap, then I could not create datatips anymore.

If you are looking for a workaround, then changing the order of the axes may be 
a solution. It should be possible to implement it by a new menu button created 
with uimenu (and as many submenus as the number of axes -1), each with a 
callback like "swap_handles(axes_1, axes_n)".
HTH
Denis

De : users  De la part de CHEZE David 227480
Envoyé : jeudi 30 septembre 2021 09:57
À : Users mailing list for Scilab 
Objet : [Scilab-users] datatips in multiple axes plot

Dear all,

I found a limitation in the datatip manager of any figure window, as 
illustrated in the screen capture below, from the "multiple scaled plots" 
example : the datatip manager can catch only the last axe that was plotted, in 
the example only the red curve. This is a pity since it might be needed to ask 
datatip for other curves as well when analysing experimental data for instance.
I tried to set first axe as the current axes, sca(gcf().children(3)), but I 
didn't manage to get the datatips for the first black curve.
Do you see any reason for this limitation? Enhancement suggestion ?


David

[cid:image001.png@01D7B5F6.9E231300]
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] find all files of specific type on hard drive

2021-09-27 Thread CRETE Denis
Hello,
May be with unix_g ?
HTH
Denis

De : users  De la part de P M
Envoyé : lundi 27 septembre 2021 16:51
À : International users mailing list for Scilab. 
Objet : [Scilab-users] find all files of specific type on hard drive

Dear All,

I need to find and list all files of a specific type on my hard driveHow to 
do that in the most elegant way?

E.g.:

- find all *.txt files in "D:\"
- also find all '*.txt' files in each sub - directory, sub-sub-directory, ..etc
- create a list that stores the absolute path names to the *.txt files.

I am aware of
- dir
- findfiles
- listfiles
- ls

But they only seem to list the files in a dedicated folder.

Is there a function, that also searches all sub-folders automatically?

Thank you,
Philipp



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


Re: [Scilab-users] disable grid in 3d plot

2021-08-29 Thread CRETE Denis
Hello,
Did you try the option of plot3d “flag=[mode, type, box]” with mode <0 ?
HTH
Denis

De : users  De la part de Federico Miyara
Envoyé : dimanche 29 août 2021 05:40
À : Users mailing list for Scilab 
Objet : [Scilab-users] disable grid in 3d plot


Dear All,

Is there any way to disable the grid on a surface generated using plot3d() or 
similar?

Sometimes it is useful, but when the grid where the data to plot are defined is 
too tight the black lines on the surface are way too invasive and the general 
appearance is almost black. I would expect a smooth surface, something like 
Sgrayplot() but in 3d.

Regards,

Federico Miyara

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]

Libre de virus. 
www.avast.com


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


Re: [Scilab-users] Plot Graphs on Different Axes

2021-07-28 Thread CRETE Denis
Hello,
Try using legends([”A”;”B”],1:2) instead of legend([”A” ;”B”]).
Alternatively, you may try legend(”A” ) before newaxes if called and 
legend(”B”) after.
HTH
Denis

De : users  De la part de Samuel Enibe
Envoyé : mercredi 28 juillet 2021 10:16
À : Users mailing list for Scilab 
Objet : Re: [Scilab-users] Plot Graphs on Different Axes

How can I add legends to the graphics,  I tried something like legend (["A"; 
"B"])
 Only the first entry is accepted while the second one is left out.

On Wed, 28 Jul 2021, 09:05 Samuel Enibe, 
mailto:samuel.en...@unn.edu.ng>> wrote:
Thank you very much Denis and Christopher. I have tried it with the newaxes 
command and filled = "off" and it worked.

Thank you very much and God bless you.


On Tue, 27 Jul 2021, 17:10 CRETE Denis, 
mailto:denis.cr...@thalesgroup.com>> wrote:
Hello,
I think this should work:

scf();
plot2d(x1',y1')
a=newaxes();
plot2d(x2',y2')
a.x_location="top";
a.y_location="right";
a.filled="off";

HTH
Denis

De : users 
mailto:users-boun...@lists.scilab.org>> De la 
part de Samuel Enibe
Envoyé : mardi 27 juillet 2021 17:17
À : Users mailing list for Scilab 
mailto:users@lists.scilab.org>>
Objet : [Scilab-users] Plot Graphs on Different Axes

I have the following sets of data:
x1 = [0 10 20 30 40 50 60 70 80 90];
y1 = [12.27   12.09   11.5310.639.4 7.896.144.22.13   
0];
x2 = [2   1.5 10.5 0-0.5-1-1.5-2];
y2 = [4.42   6.01   7.85   9.94   12.27   14.85   17.67   20.74   24.05];

I want to plot y1 with x1  (Graph 1) on Bottom x-axis and left y-axis and y2 
with x2 (Graph 2) on Top x-axis and Right y-axis. The axes have different 
ranges of values as seen from the example data

What is the simplest way of doing this?

Samuel  Enibe
University of Nigeria, Nsukka, Nigeria
___
users mailing list
users@lists.scilab.org<mailto:users@lists.scilab.org>
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plot Graphs on Different Axes

2021-07-27 Thread CRETE Denis
Hello,
I think this should work:

scf();
plot2d(x1',y1')
a=newaxes();
plot2d(x2',y2')
a.x_location="top";
a.y_location="right";
a.filled="off";

HTH
Denis

De : users  De la part de Samuel Enibe
Envoyé : mardi 27 juillet 2021 17:17
À : Users mailing list for Scilab 
Objet : [Scilab-users] Plot Graphs on Different Axes

I have the following sets of data:
x1 = [0 10 20 30 40 50 60 70 80 90];
y1 = [12.27   12.09   11.5310.639.4 7.896.144.22.13   
0];
x2 = [2   1.5 10.5 0-0.5-1-1.5-2];
y2 = [4.42   6.01   7.85   9.94   12.27   14.85   17.67   20.74   24.05];

I want to plot y1 with x1  (Graph 1) on Bottom x-axis and left y-axis and y2 
with x2 (Graph 2) on Top x-axis and Right y-axis. The axes have different 
ranges of values as seen from the example data

What is the simplest way of doing this?

Samuel  Enibe
University of Nigeria, Nsukka, Nigeria
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] plot2d3()

2021-04-12 Thread CRETE Denis
Hello ,
What about using « errbar » function, something like errbar(x,y 50+y, 0) ?
HTH
Denis

De : users  De la part de Federico Miyara
Envoyé : lundi 12 avril 2021 07:40
À : Users mailing list for Scilab 
Objet : [Scilab-users] plot2d3()


Dear All,

I'm trying to get a plot like this:
[cid:image001.jpg@01D72F77.52FA2D60]
where I intend to get a line plot where the lines come from the bottom of the 
plot instead of coming from 0 as is the normal way using plot2d3().

To get this with plot2d3() I had to plot the y axis data + 50 in order to make 
the botom of the plot coincident with 0, and then fake the labels using


gca()..y_ticks.labels = 
["-50","-45","-40","-35","-30","-25","-20","-15","-10","-5","0","5","10"]';


To get the circles I had to use plot() with "o" as third argument since 
plot2d3() doesn't accept it.

Is there a more direct way to get such result

Is a there some way of achieving this in a more tative way?

Thanks!

Regards,

Federico Miyara

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]

Libre de virus. 
www.avast.com


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


Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread CRETE Denis
Hello, I did not look carefully at the function "BetweenCurves", but it 
requires y1 and y2 to share the same x data. Isn't it a limitation ? Would it 
be useful to extend it to the case where x1 and x2 are not identical ?
Best regards
Denis
-Message d'origine-
De : users  De la part de Antoine Monmayrant
Envoyé : mercredi 7 avril 2021 11:16
À : users@lists.scilab.org
Objet : Re: [Scilab-users] Filled polygons from polylines

Hello all,

I think I answered this question before on this mailing list...

Ah, yes I did:

http://mailinglists.scilab.org/Reg-Area-Between-two-curves-td3393261.html#a4026721

Get the source for "[h,epoly,ey1,ey2]=BetweenCurves(x,y1,y2,varargin)" 
in the thread.

Hope it helps,

Antoine

On 07/04/2021 10:57, CRETE Denis wrote:
> Hello,
> The filled area is defined by 2 curves apparently; one is the top border and 
> one is the lower border. Is it possible to construct a closed polygon using 
> the points of both curves (something like C=[C1;C2] ) ?
> HTH
> Denis
>
> -Message d'origine-
> De : users  De la part de arctica1963 
> Envoyé : mercredi 7 avril 2021 09:26 À : users@lists.scilab.org Objet 
> : [Scilab-users] Filled polygons from polylines
>
> Hello,
>
> I have script that reads a csv file containing the data and uses that to 
> calculate subsidence from well information. This all works fine, but it is 
> not the best way to display the result. Is it possible to take the polyline 
> output and generate filled polygons (similar to attached image)?
>
> I am not sure how it is possible from the existing code to close the output 
> result used in the plot function to create a closed polygon. Essentially it 
> needs extra points otherwise you would just tie the end point and start point 
> of the polyline.
>
> It would be good to get some other ideas and whether it is actually possible. 
> Original code was in Matlab and had all of the data within the script, so I 
> took that out and stored in a separate data file for ease of use.
>
> Thanks for any suggestions.
>
> Lester
>
> Backstrip_1D_v1.sce
> <http://mailinglists.scilab.org/file/t495709/Backstrip_1D_v1.sce>
> A1-NC198.csv 
> <http://mailinglists.scilab.org/file/t495709/A1-NC198.csv>
> Backstrip_1D_filled-plot.jpg
> <http://mailinglists.scilab.org/file/t495709/Backstrip_1D_filled-plot.
> jpg>
>
>
>
> --
> Sent from: 
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f26
> 02246.html ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread CRETE Denis
Hello, 
The filled area is defined by 2 curves apparently; one is the top border and 
one is the lower border. Is it possible to construct a closed polygon using the 
points of both curves (something like C=[C1;C2] ) ?
HTH
Denis

-Message d'origine-
De : users  De la part de arctica1963
Envoyé : mercredi 7 avril 2021 09:26
À : users@lists.scilab.org
Objet : [Scilab-users] Filled polygons from polylines

Hello,

I have script that reads a csv file containing the data and uses that to 
calculate subsidence from well information. This all works fine, but it is not 
the best way to display the result. Is it possible to take the polyline output 
and generate filled polygons (similar to attached image)?

I am not sure how it is possible from the existing code to close the output 
result used in the plot function to create a closed polygon. Essentially it 
needs extra points otherwise you would just tie the end point and start point 
of the polyline.

It would be good to get some other ideas and whether it is actually possible. 
Original code was in Matlab and had all of the data within the script, so I 
took that out and stored in a separate data file for ease of use.

Thanks for any suggestions.

Lester

Backstrip_1D_v1.sce

A1-NC198.csv 
Backstrip_1D_filled-plot.jpg
  



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


Re: [Scilab-users] plotplots() in Scilab

2021-04-02 Thread CRETE Denis
Hello,

I am also in favour of including this function in Scilab, with an “improved” 
name. However, as far as I know, an inset has very frequently its own pair of 
axes, as opposed to a ticks-switching in (only one of) the axes. Thus, I would 
not recommend a name with “inset” and reserve it for a function more closely 
implementing an inset.
Zoom is quite appealing.
I was wondering about “non-linear”_something…

Thank you for your developments
Denis

De : users  De la part de Clément David
Envoyé : vendredi 2 avril 2021 11:20
À : sgoug...@free.fr; Users mailing list for Scilab 
Objet : Re: [Scilab-users] plotplots() in Scilab

Hello Samuel, hello all,

First thanks for the request for inclusion, that’s always good to have more 
features into Scilab itself. However, I have a few remarks regarding this 
function.

1.   The function name plotplots() does not seem well known nor easy to 
find ; after a few research I found similar behavior for Matlab and Matplotlib 
worded as “zoomed” or “zoomed_inset_axes” which better represent the behavior.
·   
https://stackoverflow.com/questions/13583153/how-to-zoomed-a-portion-of-image-and-insert-in-the-same-plot-in-matplotlib
·   https://fr.mathworks.com/matlabcentral/fileexchange/59857-zoomplot
·   
https://fr.mathworks.com/matlabcentral/answers/349042-zoomed-plot-in-the-same-figure

What about using `plot_zoomed()`, `plot_inset()` or `plot_inside()` ?

2.   I found the need to have a second axe (example 1) different to 
recompute ticks (example 2). I might have miss something, could you clarify 
these two usage ?

Thanks,

Clément


From: users 
mailto:users-boun...@lists.scilab.org>> On 
Behalf Of Samuel Gougeon
Sent: Thursday, April 1, 2021 10:07 PM
To: International users mailing list for Scilab. 
mailto:users@lists.scilab.org>>
Subject: [Scilab-users] plotplots() in Scilab


Dear all,
I would like to propose to include the plotplots() graphical function into 
Scilab.

For now 3 years, plotplots() is distributed alone in its own external 
module, with a fair number of 
downloads for a single function.

Its embedded documentation is as well provided online as PDF, in 
english
 and in 
french.

As soon as a function has a local singularity or/and an asymptotical behavior 
(that's quite common), plotplots() is very helpful to illustrate its specific 
behaviors without masking more "regular" features with a crushing graphical 
scale.

Every comment is welcome about the current plotplots status, and about the 
proposal to include it as a native Scilab function.

Hope reading you,

Best regards

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


Re: [Scilab-users] Default x|y|z labels and title font size = 2?

2021-02-02 Thread CRETE Denis
Hello ,
Very good idea !
I actually defined a function to perform xtitle and immediately increase font 
sizes for the axes labels, axis titles and title of the figure. I originally 
set them to a size of 2 for the labels and 3 for the titles.
Still, the reviewers for publications seldom complain about too large font 
sizes, much more about too small font sizes! For these applications, the risk 
of having to change the font sizes upon revision of a paper is smaller with 
default font sizes of 3 for the labels and 4 (or even 5 when LaTeX style is 
used) for the titles …
Best regards
Denis
De : users  De la part de Samuel Gougeon
Envoyé : lundi 1 février 2021 23:27
À : International users mailing list for Scilab. 
Objet : [Scilab-users] Default x|y|z labels and title font size = 2?


Dear all,

After having changed the default grid style in Scilab 6.1.0, i propose to go 
on, tuning more carefully the default font size of axes labels.

Each time that i define a xlabel, ylabel or sometimes zlabel, and a title, i 
have also to set explicitly their fontsize property, because i find the default 
size=1 always too small.
Is it also your usage?
Indeed, the font size = 1 is fine for ticks labels. From here, axes labels must 
be displayed with a bigger font size.
Sometime size=2 is still not enough, noticeably with a LaTeX content. But well, 
then we can actually use an explicit fontsize setting.

This proposal impacts everybody and frequently, because making plots is a basic 
task in Scilab
Every comment is welcome, before implementing this simple change.

Hope reading you soon.

Samuel Gougeon

clf

subplot(1,3,1)

plot2d

xlabel "Title for abscissas"

ylabel "Title for ordinates"



subplot(1,3,2)

xlabel "Title for abscissas" fontsize 2

ylabel "Title for ordinates" fontsize 2

plot2d



subplot(1,3,3)

xlabel "$\alpha\text{ coefficient }[m^{-1}]$" fontsize 2

ylabel "$\beta\text{ result }[lm^{-1}]$" fontsize 2

plot2d

[cid:image001.png@01D6F93C.C37F9280]
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] String and integer

2020-11-20 Thread CRETE Denis
Hello
msprintf(‘%04d’,1) seems to do the job
HTH
Denis
De : users  De la part de paul francedixhuit
Envoyé : vendredi 20 novembre 2020 14:49
À : Users mailing list for Scilab 
Objet : [Scilab-users] String and integer

Hi all

In ordre to change files names, I need to convert integers into strings but 
with zeros prior to it

Example if i=1 i need 0001 and not 1

I don't know how to use something like "%4d" with "string"

Thanks

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


Re: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters

2020-08-26 Thread CRETE Denis
Hello,
Just to finish my suggestion with this code, taking Y(2,:) as "reference":
// prepare "noisy" data
slope=[0.9;1;1.2];X=1:10;a=4;
Y=slope*(X+a)+0.1*rand(3,10);

// solve problem
Z=matrix(Y'*inv(diag(Y(2,:)*Y')),-1,1);
[p,q,sig]=reglin([X,X,X],Z')

// compare results with a and slope
q/p, p*Y(2,:)*Y'

It should work as long as the same values of X are used. As it is, it assumes 
that datasets contain the same number of points. This restriction may be 
suppressed using an average value for the set of Yk taken at equal values of xk 
and a weight equal to the number of points averaged for this xk.
And "sig" should give you some information on errors...

HTH
Denis


De : users  De la part de CRETE Denis
Envoyé : mardi 25 août 2020 16:38
À : Users mailing list for Scilab ; Heinz Nabielek 

Objet : Re: [Scilab-users] errors (uncertainties) in non-linear least-squares 
fitting parameters

Hello,
If the fixed point has to be optimized as well, it is possible to keep a linear 
treatment, although the solution that I have found is tedious:
First, notice that because of the fixed point and the set of xk is the same for 
the 3 lines, all Y coordinates are proportional, I mean

-  y2(xk)=P2/P1*y1(xk)

-  y3(xk)=P3/P1*y1(xk)
It is probably easy to fit the datasets y2 and y3 as a function of y1 to find 
r=P2/P1 and s=P3/P1. It might even be possible to use r=sum(y2)/sum(y1) and s= 
sum(y3)/sum(y1)... but the exact solution of the least square method is 
r=sum(y2.*y1)/sum(y1.*y1), s= sum(y3.*y1)/sum(y1.*y1).
Then the full dataset of the 3 functions y1, y2/r and y3/s can be adjusted to 
the same function p1*x+A (e.g. using reglin)
However, I did not write the code, yet... There might exist a more elegant 
solution...
I understand it is not in the focus of the initial question, but it may help 
anyway.

Denis
NB: a more compact algorithm is to fit for i=1...3,  yi/sum(yi.*y1)= f(x)

De : users 
mailto:users-boun...@lists.scilab.org>> De la 
part de Rafael Guerra
Envoyé : mardi 25 août 2020 01:47
À : Heinz Nabielek mailto:heinznabie...@me.com>>; Users 
mailing list for Scilab mailto:users@lists.scilab.org>>
Objet : Re: [Scilab-users] errors (uncertainties) in non-linear least-squares 
fitting parameters

In that case, the code can be simplified using backslash left matrix division:

// Fixed point (-4,0) solution:
a = (MW+4)\Y;
b = a*4;
GG= a'.*.xx' + repmat(b',1,size(xx,1));
plot(xx,GG','LineWidth',1);

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


Re: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters

2020-08-25 Thread CRETE Denis
Hello,
If the fixed point has to be optimized as well, it is possible to keep a linear 
treatment, although the solution that I have found is tedious:
First, notice that because of the fixed point and the set of xk is the same for 
the 3 lines, all Y coordinates are proportional, I mean

-  y2(xk)=P2/P1*y1(xk)

-  y3(xk)=P3/P1*y1(xk)
It is probably easy to fit the datasets y2 and y3 as a function of y1 to find 
r=P2/P1 and s=P3/P1. It might even be possible to use r=sum(y2)/sum(y1) and s= 
sum(y3)/sum(y1)... but the exact solution of the least square method is 
r=sum(y2.*y1)/sum(y1.*y1), s= sum(y3.*y1)/sum(y1.*y1).
Then the full dataset of the 3 functions y1, y2/r and y3/s can be adjusted to 
the same function p1*x+A (e.g. using reglin)
However, I did not write the code, yet... There might exist a more elegant 
solution...
I understand it is not in the focus of the initial question, but it may help 
anyway.

Denis
NB: a more compact algorithm is to fit for i=1...3,  yi/sum(yi.*y1)= f(x)

De : users  De la part de Rafael Guerra
Envoyé : mardi 25 août 2020 01:47
À : Heinz Nabielek ; Users mailing list for Scilab 

Objet : Re: [Scilab-users] errors (uncertainties) in non-linear least-squares 
fitting parameters

In that case, the code can be simplified using backslash left matrix division:

// Fixed point (-4,0) solution:
a = (MW+4)\Y;
b = a*4;
GG= a'.*.xx' + repmat(b',1,size(xx,1));
plot(xx,GG','LineWidth',1);

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


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

2020-05-07 Thread CRETE Denis
Hello,

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

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

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

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

Code to reproduce the problem:

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

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

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

Best regards
Denis

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


Re: [Scilab-users] FEA in Scilab

2020-01-27 Thread CRETE Denis
Hello,
You can try freefem.org
HTH
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Claus Futtrup
Envoyé : lundi 27 janvier 2020 18:32
À : users@lists.scilab.org
Objet : Re: [Scilab-users] FEA in Scilab

Hi

I've searched for FreeFEM and found https://wiki.scilab.org/FreeFem ... 
but the wiki returns that the page no longer exist. Do you know of 
another link?

Best regards,
Claus

On 27.01.2020 16:01, Heinz Nabielek wrote:
> I would have no idea, if the report
>
> "Finite Elements in Scilab: Solution of partial differential equations 
> supported by the FreeFEM toolbox"
>
> is any help. Dr van Seggern is long retired from the Forschungszentrum Jülich.
> Greetings
> Heinz
>
>
>
>
> FORSCHUNGSZENTRUM JÜLICH GmbH
> Zentralinstitut für Angewandte Mathematik
> D-52425 Jülich, Tel. (02461) 61-6402
> Interner Bericht
> Finite Elemente in Scilab:Das Lösen partieller Differentialgleichungen mit 
> Hilfe der FreeFEM-Toolbox
>
> Rainer von Seggern
> FZJ-ZAM-IB-2001-03
> April 2001
>
>> On 27.01.2020, at 11:25, Claus Futtrup  wrote:
>>
>> Dear fellow Scilabers
>>
>> There are various initiatives and possibly demonstration projects for 
>> implementing Finite Element algorithms and Analysis in Scilab. Please help 
>> me by providing pointers.
>>
>> What I'd like to simulate is the suspension of a loudspeaker (the cloth 
>> spider which essentially centers the voice coil in the air gap), in 
>> particular I wish to calculate a force-deflection curve.
>>
>> In my particular case, I'd like to describe the spider as a collection of 
>> line segments (straight lines as well as circular sections). This 
>> description represents a cross section view of the spider. For proper 
>> modeling, this is an axisymmetric model of the spider.
>>
>> I have a simple description of what I'd like to do in Scilab, but done in a 
>> software named Mecway. The PDF is 650 kb (4 pages). I am worried about 
>> attaching such a document to the User Group here in general, but I can of 
>> course send it on request. In Mecway the axisymmetric model is expanded into 
>> 3D with hex8 elements (it looks like a basic cubic element). The 
>> force-function is applied in 40 time steps. It looks like 40 x basic static 
>> analysis.
>>
>> Please let me know what you think would be suitable for solving this 
>> problem. Is there a suitable ATOMS library?
>>
>> Best regards,
>> Claus
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users


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


Re: [Scilab-users] how to faster EVSTR?

2019-10-21 Thread CRETE Denis
Hello,
For the first question: did you try 
test_number= msscanf(-1,test_str,'%f');
or 
test_number= strtod(test_str);
?
HTH
Denis
*
Hi all,

I have a 1 Milion entries array of STRING type (test_str array), I should
convert to number (test_numer array).

I do as follow:
test_number=evstr(test_str) 

It looks like working but it takes a not acceptable time...

Do you have a more clever idea?

---
Sub-question: I have such a long string array because I get it from an
uicontrol 'userdata' and it looks to me only string data can be set as
'userdata'.
Is that true or, in fact, I could simply set the user data as a number array
(without converting it in string witn the 'string' command)?
Now I do as follows:
"set(gcbo,"userdata",[spectrum_unit_x,
string(spectrum(:,1)'),string(spectrum(:,2)')])"

--
Many thanks
cheers
Anna



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


Re: [Scilab-users] improve accuracy of roots

2019-01-14 Thread CRETE Denis
Thank you Frederico!
According to the page you refer to, the method seems to converge more rapidly 
with this factor equal to the multiplicity of the root. 
About overshoot, it is well known to occur for |x|^a where a <1. But for a>1, 
the risk of overshoot with the Newton-Raphson method seems to be very small...
Best regards
Denis 

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 
e-mail : 
 denis.cr...@thalesgroup.com <mailto:%20denis.cr...@thalesgroup.com>
 http://www.trt.thalesgroup.com/ump-cnrs-thales
 http://www.research.thalesgroup.com


-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Federico Miyara
Envoyé : samedi 12 janvier 2019 07:52
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] improve accuracy of roots


Denis,

I've found the correction here,

https://en.wikipedia.org/wiki/Newton%27s_method

It is useful to accelerate convergence in case of multiple roots, but I 
guess it is not valid to apply it once to improve accuracy because of 
the risk of overshoot.

Regards,

Federico Miyara


On 10/01/2019 10:32, CRETE Denis wrote:
> Hello,
> I tried this correction to the initial roots z:
>
> z-4*(1+z).^4 ./([ones(z),z,z.^2,z.^3]*(C(2:5).*(1:4))')
>   ans  =
>
>-1. - 1.923D-13i
>-1. + 1.189D-12i
>-1. - 1.189D-12i
>-1. - 1.919D-13i
>
> // Evaluation of new error, (and defining Z as the intended root, i.e. here 
> Z=-1):
> z2=z-4*(z-Z).^4 ./([ones(z),z,z.^2,z.^3]*(C(2:5).*(1:4))')
> z2 - Z
>   ans  =
>
> 2.233D-08 - 1.923D-13i
>-2.968D-08 + 1.189D-12i
>-2.968D-08 - 1.189D-12i
> 2.131D-08 - 1.919D-13i
>
> The factor 4 in the correction is a bit obscure to me, but it seems to work 
> also for R=(3+p)^4, again with an accuracy on the roots of a ~2E-8.
>
> HTH
> Denis
>
> -Message d'origine-
> De : users [mailto:users-boun...@lists.scilab.org] De la part de Federico 
> Miyara
> Envoyé : jeudi 10 janvier 2019 00:32
> À : users@lists.scilab.org
> Objet : [Scilab-users] improve accuracy of roots
>
>
> Dear all,
>
> Consider this code:
>
> // Define polynomial variable
> p = poly(0, 'p', 'roots');
>
> // Define fourth degree polynomial
> R = (1 + p)^4;
>
> // Find its roots
> z = roots(R)
>
> The result (Scilab 6.0.1) is
>
>z  =
>
> -1.0001886
> -1. + 0.0001886i
> -1. - 0.0001886i
> -0.9998114
>
> It should be something closer to
>
> -1.
> -1.
> -1.
> -1.
>
> Using these roots
>
> C = coeff((p-z(1))*(p-z(2))*(p-z(3))*(p-z(4)))
>
> yield seemingly accurate coefficients
>C  =
>
>  1.   4.   6.   4.   1.
>
>
> but
>
> C - [1  4  6 4 1]
>
> shows the actual error:
>
> ans  =
>
>  3.775D-15   1.243D-14   1.155D-14   4.441D-15   0.
>
> This is acceptable for the coefficients, but the error in the roots is
> too large. Somehow the errors cancel out when  assembling back the
> polynomial but each individual zero should be closer to the theoretical
> value
>
> Is there some way to improve the accuracy?
>
> Regards,
>
> Federico Miyara
>
>
>
>
> ---
> El software de antivirus Avast ha analizado este correo electrónico en busca 
> de virus.
> https://www.avast.com/antivirus
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
>

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


Re: [Scilab-users] improve accuracy of roots

2019-01-10 Thread CRETE Denis
Hello,
I tried this correction to the initial roots z:

z-4*(1+z).^4 ./([ones(z),z,z.^2,z.^3]*(C(2:5).*(1:4))')
 ans  =

  -1. - 1.923D-13i
  -1. + 1.189D-12i
  -1. - 1.189D-12i
  -1. - 1.919D-13i

// Evaluation of new error, (and defining Z as the intended root, i.e. here 
Z=-1):
z2=z-4*(z-Z).^4 ./([ones(z),z,z.^2,z.^3]*(C(2:5).*(1:4))') 
z2 - Z
 ans  =

   2.233D-08 - 1.923D-13i
  -2.968D-08 + 1.189D-12i
  -2.968D-08 - 1.189D-12i
   2.131D-08 - 1.919D-13i

The factor 4 in the correction is a bit obscure to me, but it seems to work 
also for R=(3+p)^4, again with an accuracy on the roots of a ~2E-8.

HTH
Denis 

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Federico Miyara
Envoyé : jeudi 10 janvier 2019 00:32
À : users@lists.scilab.org
Objet : [Scilab-users] improve accuracy of roots


Dear all,

Consider this code:

// Define polynomial variable
p = poly(0, 'p', 'roots');

// Define fourth degree polynomial
R = (1 + p)^4;

// Find its roots
z = roots(R)

The result (Scilab 6.0.1) is

  z  =

   -1.0001886
   -1. + 0.0001886i
   -1. - 0.0001886i
   -0.9998114

It should be something closer to

   -1.
   -1.
   -1.
   -1.

Using these roots

C = coeff((p-z(1))*(p-z(2))*(p-z(3))*(p-z(4)))

yield seemingly accurate coefficients
  C  =

1.   4.   6.   4.   1.


but

C - [1  4  6 4 1]

shows the actual error:

ans  =

3.775D-15   1.243D-14   1.155D-14   4.441D-15   0.

This is acceptable for the coefficients, but the error in the roots is 
too large. Somehow the errors cancel out when  assembling back the 
polynomial but each individual zero should be closer to the theoretical 
value

Is there some way to improve the accuracy?

Regards,

Federico Miyara




---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus

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


Re: [Scilab-users] function and vectorization

2018-11-07 Thread CRETE Denis
Hello,

If your matrices are not too big,

diag((M-C)*(N(:,1:2)-C)')
may do the job: it gives the same result as Stéphane's solution
HTH
Denis


[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
e-mail :
 denis.cr...@thalesgroup.com 

http://www.trt.thalesgroup.com/ump-cnrs-thales
http://www.research.thalesgroup.com

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


Re: [Scilab-users] Tall Array in Scilab

2018-10-29 Thread CRETE Denis
Hello,
Did you try to increase the stack size with stacksize() ; it may be a simple 
solution if the array is not too big.
Otherwise, I generally recourse to the Scilab function unix_g(), with a string 
parameter calling one of the basic OS functions (e.g. sed or grep) to reduce 
the size of the array before processing with SciLab.
HTH
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
e-mail :
 denis.cr...@thalesgroup.com 

http://www.trt.thalesgroup.com/ump-cnrs-thales
http://www.research.thalesgroup.com

De : users [mailto:users-boun...@lists.scilab.org] De la part de FIXED-TERM 
Nacer Mohamed Ikbal (ETAS/ESY)
Envoyé : vendredi 26 octobre 2018 15:26
À : users@lists.scilab.org
Objet : [Scilab-users] Tall Array in Scilab

Hello M'ms and Sirs,

Do we have the concept of Tall Array in scilab, because I need to read a big 
chunk of data and it may get worst and worst soon and scilab is crushing 
because it cannot handle it.
The concept of Tall Array is explained it here 
https://www.mathworks.com/help/matlab/import_export/tall-arrays.html


So if anyone can help it will be very helpful ?

Thanks in advances.

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


Re: [Scilab-users] Optimization

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

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

HTH
Denis

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

Hi,

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

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


Given Matrix

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

Output after processing

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

Mohamed Ikbal Nacer

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

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


Re: [Scilab-users] Legends of saved SciLab graphs slip away

2018-06-06 Thread CRETE Denis
Hello,
Thank you for your quick answer.
I could get a correct behaviour with your code. However, if you run this part 
of the code:
g_test=scf();
x=-1:0.01:1; y=sin(2*%pi*x); z=cos(2*%pi*x);
plot2d(x',[y;z]',style=1:2)
legends(['Sin','Cos'],1:2,"ur")   // with an _s_, as in your post
twinkle(gcf().children(1))
save("fig0.dat","g_test")

xdel(gcf().figure_id)

and terminate with the command:
g_man=scf();
Now from the (empty) graphic window I click on "File"/"Load" and type in 
"*.dat"  + select "fig0.dat" then, I end up with the legend in the background 
(and thus invisible until I issue the console command 
g_man.children(1).filled="off"... Note that the box is at the right location in 
the window; it is invisible only because it is in the background. The same 
behaviour is observed both on Windows and Linux platforms.

I still could not figure out under what circumstances the legends slip away in 
the top left corner...

Best regards
Denis

De : users [mailto:users-boun...@lists.scilab.org] De la part de Samuel Gougeon
Envoyé : mardi 5 juin 2018 13:05
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] Legends of saved SciLab graphs slip away

Hello Denis,

I am not able to reproduce the behavior that you describe, neither with 6.0.0 
nor with 6.0.1 on Windows7 64 bits:

g_test=scf();
x=-1:0.01:1; y=sin(2*%pi*x); z=cos(2*%pi*x);
plot2d(x',[y;z]',style=1:2)
legends(['Sin','Cos'],1:2,"ur")   // with an _s_, as in your post
twinkle(gcf().children(1))
save("fig0.dat","g_test")

xdel(gcf().figure_id)
load fig0.dat
twinkle(gcf().children(1))

The legend is correctly restored, at the expected position, with the expected 
filled property set to "on", with its handle at the expected first position 
among figure's children.

I did not try yet on Linux.

Regards
Samuel

Le 05/06/2018 à 12:15, CRETE Denis a écrit :
Hello,
I noticed that saving graphs with legends was not reliable. Loading the graph 
in exactly the same environment results in a figure without readable legend. 
More specifically, the legend is almost always stowed in the upper left corner 
of the window, with all its components stacked on top of each other.

In addition, even if the legend is initially in the top axis level "Axis(1)", 
after loading it appears in the tree in "Axis(2)", i.e. behind the graph. So 
that moving back the legend to its original (X,Y) position does not allow to 
see it until gcf().children(1).filled="off" is issued.

Moving the legend using the "Axis properties" window is somehow possible by 
changing the "Data bounds" fields of the "Axis Options", but it is hard to tell 
what is the effect of the variable in each field. In addition, the units are 
not linked to anything relevant (always 0 for the first field and 0.001 for the 
second field ? same for X and Y). It looks like in general only the difference 
between the second field and the first field matters.

g_test=scf();
x=-1:0.01:1; y=sin(2*%pi*x); z=cos(2*%pi*x);
plot2d(x',[y;z]',style=1:2)
legends(['Sin','Cos'],1:2,"ur")

// Now, I save the figure in a file,
// clear it,
// and load it again, to notice that the legend escaped from its original 
place, not being able to read it.

// Legend recovery:
g_test.children(1).filled="off";
// and then it may be necessary to play with the "Data Bounds" of Axis(2), X or 
Y (or both).

I am using SciLab 6.0.0 (64 bits) on Windows 7 and a more recent version on 
Linux (64 bits), and both show this behavior. With SciLab 5.5.0 on Windows 7, 
after loading the figure, the legend slips away as well, but it is still in 
Axis(1); thus, g_test.children(1).filled="off" is not necessary. And moving 
back the legend to its original position is achieved by setting the Data Bounds 
to 0 and 0.001 on both X and Y axes.
.
This behaviour looks so strange to me that I have spent a lot of time trying to 
figure out how to avoid it... without success.
Best regards
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
e-mail :
 denis.cr...@thalesgroup.com<mailto:denis.cr...@thalesgroup.com> 
<mailto:%20denis.cr...@thalesgroup.com>
http://www.trt.thalesgroup.com/ump-cnrs-thales
http://www.research.thalesgroup.com





___

users mailing list

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

http://lists.scilab.org/mailman/listinfo/users


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


[Scilab-users] Legends of saved SciLab graphs slip away

2018-06-05 Thread CRETE Denis
Hello,
I noticed that saving graphs with legends was not reliable. Loading the graph 
in exactly the same environment results in a figure without readable legend. 
More specifically, the legend is almost always stowed in the upper left corner 
of the window, with all its components stacked on top of each other.

In addition, even if the legend is initially in the top axis level "Axis(1)", 
after loading it appears in the tree in "Axis(2)", i.e. behind the graph. So 
that moving back the legend to its original (X,Y) position does not allow to 
see it until gcf().children(1).filled="off" is issued.

Moving the legend using the "Axis properties" window is somehow possible by 
changing the "Data bounds" fields of the "Axis Options", but it is hard to tell 
what is the effect of the variable in each field. In addition, the units are 
not linked to anything relevant (always 0 for the first field and 0.001 for the 
second field ? same for X and Y). It looks like in general only the difference 
between the second field and the first field matters.

g_test=scf();
x=-1:0.01:1; y=sin(2*%pi*x); z=cos(2*%pi*x);
plot2d(x',[y;z]',style=1:2)
legends(['Sin','Cos'],1:2,"ur")

// Now, I save the figure in a file,
// clear it,
// and load it again, to notice that the legend escaped from its original 
place, not being able to read it.

// Legend recovery:
g_test.children(1).filled="off";
// and then it may be necessary to play with the "Data Bounds" of Axis(2), X or 
Y (or both).

I am using SciLab 6.0.0 (64 bits) on Windows 7 and a more recent version on 
Linux (64 bits), and both show this behavior. With SciLab 5.5.0 on Windows 7, 
after loading the figure, the legend slips away as well, but it is still in 
Axis(1); thus, g_test.children(1).filled="off" is not necessary. And moving 
back the legend to its original position is achieved by setting the Data Bounds 
to 0 and 0.001 on both X and Y axes.
.
This behaviour looks so strange to me that I have spent a lot of time trying to 
figure out how to avoid it... without success.
Best regards
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
e-mail :
 denis.cr...@thalesgroup.com 

http://www.trt.thalesgroup.com/ump-cnrs-thales
http://www.research.thalesgroup.com

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


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

2018-03-09 Thread CRETE Denis
Hello,

The operator ^ seems to return the real part of one of the complex roots of 
x^3=1.
If x=[-10:1:10]
and
y = x^(1/3);
Thus, for x<0, the values of y are half the opposite of values obtained with 
x>0.
With y=x.^(1/3), the values of y are complex for x<0.
HTH
Denis
De : users [mailto:users-boun...@lists.scilab.org] De la part de Hector R. Lepez
Envoyé : vendredi 9 mars 2018 11:58
À : users@lists.scilab.org
Objet : [Scilab-users] Help me plot y = x^(1/3);

I have problems to graph the function

x=[-10:1:10]

y = x^(1/3);

plot(x,y);

the same in plot of google gives a graph but scilab does anything with the sign.

Héctor Lépez
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Find the error

2017-11-28 Thread CRETE Denis
When the header is stripped off, there is no error:
M=fscanfMat('grids_germany_monthly_radiation_direct_201706.asc');
 
-->size(M)
 ans  = 
866.654.  
 
-->max(M)
 ans  = 
136.16  
 
-->min(M(M>-999))
 ans  =  59.  

Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Éric Dubois
Envoyé : mardi 28 novembre 2017 15:45
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] Find the error

Hello

Maybe you could unzip the files before trying to read it?

Éric 

Envoyé de mon iPhone

> Le 28 nov. 2017 à 15:30, Richard llom  a écrit :
> 
> Hello,
> when trying to read in this file:
> ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/gr
> ids_germany_monthly_radiation_direct_201706.zip
> with:
> M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')
> 
> I'm getting an error message. I suppose there is something wrong in 
> that file, but what and where exactly?
> 
> Not directly a Scilab problem (except for the fact that the 'fscanfMat'
> error message could be more verbose), but maybe someone here has an 
> idea how to find the error...
> 
> Thanks
> richard
> 
> 
> 
> --
> Sent from: 
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f26
> 02246.html ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] find a zero of a system of nonlinear functions

2017-11-28 Thread CRETE Denis
This is a strong indication that Scilab is trying to solve a problem in the 
401-dimension space (as opposed to solving 401 equations in 1D) when you give 
the vector 0:0.01:4 as first argument, as I suspected in my previous message.
In addition, I stress the point that looking at the result returned by fsolve, 
the roots are not contained in the so-called "range" that you think you define 
in the first argument of fsolve: either fsolve has a bug, or the first argument 
you give is NOT considered as a range, whatever expression you use.
Best regards
Denis 

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Hermes
Envoyé : mardi 28 novembre 2017 13:27
À : users@lists.scilab.org
Objet : Re: [Scilab-users] find a zero of a system of nonlinear functions

The problem that I present is that at times Scilab stops. And they show the 
next alert:


Gracias



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


Re: [Scilab-users] find a zero of a system of nonlinear functions

2017-11-28 Thread CRETE Denis
Hello,
I am not convinced that in the quoted document the first argument is a range:
the values returned by the function fsolve are generally not lying in the 
intended "range";
if you try: 
fsolve([0.4,0.45,0.5],f)
 ans  =
   - 1.6.228.
If I understand correctly, the first argument is considered as a vector, i.e. 
that the function f takes a vector as argument and returns a vector of the same 
dimension, with elements sin(2*%pi*xi). 
In any case, it is quite strange to give 0.5 as initial value for this search 
of root, as at this particular point f=1 and its slope is zero !!! It explains 
why very strange values are returned for the roots.
HTH
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Hermes
Envoyé : mardi 28 novembre 2017 11:59
À : users@lists.scilab.org
Objet : Re: [Scilab-users] find a zero of a system of nonlinear functions


I have tried to reproduce what can be read in this document, 
https://ljk.imag.fr/membres/Bernard.Ycart/mel/ds/ds.pdf
  , on page 36.
 I find it interesting to introduce a range as an initial value.
I use  otras funciones y obtuve los resultados esperados.
function y=f(x)
y=exp(-x.^2)*cos(4*x);
endfunction
function y = B(x)
 y = besselj(40,x+cos(x));
endfunction
I would have liked to replace this script with the fsolve function:

function root=brute_force_root_finder(F, a, b, n)
x = linspace(a, b, n);
n=size(x,"*")-1;
y = feval(x,F);
root = [];
for i=1:n-1
if y(i)*y(i+1) < 0 then
root($+i) = x(i) - (x(i+1) - x(i))/(y(i+1) - y(i))*y(i);//root = 
x[i] - (x[i+1] - x[i])/(y[i+1] - y[i])*y[i]
end
end
endfunction
Gracias




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


Re: [Scilab-users] find a zero of a system of nonlinear functions

2017-11-28 Thread CRETE Denis
Hello 
The first argument in fsolve is not the range of the variable in which the 
solution is looked for. Instead it is a guessed value:

// Start of code
function y = poly_cubic(x)
y = 3 - 10*x + 2*x^2 + 3*x^3;
endfunction
 
yr=fsolve(1.3,poly_cubic,%eps)
// yr  = 1.3027756  
yr=fsolve(-2,poly_cubic,%eps)
// yr  =  - 2.3027756  
yr=fsolve(0,poly_cubic,%eps)
// yr  =  0.333  
// End of code

By the way, for polynoms, it is more straightforward to do :
p=[3 2 -10 3]; roots(p)
// ans  =
  - 2.3027756  
1.3027756  
0.333  

HTH
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Hermes
Envoyé : mardi 28 novembre 2017 11:13
À : users@lists.scilab.org
Objet : [Scilab-users] find a zero of a system of nonlinear functions

fsolve
I find a zero of a system of nonlinear functions:
y = 3 - 10 * x + 2 * x ^ 2 + 3 * x ^ 3 in the range x = -3: 0.01: 3

but fsolve returns as a solution a vector (in the scrip yr) of the same size as 
x.
I have varied the precision tolerance h to several values 1.d-3 to% eps. but I 
always get that infinity of solutions.
the only solution that I found is shown in the script.
Is it possible to improve this?

funcprot(0);
function y = poly_cubic(x)
 y = 3 - 10*x + 2*x^2 + 3*x^3;
endfunction

x=-3:0.01:3;
clf()
plot(x,poly_cubic);

disp("-2.3027756 0.333 1.3027756  ", "Roots to y = 3 - 10*x + 2*x^2 +
3*x^3")
h=%eps;
yr=fsolve(x,poly_cubic,h)
RR=strtod(unique(string(yr)));
RR=gsort(RR,'g','i');//sort the elements of the array RR in the increasing 
order.

disp(RR,"Roots values f(x)")
plot(RR,poly_cubic,"ro") 




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


Re: [Scilab-users] ?= ?==?utf-8?q? Bug?: plot with nan values (Linux Ubuntu 17.04

2017-10-19 Thread CRETE Denis
Hello,
Today, I checked again with the Lenovo T420 + Ubuntu 16.04 + SciLab 6 ... and I 
could NOT reproduce the bug (that I did observe with the same equipment and 
same code 5 months ago). Most probably, an (automatic) update of Ubuntu may 
have fixed the problem. But I don't know the name of the file tracking the 
changes in the update... If anyone knows, and can give me instructions, I would 
be happy to do it if it helps.
Regards
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Antoine 
Monmayrant
Envoyé : jeudi 19 octobre 2017 10:30
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] ?==?utf-8?q? ?==?utf-8?q? ?= Bug?: plot with nan 
values (Linux Ubuntu 17.04

It seems the bug report was 4 years ago: 
https://bugzilla.scilab.org/show_bug.cgi?id=13060
I added my test script and plots.

Antoine
 
 
Le Jeudi, Octobre 19, 2017 10:21 CEST, "Antoine Monmayrant"  
a écrit: 
 
> Thank you all for your answers.
> It does look like a graphic bug that is only affecting some Linux machines.
> I refined my test script to compare the obtained plots when plotting on the 
> screen and directly in a file ('driver').
> It seems graphic direver related to me.
> I'll fill a bug report.
> 
> Cheers,
> 
> Antoine
> 
> 
> x=1:100;
> y=rand(x);
> th=0.1;
> rg=find(y ynan=y;
> ynan(rg)=%nan;
> 
> h=scf();
> plot(x,y,'k.-');
> plot(x,ynan,'r.-');
> xtitle('BUG');
> 
> fpath=TMPDIR+'/nobug_plot_nan.png';
> previous_driver = driver('PNG');
> xinit(fpath);
> 
> scf();
> plot(x,y,'k.-');
> plot(x,ynan,'r.-');
> xtitle('NO BUG');
> 
> xend();
> driver(previous_driver);
> stat=unix("xdg-open "+fpath);
> xs2png(h,TMPDIR+'/bug_plot_nan.png');
> /
>  
>  
> Le Mercredi, Octobre 18, 2017 13:22 CEST, "Antoine Monmayrant" 
>  a écrit: 
>  
> > Hi everyone,
> > 
> > I think I stumble upon a weird bug when plotting data with nan values: 
> > instead of a gap in the plot line, I have segments that go go towards the 
> > center of my plots.
> > This bug is present on Ubuntu 17.04, but not on Ubuntu 16.04 and it affects 
> > both scilab 5.5.2 and 6.0.
> > I attached the expected plot ('no_bug.png', what I get with 16.04), the 
> > bugged one ('bug.png') and the minimum working example ('bug_plot_nan.sce') 
> > with the original dataset with nans ('dat_with_nans.txt').
> > Are you also affected by this bug? Which platform (OS) are you working on?
> > 
> > Cheers,
> > 
> > Antoine

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


Re: [Scilab-users] Bug?: plot with nan values (Linux Ubuntu 17.04)

2017-10-18 Thread CRETE Denis
Hello Antoine
I used a Lenovo T420 with Ubuntu 16.04 (I need to check when I am back on this 
machine, and I'll try to find what is the graphic driver), and Scilab 6.0. 
With this machine, but under Windows and Scilab 5.5.2, this did not happen = it 
used to be correct, with open gap at the %Nan value.
I can't try this machine and SciLab 6 under Windows, as Windows is not on this 
machine anymore.
I also tried the following code:
// Code
X=1:5;
Y=X.^2; Y(3)=%nan;
 plot2d(X',Y')
// End of code
- with an HP Z440 + Windows 7 Pro + SciLab 6.0  : both plot and plot2d are 
correct
- with an HP Z420 + Windows 7 Pro + SciLab 5.5.2 : both plot and plot2d are 
correct
I did not fill a bug report.

I notice a different behaviour between "your bug" and "my bug": in your 
bug/no_bug PNGs, Nan points are plot in the center (both x-wise and y-wise) of 
the graph, whereas in my observation (sorry, I do not have the true result, I 
can produce it when I am back on the Linux machine) only the y coordinate is 
"fake" data in the mid-range of Y, but at the right value of X...
HTH
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Antoine 
Monmayrant
Envoyé : mercredi 18 octobre 2017 16:47
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] ?==?utf-8?q? ?==?utf-8?q? ?= )

Yep, you're right, it looks the same.
Did you fill a bug report?
On what machine/OS did you observe this bug?

Antoine
 
 
Le Mercredi, Octobre 18, 2017 14:23 CEST, CRETE Denis 
<denis.cr...@thalesgroup.com> a écrit: 
 
> This seems to be the same problem I discussed with Christophe (although he 
> observed a correct behaviour) :
> --
> 
> Objet: Scilab 6's plot2d displays %nan on the horizontal line in the 
> mid-range of vertical axis
> 
> Hello Denis,
> 
> > De  CRETE Denis
> > Envoyé : mercredi 17 mai 2017 14:20
> >
> > If %nan values are in the Y vector,
> > plot2d behaves as if the following was performed before display:
> > Y (isnan(Y))=(YM + Ym)/2
> 
> I'm not sure I understand what you're pointing out.
> The following code works exactly as I expect:
> --
> x = 1:5;
> y=x.^2;
> y(3)=%nan;
> plot(x, y)
> --
> i.e. the point at x=3 is simply missing, with a blank between x=2 and x=4.
> --
> Christophe Dang Ngoc Chan
> 
> 
> -Message d'origine-
> De : users [mailto:users-boun...@lists.scilab.org] De la part de 
> Rafael Guerra Envoyé : mercredi 18 octobre 2017 13:35 À : 
> antoine.monmayr...@laas.fr; Users mailing list for Scilab Objet : Re: 
> [Scilab-users] ?==?utf-8?q? ?==?utf-8?q? Bug?: plot with nan values 
> (Linux Ubuntu 17.04)
> 
> Hi Antoine,
> 
> I observe the "No bug" behavior (i.e., gaps when plotting nans) in both 
> Scilab 5.5.2 and Scilab 6.0.0 installations on Win7 64-bit PC.
> 
> Regards,
> Rafael
> 
> 
> -Original Message-
> From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of 
> Antoine Monmayrant
> Sent: Wednesday, October 18, 2017 1:26 PM
> To: Users mailing list for Scilab <users@lists.scilab.org>
> Subject: Re: [Scilab-users] ?==?utf-8?q? ?==?utf-8?q? Bug?: plot with 
> nan values (Linux Ubuntu 17.04)
> 
> Update:
> 
> 1) Here is a simpler minimal working example:
> 
> ///
> x=1:100;
> y=rand(x);
> th=0.1;
> rg=find(y<th);
> ynan=y;
> ynan(rg)=%nan;
> 
> scf();
> plot(x,y,'k.-');
> plot(x,ynan,'r.-');
> ///
> 
> 2) This might be due to some graphic drivers, but I think I am up to date on 
> that front. How can I check it's related to a graphic driver or not?
> 
> Antoine
>  
>  
> Le Mercredi, Octobre 18, 2017 13:22 CEST, "Antoine Monmayrant" 
> <antoine.monmayr...@laas.fr> a écrit: 
>  
> > Hi everyone,
> > 
> > I think I stumble upon a weird bug when plotting data with nan values: 
> > instead of a gap in the plot line, I have segments that go go towards the 
> > center of my plots.
> > This bug is present on Ubuntu 17.04, but not on Ubuntu 16.04 and it affects 
> > both scilab 5.5.2 and 6.0.
> > I attached the expected plot ('no_bug.png', what I get with 16.04), the 
> > bugged one ('bug.png') and the minimum working example ('bug_plot_nan.sce') 
> > with the original dataset with nans ('dat_with_nans.txt').
> > Are you also affected by this bug? Which platform (OS) are you working on?
> > 
> > Cheers,
> > 
> > Antoine
> 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.or

Re: [Scilab-users] ?= =?utf-8?q? Bug?: plot with nan values (Linux Ubuntu 17.04)

2017-10-18 Thread CRETE Denis
This seems to be the same problem I discussed with Christophe (although he 
observed a correct behaviour) :
--
Objet: Scilab 6's plot2d displays %nan on the horizontal line in the mid-range 
of vertical axis

Hello Denis,

> De  CRETE Denis
> Envoyé : mercredi 17 mai 2017 14:20
>
> If %nan values are in the Y vector,
> plot2d behaves as if the following was performed before display:
> Y (isnan(Y))=(YM + Ym)/2

I'm not sure I understand what you're pointing out.
The following code works exactly as I expect:
--
x = 1:5;
y=x.^2;
y(3)=%nan;
plot(x, y)
--
i.e. the point at x=3 is simply missing, with a blank between x=2 and x=4.
--
Christophe Dang Ngoc Chan


-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Rafael Guerra
Envoyé : mercredi 18 octobre 2017 13:35
À : antoine.monmayr...@laas.fr; Users mailing list for Scilab
Objet : Re: [Scilab-users] ?==?utf-8?q? ?==?utf-8?q? Bug?: plot with nan values 
(Linux Ubuntu 17.04)

Hi Antoine,

I observe the "No bug" behavior (i.e., gaps when plotting nans) in both Scilab 
5.5.2 and Scilab 6.0.0 installations on Win7 64-bit PC.

Regards,
Rafael


-Original Message-
From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Antoine 
Monmayrant
Sent: Wednesday, October 18, 2017 1:26 PM
To: Users mailing list for Scilab <users@lists.scilab.org>
Subject: Re: [Scilab-users] ?==?utf-8?q? ?==?utf-8?q? Bug?: plot with nan 
values (Linux Ubuntu 17.04)

Update:

1) Here is a simpler minimal working example:

///
x=1:100;
y=rand(x);
th=0.1;
rg=find(y<th);
ynan=y;
ynan(rg)=%nan;

scf();
plot(x,y,'k.-');
plot(x,ynan,'r.-');
///

2) This might be due to some graphic drivers, but I think I am up to date on 
that front. How can I check it's related to a graphic driver or not?

Antoine
 
 
Le Mercredi, Octobre 18, 2017 13:22 CEST, "Antoine Monmayrant" 
<antoine.monmayr...@laas.fr> a écrit: 
 
> Hi everyone,
> 
> I think I stumble upon a weird bug when plotting data with nan values: 
> instead of a gap in the plot line, I have segments that go go towards the 
> center of my plots.
> This bug is present on Ubuntu 17.04, but not on Ubuntu 16.04 and it affects 
> both scilab 5.5.2 and 6.0.
> I attached the expected plot ('no_bug.png', what I get with 16.04), the 
> bugged one ('bug.png') and the minimum working example ('bug_plot_nan.sce') 
> with the original dataset with nans ('dat_with_nans.txt').
> Are you also affected by this bug? Which platform (OS) are you working on?
> 
> Cheers,
> 
> Antoine

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


Re: [Scilab-users] Plot Heart Curve in Scilab

2017-09-28 Thread CRETE Denis
Hello,
It is also possible to use the couple of solutions (auricle, ventricle) of Z=0:
// Start of code
nx=201;
x=linspace(0,1,nx)'; // computation is done only for x=0 (it saves time for 
urgent needs!-)
auricle=(sqrt(x)+sqrt(1-x.^2))/1.2; 
ventricle=(sqrt(x)-sqrt(1-x.^2))/1.2;
X0=[x;x($:-1:1);-x;-x($:-1:1)];
Y0=[auricle;ventricle($:-1:1);ventricle;auricle($:-1:1)];
scf(); 
// plot of a symmetrical polygone
xset("color",5);
xfpoly(X0,Y0);
// End of code

Thank you, I learned about "xfpoly" !
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Hermes
Envoyé : mercredi 27 septembre 2017 22:29
À : users@lists.scilab.org
Objet : Re: [Scilab-users] Plot Heart Curve in Scilab

Hi Rafa,
Here I present the task solved:
//start of code
nx=300;
ny=200;
X0=linspace(-1.2,1.2,nx);
Y0=linspace(-1.5,2,ny);
X=X0.*.ones(ny,1);
Y=(Y0.*.ones(nx,1))';
Z=(1.25*Y-sqrt(abs(X))).^2+X.^2-1;
clf()
a=gca();
a.x_label.text="X";
a.y_label.text="Y";
contour(X0,Y0,Z',[0,0]);
*Polyline=a.children.children(1)
Polyline.fill_mode="on";
Polyline.foreground=5;
Polyline.background=5;
Polyline.thickness=2;*
a.view="2d";
//end code

Two questions:
in the Helps of Scilab, where can I find the hierarchy trees for the graphic 
objects?
How do I copy from SciNote to the Forum scripts and maintain the format of it?
Thank you
Hermes



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


Re: [Scilab-users] nonlinear system of equations underdetermined

2017-08-25 Thread CRETE Denis
Hello,
 f(4) and f(5) having trivial solutions, I plugged this into f(3) to reduce the 
dimension of the space to 4:
 
deff('f = Fct4(x,r)','f=[..
x(1)^2+(x(2)+1)^2+(x(3)-0.5)^2-r^2;..
x(1)-0.5*x(2)+0.5*x(3);..
(x(1)-x(4))^2+(x(2)-sin(x(4)))^2+(x(3)-sin(2*x(4)))^2-19]');

deff('e=H(x,r)','e=norm(Fct4(x,r))');

// I picked some value for 'r'
 r=2;

// With fminsearch, we need a starting point ( e.g. [0,0,0,0])
fminsearch(list(H,r),zeros(1,4))

// ans  =[  -1.3781348  -2.43795880.31827921.3335215 ]
// Fct4(ans)=[ 0.032 ; -0.158; 0.029];

//  Note: with 6 dimensions (and minimizing norm(Fct6), when starting from 
zeros(1,6)...) fminsearch did not converge

HTH
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Hermes
Envoyé : vendredi 25 août 2017 11:53
À : users@lists.scilab.org
Objet : Re: [Scilab-users] nonlinear system of equations underdetermined

My apologies run enter before editing. This is the system of interest:

the nonlinear system of equations  underdetermined  fnhttp://mailinglists.scilab.org/nonlinear-system-of-equations-underdetermined-tp4036921p4036922.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] {EXT} Scilab 6's plot2d displays %nan on the horizontal line in the mid-range of vertical axis

2017-05-24 Thread CRETE Denis
Hello Christophe,
Thank you for trying also the function "plot" instead of "plot2d". 
On Scilab 6, on a Linux platform, I have the same result for both functions = 
they both plot a number of points equal to size(x,'*'), with guessed values for 
Yk when Yk is %nan... 
Code:
 X=1:5;
 Y=X.^2;
 Y(3)=%nan;
 plot(X',Y');
 plot2d(X',Y',style=3);
 // cf. figures; Parabole_nan.png is generated by "plot", and 
Parabole_2d_nan.png is generated by "plot2d".

I did not install Scilab 6 on Windows yet. When this is done, I'll give it a 
try.
Best regards
Denis
  
-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Dang Ngoc 
Chan, Christophe
Envoyé : mercredi 17 mai 2017 15:25
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] {EXT} Scilab 6's plot2d displays %nan on the 
horizontal line in the mid-range of vertical axis

Hello Denis,

> De  CRETE Denis
> Envoyé : mercredi 17 mai 2017 14:20
>
> If %nan values are in the Y vector,
> plot2d behaves as if the following was performed before display:
> Y (isnan(Y))=(YM + Ym)/2

I'm not sure I understand what you're pointing out.

The following code works exactly as I expect:

--

x = 1:5;

y=x.^2;

y(3)=%nan;

plot(x, y)

--

i.e. the point at x=3 is simply missing, with a blank between x=2 and x=4.

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


[Scilab-users] Scilab 6's plot2d displays %nan on the horizontal line in the mid-range of vertical axis

2017-05-17 Thread CRETE Denis
Hello,
New in Scilab 6 (+Linux): If %nan values are in the Y vector, plot2d behaves as 
if the following was performed before display: Y (isnan(Y))=(YM + Ym)/2; where 
YM and Ym are max and min values of the Y-tics. It is probably not what one 
expects...
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
e-mail :
 denis.cr...@thalesgroup.com 

http://www.trt.thalesgroup.com/ump-cnrs-thales
http://www.research.thalesgroup.com

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


Re: [Scilab-users] Problem with Matrix operation

2017-04-25 Thread CRETE Denis
Hello,
This should do the job if values different for a matrix containing only 0's and 
1's:

inx=[1 2 3];
iny=[1 2 3];
A=sparse([inx;iny]',ones(inx'),[5,3]);
full(A)

If non-indexed values are not known (and A already exists) then
A(inx+size(A,'r')*(iny-1))=1;

HTH
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 
e-mail : 
 denis.cr...@thalesgroup.com 
 http://www.trt.thalesgroup.com/ump-cnrs-thales
 http://www.research.thalesgroup.com

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de SCHULZ Wolfgang
Envoyé : mardi 25 avril 2017 15:30
À : Users mailing list for Scilab
Objet : [Scilab-users] Problem with Matrix operation

Hello,
I want to set certain elements of a matrix to 1. Interestingly the following 
code fills 9 elements with 1. I expected to have only 3 elements (with index 
1,1; 2,2 and 3,3) filled with 1.

A=zeros(5,3)
inx=[1 2 3];
iny=[1 2 3];
A(inx,iny)=1

Is there any way to fill a matrix with 1 where I have the indexes in 2 vectors?

Thanks for your help
Wolfgang
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] figure exportation : "permission denied"

2017-03-30 Thread CRETE Denis
Hello,
I used to have this message with former versions of SciLab... 
Are you using version 5.5 or later ? 
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 
e-mail : 
 denis.cr...@thalesgroup.com 
 http://www.trt.thalesgroup.com/ump-cnrs-thales
 http://www.research.thalesgroup.com


-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Olivier_B
Envoyé : jeudi 30 mars 2017 15:13
À : users@lists.scilab.org
Objet : [Scilab-users] figure exportation : "permission denied"

Hi,

I have a problem with the function "xs2emf".
I have this error message, whatever the directory I try to save the file 
"Unable to create export file, permission denied".

Can someone help me?

Thanks

Olivier



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


Re: [Scilab-users] 3D interpolation

2017-03-24 Thread CRETE Denis
Hello !
Did you try cshep2d + eval_cshep2d ?
HTH
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
e-mail :
 denis.cr...@thalesgroup.com 

http://www.trt.thalesgroup.com/ump-cnrs-thales
http://www.research.thalesgroup.com

De : users [mailto:users-boun...@lists.scilab.org] De la part de 
paul.carr...@free.fr
Envoyé : vendredi 24 mars 2017 18:41
À : User Scilab
Objet : [Scilab-users] 3D interpolation

Hi all,

I don't know if my question is relavante (or not), but I'm wondering what is 
the best way to perform a 3D interpolation, from for the matrix definition to 
the interpolation procedure.

Let me using a basic example: I've some curves y = f(x,T) defining a material 
behaviour at different temperatures i.e. 1 curve (x,y) per temperature:
- y = f(x,20)
- y = f(x,100)
- y = f(x,200)

etc.

What is the best way to define a single matrix? [x y T] ?


Next step is to be able to perform a 3D interpolation whatever is the 
temperature (for a given x) ... any advice? (of course I'm looking to interp3D 
flag.

Thanks for any feedback

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


Re: [Scilab-users] How to remove all the figure in a single instruction

2016-12-05 Thread CRETE Denis
Hello,
xdel(winsid())

HTH
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 
e-mail : 
 denis.cr...@thalesgroup.com 
 http://www.trt.thalesgroup.com/ump-cnrs-thales
 http://www.research.thalesgroup.com


-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de 
paul.carr...@free.fr
Envoyé : lundi 5 décembre 2016 12:06
À : users@lists.scilab.org
Objet : [Scilab-users] How to remove all the figure in a single instruction

Hi All

To remove all the figures in a single instruction, I'm using Xdel keyword; for 
example, "xdel(1:10)" for the figure 1 to 10.

Nevertheless if I manually remove one of them in the meantime, it does not work 
anymore.

Is there another way to proceed?


Nota bene: I tried something like "xdel(1:$)" but it does not work -> would 
such way be interesting?

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


Re: [Scilab-users] using csvRead

2016-10-13 Thread CRETE Denis
Hello Philipp,

In this case I first attempt to read first (e.g. with “mopen” and “getl”) and 
then split the strings with “tokens” where the feature of multiple separators 
exists.
Of course you can also use “cvsRead” with one separator and then use “tokens” 
to finish with the other separators.
HTH
Denis

[@@ THALES GROUP INTERNAL @@]

Unité Mixte de Physique CNRS / THALES
1 Avenue Augustin Fresnel
91767 Palaiseau CEDEx - France
Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78
e-mail :
 denis.cr...@thalesgroup.com 

http://www.trt.thalesgroup.com/ump-cnrs-thales
http://www.research.thalesgroup.com

De : users [mailto:users-boun...@lists.scilab.org] De la part de Philipp 
Mühlmann
Envoyé : vendredi 14 octobre 2016 00:08
À : International users mailing list for Scilab.
Objet : [Scilab-users] using csvRead

Dear Scilab users,
having a data file (*.cvs) containg following format:

HEADER-Line
dd.mm., HH:MM:SS.MS, value01, value02

dd = day
mm = month
 = year
HH = hour
MM = minute
SS = second
Ms = milli second
ValueXY = numerical value

Is it possible to use cvsRead in such a way to define the separator beeing ',' 
and ':' at the same time?
Background:

desired Matrix after reading the file is
M = [dd mm  HH MM SS MS value1 value2]

Thank you,
Philipp

--
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.

There we have the salad.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] inserting data into a bigger matrix

2016-10-12 Thread CRETE Denis
Hello,
Assuming input data are stored in
I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0];
there might be also a solution using the “sparse” function:

Nb_Dat=size(I);
Time= I(:,1);
ij=[1+ones(Nb_Dat(2),1).*.Time,(1:Nb_Dat(2))'.*.ones(Time)] ;
sp=sparse(ij,I);
// Display full Matrix
full(sp)

and it may be more efficient (?) writing it on a single line:
sp2=sparse([1+ones(size(I,'c'),1).*. I(:,1),(1: 
size(I,'c'))'.*.ones(I(:,1))],I);

HTH.
Denis

De : users [mailto:users-boun...@lists.scilab.org] De la part de Philipp 
Mühlmann
Envoyé : mercredi 12 octobre 2016 14:55
À : Users mailing list for Scilab
Objet : Re: [Scilab-users] inserting data into a bigger matrix

charming...exactly what I need.

2016-10-12 14:45 GMT+02:00 Rafael Guerra 
>:
Hi Philipp,

Does the simple code here below meet the requirements?

I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0];
ix1=I(1,1);
ix2=I($,1);
ix=ix1:ix2;
M=zeros(length(ix),4);
M(1:$,1) = ix';
M(I(:,1)+1,:)=I;

PS:
It should be easy to adapt it for a general time series consisting of floats 
and constant time-sampling.

Regards,
Rafael

From: users 
[mailto:users-boun...@lists.scilab.org] 
On Behalf Of Philipp Mühlmann
Sent: Wednesday, October 12, 2016 2:16 PM
To: International users mailing list for Scilab. 
>
Subject: [Scilab-users] inserting data into a bigger matrix

Dear Scialb users,


how to insert time based data into a pre-defined Matrix without using a 
for-loop?

The data points are not equally spaced in time.


example:
// assuming DATA includes 5 data Points
// each dat Point consists of 4 variable
// first variable = time

//datafile could look like

Time, Var1, Var2, Var3
0, 0, 0, 1
10, 0, 3, 1
15, 30, 0, 1
18, 0, 45, 0
36, 57, 28, 0

Assume that a timestep of 1 second is wanted.

desired result should look like this:

M =
0 0 0 1
1 0 0 0
2 0 0 0
3 0 0 0.
...
10 0 3 1
...
15 30 0 1
...
18 0 45 0
...
36 57 28 0

so "M" is bigger than the original dataset.

Again, I think I could do this using for-loops.
This could be OK for small dataset, but maybe become slow for huge data sets (> 
100'000 data points).

Thanks,
Philipp




Thanks,
Philipp





--
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.

There we have the salad.

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



--
In Kanada is' ka' na' da. Sonst wär' Kanada Jemanda.

There we have the salad.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] System Identification for First order delay and dead time

2016-09-24 Thread CRETE Denis
Hello,
If ymodel is (experimentally) proportional to u (and u is not too close to 0), 
it seems better to adjust z= ymodel/u = f(s).
I frequently use “datafit” for this purpose. Here f(x)=  
(K/(Tau*x+1))*exp(-Td*x).
HTH,
Denis

[@@ THALES GROUP INTERNAL @@]

De : users [mailto:users-boun...@lists.scilab.org] De la part de Fukashiimo
Envoyé : samedi 24 septembre 2016 23:11
À : users@lists.scilab.org
Objet : Re: [Scilab-users] System Identification for First order delay and dead 
time


s is the Laplace operator, u is the process input vatiable, y is the process 
output variable,

2016/09/24 23:44 "Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives]" 
<[hidden email]>:
Le 24/09/2016 15:59, Fukashiimo a écrit :

> Hello,
>
> I am looking for a Scilab software which is similar to Matlab System ID tool
> box.
>
> I would like to obtain values of parameters, Tau, K and Td for following
> first order delay + Dead time model from time series data.
> ymodel = (K/(Tau*s+1))*exp(-Td*s)*u
> ymodel: process output, u: process input
> SISO continuous time
.
What is s?
What's the input variable: s or u? And is the other a known parameter?


___
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


If you reply to this email, your message will be added to the discussion below:
http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034610.html
To unsubscribe from System Identification for First order delay and dead time, 
click here.
NAML


View this message in context: Re: System Identification for First order delay 
and dead 
time
Sent from the Scilab users - Mailing Lists Archives mailing list 
archive
 at Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Reading single column data for processing

2014-04-25 Thread CRETE Denis
Hello,
I would try
z=fscanfMat(‘input.txt’);
y=f(z)
fprintfMat(‘output.txt’,[z,y]);

HTH
Denis
De : users [mailto:users-boun...@lists.scilab.org] De la part de Lester Anderson
Envoyé : vendredi 25 avril 2014 18:01
À : International users mailing list for Scilab.
Objet : [Scilab-users] Reading single column data for processing


A quick query.

Been a while since I have used Scilab now, but I need to read in a column data 
set and process this, and then write out the results as the input column plus 
the computed value.

Have an array of the form:

1.0
2.0
3.0
.
.
.
.
.
value(n)

e.g.

read (input.txt) -- array(z) i.e. read all values in the file from 1 to n (end 
of file)

y=function * array(z)
write (output.txt)  -- write 2 column result (input value, computed value)

Things have changed a bit in 5.5.0

Cheers

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


Re: [Scilab-users] evaluate error on each parameter calculated with leastsq

2014-02-19 Thread CRETE Denis
Dear Yohann
The (x,y) dataset does not look like a parabola... (it resembles more  a type 
of x*sin(x) function). 
Trying to fit this dataset with a parabola, will  not only give unreliable 
result, but also will put a high challenge to error estimation algorithms...
Denis

-Message d'origine-
De : users [mailto:users-boun...@lists.scilab.org] De la part de Yohann
Envoyé : mardi 18 février 2014 15:07
À : users@lists.scilab.org
Objet : [Scilab-users] evaluate error on each parameter calculated with leastsq

Hi all !!

First of all, thank you to all contributors of Scilab.
However, I have a problem to calculate the estimated error on each parameter 
calculated with leastsq.

For example if I have the simple following function  to fit:
!!!
function y = fun2fit(x, c)
  y =  c(1)*x*x + c(2)*x + c(3);
endfunction 

function e = myerror(c, x, y)
  e = fun2fit(x, c) - y;
endfunction 

// Data
x = [ 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6]';
y = [5.02  6.08  3.33 -0.93   -0.22  7.83  16.52 15.55  2.67 -11.42 -11.78 
5.09 25.25]';   

// First guess
c0 = [1 1 1]';
y0 = fun2fit(x, c0); 

// least square
[f, copt] = leastsq(list(myerror, x, y), c0) 
!!!

I'd like to have an estimated error on each of the 3 element of copt.
Any idea ?

Thanks !
Y





--
View this message in context: 
http://mailinglists.scilab.org/evaluate-error-on-each-parameter-calculated-with-leastsq-tp4028696.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Batch to export a graph to PNG automatically

2013-10-27 Thread CRETE Denis
Hello,
I tried the code given in example for the function driver, on a PC with 
Windows XP and Scilab 5.5.0: the report has a warning message given below.

--current_driver = driver()
current_driver  =
 Rec

--driver(Pos)
ans  =
 Rec

--xinit(TMPDIR+/foo.ps)
--plot2d()
--xend()
Warning !!!
Scilab has found a critical error (Unknown exception)
with xend function.
Save your data and restart Scilab.
   !--error 1
Affectation erronée.
Now, I issue the driver command twice:

--current_driver = driver()
current_driver  =
 Rec

--driver(Pos)
ans  =
 Rec

--driver(Pos)
ans  =
 Pos

--xinit(TMPDIR+/foo.ps)
--plot2d()
--xend()

and I get the graph in ps format correctly in TMPDIR. Is this to be correlated 
to the behaviour that I observed (only with Scilab) when I try to switch 
between windows with Alt+Tab (I have to repeat the command twice) ? Should we 
consider this a bug ?
Best regards
Denis


De : users [mailto:users-boun...@lists.scilab.org] De la part de Sylvestre Ledru
Envoyé : samedi 26 octobre 2013 02:59
À : users@lists.scilab.org
Objet : Re: [Scilab-users] Batch to export a graph to PNG automatically

On 26/10/2013 01:45, Lecoeur, Nora wrote:
Hello,

What would be the program to write if I want to export a graph to PNG 
automatically with scilab ?


driver  xinit are probably what you are looking for:
http://help.scilab.org/docs/5.4.1/en_US/driver.html
http://help.scilab.org/docs/5.4.1/en_US/xinit.html


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


Re: [Scilab-users] clear current line in the console

2013-08-29 Thread CRETE Denis
If cursor is at the end of the line, Shift Home + Del ?
That is not really quick...
 Denis
-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Adrien Vogt-Schilb
Envoyé : mercredi 28 août 2013 18:45
À : International users mailing list for Scilab.
Objet : [Scilab-users] clear current line in the console

Hi everyone

Is there a way to clear the crrent line in th console? In most consoloes, [ESC] 
does that, but not in scilab ___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Bug in MatLab to Scilab conversion ?

2013-05-17 Thread CRETE Denis
Hello,
While 'E1 = 1i*r; ' is converted correctly by both mfile2sci and 
translatepaths, the following line is not:
E2 = 1i*r; % pb of coexistence 1i/comment
Giving this report
E2 = 1i*r; ;// pb of coexistence 1i/comment
 !--error 276
Opérateur, virgule ou point-virgule manquant.
This problem occurs as soon as a % sign for comments is appended to the line 
containing 1i.
Denis
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Export vector graphics produced by Scilab 5.4.1

2013-04-12 Thread CRETE Denis
Hello,
I am trying to transfer graphical images (produced using plot2d, with Scilab 
5.4.1 under Windows XP) to LibreOffice. 
When I use the scratchpad, nothing appears in LO Writer, neither in LO 
Impress, neither as well in Word 2007: there seem to be a problem both for 
the Scilab command Copy to ScratchPad and the Ctrl+C shortcut.
Additionally,
- Exporting the file to a vectorial format such as EPS allows to obtain the 
result in Word 2007, but not in LibreOffice.
- Exporting an SVG file is almost correct for FireFox, but LibreOffice Writer 
does not display text (font compatibility?).
- Trying to export an EMF format, I get an error message requesting to install 
Ghostscript first. So I did, although I tried to visit the URL indicated in the 
error message: the page www.ghostscript.com/awki does not exist !-( On 
www.ghostscript.com the Welcome page begins with Welcome to Ghostscript, an 
interpreter for the PostScript language and for PDF. = I still don't see the 
relation with EMF generation... but even installation of GS, the error message 
of Scilab is always asking for installation of GS...
- EPS is recognized by Word 2007; but my first attempt with LibreOffice failed.
I hope my report is correct.
Thank you in advance for any help,
Denis

-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Mike Page
Envoyé : vendredi 12 avril 2013 11:16
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] non access to sci files

Hi,

I tried Sci2C once (a while ago now), but I found it had too many limitations.  
For me the lack of support for hypermatrices was enough to make it not usable.  
There is (I think) an example of Sci2C that shows how it works, but I don't 
remember where - sorry.

One other way to solve your problem is to use SendScilabJob.  This enables you 
to send Scilab commands from C code to the Scilab engine.  I use this quite a 
lot.  Then your Scilab code would only exist as a set of string constants 
inside C and could be compiled and hidden.

I posted an example of using SendScilabJob a while back - you can search the 
user group for sendscilabjob and you will find all the threads.

HTH,
Mike.


-Original Message-
From: users-boun...@lists.scilab.org
[mailto:users-boun...@lists.scilab.org]On Behalf Of Carrico, Paul
Sent: 12 April 2013 09:53
To: International users mailing list for Scilab.
Subject: Re: [Scilab-users] non access to sci files


Hi

It's look promissing ... I installed it but i'm spending a lot of time in 
finding some docs / help file and so on ...

Where are they ?

Cheers

Paul

-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org]
De la part de David Chèze
Envoyé : vendredi 12 avril 2013 09:34
À : users@lists.scilab.org
Objet : Re: [Scilab-users] non access to sci files

Hi Paul,

did you already have a look at:
http://atoms.scilab.org/toolboxes/scilab2c
http://atoms.scilab.org/toolboxes/scilab2c
I've never used this module and i assume there are some limitations but it's 
worth giving a try...

David




--
View this message in context:
http://mailinglists.scilab.org/Scilab-users-non-access-to-sci-files-tp402650
8p4026525.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




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


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3272 / Virus Database: 3162/6239 - Release Date: 04/11/13


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


Re: [Scilab-users] Export vector graphics produced by Scilab 5.4.1

2013-04-12 Thread CRETE Denis
Thank you for your help !
However, I included in AUTOEXEC.BAT the DOS command SET PATH=%PATH%; 
gswin32.exe_Path
Then I restarted my computer, and checked with the DOS command ECHO %PATH% and 
the additional path is appended.
But the error message for EMF export is the same: it asks again to install 
Ghostscript.
Best regards
Denis

De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Adrien Vogt-Schilb
Envoyé : vendredi 12 avril 2013 14:53
À : International users mailing list for Scilab.
Objet : [Scilab-users] Export vector graphics produced by Scilab 5.4.1

Hi

The copy to clipboard function is now known to be broken in sci 5.4: 
http://bugzilla.scilab.org/show_bug.cgi?id=11648

For the other problem, do you know if the path to ghosscript is included in 
your environment variable PATH ?
if you have no idea what this means, try the following two lines in Scilab:

 unix_g(path)
strindex(unix_g(path),gs)

and report here the answer

regards


 Original Message 
Subject:

[Scilab-users] Export vector graphics produced by Scilab 5.4.1

Date:

Fri, 12 Apr 2013 14:29:21 +0200

From:

CRETE Denis denis.cr...@thalesgroup.commailto:denis.cr...@thalesgroup.com

Reply-To:

International users mailing list for Scilab. 
users@lists.scilab.orgmailto:users@lists.scilab.org

To:

International users mailing list for Scilab. 
users@lists.scilab.orgmailto:users@lists.scilab.org



Hello,

I am trying to transfer graphical images (produced using plot2d, with Scilab 
5.4.1 under Windows XP) to LibreOffice.

When I use the scratchpad, nothing appears in LO Writer, neither in LO 
Impress, neither as well in Word 2007: there seem to be a problem both for 
the Scilab command Copy to ScratchPad and the Ctrl+C shortcut.

Additionally,

- Exporting the file to a vectorial format such as EPS allows to obtain the 
result in Word 2007, but not in LibreOffice.

- Exporting an SVG file is almost correct for FireFox, but LibreOffice Writer 
does not display text (font compatibility?).

- Trying to export an EMF format, I get an error message requesting to install 
Ghostscript first. So I did, although I tried to visit the URL indicated in the 
error message: the page 
www.ghostscript.com/awkihttp://www.ghostscript.com/awki does not exist !-( On 
www.ghostscript.comhttp://www.ghostscript.com the Welcome page begins with 
Welcome to Ghostscript, an interpreter for the PostScript language and for 
PDF. = I still don't see the relation with EMF generation... but even 
installation of GS, the error message of Scilab is always asking for 
installation of GS...

- EPS is recognized by Word 2007; but my first attempt with LibreOffice failed.

I hope my report is correct.

Thank you in advance for any help,

Denis



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


Re: [Scilab-users] uicontrols and 5.4.1

2013-04-08 Thread CRETE Denis
Hello,
I seem to have the same experience. However, as I was loading the graphics with 
a huge amount of data, I did not blame Scilab at this point.
Regards
Denis

-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Antoine Monmayrant
Envoyé : lundi 8 avril 2013 11:25
À : International users mailing list for Scilab.
Objet : [Scilab-users] uicontrols and 5.4.1

Hi everyone,

Like many of you, I greatly enjoy the improved performances and stability of 
the graphics in 5.4.1.
However, it seems that there are some random issues with the uicontrols that 
stop responding correctly after some random time.
After a restart, the uicontrols work fine again and the same script ran under 
5.4.0 does not cause any issue.
I did not manage to reproduce this bug reliably, so I don't have a test to 
submit for a bug.
(Well, I am not even sure whether the bug is in the code or sitting between the 
keyboard and the mouse!) Am I the only one in this situation or has any of you 
experienced something similar with uicontrols under 5.4.1?

Cheers,

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


Re: [Scilab-users] Re-sampling data and making 2 vectors

2013-01-11 Thread CRETE Denis
Hello Christophe,

Regarding noise, I have the feeling that lsq_splin can do a better job than 
interp1, which just interpolates linearly in its default operation. However, 
smooth might be the best choice for this task.

Regarding intersect, I considered that the data provided were representative 
of the case study, and taking into account only EXACT correspondence would - in 
this particular case - not miss any data.

Cdlt
Denis
PS: last line should have been:
disp([v',Temp1,Temp2,Temp2-(Temp1-mean(Temp1))]); 

-Message d'origine-
De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De 
la part de Dang, Christophe
Envoyé : vendredi 11 janvier 2013 17:07
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] Re-sampling data and making 2 vectors

Hello Denis

 intersect(Data1(:,1))

with this solution, you loose the information.

 It is also possible to interpolate the values of Data2 for the time 
 values in Data1(:,1) with interp1

I'm not familiar with this function, and have a question about the way it 
works. I have the feeling that it creates polynomial arcs (splines) that goes 
through all the data points, am I right?

If yes, then it is sensitive to noise.

Is there a function that does a smoothing on several data points so you can 
reduce the noise?

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