From p.muehlmann at gmail.com Fri Oct 1 00:58:18 2021 From: p.muehlmann at gmail.com (P M) Date: Fri, 1 Oct 2021 00:58:18 +0200 Subject: [Scilab-users] datatips in multiple axes plot In-Reply-To: References: <9b3317767c1b43ff8026a4f2259b1618@thalesgroup.com> Message-ID: David, if you can express your data by a function, maybe something like this can help? BR Philipp // ########################################## //define functions for data generationfunction res=func1(x) res = sin(x);endfunction function res=func2(x) res = x .* x;endfunction function res=func3(x) res = exp(x);endfunction // define function for data tip callbackfunction res=dataTipByX(fhandle, p1handle, p2handle, p3handle) xTip = evstr(x_mdialog('select x value','x','10')); y1Tip = func1(xTip); y2Tip = func2(xTip); y3Tip = func3(xTip); a = fhandle.children(); sca(a(4)) datatipRemoveAll(); datatipCreate(p1handle,[xTip, y1Tip]); sca(a(3)) datatipRemoveAll(); datatipCreate(p2handle,[xTip, y2Tip]); sca(a(2)) datatipRemoveAll(); datatipCreate(p3handle,[xTip, y3Tip]); res = 0; endfunction // create datax= linspace(-100,100,100);y1 = func1(x);y2 = func2(x);y3 = func3(x); // create figure with plotsf = figure(); plot(x,y1);a1 = gca();e1 = gce();p1 = e1.children(); newaxes()plot(x,y2);a2 = gca();e2 = gce();p2 = e2.children(); newaxes()plot(x,y3);a3 = gca();e3 = gce();p3 = e3.children(); m1=uimenu(f,'label', 'DataTip', 'callback', "dataTipByX(f, p1, p2, p3)"); // do some figure editingf.background = 8; a2.filled = 'off';a3.filled = 'off'; a2.y_location = "middle"a3.y_location = "right" a3.log_flags = "nln" p1.thickness = 1;p2.thickness = 1;p3.thickness = 1; p2.foreground = 1;p3.foreground = 5; // ########################################## Am Do., 30. Sept. 2021 um 13:15 Uhr schrieb St?phane Mottelet < stephane.mottelet at utc.fr>: > Hello, > > Having digged in the code of the entity picker some time ago, I think that > the problem can be fixed at the Java level. Please create an issue on > Bugzilla. > > S. > > Le 30 sept. 2021 ? 13:10, CRETE Denis a > ?crit : > > ? > > 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 > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Fri Oct 1 12:58:36 2021 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 1 Oct 2021 12:58:36 +0200 Subject: [Scilab-users] datatips in multiple axes plot In-Reply-To: References: Message-ID: <7ea25b9e-71f7-36ed-06d6-d124213269cc@durietz.se> Hello David, if you don't need automatic scaling, you could use drawaxis() to get the second and third y-axis and then scale the y-data of those lines to plot them in the first axes. In your figure: function y = yblu(yin) y = -1 + log10(yin)/3 endfunction function y = yred(yin) y = -1 + yin * 2/240 endfunction Then plot x and the function value of y. Regards Stefan On 2021-09-30 09:56, CHEZE David 227480 wrote: > 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 > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Fri Oct 1 14:04:02 2021 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 1 Oct 2021 14:04:02 +0200 Subject: [Scilab-users] datatips in multiple axes plot In-Reply-To: <7ea25b9e-71f7-36ed-06d6-d124213269cc@durietz.se> References: <7ea25b9e-71f7-36ed-06d6-d124213269cc@durietz.se> Message-ID: Sorry, I missed a "2": function y = yblu(yin) y = -1 + log10(yin)*2/3 endfunction Stefan On 2021-10-01 12:58, Stefan Du Rietz wrote: > Hello David, > > if you don't need automatic scaling, you could use drawaxis() to get the > second and third y-axis and then scale the y-data of those lines to plot > them in the first axes. In your figure: > > function y = yblu(yin) > ? y = -1 + log10(yin)/3 > endfunction > > function y = yred(yin) > ? y = -1 + yin * 2/240 > endfunction > > Then plot x and the function value of y. > > Regards > Stefan > > > On 2021-09-30 09:56, CHEZE David 227480 wrote: >> 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 >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From p.muehlmann at gmail.com Fri Oct 1 18:14:19 2021 From: p.muehlmann at gmail.com (P M) Date: Fri, 1 Oct 2021 18:14:19 +0200 Subject: [Scilab-users] reading binary files with some plain text Message-ID: Hi, there is a binary file I would like to extract some info from. If one opens the file witha text editor (such as notepad) it turns out, that some human readable parts are inside of the binary file. With Scilab I can get these data parts by: fd = mopen(files(i),'r'); // with files(i) beeing a list of absolute file paths data = mfscanf(-1, fd, '%c'); mclose(fd); txt = strcat(data); // is the complete file in one single line Now I can do some regexp-search within the txt. Question: Since the file an become quite big and since the data of interest are more to the end of the file, the step: data = mfscanf(-1, fd, '%c'); can take very long. I tried data = mgetl (fd, -1); which is much faster, but does not return the correct characters / string. Any idea for exchanging the mfscanf-command? Thank you, Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucien.povy at free.fr Tue Oct 5 17:24:00 2021 From: lucien.povy at free.fr (Lucien Povy) Date: Tue, 5 Oct 2021 17:24:00 +0200 Subject: [Scilab-users] Atoms toolbox : iodelay toolbox by S.steer Message-ID: Hello all, With new version of Scilab >6.1? we cannot use iodelay toolbox : problem with %rd_string. I propose a new version of this macro. (pi?ce jointe %rd_string) Regards lucien.povy at free.fr -------------- next part -------------- // ==================================================================== // Copyright (C) - lucien.povy at free.fr. Carantec 2020. // This file must be used under the terms of the GNU GPL v2.0 licence. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // https://www.gnu.org/licenses/licenses.en.html // ==================================================================== // String output of iodelay systems matrices for scilab > 6.1.? // ==================================================================== function txt=%rd_string(H) r= H.H; d=H.iodelay; [m,n]=size(r); Sr=string(r)(:);//for systems without delay. Sd=string(-d)(:);//now the delays. w="*exp("+Sd+"*"+varn(r)+")"; w(find(d==0))=""; for j=2:3:3*m*n-1 Sr(j)=part("-",ones(1,length(Sr(j)))); end Srl=[]; Stxt=[]; for i=1:m*n Srl=[Srl;[Sr(3*(i-1)+1:3*i);blanks(length(Sr(3*i)))]]; pw(i)=part("",1:length(w(i))); Stxt=[Stxt;[pw(i);w(i);pw(i);blanks(length(w(i)))]]; end tx=Srl+Stxt; txt=matrix(tx,size(tx,"*")/n,n); txt=blanks(4)+txt; endfunction From sgougeon at free.fr Mon Oct 18 21:24:18 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Oct 2021 21:24:18 +0200 Subject: [Scilab-users] 6.1.1 startup error In-Reply-To: <30832dff-36c9-1aad-0373-73d1282dfec5@free.fr> References: <30832dff-36c9-1aad-0373-73d1282dfec5@free.fr> Message-ID: Le 22/09/2021 ? 17:10, Samuel Gougeon a ?crit?: > Hello Stefan, > > This kind of error might arise when the content of the SCIHOME > directory of a previous scilab version is copied into the SCIHOME of > the current 6.1.1 version, for instance to avoid respecifying all > users preferences. > Unfortunately, when the template of some configuration file is changed > from one version to the next one, the file must be regenerated. As reported by Guenther as bug 16778 , the same error may occur after loading a Scilab workspace saved from another version of Scilab 6 (due to the bug 16781 ). Indeed, the saved workspace includes SCIHOME, and in Scilab 6 load() wrongly overwrites protected variables like SCIHOME. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Fri Oct 22 12:56:49 2021 From: p.muehlmann at gmail.com (P M) Date: Fri, 22 Oct 2021 12:56:49 +0200 Subject: [Scilab-users] Messagebox - button pre-selection Message-ID: Dear, in a messagebox: Is it possible to have a button other than the first one pre-selected? e.g.: I'd like to have "No" pre-selected in the example below? In my application the buttons must stay in their order as they are...so simply changing the order (button label) is no option. Thank you, Philipp [image: grafik.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grafik.png Type: image/png Size: 7370 bytes Desc: not available URL: From sdr at durietz.se Fri Oct 22 14:18:47 2021 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 22 Oct 2021 14:18:47 +0200 Subject: [Scilab-users] Messagebox - button pre-selection In-Reply-To: References: Message-ID: <8bd35e78-c0e1-d7d5-e1bd-d0a2440dab91@durietz.se> Hello Philipp, you can change the button labels. Regards Stefan On 2021-10-22 12:56, P M wrote: > Dear, > > in a messagebox: > > Is it possible to have a button other than the first one pre-selected? > > e.g.: I'd like to have "No" pre-selected in the example below? > > In my application the buttons must stay in their order as they are...so > simply changing the order (button label) is no option. > > Thank you, > Philipp > > grafik.png > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Fri Oct 22 14:21:44 2021 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 22 Oct 2021 14:21:44 +0200 Subject: [Scilab-users] Messagebox - button pre-selection In-Reply-To: <8bd35e78-c0e1-d7d5-e1bd-d0a2440dab91@durietz.se> References: <8bd35e78-c0e1-d7d5-e1bd-d0a2440dab91@durietz.se> Message-ID: <5f6bf96e-1f6a-3fd3-d055-e2532b67eed8@durietz.se> Sorry, I didn't read yor message to the end ... On 2021-10-22 14:18, Stefan Du Rietz wrote: > Hello Philipp, > you can change the button labels. > > Regards > Stefan > > > On 2021-10-22 12:56, P M wrote: >> Dear, >> >> in a messagebox: >> >> Is it possible to have a button other than the first one pre-selected? >> >> e.g.: I'd like to have "No" pre-selected in the example below? >> >> In my application the buttons must stay in their order as they >> are...so simply changing the order (button label) is no option. >> >> Thank you, >> Philipp >> >> grafik.png >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From p.muehlmann at gmail.com Sun Oct 24 22:58:31 2021 From: p.muehlmann at gmail.com (P M) Date: Sun, 24 Oct 2021 22:58:31 +0200 Subject: [Scilab-users] Scilab crashes on x_choose_modeless Message-ID: Hi, What is the expected behaviour of x_choose_modeless ? Executing the help example [image: grafik.png] I get the window below and Scilab does not react to anything. Experienced under Scilab 6.1.0 (64-bit) on a Win10 PC. [image: grafik.png] Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grafik.png Type: image/png Size: 2577 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grafik.png Type: image/png Size: 2291 bytes Desc: not available URL: From stephane.mottelet at utc.fr Mon Oct 25 09:06:44 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 25 Oct 2021 09:06:44 +0200 Subject: [Scilab-users] Scilab crashes on x_choose_modeless In-Reply-To: References: Message-ID: Hi, Let us see if someone reacts to/cares about? this message... S. Le 24/10/2021 ? 22:58, P M a ?crit?: > Hi, > > What is the expected behaviour of x_choose_modeless ? > > Executing the help example > > grafik.png > > > I get the window below and Scilab does not react to anything. > > Experienced under Scilab 6.1.0 (64-bit) on a Win10 PC. > > grafik.png > > Philipp > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grafik.png Type: image/png Size: 2291 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grafik.png Type: image/png Size: 2577 bytes Desc: not available URL: From sdr at durietz.se Mon Oct 25 09:34:15 2021 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 25 Oct 2021 09:34:15 +0200 Subject: [Scilab-users] Scilab crashes on x_choose_modeless In-Reply-To: References: Message-ID: <8cd580fe-4b46-429b-41b6-5da76362e279@durietz.se> Hello, I get the same result (nothing but the title: "Scilab Choose Message") with Scilab 6.1.1 under Linux. And Scilab hangs ... Stefan On 2021-10-25 09:06, St?phane Mottelet wrote: > Hi, > > Let us see if someone reacts to/cares about? this message... > > S. > > Le 24/10/2021 ? 22:58, P M a ?crit?: >> Hi, >> >> What is the expected behaviour of x_choose_modeless ? >> >> Executing the help example >> >> grafik.png >> >> >> I get the window below and Scilab does not react to anything. >> >> Experienced under Scilab 6.1.0 (64-bit) on a Win10 PC. >> >> grafik.png >> >> Philipp >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > St?phane Mottelet > Ing?nieur de recherche > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > D?partement G?nie des Proc?d?s Industriels > Sorbonne Universit?s - Universit? de Technologie de Compi?gne > CS 60319, 60203 Compi?gne cedex > Tel : +33(0)344234688 > http://www.utc.fr/~mottelet > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From Clement.David at esi-group.com Mon Oct 25 09:41:05 2021 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Mon, 25 Oct 2021 07:41:05 +0000 Subject: [Scilab-users] Scilab crashes on x_choose_modeless In-Reply-To: <8cd580fe-4b46-429b-41b6-5da76362e279@durietz.se> References: <8cd580fe-4b46-429b-41b6-5da76362e279@durietz.se> Message-ID: Hello, Yep I was able to reproduce, it looks that's a known bug https://bugzilla.scilab.org/show_bug.cgi?id=14905 Thanks, Cl?ment > -----Original Message----- > From: users On Behalf Of Stefan Du Rietz > Sent: Monday, October 25, 2021 9:34 AM > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Scilab crashes on x_choose_modeless > > Hello, I get the same result (nothing but the title: "Scilab Choose > Message") with Scilab 6.1.1 under Linux. And Scilab hangs ... > > Stefan > > > On 2021-10-25 09:06, St?phane Mottelet wrote: > > Hi, > > > > Let us see if someone reacts to/cares about? this message... > > > > S. > > > > Le 24/10/2021 ? 22:58, P M a ?crit?: > >> Hi, > >> > >> What is the expected behaviour of x_choose_modeless ? > >> > >> Executing the help example > >> > >> grafik.png > >> > >> > >> I get the window below and Scilab does not react to anything. > >> > >> Experienced under Scilab 6.1.0 (64-bit) on a Win10 PC. > >> > >> grafik.png > >> > >> Philipp > >> > >> _______________________________________________ > >> users mailing list > >> users at lists.scilab.org > >> http://lists.scilab.org/mailman/listinfo/users > > > > -- > > St?phane Mottelet > > Ing?nieur de recherche > > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > > D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - > > Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne > cedex > > Tel : +33(0)344234688 http://www.utc.fr/~mottelet > > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sdr at durietz.se Mon Oct 25 11:32:17 2021 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 25 Oct 2021 11:32:17 +0200 Subject: [Scilab-users] Scilab crashes on x_choose_modeless In-Reply-To: References: <8cd580fe-4b46-429b-41b6-5da76362e279@durietz.se> Message-ID: <3b80f1aa-820e-ee9c-8161-0df6a95e486f@durietz.se> But as Samuel G wrote in https://bugzilla.scilab.org/show_bug.cgi?id=14652 this function would be redundant if x_choose() had.an argument "modal". Stefan On 2021-10-25 09:41, Cl?ment David wrote: > Hello, > > Yep I was able to reproduce, it looks that's a known bug https://bugzilla.scilab.org/show_bug.cgi?id=14905 > > Thanks, > Cl?ment > >> -----Original Message----- >> From: users On Behalf Of Stefan Du Rietz >> Sent: Monday, October 25, 2021 9:34 AM >> To: users at lists.scilab.org >> Subject: Re: [Scilab-users] Scilab crashes on x_choose_modeless >> >> Hello, I get the same result (nothing but the title: "Scilab Choose >> Message") with Scilab 6.1.1 under Linux. And Scilab hangs ... >> >> Stefan >> >> >> On 2021-10-25 09:06, St?phane Mottelet wrote: >>> Hi, >>> >>> Let us see if someone reacts to/cares about? this message... >>> >>> S. >>> >>> Le 24/10/2021 ? 22:58, P M a ?crit?: >>>> Hi, >>>> >>>> What is the expected behaviour of x_choose_modeless ? >>>> >>>> Executing the help example >>>> >>>> grafik.png >>>> >>>> >>>> I get the window below and Scilab does not react to anything. >>>> >>>> Experienced under Scilab 6.1.0 (64-bit) on a Win10 PC. >>>> >>>> grafik.png >>>> >>>> Philipp >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>> >>> -- >>> St?phane Mottelet >>> Ing?nieur de recherche >>> EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable >>> D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - >>> Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne >> cedex >>> Tel : +33(0)344234688 http://www.utc.fr/~mottelet >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From stephane.mottelet at utc.fr Mon Oct 25 16:35:18 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 25 Oct 2021 16:35:18 +0200 Subject: [Scilab-users] Sundials ode solvers Message-ID: Hi all, As discussed in this thread last month https://www.mail-archive.com/users at lists.scilab.org/msg10679.html I am glad to annouce that a first version of the? sci-sundials toolbox (maybe part of Scilab in the future) is available on Atoms in the "Differential Equations" category (refresh the package list if you don't see it).? To have an idea of its features I pasted below the content of the README.md file on the gitlab project of sci-sundials (https://gitlab.com/mottelet/sci-sundials/). If you appreciate the work and want to help, doc, demos, or even more if you know how to code in C and C++ you are welcome ! S. What has been done and what is to be done Until now only CVODE has been interfaced but many common features have been developped in the OdeManager class, hence interfacing IDA will be quite easy. ARKODE (various modern explicit, implicit and mixed explicit/implicit Runge-Kutta solvers) does not exist in the old 2.4.0 version of Sundials which is used in Scilab hence won't be interfaced unless an upgrade is done (Sundials is now at version 5.7.0). The support of Sparse Jacobians is also missing for the same reason. Features The CVODE gateway cvode_solve() implements the following features which were missing by the legacy LSODE/LSODA/LSODAR/... ode() gateway : * full a posteriori access to solver continuous extension of solution at arbitrary points via a MList output when only one lhs is given: |sol = cvode_solve(f, [t0 tf], y0) t = linspace(t0, tf, 1000) plot(t, sol(t)) | The |sol| MList fields gathers all information related to the obtained solution (time steps, solution at time steps, events, ...). The solver can be restarted by giving the MLlist as first argument to |cvode_extend| : |sol2 = cvode_extend(sol, tx, ...)| where |tx| is the time point to which solution has to be extended. The options of the call that yielded |sol| are used and can be changed as optional named parameters after |tx|. * a user-friendly access to solver options via optional named parameters in cvode_solve call, i.e. |cvode_solve(f, tspan, y0, h0=0.01, rtol=1e-3)| * a really simpler way to give time span of integration allowing to choose between error driven solver internal time steps and user fixed time steps, i.e. |[t,y] = cvode_solve(f, [t0 tf], y0) [t,y] = cvode_solve(f, [t0 t1 ... tf], y0) [t,t] = cvode_solve(f, tspan, y0, t0=0)| the latter style being the closest to actual |ode()| behavior where solution is by default given at user time steps and |t0| is not necessarily equal to |tspan(1)|, which is the default in the two former calls above. * a better and user-friendly specification of events via a variable number of outputs event function (giving value of event equations, wheter to stop integration for a given event and event direction selection), minimal style beeing a single output. Information about events is also simpler to get: |function [eq,term,dir] = evfun(t,y) eq = y(1)-1.7; term = %f; dir = 1; end [t,y,te,ye,ie] = cvode_solve(f, tspan, y0, events = evfun) sol = cvode_solve(f, tspan, y0, events = evfun)| in the latter call information about events is recovered in |sol.te,sol.ye,sol.ie|. * support of complex solution with detection of complexity in |y0| or |f(t0,y0)|, e.g. |function out = crhs(t,y) out = 10*exp(2*%i*%pi*t)*y; end [t,y] = cvode_solve(crhs, [0,5], 1) plot(t,real(y),t,imag(y))| * Support of a callback function called after each successfull step, giving access to current solver statistics and allowing to stop integration (e.g. by a "stop" button on a GUI), e.g. |function stop = scicallback(t,y,flag,stats) stop = %f if flag == "step" mprintf("%s : hlast=%g\n", flag, stats.hlast) end end [t,y] = cvode_solve(f, tspan, y0, intcb=scicallback);| * support of an arbitrary number of dimensions of ode state Performance |cvode_solve()| is roughly two times faster than |ode()| for both fixed methods (Adams and BDF). As |ode()| already did, compiled and dynamically linked C,C++ or Fortran externals are supported by |cvode_solve()|. When using such externals instead of Scilab functions |cvode_solve()| is generally an order of magnitude faster. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From unclekachi at gmail.com Tue Oct 26 14:25:05 2021 From: unclekachi at gmail.com (onyeka ogbonna) Date: Tue, 26 Oct 2021 13:25:05 +0100 Subject: [Scilab-users] Inquiry Message-ID: Which is advisable to learn now, Scilab or Python -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.crete at thalesgroup.com Tue Oct 26 15:34:29 2021 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Tue, 26 Oct 2021 13:34:29 +0000 Subject: [Scilab-users] Inquiry In-Reply-To: References: Message-ID: <64193046774649a68e5eca1623285acf@thalesgroup.com> 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 at lists.scilab.org Objet : [Scilab-users] Inquiry Which is advisable to learn now, Scilab or Python -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Tue Oct 26 19:49:08 2021 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Tue, 26 Oct 2021 17:49:08 +0000 Subject: [Scilab-users] Inquiry In-Reply-To: References: Message-ID: Hello, > De : onyeka ogbonna > Envoy? : mardi 26 octobre 2021 14:25 > > Which is advisable to learn now, Scilab or Python I'd say: Scilab is probably easier to learn and you have a community of calculation specialists you can rely on. Then, switching to Python is not much a problem. Python has generally a dynamic and strong community that ensures long time continuity (Python should not be abandoned in 20 years), and you will find a lot of help concerning programming (but maybe less about calculation itself?). -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From david.cheze at cea.fr Wed Oct 27 16:18:25 2021 From: david.cheze at cea.fr (CHEZE David 227480) Date: Wed, 27 Oct 2021 14:18:25 +0000 Subject: [Scilab-users] Sundials ode solvers In-Reply-To: References: Message-ID: Hi St?phane, I tested the cvode_solve() function in my case study cited below and it actually ran 40% faster than the previous ode(?stiff?,?), with easy one-to-one function?s parameters replacement (in my case including the list syntax, with function?s multiple parameters, gradient function, simple tolerance specifications). As you advised, I need to investigate moving the differential equation code from Scilab to fortran external function to reduce further the simulation time. Thank you for this new module, staying updated with Sundials ! Best, David Ch?ze tel. +33(0)479792130 ? CEA ? INES ? LITEN/DTS/SIRE/LELA ? Le Bourget du Lac (73), FRANCE ? b?t. HELIOS/3108 Liten.cea.fr De : users De la part de St?phane Mottelet Envoy? : lundi 25 octobre 2021 16:35 ? : Users mailing list for Scilab Objet : [Scilab-users] Sundials ode solvers Hi all, As discussed in this thread last month https://www.mail-archive.com/users at lists.scilab.org/msg10679.html I am glad to annouce that a first version of the sci-sundials toolbox (maybe part of Scilab in the future) is available on Atoms in the "Differential Equations" category (refresh the package list if you don't see it). To have an idea of its features I pasted below the content of the README.md file on the gitlab project of sci-sundials (https://gitlab.com/mottelet/sci-sundials/). If you appreciate the work and want to help, doc, demos, or even more if you know how to code in C and C++ you are welcome ! S. What has been done and what is to be done Until now only CVODE has been interfaced but many common features have been developped in the OdeManager class, hence interfacing IDA will be quite easy. ARKODE (various modern explicit, implicit and mixed explicit/implicit Runge-Kutta solvers) does not exist in the old 2.4.0 version of Sundials which is used in Scilab hence won't be interfaced unless an upgrade is done (Sundials is now at version 5.7.0). The support of Sparse Jacobians is also missing for the same reason. Features The CVODE gateway cvode_solve() implements the following features which were missing by the legacy LSODE/LSODA/LSODAR/... ode() gateway : * full a posteriori access to solver continuous extension of solution at arbitrary points via a MList output when only one lhs is given: sol = cvode_solve(f, [t0 tf], y0) t = linspace(t0, tf, 1000) plot(t, sol(t)) The sol MList fields gathers all information related to the obtained solution (time steps, solution at time steps, events, ...). The solver can be restarted by giving the MLlist as first argument to cvode_extend : sol2 = cvode_extend(sol, tx, ...) where tx is the time point to which solution has to be extended. The options of the call that yielded sol are used and can be changed as optional named parameters after tx. * a user-friendly access to solver options via optional named parameters in cvode_solve call, i.e. cvode_solve(f, tspan, y0, h0=0.01, rtol=1e-3) * a really simpler way to give time span of integration allowing to choose between error driven solver internal time steps and user fixed time steps, i.e. [t,y] = cvode_solve(f, [t0 tf], y0) [t,y] = cvode_solve(f, [t0 t1 ... tf], y0) [t,t] = cvode_solve(f, tspan, y0, t0=0) the latter style being the closest to actual ode() behavior where solution is by default given at user time steps and t0 is not necessarily equal to tspan(1), which is the default in the two former calls above. * a better and user-friendly specification of events via a variable number of outputs event function (giving value of event equations, wheter to stop integration for a given event and event direction selection), minimal style beeing a single output. Information about events is also simpler to get: function [eq,term,dir] = evfun(t,y) eq = y(1)-1.7; term = %f; dir = 1; end [t,y,te,ye,ie] = cvode_solve(f, tspan, y0, events = evfun) sol = cvode_solve(f, tspan, y0, events = evfun) in the latter call information about events is recovered in sol.te,sol.ye,sol.ie. * support of complex solution with detection of complexity in y0 or f(t0,y0), e.g. function out = crhs(t,y) out = 10*exp(2*%i*%pi*t)*y; end [t,y] = cvode_solve(crhs, [0,5], 1) plot(t,real(y),t,imag(y)) * Support of a callback function called after each successfull step, giving access to current solver statistics and allowing to stop integration (e.g. by a "stop" button on a GUI), e.g. function stop = scicallback(t,y,flag,stats) stop = %f if flag == "step" mprintf("%s : hlast=%g\n", flag, stats.hlast) end end [t,y] = cvode_solve(f, tspan, y0, intcb=scicallback); * support of an arbitrary number of dimensions of ode state Performance cvode_solve() is roughly two times faster than ode() for both fixed methods (Adams and BDF). As ode() already did, compiled and dynamically linked C,C++ or Fortran externals are supported by cvode_solve(). When using such externals instead of Scilab functions cvode_solve() is generally an order of magnitude faster. -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Oct 27 17:13:38 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 27 Oct 2021 17:13:38 +0200 Subject: [Scilab-users] Sundials ode solvers In-Reply-To: References: Message-ID: Hi David, Le 27/10/2021 ? 16:18, CHEZE David 227480 a ?crit?: > > Hi St?phane, > > I tested the cvode_solve() function in my case study cited below and > it actually ran 40% faster than the previous ode(?stiff?,?), with easy > one-to-one function?s parameters replacement (in my case including the > list syntax, with function?s multiple parameters, gradient function, > simple tolerance specifications). > > As you advised, I need to investigate moving the differential equation > code from Scilab to fortran external function to reduce further the > simulation time. > As I already said, only the right hand side would need to be translated. S. > Thank you for this new module, staying updated with Sundials ! > > Best, > > David Ch?ze > > tel. +33(0)479792130 ? CEA ? INES ? LITEN/DTS/SIRE/LELA ?? Le Bourget > du Lac (73), FRANCE ? b?t. HELIOS/3108 Liten.cea.fr > > *De?:*users *De la part de* St?phane > Mottelet > *Envoy??:* lundi 25 octobre 2021 16:35 > *??:* Users mailing list for Scilab > *Objet?:* [Scilab-users] Sundials ode solvers > > Hi all, > > As discussed in this thread last month > > https://www.mail-archive.com/users at lists.scilab.org/msg10679.html > > > I am glad to annouce that a first version of the sci-sundials toolbox > (maybe part of Scilab in the future) is available on Atoms in the > "Differential Equations" category (refresh the package list if you > don't see it).? To have an idea of its features I pasted below the > content of the README.md file on the gitlab project of sci-sundials > (https://gitlab.com/mottelet/sci-sundials/ > ). > > If you appreciate the work and want to help, doc, demos, or even more > if you know how to code in C and C++ you are welcome ! > > S. > > > What has been done and what is to be done > > Until now only CVODE has been interfaced but many common features have > been developped in the OdeManager class, hence interfacing IDA will be > quite easy. ARKODE (various modern explicit, implicit and mixed > explicit/implicit Runge-Kutta solvers) does not exist in the old 2.4.0 > version of Sundials which is used in Scilab hence won't be interfaced > unless an upgrade is done (Sundials is now at version 5.7.0). The > support of Sparse Jacobians is also missing for the same reason. > > > Features > > The CVODE gateway cvode_solve() implements the following features > which were missing by the legacy LSODE/LSODA/LSODAR/... ode() gateway : > > * full a posteriori access to solver continuous extension of > solution at arbitrary points via a MList output when only one lhs > is given: > > sol = cvode_solve(f, [t0 tf], y0)|| > t = linspace(t0, tf, 1000)|| > plot(t, sol(t)) > > The |sol| MList fields gathers all information related to the obtained > solution (time steps, solution at time steps, events, ...). The solver > can be restarted by giving the MLlist as first argument to > |cvode_extend| : > > sol2 = cvode_extend(sol, tx, ...) > > where |tx| is the time point to which solution has to be extended. The > options of the call that yielded |sol| are used and can be changed as > optional named parameters after |tx|. > > * a user-friendly access to solver options via optional named > parameters in cvode_solve call, i.e. > > cvode_solve(f, tspan, y0, h0=0.01, rtol=1e-3) > > * a really simpler way to give time span of integration allowing to > choose between error driven solver internal time steps and user > fixed time steps, i.e. > > [t,y] = cvode_solve(f, [t0 tf], y0)|| > [t,y] = cvode_solve(f, [t0 t1 ... tf], y0)|| > [t,t] = cvode_solve(f, tspan, y0, t0=0) > > the latter style being the closest to actual |ode()| behavior where > solution is by default given at user time steps and |t0| is not > necessarily equal to |tspan(1)|, which is the default in the two > former calls above. > > * a better and user-friendly specification of events via a variable > number of outputs event function (giving value of event equations, > wheter to stop integration for a given event and event direction > selection), minimal style beeing a single output. Information > about events is also simpler to get: > > function [eq,term,dir] = evfun(t,y)|| > ??? eq = y(1)-1.7;|| > ??? term = %f;|| > ??? dir? = 1;|| > end|| > [t,y,te,ye,ie] = cvode_solve(f, tspan, y0, events = evfun)|| > sol = cvode_solve(f, tspan, y0, events = evfun) > > in the latter call information about events is recovered in > |sol.te,sol.ye,sol.ie|. > > * support of complex solution with detection of complexity in |y0| > or |f(t0,y0)|, e.g. > > function out = crhs(t,y)|| > ??? out = 10*exp(2*%i*%pi*t)*y;|| > end|| > [t,y] = cvode_solve(crhs, [0,5], 1)|| > plot(t,real(y),t,imag(y)) > > * Support of a callback function called after each successfull step, > giving access to current solver statistics and allowing to stop > integration (e.g. by a "stop" button on a GUI), e.g. > > function stop = scicallback(t,y,flag,stats)|| > ??? stop = %f|| > ??? if flag == "step"|| > ??????? mprintf("%s : hlast=%g\n", flag, stats.hlast)|| > ??? end|| > end|| > [t,y] = cvode_solve(f, tspan, y0, intcb=scicallback); > > * support of an arbitrary number of dimensions of ode state > > > Performance > > |cvode_solve()| is roughly two times faster than |ode()| for both > fixed methods (Adams and BDF). As |ode()| already did, compiled and > dynamically linked C,C++ or Fortran externals are supported by > |cvode_solve()|. When using such externals instead of Scilab functions > |cvode_solve()| is generally an order of magnitude faster. > > -- > 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 at lists.scilab.org > https://antispam.utc.fr/proxy/v3?i=WjB4M1dJWGJJMnNGTHV5MuAPDwEdQko7KGyaWIIeme0&r=Skk2OVhvdXl2cm1uOWJtRLRPDrgr4YiCABksjbHu_Gv8eNkcUiMzd6MxV8KbAPI5&f=M2FwZHlGNnU1aUlkc09ZNN6FtQAZUfRagBYPQiUfaoT45ZkXHKKVm0cOGvv2yMCS&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=CXOq -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: