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 :

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

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;

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

Re: [Scilab-users] Graphics: Highlighted Entity

2022-06-09 Thread CRETE Denis
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

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

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

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

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

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

2021-07-28 Thread CRETE Denis
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 shou

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

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:

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread CRETE Denis
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

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

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

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

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

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

2020-08-26 Thread CRETE Denis
r 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 lea

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 -

[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

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

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).

Re: [Scilab-users] improve accuracy of roots

2019-01-14 Thread CRETE Denis
s, 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. -

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

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

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

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; [

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

2018-06-06 Thread CRETE Denis
;, 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 resu

[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

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

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

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

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

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

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

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

2017-10-18 Thread CRETE Denis
i, 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) : > -- > -

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

2017-10-18 Thread CRETE Denis
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 e

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;

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]');

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

[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 @@]

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

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

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 :

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

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.

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

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

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

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

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

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

[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

[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

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

2013-04-12 Thread CRETE Denis
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

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

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