From arctica1963 at gmail.com Sun May 1 09:37:30 2022 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 1 May 2022 08:37:30 +0100 Subject: [Scilab-users] Variable user equation input (2, 3 or more) In-Reply-To: References: <8be005f8-7ee4-7b2f-5414-7b4e0022b0c3@free.fr> Message-ID: Having an issue with the code: Tried: x ? 2 mod 11; 3 mod 12; 4 mod 13; 5 mod 17; 6 mod 19 (result should be 150999 but get 442719) Also checked x ? 4 mod 11; 3 mod 17 (result should be 37 but get 136) However, 3 equations work fine! I have pinned down the problem to M_inv, where it is not looping through all elements (m) but doing one less (eg 4 instead of 5). for i=1:length(m) for j=1:n if modulo(((M_ratio(i)*j)-1),m(i)) == 0 M_inv(i)=j; xn(i)=(a(i)*M_ratio(i)*M_inv(i)); end endend With the code snippet above, it should iterate 5 times for 5 input values of a and m, it is not generating M_inv(5), or M_inv(2) (2 equations). I have verified what the results should be in Maxima CAS, [image: image.png] Any ideas what is going wrong? Thanks On Sun, 1 May 2022 at 05:32, Lester Anderson wrote: > Many thanks Samuel > > On Sat, 30 Apr 2022 at 17:28, Samuel Gougeon wrote: > >> Le 30/04/2022 ? 18:26, Samuel Gougeon a ?crit : >> >> Le 30/04/2022 ? 18:14, Lester Anderson a ?crit : >> >> Sorted the code with multiple equations. Not too sure how to deal with >> the messagebox list of equations. >> Still have to do that manually - unless there is a way to automatically >> build this? >> >> Can this multiple text string be done via a for loop to build a list ? >> >> Thanks >> >> >> Please \n as trailer for the 2nd msprintf as well: >> >> [ msprintf("x ? %d mod %d\n", a(:), m(:)) >> msprintf("The solution for (x): %d mod %d\n", x(:), M(:)) >> 'Solution of 3 congruence equations'] >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 3662 bytes Desc: not available URL: From arctica1963 at gmail.com Sun May 1 13:23:40 2022 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 1 May 2022 12:23:40 +0100 Subject: [Scilab-users] Variable user equation input (2, 3 or more) In-Reply-To: References: <8be005f8-7ee4-7b2f-5414-7b4e0022b0c3@free.fr> Message-ID: As a test, I increased the value n (iterations) and that forced it to converge on the value 150999. Sounds like I need a test of convergence. On Sun, 1 May 2022 at 08:37, Lester Anderson wrote: > Having an issue with the code: > > Tried: x ? 2 mod 11; 3 mod 12; 4 mod 13; 5 mod 17; 6 mod 19 (result should > be 150999 but get 442719) > Also checked x ? 4 mod 11; 3 mod 17 (result should be 37 but get 136) > However, 3 equations work fine! > > I have pinned down the problem to M_inv, where it is not looping through > all elements (m) but doing one less (eg 4 instead of 5). > > for i=1:length(m) > for j=1:n > if modulo(((M_ratio(i)*j)-1),m(i)) == 0 > M_inv(i)=j; > xn(i)=(a(i)*M_ratio(i)*M_inv(i)); > end > endend > > With the code snippet above, it should iterate 5 times for 5 input values of a and m, it is not generating M_inv(5), or M_inv(2) (2 equations). > > I have verified what the results should be in Maxima CAS, > > [image: image.png] > > Any ideas what is going wrong? > > Thanks > > On Sun, 1 May 2022 at 05:32, Lester Anderson > wrote: > >> Many thanks Samuel >> >> On Sat, 30 Apr 2022 at 17:28, Samuel Gougeon wrote: >> >>> Le 30/04/2022 ? 18:26, Samuel Gougeon a ?crit : >>> >>> Le 30/04/2022 ? 18:14, Lester Anderson a ?crit : >>> >>> Sorted the code with multiple equations. Not too sure how to deal with >>> the messagebox list of equations. >>> Still have to do that manually - unless there is a way to automatically >>> build this? >>> >>> Can this multiple text string be done via a for loop to build a list ? >>> >>> Thanks >>> >>> >>> Please \n as trailer for the 2nd msprintf as well: >>> >>> [ msprintf("x ? %d mod %d\n", a(:), m(:)) >>> msprintf("The solution for (x): %d mod %d\n", x(:), M(:)) >>> 'Solution of 3 congruence equations'] >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 3662 bytes Desc: not available URL: From p.muehlmann at gmail.com Sun May 1 23:09:57 2022 From: p.muehlmann at gmail.com (P M) Date: Sun, 1 May 2022 23:09:57 +0200 Subject: [Scilab-users] Changing properties of mark_mode polyline in param3d1 In-Reply-To: References: Message-ID: Hello, are you bound to param3d1 or can you use scatter3d instead? scatter3d([1 2 3],[3 4 2],[5 2 4],36,['red1' 'green1' 'blue1'],'fill');a = gca();a.data_bounds = [0,0,0;7,7,7]; BR Philipp Am Fr., 29. Apr. 2022 um 12:57 Uhr schrieb Izabela W?jcik-Grz?ba < iwoj at il.pw.edu.pl>: > Hello, > > I have a simple example of param3d1 graph: > > param3d1([1 2 3],[3 4 2],[5 2 4]); > > h=gce(); > > h.line_mode="off"; > > h.mark_mode="on"; > > h.mark_sytle=9; > > h.mark_size=1; > > h.mark_foreground=13; > > h.mark_background=13; > > I would like to ask if it's possible to change properties of marks > individually? My main goal is to change colors using colormap according to > the values assigned to each mark (point on the graph). As an illustration > of my problem I give a vector of values and colors for the 3 points: > > [1 2 3] > > [red green blue] > > I know how to do it for line_mode="on", but for mark_mode the structure of > figure is different. > > Thanks in advance for any help. Regards, > > Iza > -- > Izabela W?jcik-Grz?ba > Zesp?? Konstrukcji Metalowych > ZKBiM IIB WIL Politechnika Warszawska > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Mon May 2 10:15:02 2022 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 2 May 2022 08:15:02 +0000 Subject: [Scilab-users] Changing properties of mark_mode polyline in param3d1 In-Reply-To: <935e1729c2124b5f3452ee28d5b93f71@il.pw.edu.pl> References: <569266d4-7103-c302-bcad-dace1986141f@utc.fr> <935e1729c2124b5f3452ee28d5b93f71@il.pw.edu.pl> Message-ID: Hello, > De : Izabela W?jcik-Grzaba > Envoy? : vendredi 29 avril 2022 17:01 > > The problem is that my real plot is made with param3d1 and consists of different elements: polylines with line_mode, with mark_mode, xstrings. > It is now impossible to change the type. Both param3d1() and scatter3d() create a polyline with similar parameters. So I wonder why it could not be possible to do the same things with one or the other figure type. You could also consider the possibility to create a dumb scatter3d() and apply the data field of the polyline generated by the param3d1(), with something like gcf().children.children.data Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From Christophe.Dang at sidel.com Mon May 2 10:29:14 2022 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 2 May 2022 08:29:14 +0000 Subject: [Scilab-users] Variable user equation input (2, 3 or more) In-Reply-To: References: Message-ID: Hello, > De : De la part de Lester Anderson > Envoy? : samedi 30 avril 2022 07:15 > > My query, is it possible to make this more generalised and vary the > number of input equations and give the user an option to specify the number of equations? I don't know this problem and its solution but as a first idea, I'd use matrices for the remainders and moduli, one line per equation (so n lines for n equations). So 1. Ask the number of equations n 2. Loop to ask the moduli and remainders, and fill in the lines of the matrices. Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From iwoj at il.pw.edu.pl Mon May 2 11:48:10 2022 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Mon, 02 May 2022 11:48:10 +0200 Subject: [Scilab-users] Changing properties of mark_mode polyline in param3d1 In-Reply-To: References: Message-ID: <17c5f93190bdbe158adb608b601c8f5f@il.pw.edu.pl> Hi, Thank you all for the answers. Problem is solved thanks to matrix with color indexes. Earlier I thought about changing color of each point with the use of "for" loop and that's why I didn't think about the simplest solution which is the matrix. Kind regards, Iza --- Izabela W?jcik-Grz?ba Zesp?? Konstrukcji Metalowych ZKBiM IIB WIL Politechnika Warszawska W dniu 01.05.2022 23:09, P M napisa?(a): > Hello, > > are you bound to param3d1 or can you use scatter3d instead? > > scatter3d([1 2 3],[3 4 2],[5 2 4],36,['red1' 'green1' 'blue1'],'fill'); > a = gca(); > a.data_bounds = [0,0,0;7,7,7]; > > BR > > Philipp > > Am Fr., 29. Apr. 2022 um 12:57 Uhr schrieb Izabela W?jcik-Grz?ba : > >> Hello, >> >> I have a simple example of param3d1 graph: >> >> param3d1([1 2 3],[3 4 2],[5 2 4]); >> >> h=gce(); >> >> h.line_mode="off"; >> >> h.mark_mode="on"; >> >> h.mark_sytle=9; >> >> h.mark_size=1; >> >> h.mark_foreground=13; >> >> h.mark_background=13; >> >> I would like to ask if it's possible to change properties of marks individually? My main goal is to change colors using colormap according to the values assigned to each mark (point on the graph). As an illustration of my problem I give a vector of values and colors for the 3 points: >> >> [1 2 3] >> >> [red green blue] >> >> I know how to do it for line_mode="on", but for mark_mode the structure of figure is different. >> >> Thanks in advance for any help. Regards, >> >> Iza >> >> -- >> Izabela W?jcik-Grz?ba >> Zesp?? Konstrukcji Metalowych >> ZKBiM IIB WIL Politechnika Warszawska >> >> _______________________________________________ >> 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 stephane.mottelet at utc.fr Fri May 13 16:45:34 2022 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 13 May 2022 16:45:34 +0200 Subject: [Scilab-users] Sundials module, Windows preview In-Reply-To: References: Message-ID: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> Hello, Did anybody give a try to the Windows build ? Frankly speaking, if nobody cares about improved numerical methods in Scilab, things can be left as is, and time could be spent on other features (but not by me...). I can also prepare a Linux build, if users of this os want to test... Regards, S. Le 27/04/2022 ? 17:32, St?phane Mottelet a ?crit?: > > Hi all, > > The next version of scilab will include a new module "Sundials". This > module provides new full featured? ODE solvers: arkode(), cvode() and > DAE solver ida(), all handling complex numbers and dense/sparse/banded > Jacobians. Each solver has specific features, e.g. ida() handles DAE, > arkode() handles mixed implicit/explicit Runge-Kutta methods and > cvode() can do forward sensitivity computation. > > The module also includes a general-purpose nonlinear system solver: > kinsol(), who takes advantage of the module architecture (parsing, > computation engine and SUNDIALS abstraction of various linear solvers). > > Current help pages can be found @ > https://www.utc.fr/~mottelet/scilab/sundials/ and a *Windows* build of > Scilab (in addition to the already available macOS build) including > the new module is available at > > https://www.utc.fr/~mottelet/scilab_for_macOS.html > > The help pages propose a lot of examples and two demos (this section > is to be enriched) are available. > > Comments are welcome ! > > -- > 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=SHV0Y1JZQjNyckJFa3dUQiblhF5YcUqtiWCaK_ri0kk&r=T0hnMlUyVEgwNmlmdHc1NTiGTQVgIg9a1MYkHb_GeosOO-jCQ_NnAucfYCLceioT&f=V3p0eFlQOUZ4czh2enpJS67gBdM2WVME2HqVPefA4FpGU6HeKhrEzrhzAHs-d_Wu&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=ZVd0 -- 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 david.cheze at cea.fr Fri May 13 17:16:21 2022 From: david.cheze at cea.fr (CHEZE David 227480) Date: Fri, 13 May 2022 15:16:21 +0000 Subject: [Scilab-users] Sundials module, Windows preview In-Reply-To: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> References: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> Message-ID: <7c492384547244a4a3bdacd2ffab4048@cea.fr> Dear Stephane, I did give a try to windows build, limited to my use case, and it works like a charm ! I just ran a previous use case with cvode() (solar thermal panel quasi-dynamic model, comparison with experimental data set ), as it was written for the external Sundials module you developed previously (~January 2022) : same performance in execution time as expected since relying on the same code isn?t it ? I appreciated the improved documentation details and I just started reading documentation of the new features from the windows Sundials Scilab builtin : arkode, ida, kinsol : it looks exciting for future use cases. Thanks again for introducing these key features, is there any news about the next Scilab release ? David Ps: windows users might be confused by the url stating only mac_os : https://www.utc.fr/~mottelet/scilab_for_macOS.html De : users De la part de St?phane Mottelet Envoy? : vendredi 13 mai 2022 16:46 ? : users at lists.scilab.org Objet : Re: [Scilab-users] Sundials module, Windows preview Hello, Did anybody give a try to the Windows build ? Frankly speaking, if nobody cares about improved numerical methods in Scilab, things can be left as is, and time could be spent on other features (but not by me...). I can also prepare a Linux build, if users of this os want to test... Regards, S. Le 27/04/2022 ? 17:32, St?phane Mottelet a ?crit : Hi all, The next version of scilab will include a new module "Sundials". This module provides new full featured ODE solvers: arkode(), cvode() and DAE solver ida(), all handling complex numbers and dense/sparse/banded Jacobians. Each solver has specific features, e.g. ida() handles DAE, arkode() handles mixed implicit/explicit Runge-Kutta methods and cvode() can do forward sensitivity computation. The module also includes a general-purpose nonlinear system solver: kinsol(), who takes advantage of the module architecture (parsing, computation engine and SUNDIALS abstraction of various linear solvers). Current help pages can be found @ https://www.utc.fr/~mottelet/scilab/sundials/ and a Windows build of Scilab (in addition to the already available macOS build) including the new module is available at https://www.utc.fr/~mottelet/scilab_for_macOS.html The help pages propose a lot of examples and two demos (this section is to be enriched) are available. Comments are welcome ! -- 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=SHV0Y1JZQjNyckJFa3dUQiblhF5YcUqtiWCaK_ri0kk&r=T0hnMlUyVEgwNmlmdHc1NTiGTQVgIg9a1MYkHb_GeosOO-jCQ_NnAucfYCLceioT&f=V3p0eFlQOUZ4czh2enpJS67gBdM2WVME2HqVPefA4FpGU6HeKhrEzrhzAHs-d_Wu&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=ZVd0 -- 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 fmiyara at fceia.unr.edu.ar Fri May 13 18:03:19 2022 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 13 May 2022 13:03:19 -0300 Subject: [Scilab-users] Sundials module, Windows preview In-Reply-To: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> References: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> Message-ID: <2065684f-e0a3-fa71-3b5f-0271029d0548@fceia.unr.edu.ar> St?phane, I don't regularly use ODE solvers for the time being, but I think any improvement is valuable and is worth the effort. The lack or paucity of feedback in this list is not an evidence of lack of interest for the Scilab users community. It may also encourage other potential users to move to Scilab. I'm grateful for your effort and feel reassured that in the event I need the feature, I'll have better solvers. Regards, Federico Miyara On 13/05/2022 11:45, St?phane Mottelet wrote: > > Hello, > > Did anybody give a try to the Windows build ? > > Frankly speaking, if nobody cares about improved numerical methods in > Scilab, things can be left as is, and time could be spent on other > features (but not by me...). > > I can also prepare a Linux build, if users of this os want to test... > > Regards, > > S. > > Le 27/04/2022 ? 17:32, St?phane Mottelet a ?crit?: >> >> Hi all, >> >> The next version of scilab will include a new module "Sundials". This >> module provides new full featured? ODE solvers: arkode(), cvode() and >> DAE solver ida(), all handling complex numbers and >> dense/sparse/banded Jacobians. Each solver has specific features, >> e.g. ida() handles DAE, arkode() handles mixed implicit/explicit >> Runge-Kutta methods and cvode() can do forward sensitivity computation. >> >> The module also includes a general-purpose nonlinear system solver: >> kinsol(), who takes advantage of the module architecture (parsing, >> computation engine and SUNDIALS abstraction of various linear solvers). >> >> Current help pages can be found @ >> https://www.utc.fr/~mottelet/scilab/sundials/ and a *Windows* build >> of Scilab (in addition to the already available macOS build) >> including the new module is available at >> >> https://www.utc.fr/~mottelet/scilab_for_macOS.html >> >> The help pages propose a lot of examples and two demos (this section >> is to be enriched) are available. >> >> Comments are welcome ! >> >> -- >> 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=SHV0Y1JZQjNyckJFa3dUQiblhF5YcUqtiWCaK_ri0kk&r=T0hnMlUyVEgwNmlmdHc1NTiGTQVgIg9a1MYkHb_GeosOO-jCQ_NnAucfYCLceioT&f=V3p0eFlQOUZ4czh2enpJS67gBdM2WVME2HqVPefA4FpGU6HeKhrEzrhzAHs-d_Wu&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=ZVd0 > -- > 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 -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjmccann at ieee.org Sun May 15 16:05:27 2022 From: mjmccann at ieee.org (Michael J. McCann) Date: Sun, 15 May 2022 10:05:27 -0400 Subject: [Scilab-users] Sundials module, Windows preview In-Reply-To: <2065684f-e0a3-fa71-3b5f-0271029d0548@fceia.unr.edu.ar> References: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> <2065684f-e0a3-fa71-3b5f-0271029d0548@fceia.unr.edu.ar> Message-ID: <86127540-d513-9900-2aaa-66f103d41062@ieee.org> Currently I'm not using the ODE solvers but it's an area of interest since mathematical modelling is the core of my business. I'd like to see that in Xcos I can get the full range of ODE solvers (at least for 'real-only' as distinct from 'complex-number' issues). On 13/05/2022 12:03, Federico Miyara wrote: > > St?phane, > > I don't regularly use ODE solvers for the time being, but I think any > improvement is valuable and is worth the effort. The lack or paucity > of feedback in this list is not an evidence of lack of interest for > the Scilab users community. It may also encourage other potential > users to move to Scilab. I'm grateful for your effort and feel > reassured that in the event I need the feature, I'll have better solvers. > > Regards, > > Federico Miyara > > On 13/05/2022 11:45, St?phane Mottelet wrote: >> >> Hello, >> >> Did anybody give a try to the Windows build ? >> >> Frankly speaking, if nobody cares about improved numerical methods in >> Scilab, things can be left as is, and time could be spent on other >> features (but not by me...). >> >> I can also prepare a Linux build, if users of this os want to test... >> >> Regards, >> >> S. >> >> Le 27/04/2022 ? 17:32, St?phane Mottelet a ?crit?: >>> >>> Hi all, >>> >>> The next version of scilab will include a new module "Sundials". >>> This module provides new full featured? ODE solvers: arkode(), >>> cvode() and DAE solver ida(), all handling complex numbers and >>> dense/sparse/banded Jacobians. Each solver has specific features, >>> e.g. ida() handles DAE, arkode() handles mixed implicit/explicit >>> Runge-Kutta methods and cvode() can do forward sensitivity computation. >>> >>> The module also includes a general-purpose nonlinear system solver: >>> kinsol(), who takes advantage of the module architecture (parsing, >>> computation engine and SUNDIALS abstraction of various linear solvers). >>> >>> Current help pages can be found @ >>> https://www.utc.fr/~mottelet/scilab/sundials/ and a *Windows* build >>> of Scilab (in addition to the already available macOS build) >>> including the new module is available at >>> >>> https://www.utc.fr/~mottelet/scilab_for_macOS.html >>> >>> The help pages propose a lot of examples and two demos (this section >>> is to be enriched) are available. >>> >>> Comments are welcome ! >>> >>> -- >>> 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=SHV0Y1JZQjNyckJFa3dUQiblhF5YcUqtiWCaK_ri0kk&r=T0hnMlUyVEgwNmlmdHc1NTiGTQVgIg9a1MYkHb_GeosOO-jCQ_NnAucfYCLceioT&f=V3p0eFlQOUZ4czh2enpJS67gBdM2WVME2HqVPefA4FpGU6HeKhrEzrhzAHs-d_Wu&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=ZVd0 >> -- >> 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 > > > > Libre de virus. www.avast.com > > > > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon May 16 08:24:49 2022 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 16 May 2022 08:24:49 +0200 Subject: [Scilab-users] Sundials module, Windows preview In-Reply-To: <7c492384547244a4a3bdacd2ffab4048@cea.fr> References: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> <7c492384547244a4a3bdacd2ffab4048@cea.fr> Message-ID: <32ea54fd-7e6d-7124-963e-e57c3f125db7@utc.fr> Hi, Le 13/05/2022 ? 17:16, CHEZE David 227480 a ?crit?: > > Dear Stephane, I did give a try to windows build, limited to my use > case, and it works like a charm ! > > I just ran a previous use case with cvode() (solar thermal panel > quasi-dynamic model, comparison with experimental data set ), as it > was written for the external Sundials module you developed previously > (~January 2022) : same performance in execution time as expected since > relying on the same code isn?t it ? > Yes, the Sundials module is mostly based on the Atoms Sundials module, but many internal improvements have been made since the last release (upgrade to Sundials 2.6.0 allowing the use of ARKODE, sparse solvers, ...) > > I appreciated the improved documentation details and I just started > reading documentation of the new features from the windows Sundials > Scilab builtin : arkode, ida, kinsol : it looks exciting for future > use cases. > > Thanks again for introducing these key features, is there any news > about the next Scilab release ? > Not yet > > David > > Ps: windows users might be confused by the url stating only mac_os : > https://www.utc.fr/~mottelet/scilab_for_macOS.html > > OK maybe should I create a dedicated page... thanks for the remark S. > *De?:*users *De la part de* St?phane > Mottelet > *Envoy??:* vendredi 13 mai 2022 16:46 > *??:* users at lists.scilab.org > *Objet?:* Re: [Scilab-users] Sundials module, Windows preview > > Hello, > > Did anybody give a try to the Windows build ? > > Frankly speaking, if nobody cares about improved numerical methods in > Scilab, things can be left as is, and time could be spent on other > features (but not by me...). > > I can also prepare a Linux build, if users of this os want to test... > > Regards, > > S. > > Le 27/04/2022 ? 17:32, St?phane Mottelet a ?crit?: > > Hi all, > > The next version of scilab will include a new module "Sundials". > This module provides new full featured? ODE solvers: arkode(), > cvode() and DAE solver ida(), all handling complex numbers and > dense/sparse/banded Jacobians. Each solver has specific features, > e.g. ida() handles DAE, arkode() handles mixed implicit/explicit > Runge-Kutta methods and cvode() can do forward sensitivity > computation. > > The module also includes a general-purpose nonlinear system > solver: kinsol(), who takes advantage of the module architecture > (parsing, computation engine and SUNDIALS abstraction of various > linear solvers). > > Current help pages can be found @ > https://www.utc.fr/~mottelet/scilab/sundials/ > > and a *Windows* build of Scilab (in addition to the already > available macOS build) including the new module is available at > > https://www.utc.fr/~mottelet/scilab_for_macOS.html > > > > The help pages propose a lot of examples and two demos (this > section is to be enriched) are available. > > Comments are welcome ! > > -- > > 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=SHV0Y1JZQjNyckJFa3dUQiblhF5YcUqtiWCaK_ri0kk&r=T0hnMlUyVEgwNmlmdHc1NTiGTQVgIg9a1MYkHb_GeosOO-jCQ_NnAucfYCLceioT&f=V3p0eFlQOUZ4czh2enpJS67gBdM2WVME2HqVPefA4FpGU6HeKhrEzrhzAHs-d_Wu&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=ZVd0 > > -- > 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=Z09lbVhROVBaOHd3NjZZMVfTogSUUCLtvQYv_TI7-Qg&r=eVVJWkdic3NtZTdZV2pycc8oEJBVcQfwoAgOILbixruFQP-mXZOvGI-Awo-iPm4W&f=UU9IMnpkdmJmSk9YOHVtc4JNomkUGubf8DA_bzrUn-Hiq5VuGo_VlJP1TQC7yyVL&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=eFRI -- 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 Tue May 17 13:44:06 2022 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 17 May 2022 13:44:06 +0200 Subject: [Scilab-users] Sundials module, Windows preview In-Reply-To: <86127540-d513-9900-2aaa-66f103d41062@ieee.org> References: <8f06436c-577e-8fea-4f58-6322ccae4768@utc.fr> <2065684f-e0a3-fa71-3b5f-0271029d0548@fceia.unr.edu.ar> <86127540-d513-9900-2aaa-66f103d41062@ieee.org> Message-ID: <28fc4068-7a0e-5e98-5e2f-b625ac586699@utc.fr> Hi Michael, Le 15/05/2022 ? 16:05, Michael J. McCann a ?crit?: > Currently I'm not using the ODE solvers but it's an area of interest > since mathematical modelling is the core of my business. I'd like to > see that in Xcos I can get the full range of ODE solvers (at least for > 'real-only' as distinct from 'complex-number' issues). > In fact among actual available solvers in Sundials, the only missing in Xcos is ARK/ERKODE, since IDA and CVODE are already available. We already have a few Runge-Kutta methods but this is a home made fixed-stepimplementation of these, hence the integration in Xcos could be the next step if new solvers are really needed. S. > > On 13/05/2022 12:03, Federico Miyara wrote: >> >> St?phane, >> >> I don't regularly use ODE solvers for the time being, but I think any >> improvement is valuable and is worth the effort. The lack or paucity >> of feedback in this list is not an evidence of lack of interest for >> the Scilab users community. It may also encourage other potential >> users to move to Scilab. I'm grateful for your effort and feel >> reassured that in the event I need the feature, I'll have better solvers. >> >> Regards, >> >> Federico Miyara >> >> On 13/05/2022 11:45, St?phane Mottelet wrote: >>> >>> Hello, >>> >>> Did anybody give a try to the Windows build ? >>> >>> Frankly speaking, if nobody cares about improved numerical methods >>> in Scilab, things can be left as is, and time could be spent on >>> other features (but not by me...). >>> >>> I can also prepare a Linux build, if users of this os want to test... >>> >>> Regards, >>> >>> S. >>> >>> Le 27/04/2022 ? 17:32, St?phane Mottelet a ?crit?: >>>> >>>> Hi all, >>>> >>>> The next version of scilab will include a new module "Sundials". >>>> This module provides new full featured? ODE solvers: arkode(), >>>> cvode() and DAE solver ida(), all handling complex numbers and >>>> dense/sparse/banded Jacobians. Each solver has specific features, >>>> e.g. ida() handles DAE, arkode() handles mixed implicit/explicit >>>> Runge-Kutta methods and cvode() can do forward sensitivity >>>> computation. >>>> >>>> The module also includes a general-purpose nonlinear system solver: >>>> kinsol(), who takes advantage of the module architecture (parsing, >>>> computation engine and SUNDIALS abstraction of various linear >>>> solvers). >>>> >>>> Current help pages can be found @ >>>> https://www.utc.fr/~mottelet/scilab/sundials/ and a *Windows* build >>>> of Scilab (in addition to the already available macOS build) >>>> including the new module is available at >>>> >>>> https://www.utc.fr/~mottelet/scilab_for_macOS.html >>>> >>>> The help pages propose a lot of examples and two demos (this >>>> section is to be enriched) are available. >>>> >>>> Comments are welcome ! >>>> >>>> -- >>>> 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=SHV0Y1JZQjNyckJFa3dUQiblhF5YcUqtiWCaK_ri0kk&r=T0hnMlUyVEgwNmlmdHc1NTiGTQVgIg9a1MYkHb_GeosOO-jCQ_NnAucfYCLceioT&f=V3p0eFlQOUZ4czh2enpJS67gBdM2WVME2HqVPefA4FpGU6HeKhrEzrhzAHs-d_Wu&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=ZVd0 >>> -- >>> 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 >> >> >> >> Libre de virus. www.avast.com >> >> >> >> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >> >> _______________________________________________ >> 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 -- 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 arctica1963 at gmail.com Sun May 22 08:31:30 2022 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 22 May 2022 07:31:30 +0100 Subject: [Scilab-users] Riemann Zeta update Message-ID: Hi all, After a lot of trial and error, I have managed to get a set of functions to compute the approximations of Riemann's Zeta for negative and positive real values; values of n > 1e6 seem to give better results: function zs=zeta_s(z, n) // Summation loop zs=1; if z == 0 zs = -0.5 elseif z == 1 zs = %inf else for i = 2: n-1 zs = zs + i.^-z; end endendfunction function zfn=zeta_functional_eqn(s)// Riemann's functional equation// Analytic continuation for negative values zfn = 2.^s .* %pi.^(s - 1) .* sin(%pi.*s./2) .* gamma(1 - s) .* zeta_s((1 - s),n)endfunction For even values of s < -20 the values of Zeta(s) increase in value and are not as close to zero as expected e.g. zeta_functional_eqn(-40) gives 7.5221382. At small even values e.g. -10, the result is of the order of ~1e-18 (close enough to zero). Any ideas why the even zeta values increase or how to reduce that response? The solution over the critical strip (zero to one) is not so efficient unless n is very large( > 1e8), and there seems to be a performance issue when using a for-loop compared to vectorisation. Vectorised n speeds things up quite a bit. function zs2=zeta_0_1(s, n)zs2=0for i = 1: n zs2 = zs2 + (-1).^(i + 1)./(i.^s );end zs2 = 1./(1 - 2.^( 1-s )).*zs2; endfunction function zs1=zeta_0_1(s, n)// Vectorised version zs1=0k=linspace(1,n,n); zs1 = sum((-1).^(k+ 1)./(k.^s )); zs1 = 1./(1 - 2.^( 1-s )).*zs1;endfunction For example, calculating the approximation of Zeta(0.5) using a for-loop takes ~150s to give a value of -1.4602337981325388 (quite close), whereas the vectorised version does the computation in under 20s, both tested using n=1e8. Can the functions be optimised to improve speed and accuracy? Using Scilab 6.1.1 on Windows 10 (16 Gb RAM). Thanks Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Mon May 23 09:47:48 2022 From: arctica1963 at gmail.com (Lester Anderson) Date: Mon, 23 May 2022 08:47:48 +0100 Subject: [Scilab-users] Riemann Zeta update In-Reply-To: References: Message-ID: Finally got to the end of the problem and replicated the plot of the Riemann Zeta function on the critical line (s=0.5 + %i*t) Looks pretty close to that shown on the Wikipedia page for the Riemann Zeta Function! function zs1=zeta_0_1(s, n) // Vectorised version zs1=0k=linspace(1,n,n); zs1 = sum((-1).^(k+ 1)./(k.^s )); zs1 = 1./(1 - 2.^( 1-s )).*zs1;endfunction k=linspace(1,50,1000) s_list=0.5+%i*k; for i = 1:length(k) s2(i) = zeta_0_1(s_list(i),1e6);end S_real=real(s2);S_imag=imag(s2); plot(S_real, S_imag) Note: the function for the "Critical strip" uses vectorisation to improve speed. Lester On Sun, 22 May 2022 at 07:31, Lester Anderson wrote: > Hi all, > > After a lot of trial and error, I have managed to get a set of functions > to compute the approximations of Riemann's Zeta for negative and positive > real values; values of n > 1e6 seem to give better results: > > function zs=zeta_s(z, n) > // Summation loop > zs=1; > if z == 0 > zs = -0.5 > elseif z == 1 > zs = %inf > else > for i = 2: n-1 > zs = zs + i.^-z; > end > endendfunction > function zfn=zeta_functional_eqn(s)// Riemann's functional equation// Analytic continuation for negative values > zfn = 2.^s .* %pi.^(s - 1) .* sin(%pi.*s./2) .* gamma(1 - s) .* zeta_s((1 - s),n)endfunction > > For even values of s < -20 the values of Zeta(s) increase in value and are > not as close to zero as expected e.g. zeta_functional_eqn(-40) gives > 7.5221382. At small even values e.g. -10, the result is of the order of > ~1e-18 (close enough to zero). Any ideas why the even zeta values increase > or how to reduce that response? > > The solution over the critical strip (zero to one) is not so efficient > unless n is very large( > 1e8), and there seems to be a performance issue > when using a for-loop compared to vectorisation. Vectorised n speeds things > up quite a bit. > > function zs2=zeta_0_1(s, n)zs2=0for i = 1: n > zs2 = zs2 + (-1).^(i + 1)./(i.^s );end > zs2 = 1./(1 - 2.^( 1-s )).*zs2; endfunction > function zs1=zeta_0_1(s, n)// Vectorised version zs1=0k=linspace(1,n,n); > zs1 = sum((-1).^(k+ 1)./(k.^s )); > zs1 = 1./(1 - 2.^( 1-s )).*zs1;endfunction > > For example, calculating the approximation of Zeta(0.5) using a for-loop > takes ~150s to give a value of -1.4602337981325388 (quite close), > whereas the vectorised version does the computation in under 20s, both > tested using n=1e8. Can the functions be optimised to improve speed and > accuracy? > > Using Scilab 6.1.1 on Windows 10 (16 Gb RAM). > > Thanks > Lester > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cheze at cea.fr Wed May 25 10:28:27 2022 From: david.cheze at cea.fr (CHEZE David 227480) Date: Wed, 25 May 2022 08:28:27 +0000 Subject: [Scilab-users] mailing lists archive and subscription disabled Message-ID: <967b8ddcd12a46d49bd7a8cdf541e09a@cea.fr> Hi, It's not possible anymore to browse or to subscribe to users mailing lists from the links displayed in Scilab website https://www.scilab.org/about/community/mailing-lists And search on lists.scilab.org domain doesn't return clear location of the archive. This issue was already raised a few years ago and is for sure reason for preventing new unregistered users to take part to the community, to get support from community and to suggest . Is ESI still taking care of keeping Scilab and its website alive in any way ? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed May 25 11:02:19 2022 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 25 May 2022 11:02:19 +0200 Subject: [Scilab-users] mailing lists archive and subscription disabled In-Reply-To: <967b8ddcd12a46d49bd7a8cdf541e09a@cea.fr> References: <967b8ddcd12a46d49bd7a8cdf541e09a@cea.fr> Message-ID: Hi David, Le 25/05/2022 ? 10:28, CHEZE David 227480 a ?crit?: > > Hi, > > It?s not possible anymore to browse > Yes, I already gave a solution to this problem, the list is also archived there: https://www.mail-archive.com/users at lists.scilab.org the whole thread is available at https://www.mail-archive.com/users at lists.scilab.org/msg10628.html > or to subscribe to users mailing lists from the links displayed in > Scilab website https://www.scilab.org/about/community/mailing-lists > > You are not right, the subscription links work (http://lists.scilab.org/mailman/listinfo/users) > > And search on lists.scilab.org domain doesn?t return clear location of > the archive. This issue was already raised a few years ago and is for > sure reason for preventing new unregistered users to take part to the > community, to get support from community and to suggest . > > Is ESI still taking care of keeping Scilab and its website alive in > any way ? > I don't know (although I am very concerned about Scilab, I don't work at ESI...). I hope that the situation will be clarified before the end of 2022. S. > David > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/v3?i=WG91eXZybW45Ym1EZEZCbdLWaANujcLcgsFkB3F7dzg&r=bnJjU3hQT3pQSmNQZVE3aHi0e9tBMT9ll7ukw_G-zVkmPCTRUjeyB5560oG7uBEr&f=SGI0YVJGNmxZNE90Z2thMND4NUJUIHsVzjiyBeFmyAEyW-lenoPpNM8ZjDD6Ns-Z&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=JI69 -- 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 May 25 11:22:10 2022 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 25 May 2022 11:22:10 +0200 Subject: [Scilab-users] Riemann Zeta update In-Reply-To: References: Message-ID: Hi, For real argument, we could easily interface std::riemann_zeta : https://en.cppreference.com/w/cpp/numeric/special_functions/riemann_zeta If you have a compiler (under windows you can install the minGW atoms module), you can run the following script: code=[ "#define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1 " "#include " "#include ""double.hxx"" " "#include ""function.hxx"" " "extern ""C"" " "{ " "#include ""Scierror.h"" " "#include ""localization.h"" " "} " "/* ==================================================================== */ " "types::Function::ReturnValue sci_zeta(types::typed_list &in, int _iRetCount, types::typed_list &out) " "{ " "types::Double* pDblOut; " "types::Double* pDblIn; " "if (in.size() != 1) " "{ " "Scierror(77, _(""%s: Wrong number of input argument(s): %d expected.\n""), ""zeta"", 1); " "return types::Function::Error; " "} " "if (_iRetCount >1) " "{ " "Scierror(78, _(""%s: Wrong number of output argument(s): %d expected.""), ""zeta"", 1); " "return types::Function::Error; " "} " "if (in[0]->isDouble() == false || in[0]->getAs()->isComplex()) " "{ " "Scierror(999, _(""%s: Wrong type for input argument #%d: real expected.\n""), ""zeta"", 1); " "return types::Function::Error; " "} " "pDblIn = in[0]->getAs(); " "pDblOut = pDblIn->clone(); " "for (int i = 0 ; i getSize() ; ++i) " "{ " "pDblOut->set(i,std::riemann_zeta(pDblIn->get(i))); " "} " "out.push_back(pDblOut); " "return types::Function::OK; " "} " ]; ulink files = fullfile(TMPDIR,"sci_zeta.cpp"); mputl(code,files) ilib_verbose(1) ilib_build("zeta", ["zeta" "sci_zeta" "cppsci"],files,[]) exec loader.sce tic disp(zeta(0.5)) disp(toc()) Le 22/05/2022 ? 08:31, Lester Anderson a ?crit?: > Hi all, > > After a lot of trial and error, I have managed to get a set of > functions to compute the approximations of Riemann's Zeta for negative > and positive real values; values of n > 1e6 seem to give better results: > > function zs=zeta_s(z, n) > // Summation loop > zs=1; > if z == 0 > zs = -0.5 > elseif z == 1 > zs = %inf > else > for i = 2: n-1 > zs = zs + i.^-z; > end > end > endfunction > > function zfn=zeta_functional_eqn(s) > // Riemann's functional equation > // Analytic continuation for negative values > zfn = 2.^s .* %pi.^(s - 1) .* sin(%pi.*s./2) .* gamma(1 - s) .* zeta_s((1 - s),n) > endfunction > For even values of s < -20 the values of Zeta(s) increase in value and > are not as close to zero as expected e.g. zeta_functional_eqn(-40) > gives 7.5221382. At small even values e.g. -10, the result is of the > order of ~1e-18 (close enough to zero). Any ideas why the even zeta > values increase or how to reduce that response? > > The solution over the critical strip (zero to one) is not so efficient > unless n is very large( > 1e8), and there seems to be a performance > issue when using a for-loop compared to vectorisation. Vectorised n > speeds things up quite a bit. > > function zs2=zeta_0_1(s, n) > zs2=0 > for i = 1: n > zs2 = zs2 + (-1).^(i + 1)./(i.^s ); > end > zs2 = 1./(1 - 2.^( 1-s )).*zs2; > endfunction > > function zs1=zeta_0_1(s, n) > // Vectorised version > zs1=0 > k=linspace(1,n,n); > zs1 = sum((-1).^(k+ 1)./(k.^s )); > zs1 = 1./(1 - 2.^( 1-s )).*zs1; > endfunction > For example, calculating the approximation of Zeta(0.5) using a > for-loop takes ~150s to give a value of -1.4602337981325388 (quite > close), whereas?the vectorised version does the computation in under > 20s, both tested using n=1e8. Can the functions be optimised to > improve speed and accuracy? > > Using Scilab 6.1.1 on Windows 10 (16 Gb RAM). > > Thanks > Lester > > _______________________________________________ > 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: From david.cheze at cea.fr Wed May 25 11:32:15 2022 From: david.cheze at cea.fr (CHEZE David 227480) Date: Wed, 25 May 2022 09:32:15 +0000 Subject: [Scilab-users] mailing lists archive and subscription disabled In-Reply-To: References: <967b8ddcd12a46d49bd7a8cdf541e09a@cea.fr> Message-ID: <57e22dc1a0a34d53a1b785856edd03d2@cea.fr> Thank you for your reply Stephane, unfortunately the subscription link doesn?t work from my side WIN10-Chrome. [cid:image002.png at 01D8702B.14D297C0] Since the link to the actual mail archive repository is not referenced on the Scilab.org website, very limited chance that any unregistered user manage to find it : is anyone from ESI looking at this thread to update the website ? Regards, David De : users De la part de St?phane Mottelet Envoy? : mercredi 25 mai 2022 11:02 ? : users at lists.scilab.org Objet : Re: [Scilab-users] mailing lists archive and subscription disabled Hi David, Le 25/05/2022 ? 10:28, CHEZE David 227480 a ?crit : Hi, It?s not possible anymore to browse Yes, I already gave a solution to this problem, the list is also archived there: https://www.mail-archive.com/users at lists.scilab.org the whole thread is available at https://www.mail-archive.com/users at lists.scilab.org/msg10628.html or to subscribe to users mailing lists from the links displayed in Scilab website https://www.scilab.org/about/community/mailing-lists You are not right, the subscription links work (http://lists.scilab.org/mailman/listinfo/users) And search on lists.scilab.org domain doesn?t return clear location of the archive. This issue was already raised a few years ago and is for sure reason for preventing new unregistered users to take part to the community, to get support from community and to suggest . Is ESI still taking care of keeping Scilab and its website alive in any way ? I don't know (although I am very concerned about Scilab, I don't work at ESI...). I hope that the situation will be clarified before the end of 2022. S. David _______________________________________________ users mailing list users at lists.scilab.org https://antispam.utc.fr/proxy/v3?i=WG91eXZybW45Ym1EZEZCbdLWaANujcLcgsFkB3F7dzg&r=bnJjU3hQT3pQSmNQZVE3aHi0e9tBMT9ll7ukw_G-zVkmPCTRUjeyB5560oG7uBEr&f=SGI0YVJGNmxZNE90Z2thMND4NUJUIHsVzjiyBeFmyAEyW-lenoPpNM8ZjDD6Ns-Z&u=http%3A//lists.scilab.org/mailman/listinfo/users&k=JI69 -- 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: image002.png Type: image/png Size: 48047 bytes Desc: image002.png URL: From arctica1963 at gmail.com Wed May 25 16:17:06 2022 From: arctica1963 at gmail.com (Lester Anderson) Date: Wed, 25 May 2022 15:17:06 +0100 Subject: [Scilab-users] HDF5 write data to file Message-ID: Hi all, I just found a useful way of getting netCDF files into Scilab via HDF5 (just found this!): a=h5open('Test_10-FAA.grd'); h5ls(a) // "lat" "dataset" // "lon" "dataset" // "z" "dataset" // "Conventions" "attribute"// "GMT_version" "attribute"// "_NCProperties" "attribute"// "description" "attribute"// "history" "attribute"// "node_offset" "attribute"// "title" "attribute" lon=h5read(a, 'lon');lat=h5read(a, 'lat');data=h5read(a, 'z'); h5close(a); The data plots fine via Sgrayplot(lon,lat,data,zminmax=[-25,25]) . I need to know how to write data out to essentially replicate the input netCDF file, so any pointers/examples would be helpful. It would be good to output a file in a format that GMT (Generic Mapping Tools) would recognise. The use of HDF5 seems to solve the issues of working with netCDF-4 files. Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Fri May 27 17:13:10 2022 From: arctica1963 at gmail.com (Lester Anderson) Date: Fri, 27 May 2022 16:13:10 +0100 Subject: [Scilab-users] HDF5 write data to file In-Reply-To: References: Message-ID: Hi all, The Scilab (SOD) format is the way forward since netCDF and HDF5 are very similar, but have slightly different naming conventions. I have a Geographic grid with the structure below, but cannot seem to get the output file dimensions right, i.e. the x and y coordinates in degrees and not pixel reference. File structure from ncdisp('filename') Source: Test_10-FAA.grd Format: netcdf4 Global Attributes: Conventions = "COARDS, CF-1.5" title = "" history = "grdsample -R-10/10/-10/10 -I1m @GMTAPI at -000001 -Gc:\Temp\Test_10-FAA.grd -fg --GMT_HISTORY=false" description = "" GMT_version = "5.4.3 (r19528) [64-bit] [MP]" node_offset = 1 Dimensions: lon = 1200 lat = 1200 Variables: lon Size: 1200 Dimensions: lon Datatype: double Attributes: long_name = "longitude" units = "degrees_east" actual_range = -10 10 lat Size: 1200 Dimensions: lat Datatype: double Attributes: long_name = "latitude" units = "degrees_north" actual_range = -10 10 z Size: 1200x1200 Dimensions: lon,lat Datatype: single Attributes: long_name = "z" _FillValue = NaN actual_range = -104.9617 456.6511 b=h5open('Test_out.grd','w'); h5write(b,'lat',lat); h5write(b,'lon',lon); h5write(b,'data',data); h5close(b) save('Test_output.sod','lon','lat','data') Saving the output creates a file composed of the three datasets (lon, lat, data). Plotting the data in Scilab via Sgrayplot(x,y,z) it looks correct, oriented properly and axes of longitude and latitude. Anyone know how to set the correct attributes to get the HDF5 file recognised as Geographic? Lester On Wed, 25 May 2022 at 15:17, Lester Anderson wrote: > Hi all, > > I just found a useful way of getting netCDF files into Scilab via HDF5 > (just found this!): > > a=h5open('Test_10-FAA.grd'); > h5ls(a) > // "lat" "dataset" // "lon" "dataset" // "z" "dataset" // "Conventions" "attribute"// "GMT_version" "attribute"// "_NCProperties" "attribute"// "description" "attribute"// "history" "attribute"// "node_offset" "attribute"// "title" "attribute" > lon=h5read(a, 'lon');lat=h5read(a, 'lat');data=h5read(a, 'z'); > > h5close(a); > > The data plots fine via Sgrayplot(lon,lat,data,zminmax=[-25,25]) . I need > to know how to write data out to essentially replicate the input netCDF > file, so any pointers/examples would be helpful. It would be good to output > a file in a format that GMT (Generic Mapping Tools) would recognise. > > The use of HDF5 seems to solve the issues of working with netCDF-4 files. > > Lester > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Mon May 30 07:47:51 2022 From: arctica1963 at gmail.com (Lester Anderson) Date: Mon, 30 May 2022 06:47:51 +0100 Subject: [Scilab-users] dos function (update) Message-ID: Hi all, I previously queried an issue with the dos function in Scilab 6.1.1 not working as it should; i.e. dos('grdinfo file.grd') would fail and return F. However, the workaround is the following: [result, bOK]=dos('exit | grdinfo file.grd') This will write the result and return T, but not leave the command window open (if start was used instead). This could be put into a wrapper function: function [result, bOK]=dos_win(x) [result, bOK] = dos('exit |'+ x)endfunction It is interesting how basic dos commands work fine (e.g. dir, copy etc). More of an observation on the current behaviour on Windows (10). At least one knows how to make it work now! Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: