From arctica1963 at gmail.com Fri Jan 1 09:16:01 2021 From: arctica1963 at gmail.com (arctica1963) Date: Fri, 1 Jan 2021 01:16:01 -0700 (MST) Subject: [Scilab-users] Triple integral (int3d) query Message-ID: <1609488961566-0.post@n3.nabble.com> Hello all, I have worked out a simpler input for 2D integration with a function that calls int2d: function [Integral, error]=Integral_2d(xmin,xmax,ymin,ymax,f) X=[xmin xmax xmax; xmin xmax xmin]' Y=[ymin ymin ymax; ymin ymax ymax]' [Integral, error]=int2d(X,Y,f) endfunction This simplifies the issue for triangulation and only needs the x, y limits and function to integrate; tested with the int2d example and works fine. Is it feasible to use the same methodology for int3d - triple integral - for defining the tetrahedron vertices? Really all one wants to do is enter the limits of x, y and z, with a function f(x,y,z). Any suggestions would be welcome Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Fri Jan 1 13:14:56 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 1 Jan 2021 13:14:56 +0100 Subject: [Scilab-users] Triple integral (int3d) query In-Reply-To: <1609488961566-0.post@n3.nabble.com> References: <1609488961566-0.post@n3.nabble.com> Message-ID: <43a5a8c1-fd78-1ea1-8425-2ec26c86b8e4@free.fr> Hello Lester, Le 01/01/2021 ? 09:16, arctica1963 a ?crit?: > Hello all, > > I have worked out a simpler input for 2D integration with a function that > calls int2d: > > function [Integral, error]=Integral_2d(xmin,xmax,ymin,ymax,f) > X=[xmin xmax xmax; xmin xmax xmin]' > Y=[ymin ymin ymax; ymin ymax ymax]' > [Integral, error]=int2d(X,Y,f) > endfunction > > This simplifies the issue for triangulation and only needs the x, y limits > and function to integrate; tested with the int2d example and works fine. > > Is it feasible to use the same methodology for int3d - triple integral - for > defining the tetrahedron vertices? Really all one wants to do is enter the > limits of x, y and z, with a function f(x,y,z). > > Any suggestions would be welcome With Scilab *6.0.2* you can install the CGLAB toolbox *atomsInstall("cglab")*. Then its *delaunay_3()* function will yield tetrahedrons required by int3d(). An intermediate step might be required to specify tetrahedrons in the way that int3d() expects. Best wishes and Happy New Year 2021 to you, and to all Scilab users! Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Fri Jan 1 15:52:08 2021 From: arctica1963 at gmail.com (arctica1963) Date: Fri, 1 Jan 2021 07:52:08 -0700 (MST) Subject: [Scilab-users] Triple integral (int3d) query In-Reply-To: <43a5a8c1-fd78-1ea1-8425-2ec26c86b8e4@free.fr> References: <1609488961566-0.post@n3.nabble.com> <43a5a8c1-fd78-1ea1-8425-2ec26c86b8e4@free.fr> Message-ID: <1609512728923-0.post@n3.nabble.com> Hi Samuel, Many thanks for the suggestion. Happy New Year to you too. Kind regards Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From Christophe.Dang at sidel.com Mon Jan 4 09:30:16 2021 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 4 Jan 2021 08:30:16 +0000 Subject: [Scilab-users] {EXT} New constant %chars to get sets of symbols In-Reply-To: References: Message-ID: Hello to all (and best wishes for the new year) > De : Samuel Gougeon > Envoy? : mardi 29 d?cembre 2020 16:40 > > So, i would like to propose to add this new constant to Scilab, for the benefit of all users. > In this respect, you will find > http://bugzilla.scilab.org/attachment.cgi?id=5206 That suits me. For the time being, I'm using my personal Wikipedia page in exactly the same way https://fr.wikipedia.org/wiki/Utilisateur:Cdang/bo%C3%AEte_%C3%A0_outils#Caract%C3%A8res_sp%C3%A9ciaux so that's perfect for me. Best 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 Jean-Yves.Baudais at insa-rennes.fr Mon Jan 4 15:55:50 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Mon, 4 Jan 2021 15:55:50 +0100 (CET) Subject: [Scilab-users] atomsLoad In-Reply-To: <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <1147985828.557207.1608562384245.JavaMail.zimbra@insa-rennes.fr> <3004f551-7647-2e8c-33a5-4db321fd91db@free.fr> <450958042.598780.1608636985061.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> Message-ID: <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> Hi, I fixed the problems. The modifications are 1) emd.sci file, line 410 "//pause" becomes "pause" 2) emd.sci file, line 683 opt_fields = {'t','stop','display','maxiterations','fix','maxmodes','interp','fix_h','mask','ndirs','complex_version'}; becomes opt_fields = ['t','stop','display','maxiterations','fix','maxmodes','interp','fix_h','mask','ndirs','complex_version']; 3) emd.sci file, line 794 if ~type(INTERP)==10 | ~or(convstr(INTERP)==convstr({'linear','cubic','spline'})) becomes if ~type(INTERP)==10 | ~or(convstr(INTERP)==convstr(['linear','cubic','spline'])) 4) emd_local_peak.sci, line 32 lm = find(diff(a)~=1) + 1; becomes lm = find(diff(a)~=1); if lm==[], then lm=1; end 5) boundary_conditions_emd.sci file, the function moc_fliplr should be added at the end of the file function y = moc_fliplr(x) // Copyright Aldo I Maalouf if ndims(x)~=2, disp('X must be a 2-D matrix!') end y = x(:,$:-1:1); endfunction The modification 1) is really a minor one. The remove of moc_fliplr() function in boundary_conditions_emd.sci file is very strange (this function exists in older emd_toolbox version!). I only tested the emd() function and it gives the same output with toy examples as the ones obtained with emd_toolbox of repository 5.4 (tested on scilab-5.5.2). However, I didn't test all the paramaters of the function. It remains one problem: the memory used always increases. If emd() function is ran multiple times, my 8G mem is fulfilled by scilab and of course scilab crashes. Maybe this comes from the modified sources of emd_toolbox done by Stephane Mottelet? (Note that there is no memory issues with emd() function of repository 5.4.) Jean-Yves ----- Original Message ----- > From: "St?phane Mottelet" > To: "Users mailing list for Scilab" scilab.org> > Sent: Tuesday, 22 December, 2020 17:02:48 > Subject: Re: [Scilab-users] atomsLoad > I sent you (private message) the modified sources of emd_toolbox, for > the gateway part only. The toolbox compiles and loads, but then there > are problems due to the convention with the empty matrix that changed > since Scilab 6. I hope you will be able to fix them yourself (keep us > informed of your fixes). > > S. > > Le 22/12/2020 ? 16:12, Jean-Yves Baudais a ?crit : >> Hi, >> >>> It is quite easy (a 10 min. job). I made the needed modifications and it >>> compiles and loads under OSX. If you give me the rights on Gitlab I can commit >>> the modifications this afternoon. >> Ok, but I don't how to do this, but I'm ready to learn :-) So, could you give me >> the step starting with "stftb" source? >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/atoms.scilab.org/toolboxes/stftb/2.0.2/files/stftb-2.0.2-src.zip >> (I'm regular with Linux command-line, not too much with makefile) >> >> Or, maybe there already exists a document explaining the steps? >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 stephane.mottelet at utc.fr Mon Jan 4 16:02:42 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 4 Jan 2021 16:02:42 +0100 Subject: [Scilab-users] atomsLoad In-Reply-To: <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <1147985828.557207.1608562384245.JavaMail.zimbra@insa-rennes.fr> <3004f551-7647-2e8c-33a5-4db321fd91db@free.fr> <450958042.598780.1608636985061.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> Message-ID: <78ef9952-db6f-ff94-3198-1777993d097e@utc.fr> Le 04/01/2021 ? 15:55, Jean-Yves Baudais a ?crit?: > Hi, > > I fixed the problems. The modifications are > > 1) emd.sci file, line 410 > "//pause" > becomes > "pause" > > 2) emd.sci file, line 683 > opt_fields = {'t','stop','display','maxiterations','fix','maxmodes','interp','fix_h','mask','ndirs','complex_version'}; > becomes > opt_fields = ['t','stop','display','maxiterations','fix','maxmodes','interp','fix_h','mask','ndirs','complex_version']; > > 3) emd.sci file, line 794 > if ~type(INTERP)==10 | ~or(convstr(INTERP)==convstr({'linear','cubic','spline'})) > becomes > if ~type(INTERP)==10 | ~or(convstr(INTERP)==convstr(['linear','cubic','spline'])) > > 4) emd_local_peak.sci, line 32 > lm = find(diff(a)~=1) + 1; > becomes > lm = find(diff(a)~=1); if lm==[], then lm=1; end > > 5) boundary_conditions_emd.sci file, the function moc_fliplr should be added at the end of the file > function y = moc_fliplr(x) > // Copyright Aldo I Maalouf > if ndims(x)~=2, > disp('X must be a 2-D matrix!') > end > y = x(:,$:-1:1); > endfunction > > The modification 1) is really a minor one. The remove of moc_fliplr() function in boundary_conditions_emd.sci file is very strange (this function exists in older emd_toolbox version!). > > I only tested the emd() function and it gives the same output with toy examples as the ones obtained with emd_toolbox of repository 5.4 (tested on scilab-5.5.2). However, I didn't test all the paramaters of the function. > > It remains one problem: the memory used always increases. If emd() function is ran multiple times, my 8G mem is fulfilled by scilab and of course scilab crashes. Maybe this comes from the modified sources of emd_toolbox done by Stephane Mottelet? Surely not. I just removed one obsolete #include and didn't touch anything else. The memory leak was already present in the original source... S. > (Note that there is no memory issues with emd() function of repository 5.4.) > > Jean-Yves > > ----- Original Message ----- >> From: "St?phane Mottelet" >> To: "Users mailing list for Scilab" scilab.org> >> Sent: Tuesday, 22 December, 2020 17:02:48 >> Subject: Re: [Scilab-users] atomsLoad >> I sent you (private message) the modified sources of emd_toolbox, for >> the gateway part only. The toolbox compiles and loads, but then there >> are problems due to the convention with the empty matrix that changed >> since Scilab 6. I hope you will be able to fix them yourself (keep us >> informed of your fixes). >> >> S. >> >> Le 22/12/2020 ? 16:12, Jean-Yves Baudais a ?crit : >>> Hi, >>> >>>> It is quite easy (a 10 min. job). I made the needed modifications and it >>>> compiles and loads under OSX. If you give me the rights on Gitlab I can commit >>>> the modifications this afternoon. >>> Ok, but I don't how to do this, but I'm ready to learn :-) So, could you give me >>> the step starting with "stftb" source? >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/atoms.scilab.org/toolboxes/stftb/2.0.2/files/stftb-2.0.2-src.zip >>> (I'm regular with Linux command-line, not too much with makefile) >>> >>> Or, maybe there already exists a document explaining the steps? >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 From Jean-Yves.Baudais at insa-rennes.fr Mon Jan 4 16:16:42 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Mon, 4 Jan 2021 16:16:42 +0100 (CET) Subject: [Scilab-users] atomsLoad In-Reply-To: <78ef9952-db6f-ff94-3198-1777993d097e@utc.fr> References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <450958042.598780.1608636985061.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> <78ef9952-db6f-ff94-3198-1777993d097e@utc.fr> Message-ID: <1675213628.291028.1609773402921.JavaMail.zimbra@insa-rennes.fr> ----- Original Message ----- > From: "St?phane Mottelet" > Le 04/01/2021 ? 15:55, Jean-Yves Baudais a ?crit?: >> It remains one problem: the memory used always increases. If emd() function is >> ran multiple times, my 8G mem is fulfilled by scilab and of course scilab >> crashes. Maybe this comes from the modified sources of emd_toolbox done by >> Stephane Mottelet? > > Surely not. I just removed one obsolete #include and didn't touch > anything else. The memory leak was already present in the original source... I checked "diff" of sci files in emd_toolbox-1.3 and emd_toolbox-1.2.1 (the one working on scilab-5.5.2). The differences I found are about emd_ prefix added to function names (and the incomprehensible remove of moc_fliplr). I will check the c code. Jean-Yves From Jean-Yves.Baudais at insa-rennes.fr Mon Jan 4 18:01:11 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Mon, 4 Jan 2021 18:01:11 +0100 (CET) Subject: [Scilab-users] atomsLoad In-Reply-To: <1675213628.291028.1609773402921.JavaMail.zimbra@insa-rennes.fr> References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> <78ef9952-db6f-ff94-3198-1777993d097e@utc.fr> <1675213628.291028.1609773402921.JavaMail.zimbra@insa-rennes.fr> Message-ID: <1927281931.308118.1609779671022.JavaMail.zimbra@insa-rennes.fr> The difference between emd_toolbox-1.2-1 and emd_toolbox-1.3 are the "void *pvApiCtx" added in cemdc.c, cemdc2.c, cemdc_fix.c, cemdc2_fix.c, emdc.c and emdc_fix.c. Could that be the source of the memory problem? Jean-Yves ----- Original Message ----- > From: "Jean-Yves Baudais" > To: "Users mailing list for Scilab" > Sent: Monday, 4 January, 2021 16:16:42 > Subject: Re: [Scilab-users] atomsLoad > ----- Original Message ----- >> From: "St?phane Mottelet" >> Le 04/01/2021 ? 15:55, Jean-Yves Baudais a ?crit?: >>> It remains one problem: the memory used always increases. If emd() function is >>> ran multiple times, my 8G mem is fulfilled by scilab and of course scilab >>> crashes. Maybe this comes from the modified sources of emd_toolbox done by >>> Stephane Mottelet? >> >> Surely not. I just removed one obsolete #include and didn't touch >> anything else. The memory leak was already present in the original source... > > > I checked "diff" of sci files in emd_toolbox-1.3 and emd_toolbox-1.2.1 (the one > working on scilab-5.5.2). The differences I found are about emd_ prefix added > to function names (and the incomprehensible remove of moc_fliplr). I will check > the c code. > > Jean-Yves > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Jean-Yves Baudais From stephane.mottelet at utc.fr Mon Jan 4 18:09:17 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 4 Jan 2021 18:09:17 +0100 Subject: [Scilab-users] atomsLoad In-Reply-To: <1927281931.308118.1609779671022.JavaMail.zimbra@insa-rennes.fr> References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> <78ef9952-db6f-ff94-3198-1777993d097e@utc.fr> <1675213628.291028.1609773402921.JavaMail.zimbra@insa-rennes.fr> <1927281931.308118.1609779671022.JavaMail.zimbra@insa-rennes.fr> Message-ID: <22ea3580-ce59-e81f-37c7-afbb85423605@utc.fr> Le 04/01/2021 ? 18:01, Jean-Yves Baudais a ?crit?: > The difference between emd_toolbox-1.2-1 and emd_toolbox-1.3 are the "void *pvApiCtx" added in cemdc.c, cemdc2.c, cemdc_fix.c, cemdc2_fix.c, emdc.c and emdc_fix.c. Could that be the source of the memory problem? Oh yes I didn't remember those ones. It has nothing to do with memory allocation, this is just a required explicit argument in Scilab 6 API. Otherwise you won't be able to compile the gateways. As I already said the memory leak is just a feature of the original source... S. > > Jean-Yves > > ----- Original Message ----- >> From: "Jean-Yves Baudais" >> To: "Users mailing list for Scilab" >> Sent: Monday, 4 January, 2021 16:16:42 >> Subject: Re: [Scilab-users] atomsLoad >> ----- Original Message ----- >>> From: "St?phane Mottelet" >>> Le 04/01/2021 ? 15:55, Jean-Yves Baudais a ?crit?: >>>> It remains one problem: the memory used always increases. If emd() function is >>>> ran multiple times, my 8G mem is fulfilled by scilab and of course scilab >>>> crashes. Maybe this comes from the modified sources of emd_toolbox done by >>>> Stephane Mottelet? >>> Surely not. I just removed one obsolete #include and didn't touch >>> anything else. The memory leak was already present in the original source... >> >> I checked "diff" of sci files in emd_toolbox-1.3 and emd_toolbox-1.2.1 (the one >> working on scilab-5.5.2). The differences I found are about emd_ prefix added >> to function names (and the incomprehensible remove of moc_fliplr). I will check >> the c code. >> >> Jean-Yves >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 From Jean-Yves.Baudais at insa-rennes.fr Tue Jan 5 11:11:06 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Tue, 5 Jan 2021 11:11:06 +0100 Subject: [Scilab-users] atomsLoad In-Reply-To: <22ea3580-ce59-e81f-37c7-afbb85423605@utc.fr> References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> <78ef9952-db6f-ff94-3198-1777993d097e@utc.fr> <1675213628.291028.1609773402921.JavaMail.zimbra@insa-rennes.fr> <1927281931.308118.1609779671022.JavaMail.zimbra@insa-rennes.fr> <22ea3580-ce59-e81f-37c7-afbb85423605@utc.fr> Message-ID: Hello, Le 04/01/2021 ? 18:09, St?phane Mottelet a ?crit?: > It has nothing to do with memory > allocation, this is just a required explicit argument in Scilab 6 API. > Otherwise you won't be able to compile the gateways. I did the test, removed "void *pvApiCtx" and of course the gateway didn't compile. > As I already said > the memory leak is just a feature of the original source... I don't know where it comes from, but clearly the source code is ok with Scilab 5.2.2 but not with Scilab 6.1.0 (emd_toolbox-1.3 it's more or less "formatting" modifications compared to emd_toolbox-1.2-1)! It looks like Scilab 5.2.2 is able to free some memories but not Scilab 6.1.0! I stop here because I cannot do more. So with the modifications, emd_toolbox-1.3 can be use for toy examples, only. --Jean-Yves From sgougeon at free.fr Tue Jan 5 11:32:37 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 5 Jan 2021 11:32:37 +0100 Subject: [Scilab-users] atomsLoad In-Reply-To: <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <1147985828.557207.1608562384245.JavaMail.zimbra@insa-rennes.fr> <3004f551-7647-2e8c-33a5-4db321fd91db@free.fr> <450958042.598780.1608636985061.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> Message-ID: Le 04/01/2021 ? 15:55, Jean-Yves Baudais a ?crit?: > .../... > 5) boundary_conditions_emd.sci file, the function moc_fliplr should be added at the end of the file > function y = moc_fliplr(x) > // Copyright Aldo I Maalouf > if ndims(x)~=2, > disp('X must be a 2-D matrix!') > end > y = x(:,$:-1:1); > endfunction > > The modification 1) is really a minor one. The remove of moc_fliplr() function in boundary_conditions_emd.sci file is very strange (this function exists in older emd_toolbox version!). flipdim() does the same and is available since Scilab 5.0. Keeping useless external dependencies (here on the moc_ toolbox) complicates a lot the maintenance -- and so the actual availability -- of external modules. Samuel From stephane.mottelet at utc.fr Tue Jan 5 14:02:40 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 5 Jan 2021 14:02:40 +0100 Subject: [Scilab-users] atomsLoad In-Reply-To: References: <1893395180.452434.1608313088195.JavaMail.zimbra@insa-rennes.fr> <441fce18-9bf0-4276-6319-100a27f19cf5@utc.fr> <1607135779.616587.1608649937970.JavaMail.zimbra@insa-rennes.fr> <2742c2dc-8ce3-469e-fefd-a6b25b809386@utc.fr> <977423698.286442.1609772150448.JavaMail.zimbra@insa-rennes.fr> <78ef9952-db6f-ff94-3198-1777993d097e@utc.fr> <1675213628.291028.1609773402921.JavaMail.zimbra@insa-rennes.fr> <1927281931.308118.1609779671022.JavaMail.zimbra@insa-rennes.fr> <22ea3580-ce59-e81f-37c7-afbb85423605@utc.fr> Message-ID: Le 05/01/2021 ? 11:11, Jean-Yves Baudais a ?crit?: > Hello, > > Le 04/01/2021 ? 18:09, St?phane Mottelet a ?crit?: >> It has nothing to do with memory allocation, this is just a required >> explicit argument in Scilab 6 API. Otherwise you won't be able to >> compile the gateways. > > > I did the test, removed "void *pvApiCtx" and of course the gateway > didn't compile. > > >> As I already said the memory leak is just a feature of the original >> source... > > > I don't know where it comes from, but clearly the source code is ok > with Scilab 5.2.2 but not with Scilab 6.1.0 (emd_toolbox-1.3 it's more > or less "formatting" modifications compared to emd_toolbox-1.2-1)! > > It looks like Scilab 5.2.2 is able to free some memories but not > Scilab 6.1.0! Yes. Memory leak is a new great feature of Scilab 6 ;-) > > I stop here because I cannot do more. So with the modifications, > emd_toolbox-1.3 can be use for toy examples, only. > > --Jean-Yves > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 From fmiyara at fceia.unr.edu.ar Tue Jan 5 09:19:30 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 5 Jan 2021 05:19:30 -0300 Subject: [Scilab-users] Problems arising from truncation of %pi Message-ID: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> Dear all, In order to test the FFT on a periodic signal whose period is an exact submultiple of the FFT length I found a frequency fo satisfying this for the chosen sample rate and window length, and generated the following signal: x = sin(2*%pi*fo*t); where t is a time vector. This should be a perfectly periodic discrete signal but it isn't because the sin() function has a (virtually) exact period of pi, while %pi is exact to 16 digits only. For instance, we have (23 digits shown) --> sin(%pi) ?ans? = ?? 0.0000000000000001224647 --> sin(1e10*%pi) ?ans? = ? -0.0000022393627619559233 --> sin(1e15*%pi) ?ans? = ? -0.2362090532517409080526 The Wolfram Alpha site yields the correct value 0 in all cases (using their own pi). Questions: 1) How is the sin() function extended to very large values of the argument? My first guess would be to compute a quarter cycle using Taylor and then extend it by symmetry and periodicity, but with which period? The best approximation available is 2*%pi. Or it is possible to use extended precision internally? 2) Is there a way to get a periodic discrete sine other than extending it periodically with the desired period? Wouldn't this create a slight glitch at the frontier between cycles? Regards, Federico Miyara -- 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 Christophe.Dang at sidel.com Wed Jan 6 08:46:08 2021 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Wed, 6 Jan 2021 07:46:08 +0000 Subject: [Scilab-users] {EXT} Problems arising from truncation of %pi In-Reply-To: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> Message-ID: Hello Federico, I'm not sure to understand exactly your needs but: > De : Federico Miyara > Envoy? : mardi 5 janvier 2021 09:20 > > --> sin(%pi) > ans = > 0.0000000000000001224647 seems to be something we cannot get rid off unless using symbolic calculation i.e. having a specific variable for pi which is recognised and gives the exact result with given functions. > 1) How is the sin() function extended to very large values of the argument? I don?t know about Scilab but as it is initially based on Fortran, it probably uses the related Fortran library (or maybe a more modern library, this is not documented). You might have some answers here: https://en.wikipedia.org/wiki/Sine#Software_implementations Hope this helps, 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 Jean-Yves.Baudais at insa-rennes.fr Wed Jan 6 09:14:23 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Wed, 6 Jan 2021 09:14:23 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> Message-ID: <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> Hello, Le 05/01/2021 ? 09:19, Federico Miyara a ?crit?: > --> sin(%pi) > ?ans? = > ?? 0.0000000000000001224647 You face the limited precision of all numerical calculus. See --> help %eps It has no sense to use 23 digits with a precision of 2.22E-16, the 7th last digits are noise. > --> sin(1e10*%pi) > ?ans? = > ? -0.0000022393627619559233 > > --> sin(1e15*%pi) > ?ans? = > ? -0.2362090532517409080526 All is consistent with the definition of the precision. A toy example: --> a=2; --> b=sqrt(2); --> a-b^2 You expect zero because you do symbolic calculus, not Scilab. > The Wolfram Alpha site yields the correct value 0 in all cases (using > their own pi). Because it uses symbolic calculus. So, if you want more precision with Scilab you should change the standard used, but maybe some tricks in your code can solve the problem... Or maybe you need symbolic calculus tool. --Jean-Yves From antoine.monmayrant at laas.fr Wed Jan 6 09:22:11 2021 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 6 Jan 2021 09:22:11 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> Message-ID: <50c5a7e2-7d7e-e3c7-d83f-eb76ec1b1a0f@laas.fr> Hello Frederico, Like Christophe, I am not sure this has anything to do with the implementation of sin(). It seems to be a known limitation of numerical calculations using floating numbers. In particular, even with en hypothetical ideal value of %pi, because of the conversion to a double, %pi*1e15 is converted to the nearest available double and this "shift" or error as compared to the ideal infinitely-precise value is increasing with the size of your number. Thus you make a x1e15 bigger error when using "%pi*1e15" than when using "%pi". As Christophe as said, there is not much you can do, apart from resorting to symbolic calculation (what Alpha does). You can see that by using nearfloat to get the distance between two doubles: nearfloat("succ", %pi)-%pi ?ans? =?? 4.441D-16 nearfloat("succ", %pi*1e15)-%pi*1e15 ?ans? =?? 0.5 As I said, the error on the sin() argument is getting x1e15 bigger! I'm sorry if my explanation of floating point numbers is not really good. This one was a revelation for me: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html . It helped me understand why it's usually a good idea to use "reduced units" for your calculations (ie keep everything close to 1 when possible). I hope it helps, Cheers, Antoine On 05/01/2021 09:19, Federico Miyara wrote: > > Dear all, > > In order to test the FFT on a periodic signal whose period is an exact > submultiple of the FFT length I found a frequency fo satisfying this > for the chosen sample rate and window length, and generated the > following signal: > > x = sin(2*%pi*fo*t); > > where t is a time vector. This should be a perfectly periodic discrete > signal but it isn't because the sin() function has a (virtually) exact > period of pi, while %pi is exact to 16 digits only. > > For instance, we have (23 digits shown) > > --> sin(%pi) > ?ans? = > ?? 0.0000000000000001224647 > > --> sin(1e10*%pi) > ?ans? = > ? -0.0000022393627619559233 > > --> sin(1e15*%pi) > ?ans? = > ? -0.2362090532517409080526 > > The Wolfram Alpha site yields the correct value 0 in all cases (using > their own pi). > > Questions: > > 1) How is the sin() function extended to very large values of the > argument? My first guess would be to compute a quarter cycle using > Taylor and then extend it by symmetry and periodicity, but with which > period? The best approximation available is 2*%pi. Or it is possible > to use extended precision internally? > > 2) Is there a way to get a periodic discrete sine other than extending > it periodically with the desired period? > Wouldn't this create a slight glitch at the frontier between cycles? > > Regards, > > Federico Miyara > > > 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 Wed Jan 6 09:49:24 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 6 Jan 2021 09:49:24 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> Message-ID: I do not agree with your answer. Doing *by hand* the shift to a principal period? of sin () solves the problem. For example, here is a plot of sin(x) vs sin(x-floor(x/2/%pi)*%pi*2) for large values of x: x = (10^[1:16])*%pi sx = sin(x-floor(x/2/%pi)*%pi*2) plot("ln",x,sin(x),'-o',x,sx,'-o') legend("$\Large\sin x$","$\Large\sin \left(x-2\pi\left\lfloor\frac{x}{2\pi}\right\rfloor\right)$",3) error I suppose that the hardware implementation used by the compiler when using the standard math library does not use this simple trick because it would decrease the floating point performance. S. Le 06/01/2021 ? 09:14, Jean-Yves Baudais a ?crit?: > Hello, > > Le 05/01/2021 ? 09:19, Federico Miyara a ?crit?: >> --> sin(%pi) >> ??ans? = >> ??? 0.0000000000000001224647 > > > You face the limited precision of all numerical calculus. See > --> help %eps > > It has no sense to use 23 digits with a precision of 2.22E-16, the 7th > last digits are noise. > > >> --> sin(1e10*%pi) >> ??ans? = >> ?? -0.0000022393627619559233 >> >> --> sin(1e15*%pi) >> ??ans? = >> ?? -0.2362090532517409080526 > > > All is consistent with the definition of the precision. A toy example: > --> a=2; > --> b=sqrt(2); > --> a-b^2 > > You expect zero because you do symbolic calculus, not Scilab. > > >> The Wolfram Alpha site yields the correct value 0 in all cases (using >> their own pi). > > > Because it uses symbolic calculus. So, if you want more precision with > Scilab you should change the standard used, but maybe some tricks in > your code can solve the problem... Or maybe you need symbolic calculus > tool. > > --Jean-Yves > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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: error.gif Type: image/gif Size: 6463 bytes Desc: not available URL: From stephane.mottelet at utc.fr Wed Jan 6 10:00:59 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 6 Jan 2021 10:00:59 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> Message-ID: Of course, this does only work for integer multiples of %pi. This plot illustrates well Antoine's remark: x=(10^15*%pi)+(0:0.001:2*%pi); plot(sin(x)); error I like new year's jokes ! S. Le 06/01/2021 ? 09:49, St?phane Mottelet a ?crit?: > > I do not agree with your answer. Doing *by hand* the shift to a > principal period? of sin () solves the problem. For example, here is a > plot of sin(x) vs sin(x-floor(x/2/%pi)*%pi*2) for large values of x: > > x = (10^[1:16])*%pi > sx = sin(x-floor(x/2/%pi)*%pi*2) > plot("ln",x,sin(x),'-o',x,sx,'-o') > legend("$\Large\sin x$","$\Large\sin > \left(x-2\pi\left\lfloor\frac{x}{2\pi}\right\rfloor\right)$",3) > > error > > I suppose that the hardware implementation used by the compiler when > using the standard math library does not use this simple trick because > it would decrease the floating point performance. > > > S. > > Le 06/01/2021 ? 09:14, Jean-Yves Baudais a ?crit?: >> Hello, >> >> Le 05/01/2021 ? 09:19, Federico Miyara a ?crit?: >>> --> sin(%pi) >>> ??ans? = >>> ??? 0.0000000000000001224647 >> >> >> You face the limited precision of all numerical calculus. See >> --> help %eps >> >> It has no sense to use 23 digits with a precision of 2.22E-16, the >> 7th last digits are noise. >> >> >>> --> sin(1e10*%pi) >>> ??ans? = >>> ?? -0.0000022393627619559233 >>> >>> --> sin(1e15*%pi) >>> ??ans? = >>> ?? -0.2362090532517409080526 >> >> >> All is consistent with the definition of the precision. A toy example: >> --> a=2; >> --> b=sqrt(2); >> --> a-b^2 >> >> You expect zero because you do symbolic calculus, not Scilab. >> >> >>> The Wolfram Alpha site yields the correct value 0 in all cases >>> (using their own pi). >> >> >> Because it uses symbolic calculus. So, if you want more precision >> with Scilab you should change the standard used, but maybe some >> tricks in your code can solve the problem... Or maybe you need >> symbolic calculus tool. >> >> --Jean-Yves >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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: error.gif Type: image/gif Size: 5581 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: error.gif Type: image/gif Size: 6463 bytes Desc: not available URL: From fmiyara at fceia.unr.edu.ar Thu Jan 7 19:02:40 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 7 Jan 2021 15:02:40 -0300 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> Message-ID: Jean-Yves, Thanks for your answer. > You face the limited precision of all numerical calculus. See --> help > %eps Yes, I'm aware of this limitation, but I think an improved version of the sine function could be provided for its use in certain cases, in a similar fashion as the log1p() function, which takes advantage of foating point capabilitties when the input argument is close to 1. The function could be sinpi() or similar, with two arguments: the main argument x and an integer argument n, being its result equivalent to sin(x - n*pi) where pi is the exact value of pi > It has no sense to use 23 digits with a precision of 2.22E-16, the 7th > last digits are noise. I've just reported the digits provided when using format(25) Probably it is not proper to refer to it as noise, since the difference is deterministic as can be demonstrated by using the function nearfloat() Regards, Federico Miyara > > > >> --> sin(1e10*%pi) >> ??ans? = >> ?? -0.0000022393627619559233 >> >> --> sin(1e15*%pi) >> ??ans? = >> ?? -0.2362090532517409080526 > > > All is consistent with the definition of the precision. A toy example: > --> a=2; > --> b=sqrt(2); > --> a-b^2 > > You expect zero because you do symbolic calculus, not Scilab. > > >> The Wolfram Alpha site yields the correct value 0 in all cases (using >> their own pi). > > > Because it uses symbolic calculus. So, if you want more precision with > Scilab you should change the standard used, but maybe some tricks in > your code can solve the problem... Or maybe you need symbolic calculus > tool. > > --Jean-Yves > _______________________________________________ > 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 From fmiyara at fceia.unr.edu.ar Thu Jan 7 19:05:45 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 7 Jan 2021 15:05:45 -0300 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <50c5a7e2-7d7e-e3c7-d83f-eb76ec1b1a0f@laas.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <50c5a7e2-7d7e-e3c7-d83f-eb76ec1b1a0f@laas.fr> Message-ID: <9ca7304e-fd8a-1daa-0968-2a91acd23d0d@fceia.unr.edu.ar> Antoine, Thanks for the link, very interesting. Regards, Federico Miyara On 06/01/2021 05:22, Antoine Monmayrant wrote: > > Hello Frederico, > > Like Christophe, I am not sure this has anything to do with the > implementation of sin(). > It seems to be a known limitation of numerical calculations using > floating numbers. > In particular, even with en hypothetical ideal value of %pi, because > of the conversion to a double, %pi*1e15 is converted to the nearest > available double and this "shift" or error as compared to the ideal > infinitely-precise value is increasing with the size of your number. > Thus you make a x1e15 bigger error when using "%pi*1e15" than when > using "%pi". > As Christophe as said, there is not much you can do, apart from > resorting to symbolic calculation (what Alpha does). > > You can see that by using nearfloat to get the distance between two > doubles: > > nearfloat("succ", %pi)-%pi > ?ans? =?? 4.441D-16 > nearfloat("succ", %pi*1e15)-%pi*1e15 > ?ans? =?? 0.5 > > As I said, the error on the sin() argument is getting x1e15 bigger! > > I'm sorry if my explanation of floating point numbers is not really good. > This one was a revelation for me: > https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html . > It helped me understand why it's usually a good idea to use "reduced > units" for your calculations (ie keep everything close to 1 when > possible). > > I hope it helps, > > Cheers, > > Antoine > On 05/01/2021 09:19, Federico Miyara wrote: >> >> Dear all, >> >> In order to test the FFT on a periodic signal whose period is an >> exact submultiple of the FFT length I found a frequency fo satisfying >> this for the chosen sample rate and window length, and generated the >> following signal: >> >> x = sin(2*%pi*fo*t); >> >> where t is a time vector. This should be a perfectly periodic >> discrete signal but it isn't because the sin() function has a >> (virtually) exact period of pi, while %pi is exact to 16 digits only. >> >> For instance, we have (23 digits shown) >> >> --> sin(%pi) >> ?ans? = >> ?? 0.0000000000000001224647 >> >> --> sin(1e10*%pi) >> ?ans? = >> ? -0.0000022393627619559233 >> >> --> sin(1e15*%pi) >> ?ans? = >> ? -0.2362090532517409080526 >> >> The Wolfram Alpha site yields the correct value 0 in all cases (using >> their own pi). >> >> Questions: >> >> 1) How is the sin() function extended to very large values of the >> argument? My first guess would be to compute a quarter cycle using >> Taylor and then extend it by symmetry and periodicity, but with which >> period? The best approximation available is 2*%pi. Or it is possible >> to use extended precision internally? >> >> 2) Is there a way to get a periodic discrete sine other than >> extending it periodically with the desired period? >> Wouldn't this create a slight glitch at the frontier between cycles? >> >> Regards, >> >> Federico Miyara >> >> >> 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 -- 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 fmiyara at fceia.unr.edu.ar Fri Jan 8 01:03:10 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 7 Jan 2021 21:03:10 -0300 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> Message-ID: <3444f3e7-d50f-a115-06f9-d4fbbdfd6322@fceia.unr.edu.ar> St?phane, This would be great if it worked for any x. When x is close to 1e16 there are few valid numbers per cycle. For instance x(1) = 1e16 for k=1:5 ??? x(k+1) = nearfloat("succ",x(k)); end x yields (with format(25)) ?? 10000000000000000. ?? 10000000000000002. ?? 10000000000000004. ?? 10000000000000006. ?? 10000000000000008. ?? 10000000000000010. Those few numbers have each a definite exact value and sin(x) has also a definite exact value which seemingly is already well approximated, unlike what I had previously supposed. For instance [x sin(x)] yields 10000000000000000.?? 0.779688006606978_7_8957 ?? 10000000000000002.? -0.893837828765730_5_909519 ?? 10000000000000004.? -0.035752436952928_5_263036 ?? 10000000000000006.?? 0.923594355839355_2_299535 ?? 10000000000000008.? -0.732949301917758_3_112977 ?? 10000000000000010.? -0.313565289154332_2_384749 I have underlined the last correct digit compared with Alpha, so it is the expected result with 16 digits. Regards, Federico Miyara On 06/01/2021 05:49, St?phane Mottelet wrote: > x = (10^[1:16])*%pi > sx = sin(x-floor(x/2/%pi)*%pi*2) > plot("ln",x,sin(x),'-o',x,sx,'-o') > legend("$\Large\sin x$","$\Large\sin > \left(x-2\pi\left\lfloor\frac{x}{2\pi}\right\rfloor\right)$",3) -- 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 Jean-Yves.Baudais at insa-rennes.fr Fri Jan 8 10:48:31 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Fri, 8 Jan 2021 10:48:31 +0100 (CET) Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> Message-ID: <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> Hello, ----- Original Message ----- > The function could be sinpi() or similar, with two arguments: the main > argument x and an integer argument n, being its result equivalent to > > sin(x - n*pi) So now the problem can be how these large numbers are obtained --> a=1e16+1 --> a-1e16 of course equals zero. > where pi is the exact value of pi Hum... What does "exact" mean in numerical calculus? (In symbolic one, it's simpler :-) --> format(25) --> %pi 3.141592653589793115998 the 6 last digits are wrong (cf. https://oeis.org/A000796) because of float64 format. > Probably it is not proper to refer to it as noise, since the difference > is deterministic as can be demonstrated by using the function nearfloat() Maybe noise is not the right word. But, the difference is fixed and %pi give all the time the same digit in format(25). It's a bit weird (up to my ignorance) to have these wrong deterministic digits... Hum, maybe I need to read "What Every Computer Scientist Should Know about Floating-Point Arithmetic", David Goldberg, ACM Computing Surveys, vol. 23, no 1, mars 1991 recommanded by https://en.wikipedia.org/wiki/IEEE_754 --Jean-Yves From stephane.mottelet at utc.fr Fri Jan 8 12:20:31 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 8 Jan 2021 12:20:31 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> Message-ID: <7dd53a5c-f95a-f10a-cda6-ef247ad2066e@utc.fr> The nearest double-precision IEEE-754 binary floating-point number for the decimal number PI 3.141592653589793 23846264338327950288419716939937510582097494459230 78164 06286 .... is 3.141592653589793 115997963468544185161590576171875 It can be shown this way: its internal base 2 representation is (I added spaces to separate the sign, exponent and mantissa) is given in Scilab by --> bitstring(%pi) ?ans? = ? "0 10000000000 1001001000011111101101010100010001000010110100011000" i.e. a positive number, with exponent 2^(1024-1023) = 1 and mantissa 1.1001001000011111101101010100010001000010110100011000 i.e. the leading "1."? is implicit (normalized convention) and has to be added. Hence, the final numer, after mutiplication by 2^exponent, is 11.001001000011111101101010100010001000010110100011000 You won't be able to convert this back to decimal by using floating point arithmetic. There is an efficient converter at https://www.exploringbinary.com/binary-converter/ which gives the actual result convert S. Le 08/01/2021 ? 10:48, Jean-Yves Baudais a ?crit?: > Hello, > > ----- Original Message ----- >> The function could be sinpi() or similar, with two arguments: the main >> argument x and an integer argument n, being its result equivalent to >> >> sin(x - n*pi) > So now the problem can be how these large numbers are obtained > --> a=1e16+1 > --> a-1e16 > of course equals zero. > >> where pi is the exact value of pi > Hum... What does "exact" mean in numerical calculus? (In symbolic one, it's simpler :-) > > --> format(25) > --> %pi > 3.141592653589793115998 > > the 6 last digits are wrong (cf. https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/oeis.org/A000796) because of float64 format. > >> Probably it is not proper to refer to it as noise, since the difference >> is deterministic as can be demonstrated by using the function nearfloat() > Maybe noise is not the right word. But, the difference is fixed and %pi give all the time the same digit in format(25). It's a bit weird (up to my ignorance) to have these wrong deterministic digits... Hum, maybe I need to read "What Every Computer Scientist Should Know about Floating-Point Arithmetic", David Goldberg, ACM Computing Surveys, vol. 23, no 1, mars 1991 recommanded by https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/en.wikipedia.org/wiki/IEEE_754 > > --Jean-Yves > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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: convert.png Type: image/png Size: 31552 bytes Desc: not available URL: From stephane.mottelet at utc.fr Fri Jan 8 12:28:30 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 8 Jan 2021 12:28:30 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <7dd53a5c-f95a-f10a-cda6-ef247ad2066e@utc.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> <7dd53a5c-f95a-f10a-cda6-ef247ad2066e@utc.fr> Message-ID: But, of course, we have --> bitstring(3.141592653589793) == bitstring(%pi) ?ans? = ? T which means that 3.141592653589793 and 3.141592653589793115997963468544185161590576171875 have the same internal IEEE754 representation. S. Le 08/01/2021 ? 12:20, St?phane Mottelet a ?crit?: > The nearest double-precision IEEE-754 binary floating-point number for > the decimal number PI > > 3.141592653589793 23846264338327950288419716939937510582097494459230 > 78164 06286 .... > > is > > 3.141592653589793 115997963468544185161590576171875 > > It can be shown this way: its internal base 2 representation is (I > added spaces to separate the sign, exponent and mantissa) is given in > Scilab by > > --> bitstring(%pi) > ?ans? = > > ? "0 10000000000 1001001000011111101101010100010001000010110100011000" > > i.e. a positive number, with exponent 2^(1024-1023) = 1 and mantissa > > 1.1001001000011111101101010100010001000010110100011000 > > i.e. the leading "1."? is implicit (normalized convention) and has to > be added. Hence, the final numer, after mutiplication by 2^exponent, is > > 11.001001000011111101101010100010001000010110100011000 > > You won't be able to convert this back to decimal by using floating > point arithmetic. There is an efficient converter at > https://www.exploringbinary.com/binary-converter/ which gives the > actual result > > convert > > > S. > > Le 08/01/2021 ? 10:48, Jean-Yves Baudais a ?crit?: >> Hello, >> >> ----- Original Message ----- >>> The function could be sinpi() or similar, with two arguments: the main >>> argument x and an integer argument n, being its result equivalent to >>> >>> sin(x - n*pi) >> So now the problem can be how these large numbers are obtained >> --> a=1e16+1 >> --> a-1e16 >> of course equals zero. >> >>> where pi is the exact value of pi >> Hum... What does "exact" mean in numerical calculus? (In symbolic one, it's simpler :-) >> >> --> format(25) >> --> %pi >> 3.141592653589793115998 >> >> the 6 last digits are wrong (cf.https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/oeis.org/A000796) because of float64 format. >> >>> Probably it is not proper to refer to it as noise, since the difference >>> is deterministic as can be demonstrated by using the function nearfloat() >> Maybe noise is not the right word. But, the difference is fixed and %pi give all the time the same digit in format(25). It's a bit weird (up to my ignorance) to have these wrong deterministic digits... Hum, maybe I need to read "What Every Computer Scientist Should Know about Floating-Point Arithmetic", David Goldberg, ACM Computing Surveys, vol. 23, no 1, mars 1991 recommanded byhttps://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/en.wikipedia.org/wiki/IEEE_754 >> >> --Jean-Yves >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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: convert.png Type: image/png Size: 31552 bytes Desc: not available URL: From Jean-Yves.Baudais at insa-rennes.fr Fri Jan 8 13:28:22 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Fri, 8 Jan 2021 13:28:22 +0100 (CET) Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <7dd53a5c-f95a-f10a-cda6-ef247ad2066e@utc.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> <7dd53a5c-f95a-f10a-cda6-ef247ad2066e@utc.fr> Message-ID: <2012401579.312238.1610108902150.JavaMail.zimbra@insa-rennes.fr> ----- Original Message ----- > From: "St?phane Mottelet" > --> bitstring(%pi) > ans = > > "0 10000000000 1001001000011111101101010100010001000010110100011000" > [...] > https://www.exploringbinary.com/binary-converter/ Thank you for the recall on floating point representation and for the link (the French wiki page on IEEE 754 gives also a full and clear example). Of course we can convert float64 from finite binary representation to decimal one with more than 16 digits, but in that case the binary to float tranform is not a "relation binaire univoque" and the finite number representation problem is "put under the carpet". As I prefer one-to-one convertion and I hate carpet, I use 16 digits at most to write float64. -- Jean-Yves From stephane.mottelet at utc.fr Fri Jan 8 14:48:59 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 8 Jan 2021 14:48:59 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <2012401579.312238.1610108902150.JavaMail.zimbra@insa-rennes.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> <7dd53a5c-f95a-f10a-cda6-ef247ad2066e@utc.fr> <2012401579.312238.1610108902150.JavaMail.zimbra@insa-rennes.fr> Message-ID: <1422efac-55ef-6d17-2cad-b1d1a0b65957@utc.fr> Le 08/01/2021 ? 13:28, Jean-Yves Baudais a ?crit?: > ----- Original Message ----- >> From: "St?phane Mottelet" >> --> bitstring(%pi) >> ans = >> >> "0 10000000000 1001001000011111101101010100010001000010110100011000" >> [...] >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.exploringbinary.com/binary-converter/ > > Thank you for the recall on floating point representation and for the link (the French wiki page on IEEE 754 gives also a full and clear example). Of course we can convert float64 from finite binary representation to decimal one with more than 16 digits, but in that case the binary to float tranform is not a "relation binaire univoque" and the finite number representation problem is "put under the carpet". As I prefer one-to-one convertion and I hate carpet, I use 16 digits at most to write float64. There is no hiding of anything in my demonstration. I was just showing that the figures displayed by Scilab after the 16th are computed on a clear basis. This is a legacy choice of Scilab to allow the display of more than 16 decimals and this can be discussed. For example, "long" format of Matlab displays the shortest decimal number matching the internal IEEE754 representation. S. > > -- Jean-Yves > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 fmiyara at fceia.unr.edu.ar Sat Jan 9 01:32:29 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 8 Jan 2021 21:32:29 -0300 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> Message-ID: <63c4b367-1646-a1f0-bd7d-4483d06d665d@fceia.unr.edu.ar> Jean-Yves, >> sin(x - n*pi) > So now the problem can be how these large numbers are obtained > --> a=1e16+1 > --> a-1e16 > of course equals zero. Yes, I've thought about it and you are right, above 1e16 x is so sparse, cycle-wise speaking, that my original intention doesn't make much sense. Besides, at a sample rate of 44100, and a maximum frequency of 22050 Hz, a phase of 1e16 is reached only? after 2288 years, so it's not a practical problem! I must confess, by the way, that because of a stupid interpretation of some results on my part, I thought an error I was having was due to the slow departure from strict discrete signal periodicity but it wasn't. Sorry! Regards, Federico Miyara -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus From fmiyara at fceia.unr.edu.ar Sat Jan 9 02:02:14 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 8 Jan 2021 22:02:14 -0300 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <1422efac-55ef-6d17-2cad-b1d1a0b65957@utc.fr> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> <7dd53a5c-f95a-f10a-cda6-ef247ad2066e@utc.fr> <2012401579.312238.1610108902150.JavaMail.zimbra@insa-rennes.fr> <1422efac-55ef-6d17-2cad-b1d1a0b65957@utc.fr> Message-ID: <750df281-4b89-d5df-8ea1-a30e6af0551b@fceia.unr.edu.ar> St?phane, Thanks for your comments, I didn't know bitstring(). Regards, Federico Miyara On 08/01/2021 10:48, St?phane Mottelet wrote: > > > Le 08/01/2021 ? 13:28, Jean-Yves Baudais a ?crit?: >> ----- Original Message ----- >>> From: "St?phane Mottelet" >>> --> bitstring(%pi) >>> ans = >>> >>> "0 10000000000 1001001000011111101101010100010001000010110100011000" >>> [...] >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.exploringbinary.com/binary-converter/ >> Thank you for the recall on floating point representation and for the link (the French wiki page on IEEE 754 gives also a full and clear example). Of course we can convert float64 from finite binary representation to decimal one with more than 16 digits, but in that case the binary to float tranform is not a "relation binaire univoque" and the finite number representation problem is "put under the carpet". As I prefer one-to-one convertion and I hate carpet, I use 16 digits at most to write float64. > > There is no hiding of anything in my demonstration. I was just showing > that the figures displayed by Scilab after the 16th are computed on a > clear basis. This is a legacy choice of Scilab to allow the display of > more than 16 decimals and this can be discussed. For example, "long" > format of Matlab displays the shortest decimal number matching the > internal IEEE754 representation. > > S. > >> -- Jean-Yves >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 -- 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 sgougeon at free.fr Sat Jan 9 13:04:23 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Jan 2021 13:04:23 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: <63c4b367-1646-a1f0-bd7d-4483d06d665d@fceia.unr.edu.ar> References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> <63c4b367-1646-a1f0-bd7d-4483d06d665d@fceia.unr.edu.ar> Message-ID: Hello Federico, Le 09/01/2021 ? 01:32, Federico Miyara a ?crit?: > > Jean-Yves, > >>> sin(x - n*pi) >> So now the problem can be how these large numbers are obtained >> --> a=1e16+1 >> --> a-1e16 >> of course equals zero. > > Yes, I've thought about it and you are right, above 1e16 x is so > sparse, cycle-wise speaking, that my original intention doesn't make > much sense. MPScilab is an external module available up to Scilab 5.3 -- not recompiled since then -- allowing *arbitrary precision computations* for a short list of the mathematical functions. sin() is not in the list, but exp() is. So if this release supports complex input arguments, Euler formulae should be usable to comput trigonometric functions as well in arbitrary precision. Unlike MPScilab, DD_QD is available for Scilab 6.1. It implements floating point computations for decimal numbers encoded over 2x8 or 4x8 bytes, instead of "only" 8 bytes. sin(), cos() and tan() are among supported functions. You may try them out, out of curiosity. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Jan 9 13:11:14 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Jan 2021 13:11:14 +0100 Subject: [Scilab-users] Problems arising from truncation of %pi In-Reply-To: References: <612f5b66-b72e-5194-5bd3-a37f37b84aba@fceia.unr.edu.ar> <18f181de-0582-c968-f189-bb9a9f4190d4@insa-rennes.fr> <519909984.282175.1610099311730.JavaMail.zimbra@insa-rennes.fr> <63c4b367-1646-a1f0-bd7d-4483d06d665d@fceia.unr.edu.ar> Message-ID: Le 09/01/2021 ? 13:04, Samuel Gougeon a ?crit?: > Hello Federico, > > Le 09/01/2021 ? 01:32, Federico Miyara a ?crit?: >> >> Jean-Yves, >> >>>> sin(x - n*pi) >>> So now the problem can be how these large numbers are obtained >>> --> a=1e16+1 >>> --> a-1e16 >>> of course equals zero. >> >> Yes, I've thought about it and you are right, above 1e16 x is so >> sparse, cycle-wise speaking, that my original intention doesn't make >> much sense. > > > MPScilab is an external > module available up to Scilab 5.3 -- not recompiled since then -- > allowing *arbitrary precision computations* for a short list > > of the mathematical functions. > sin() is not in the list, but exp() is. > Sorry: all trigonometric functions are supported. I have just missed the dedicated section where they are addressed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Sun Jan 10 08:18:54 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Sun, 10 Jan 2021 04:18:54 -0300 Subject: [Scilab-users] Insufficient documentation of interp1 Message-ID: Dear All, I find that the extrapolation option for interp1 is not thoroughly documented. In the Arguments section it states, for extrapolation, (optional) string, or real value defining the yp(j) components for xp(j) values outside [x1,xn] interval. In the Description section the only string listed is "extrap" which says: the extrapolation is performed by the defined method But which is the defined method? If one selects the method "spline" it is suggested to refer to interp(), which has a specific argument (called out_mode) with several possibilities for extrapolation. These possibilities aren't accessible from the interp1() function, so it should be completely clear in its documantation which one is used. Besides, the argument extrapolation is optional but it is not clear what happens if it is not used. I suppose it is what appears under "by default", but again it says the extrapolation is performed by the defined method (for spline method) But, as already mentioned, tha spline method has more than one extrapolation strategy, which can be selected from interp but not from interp1. Finally, at least for spline it seems to be no difference between setting the extrapolation argument to "extrap" or not using it. Regards, Federico Miyara -- 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 sgougeon at free.fr Sun Jan 10 15:18:48 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Jan 2021 15:18:48 +0100 Subject: [Scilab-users] Insufficient documentation of interp1 In-Reply-To: References: Message-ID: <4e956401-9804-17d4-91de-86c001d58e7f@free.fr> Le 10/01/2021 ? 08:18, Federico Miyara a ?crit?: > > Dear All, > > I find that the extrapolation option for interp1 is not thoroughly > documented. In the Arguments section it states, for extrapolation, > > (optional) string, or real value defining the yp(j) components for > xp(j) values outside [x1,xn] interval. > > > In the Description section the only string listed is "extrap" which says: > > the extrapolation is performed by the defined method > > > But which is the defined method? , used for interpolation. > If one selects the method "spline" it is suggested to refer to > interp(), which has a specific argument (called out_mode) with several > possibilities for extrapolation. These possibilities aren't accessible > from the interp1() function, so it should be completely clear in its > documantation which one is used. Right. This is true also for interp(), for which the default extrapolation behavior is not documented. > > Besides, the argument extrapolation is optional but it is not clear > what happens if it is not used. I suppose it is what appears under "by > default", Sure > but again it says > > the extrapolation is performed by the defined method (for spline > method) > > > But, as already mentioned, tha spline method has more than one > extrapolation strategy, which can be selected from interp but not from > interp1. It is the same remark as above. > Finally, at least for spline it seems to be no difference between > setting the extrapolation argument to "extrap" or not using it. According to the current documentation, interp1(x, y, xp, "spline", "extrap")? // is equivalent to interp1(x, y, xp, "spline", "spline") // while interp1(x, y, xp, "spline")? // is as well equivalent to interp1(x, y, xp, "spline", "spline") So yes, same results are expected. But i find as well the "by default" explanation uselessly complicated: From /? by default :// //?????? the extrapolation is performed by the defined method (for spline method), and by nan for// //?????? linear and nearest methods. yp=interp1(x,y,xp,method)// /it could rather be something like /? by default :// //?????? the extrapolation is performed by spline when the interpolation is done by spline, and by nan for// //?????? linear and nearest interpolation methods.// /Samuel Gougeon / / -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Mon Jan 11 05:36:44 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Mon, 11 Jan 2021 01:36:44 -0300 Subject: [Scilab-users] Insufficient documentation of interp1 In-Reply-To: <4e956401-9804-17d4-91de-86c001d58e7f@free.fr> References: <4e956401-9804-17d4-91de-86c001d58e7f@free.fr> Message-ID: <32b31e87-810a-aed5-3377-6426e6f082af@fceia.unr.edu.ar> Samuel, Thanks for your comments, which encouraged me to submit bug #16629. Regards, Federico Miyara On 10/01/2021 11:18, Samuel Gougeon wrote: > Le 10/01/2021 ? 08:18, Federico Miyara a ?crit?: >> >> Dear All, >> >> I find that the extrapolation option for interp1 is not thoroughly >> documented. In the Arguments section it states, for extrapolation, >> >> (optional) string, or real value defining the yp(j) components >> for xp(j) values outside [x1,xn] interval. >> >> >> In the Description section the only string listed is "extrap" which says: >> >> the extrapolation is performed by the defined method >> >> >> But which is the defined method? > > , used for interpolation. > > >> If one selects the method "spline" it is suggested to refer to >> interp(), which has a specific argument (called out_mode) with >> several possibilities for extrapolation. These possibilities aren't >> accessible from the interp1() function, so it should be completely >> clear in its documantation which one is used. > > > Right. This is true also for interp(), for which the default > extrapolation behavior is not documented. > > >> >> Besides, the argument extrapolation is optional but it is not clear >> what happens if it is not used. I suppose it is what appears under >> "by default", > > > Sure > > >> but again it says >> >> the extrapolation is performed by the defined method (for spline >> method) >> >> >> But, as already mentioned, tha spline method has more than one >> extrapolation strategy, which can be selected from interp but not >> from interp1. > > > It is the same remark as above. > >> Finally, at least for spline it seems to be no difference between >> setting the extrapolation argument to "extrap" or not using it. > > According to the current documentation, > > interp1(x, y, xp, "spline", "extrap")? // is equivalent to > interp1(x, y, xp, "spline", "spline") > > // while > > interp1(x, y, xp, "spline")? // is as well equivalent to > interp1(x, y, xp, "spline", "spline") > > So yes, same results are expected. > > But i find as well the "by default" explanation uselessly complicated: > From > /? by default :// > //?????? the extrapolation is performed by the defined method (for > spline method), and by nan for// > //?????? linear and nearest methods. yp=interp1(x,y,xp,method)// > /it could rather be something like > /? by default :// > //?????? the extrapolation is performed by spline when the > interpolation is done by spline, and by nan for// > //?????? linear and nearest interpolation methods.// > > /Samuel Gougeon > > / > / > > > _______________________________________________ > 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 Jean-Yves.Baudais at insa-rennes.fr Mon Jan 18 14:54:38 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Mon, 18 Jan 2021 14:54:38 +0100 Subject: [Scilab-users] Update library and help Message-ID: Hello, When I modify the file myfunction.sci in my librairie "mylib", the update works as expected when I restard Scilab with the following lines in my .scilab file genlib(SCIHOME+"/mylib/macros") load(SCIHOME+"/mylib/macros/lib") add_help_chapter("Librairie perso",SCIHOME+"mylib/jar") I would like to do the update without Scilab exit and restart, so I do --> del_help_chapter("Librairie perso") --> clear mylib myfunction --> genlib(SCIHOME+"/mylib/macros") --> help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR"); --> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR"); --> load(SCIHOME+"/mylib/macros/lib") --> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar") Excepted genlib and xmltojar, not all the code lines work all the time (some time yes and some time no). I understand nothing because I not able to reproduce "deterministically" the success, or not! So I think my code is wrong. What is the good code to update library and help after changing a file? -- Jean-Yves Baudais From Clement.David at esi-group.com Thu Jan 21 20:29:43 2021 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Thu, 21 Jan 2021 19:29:43 +0000 Subject: [Scilab-users] {EXT} New constant %chars to get sets of symbols In-Reply-To: References: Message-ID: Hello all, For your information, this proposal has been merged and will be available on the next release. Thanks Samuel for this idea and for the code ! Regards, Cl?ment -----Original Message----- From: users On Behalf Of Dang Ngoc Chan, Christophe Sent: Monday, January 4, 2021 9:30 AM To: sgougeon at free.fr; Users mailing list for Scilab Subject: Re: [Scilab-users] {EXT} New constant %chars to get sets of symbols Hello to all (and best wishes for the new year) > De : Samuel Gougeon > Envoy? : mardi 29 d?cembre 2020 16:40 > > So, i would like to propose to add this new constant to Scilab, for the benefit of all users. > In this respect, you will find > http://bugzilla.scilab.org/attachment.cgi?id=5206 That suits me. For the time being, I'm using my personal Wikipedia page in exactly the same way https://fr.wikipedia.org/wiki/Utilisateur:Cdang/bo%C3%AEte_%C3%A0_outils#Caract%C3%A8res_sp%C3%A9ciaux so that's perfect for me. Best regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Fri Jan 22 21:04:47 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 22 Jan 2021 21:04:47 +0100 Subject: [Scilab-users] users@ interruptions? Message-ID: Hello, Has anyone received the recent message archived @ http://mailinglists.scilab.org/Scilab-users-Update-library-and-help-tt4041262.html ? I have not. BR Samuel From p.muehlmann at gmail.com Fri Jan 22 22:11:16 2021 From: p.muehlmann at gmail.com (P M) Date: Fri, 22 Jan 2021 22:11:16 +0100 Subject: [Scilab-users] users@ interruptions? In-Reply-To: References: Message-ID: Yes, I did receive that message. Best Regards, Philipp Am Fr., 22. Jan. 2021 um 21:05 Uhr schrieb Samuel Gougeon : > Hello, > Has anyone received the recent message archived @ > > http://mailinglists.scilab.org/Scilab-users-Update-library-and-help-tt4041262.html > ? > I have not. > BR > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Sat Jan 23 08:19:46 2021 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Sat, 23 Jan 2021 08:19:46 +0100 Subject: [Scilab-users] users@ interruptions? In-Reply-To: References: Message-ID: <13dfc218-e749-a170-6b4c-78b00f15db5d@laas.fr> me too! Antoine On 22/01/2021 22:11, P M wrote: > Yes, I did receive that message. > > Best Regards, > Philipp > > Am Fr., 22. Jan. 2021 um 21:05?Uhr schrieb Samuel Gougeon > >: > > Hello, > Has anyone received the recent message archived @ > http://mailinglists.scilab.org/Scilab-users-Update-library-and-help-tt4041262.html > > ? > I have not. > BR > Samuel > > _______________________________________________ > 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 fmiyara at fceia.unr.edu.ar Fri Jan 22 21:38:27 2021 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 22 Jan 2021 17:38:27 -0300 Subject: [Scilab-users] users@ interruptions? In-Reply-To: References: Message-ID: Samuel, I haven't received it either, but I did receive yours, seemingly from the users list. Regards, Federico On 22/01/2021 17:04, Samuel Gougeon wrote: > Hello, > Has anyone received the recent message archived @ > http://mailinglists.scilab.org/Scilab-users-Update-library-and-help-tt4041262.html > ? > I have not. > BR > Samuel > > _______________________________________________ > 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 cfuttrup at gmail.com Sat Jan 23 20:18:16 2021 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 23 Jan 2021 20:18:16 +0100 Subject: [Scilab-users] users@ interruptions? In-Reply-To: References: Message-ID: <1909374c-a4c9-e91c-4e1a-e84b0e49c5e4@gmail.com> Same here /Claus On 22-01-2021 21:38, Federico Miyara wrote: > > Samuel, > > I haven't received it either, but I did receive yours, seemingly from > the users list. > > Regards, > > Federico > > On 22/01/2021 17:04, Samuel Gougeon wrote: >> Hello, >> Has anyone received the recent message archived @ >> http://mailinglists.scilab.org/Scilab-users-Update-library-and-help-tt4041262.html >> ? >> I have not. >> BR >> Samuel >> >> _______________________________________________ >> 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 awanou at uic.edu Sun Jan 24 21:03:59 2021 From: awanou at uic.edu (Gerard Awanou) Date: Sun, 24 Jan 2021 14:03:59 -0600 Subject: [Scilab-users] Can't get current directory Message-ID: Hi I am running Scilab 6.1 on mac OS Catalina and I am getting the annoying message "Can't get current directory". How do I fix this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Jan 24 21:14:34 2021 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 24 Jan 2021 21:14:34 +0100 Subject: [Scilab-users] Can't get current directory In-Reply-To: References: Message-ID: Hi Gerard Can you be a little bit more specific? What are you trying to do while this message pops up? - Are you using the GUI, or are you running a script? If a script - could you share a few lines of code that reproduces the error at your end? Best regards, Claus On 24-01-2021 21:03, Gerard Awanou wrote: > Hi > > I am running Scilab 6.1 on mac OS Catalina and I am getting the > annoying message > "Can't get current directory". > > How do?I fix?this? > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From awanou at uic.edu Sun Jan 24 22:05:25 2021 From: awanou at uic.edu (Gerard Awanou) Date: Sun, 24 Jan 2021 15:05:25 -0600 Subject: [Scilab-users] Can't get current directory In-Reply-To: References: Message-ID: I am using the GUI. It starts with the message Startup execution: loading initial environment Then, I try to go to a specific directory cd Desktop I then got the error message "/Users/gerardawanou/Desktop" Can't get current directory. I did give Scilab full disc acsess On Sun, Jan 24, 2021 at 2:52 PM Heinz Nabielek wrote: > G?rard, > > I added SciLab into Security&Privacy/Privacy/Full Disk Access. > > Works fine. But furious about the way the newer Mac OSses make life ever > more difficult...... > > Does anybody have a better suggestion? > Heinz > > > > > On 24.01.2021, at 21:03, Gerard Awanou wrote: > > > > Hi > > > > I am running Scilab 6.1 on mac OS Catalina and I am getting the annoying > message > > "Can't get current directory". > > > > How do I fix this? > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at me.com Sun Jan 24 21:52:47 2021 From: heinznabielek at me.com (Heinz Nabielek) Date: Sun, 24 Jan 2021 21:52:47 +0100 Subject: [Scilab-users] Can't get current directory In-Reply-To: References: Message-ID: G?rard, I added SciLab into Security&Privacy/Privacy/Full Disk Access. Works fine. But furious about the way the newer Mac OSses make life ever more difficult...... Does anybody have a better suggestion? Heinz > On 24.01.2021, at 21:03, Gerard Awanou wrote: > > Hi > > I am running Scilab 6.1 on mac OS Catalina and I am getting the annoying message > "Can't get current directory". > > How do I fix this? > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From heinznabielek at me.com Sun Jan 24 22:21:40 2021 From: heinznabielek at me.com (Heinz Nabielek) Date: Sun, 24 Jan 2021 22:21:40 +0100 Subject: [Scilab-users] Can't get current directory In-Reply-To: References: Message-ID: Perfect for me... --> pwd ans = "/Users/heinz" --> cd Desktop ans = "/Users/heinz/Desktop" > On 24.01.2021, at 22:05, Gerard Awanou wrote: > > I am using the GUI. It starts with the message > > Startup execution: > loading initial environment > > Then, I try to go to a specific directory > > cd Desktop > > I then got the error message > > "/Users/gerardawanou/Desktop" > Can't get current directory. > > I did give Scilab full disc acsess > > On Sun, Jan 24, 2021 at 2:52 PM Heinz Nabielek wrote: > G?rard, > > I added SciLab into Security&Privacy/Privacy/Full Disk Access. > > Works fine. But furious about the way the newer Mac OSses make life ever more difficult...... > > Does anybody have a better suggestion? > Heinz > > > > > On 24.01.2021, at 21:03, Gerard Awanou wrote: > > > > Hi > > > > I am running Scilab 6.1 on mac OS Catalina and I am getting the annoying message > > "Can't get current directory". > > > > How do I fix this? > > > > _______________________________________________ > > 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 Jean-Yves.Baudais at insa-rennes.fr Mon Jan 25 08:33:06 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Mon, 25 Jan 2021 08:33:06 +0100 Subject: [Scilab-users] users@ interruptions? In-Reply-To: References: Message-ID: Hello, Le 22/01/2021 ? 21:04, Samuel Gougeon a ?crit?: > Has anyone received the recent message archived @ > http://mailinglists.scilab.org/Scilab-users-Update-library-and-help-tt4041262.html I received it, and sent it also. But I did not receive any answer yet. -- Jean-Yves From Jean-Yves.Baudais at insa-rennes.fr Mon Jan 25 08:50:38 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Mon, 25 Jan 2021 08:50:38 +0100 Subject: [Scilab-users] Can't get current directory In-Reply-To: References: Message-ID: <8d35d83a-261a-72fe-1909-c167604b7188@insa-rennes.fr> Hi, Le 24/01/2021 ? 22:05, Gerard Awanou a ?crit?: > Then, I try to go to a specific directory > cd Desktop > I then got the error message > "/Users/gerardawanou/Desktop" > Can't get current directory. > I did give Scilab full disc acsess If it was access problem, the message would be : Can't go to directory Desktop: Permission denied I can't reproduce your error message. What does --> cd /Users/gerardawanou/ give? -- Jean-Yves From stephane.mottelet at utc.fr Mon Jan 25 09:08:26 2021 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 25 Jan 2021 09:08:26 +0100 Subject: [Scilab-users] Can't get current directory In-Reply-To: References: Message-ID: <709277cf-78ab-e5fa-c2ae-2b22fa51fe16@utc.fr> Hi, First of all, can you give the build date of your version of Scilab ([a,b]=getversion()) ? Since the end of december the dmg archive of Scilab is notarized by Apple and it could change the way that disk access is granted or not. Moreover, as indicated in https://www.utc.fr/~mottelet/scilab_for_macOS.html *Problems with macOS Catalina* macOS Catalina introduces new security controls. For example, apps are now required to ask your permission before accessing parts of the drive where documents and personal files are kept. If Scilab does not show files in the FileBrowser component, you will have to enable the command-line interpreter //bin/sh/ (which is run just after you double-click on Scilab's icon) in the "Privacy" tab in the System Preferences Control Panel. This small video shows how to find the //bin/ folder by using the keys combination /Command-Shift-G/ and then drag and drop //bin/sh/ in the list of authorized applications. this is not just a matter of full disk access, /bin/sh should also be authorized. However, settings can also be different if you have disabled the System Integrity protection. S. Le 24/01/2021 ? 22:05, Gerard Awanou a ?crit?: > I am using the GUI. It starts with the message > > Startup execution: > ? loading initial environment > > Then, I try to go to a specific directory > > cd Desktop > > I then got the error message > > "/Users/gerardawanou/Desktop" > Can't get current directory. > > I did give Scilab full disc acsess > > On Sun, Jan 24, 2021 at 2:52 PM Heinz Nabielek > wrote: > > G?rard, > > I added SciLab into Security&Privacy/Privacy/Full Disk Access. > > Works fine. But furious about the way the newer Mac OSses make > life ever more difficult...... > > Does anybody have a better suggestion? > Heinz > > > > > On 24.01.2021, at 21:03, Gerard Awanou > wrote: > > > > Hi > > > > I am running Scilab 6.1 on mac OS Catalina and I am getting the > annoying message > > "Can't get current directory". > > > > How do I fix this? > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 awanou at uic.edu Mon Jan 25 14:41:19 2021 From: awanou at uic.edu (Gerard Awanou) Date: Mon, 25 Jan 2021 07:41:19 -0600 Subject: [Scilab-users] Can't get current directory In-Reply-To: <709277cf-78ab-e5fa-c2ae-2b22fa51fe16@utc.fr> References: <709277cf-78ab-e5fa-c2ae-2b22fa51fe16@utc.fr> Message-ID: Hi cd /Users/gerardawanou/ gives ans = "/Users/gerardawanou" [a,b]=getversion() gives a = "scilab-branch-6.1" b = "GCC" "x64" "release" "Jan 19 2021" "19:28:01" Adding bin/sh solves the problem. Sorry I thought that would be equivalent to full disc access. Thank you very much. Gerard On Mon, Jan 25, 2021 at 2:08 AM St?phane Mottelet wrote: > Hi, > > First of all, can you give the build date of your version of Scilab > ([a,b]=getversion()) ? Since the end of december the dmg archive of Scilab > is notarized by Apple and it could change the way that disk access is > granted or not. > > Moreover, as indicated in > https://www.utc.fr/~mottelet/scilab_for_macOS.html > > *Problems with macOS Catalina* > > macOS Catalina introduces new security controls. For example, apps are now > required to ask your permission before accessing parts of the drive where > documents and personal files are kept. If Scilab does not show files in the > FileBrowser component, you will have to enable the command-line interpreter > */bin/sh* (which is run just after you double-click on Scilab's icon) in > the "Privacy" tab in the System Preferences Control Panel. This small > video > > shows how to find the */bin* folder by using the keys combination > *Command-Shift-G* and then drag and drop */bin/sh* in the list of > authorized applications. > this is not just a matter of full disk access, /bin/sh should also be > authorized. However, settings can also be different if you have disabled > the System Integrity protection. > > S. > > Le 24/01/2021 ? 22:05, Gerard Awanou a ?crit : > > I am using the GUI. It starts with the message > > Startup execution: > loading initial environment > > Then, I try to go to a specific directory > > cd Desktop > > I then got the error message > > "/Users/gerardawanou/Desktop" > Can't get current directory. > > I did give Scilab full disc acsess > > On Sun, Jan 24, 2021 at 2:52 PM Heinz Nabielek > wrote: > >> G?rard, >> >> I added SciLab into Security&Privacy/Privacy/Full Disk Access. >> >> Works fine. But furious about the way the newer Mac OSses make life ever >> more difficult...... >> >> Does anybody have a better suggestion? >> Heinz >> >> >> >> > On 24.01.2021, at 21:03, Gerard Awanou wrote: >> > >> > Hi >> > >> > I am running Scilab 6.1 on mac OS Catalina and I am getting the >> annoying message >> > "Can't get current directory". >> > >> > How do I fix this? >> > >> > _______________________________________________ >> > users mailing list >> > users at lists.scilab.org >> > http://lists.scilab.org/mailman/listinfo/users >> >> >> > _______________________________________________ > users mailing listusers at lists.scilab.orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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)344234688http://www.utc.fr/~mottelet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jean-Yves.Baudais at insa-rennes.fr Wed Jan 27 12:42:04 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Wed, 27 Jan 2021 12:42:04 +0100 Subject: [Scilab-users] Segfault with inv, det... Message-ID: Hello, I'm still working on scilab-5.5.2 (I will update my Ubuntu but I would like to wait a bit. It's not a good time for me!). --> det(zeros(10,10)) produces Segmentation fault. There is no problem with lower matrix size, and there is no problem at all if I use "scilab -nwni" and higher matrix sizes. "scilab -debug" gives Thread 1 "scilab-bin" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff7f9f780 (LWP 14031)] 0x00007fffe8c9a343 in dgetrf_parallel () from /usr/lib/libopenblas.so.0 before stopping, but I don't know if it is relevant because there is not problem with "scilab -nwni"! Is there a simple way to solve this segfault, still using scilab-5.5.2? Many thanks, --Jean-Yves From sgougeon at free.fr Thu Jan 28 14:14:52 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Jan 2021 14:14:52 +0100 Subject: [Scilab-users] Difference between coverage and profiling functions? Message-ID: <4aea18c0-0764-0b05-5a24-32d3790a17d0@free.fr> Dear all, After removing the former set of useful and handy profiling functions used in Scilab 5, two sets of new functions dedicated to diagnosis of code performances are proposed in Scilab 6: * coverage functions: covStart, covStop, codeWrite, codeMerge * profiling functions: profileEnable, profileDisable, profileGetInfo They are gathered in the same section: https://help.scilab.org/docs/6.1.0/en_US/section_c03e1a5123246ff8c6ebb512f543c540.html I am wondering about the difference between both sets. I mean, i don't understand when using coverage functions, and when using profiling ones. By the way, when using *profile*GetInfo(), the two main fields of the result are about *coverage*: * profileGetInfo().*FunctionCoverage* * profileGetInfo().*LineCoverage* I am afraid i am lost... Are these 2 sets doing the same thing and the difference is just in the presentation of the results (then has this really deserved two distinct sets, noticeably with start and stop duplicates?), or are they really about distinct usages for distinct information? Thanks for any informed clarification about these important tools. For the time being, i am just unable to use them, and Scilab-5-like profiling results miss me. Best regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Jan 28 14:43:42 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Jan 2021 14:43:42 +0100 Subject: [Scilab-users] How to read profileGetInfo().LineCoverage results correctly? Message-ID: <9e3ace48-12a8-1992-c2dc-639db19bbe9f@free.fr> Dear all, Still about new Scilab 6 profiling capabilities: The first so-called ""Basic example" given in the documentation of? the profiling features @ https://help.scilab.org/docs/6.1.0/en_US/profile.html? is the following: // Function to be profiled function x=foo(n) if n > 0 then x = 0; for k = 1:n s = svd(rand(n, n)); x = x + s(1); end else x = []; end endfunction // Enables the profiling of the function profileEnable(foo); // Executes the function foo(200); // Returns the function profiling results prof = profileGetInfo(); Now, after https://help.scilab.org/docs/6.1.0/en_US/profileGetInfo.html we can get --> prof.LineCoverage(1) ?ans? = ? -1.???? 0.??????????????????????????????????? // function ... ?? 1. 0.6385544 // if ... *Why so long time ??* ?? 1. 0.6385513 // x = 0;??? 638 ms for a single execution ?? ?? 1. 0.6385467 // idem ?? 200.?? 1.2763477???????????????? // OK, quite expected. The strange thing is that the "x=0" time is almost the half of this time.. ?? 200.?? 0.0005116???????????????? // OK, a result more understandable than for x=0 above. ? -1.???? 0.?????????????????????????????????? // OK (end for) ? -1.???? 0.?????????????????????????????????? // OK (else) ?? 0.???? 0.??????????????????????????????????? // OK : never met ? -1.???? 0. ? -1.???? 0. Since it is presented as a basic example, it is likely error-proof. So what am i missing about how to read or interpret these results ? Thanks for any clarification. Without it, it quite hard to trust and use this important tool. Best regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From Clement.David at esi-group.com Thu Jan 28 15:05:26 2021 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Thu, 28 Jan 2021 14:05:26 +0000 Subject: [Scilab-users] How to read profileGetInfo().LineCoverage results correctly? In-Reply-To: <9e3ace48-12a8-1992-c2dc-639db19bbe9f@free.fr> References: <9e3ace48-12a8-1992-c2dc-639db19bbe9f@free.fr> Message-ID: Hello Samuel, hello all, As a reminder and behind the introduction of profile-prefixed functions the idea is to implement functions similar to the ones available within Scilab-5 to: 1. instrument a specific function 2. get the counters in a Scilab structure 3. de-instrument a specific function So depending on your use you can covStart()/profileEnable() then profileGetInfo() then covStop() /profileDisable() to retrieve information about your execution. covStart() will clear previous instrumented information whereas profileEnable() allow to append functions (same difference between covStop() and profileDisable()). In term of arguments, covStart() allow string arguments (function names) whereas profileEnable() only take functions or libraries. About numbers, well I think you get it right and I agree the lines 2,3 and 4 are not obvious ; there might be a bug there. 638ms for getting / setting a double scalar is not correct as well as the cumulated time `sum( prof(4)(1), 'r')` does not look like being in seconds (as stated in the documentation). Cl?ment From: users On Behalf Of Samuel Gougeon Sent: Thursday, January 28, 2021 2:44 PM To: International users mailing list for Scilab. Subject: [Scilab-users] How to read profileGetInfo().LineCoverage results correctly? Dear all, Still about new Scilab 6 profiling capabilities: The first so-called ""Basic example" given in the documentation of the profiling features @ https://help.scilab.org/docs/6.1.0/en_US/profile.html is the following: // Function to be profiled function x=foo(n) if n > 0 then x = 0; for k = 1:n s = svd(rand(n, n)); x = x + s(1); end else x = []; end endfunction // Enables the profiling of the function profileEnable(foo); // Executes the function foo(200); // Returns the function profiling results prof = profileGetInfo(); Now, after https://help.scilab.org/docs/6.1.0/en_US/profileGetInfo.html we can get --> prof.LineCoverage(1) ans = -1. 0. // function ... 1. 0.6385544 // if ... Why so long time ?? 1. 0.6385513 // x = 0; 638 ms for a single execution ?? 1. 0.6385467 // idem 200. 1.2763477 // OK, quite expected. The strange thing is that the "x=0" time is almost the half of this time.. 200. 0.0005116 // OK, a result more understandable than for x=0 above. -1. 0. // OK (end for) -1. 0. // OK (else) 0. 0. // OK : never met -1. 0. -1. 0. Since it is presented as a basic example, it is likely error-proof. So what am i missing about how to read or interpret these results ? Thanks for any clarification. Without it, it quite hard to trust and use this important tool. Best regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jean-Yves.Baudais at insa-rennes.fr Thu Jan 28 16:04:40 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Thu, 28 Jan 2021 16:04:40 +0100 (CET) Subject: [Scilab-users] Segfault with inv, det... In-Reply-To: <8c12ac5f-714f-5129-c22b-d4e4c845b9ad@laas.fr> References: <8c12ac5f-714f-5129-c22b-d4e4c845b9ad@laas.fr> Message-ID: <774341484.245719.1611846280263.JavaMail.zimbra@insa-rennes.fr> Hi, ----- Original Message ----- > From: "Antoine Monmayrant" >> produces Segmentation fault. > Ouch, that's bad. "I don't you make it to tell" (sorry, it's franglais) > So it only occurs for a specific size of 10x10 and with java graphical > interface enabled? No, that appends for all size equal or more than 10x10. There is not problem with lower size. > (1) Can you split your code into one part that does the heavy-lifting > (ran using "scilab -nwni") and another part that does the gui interface > (plots, uicontrols ..., ran using "scilab") ? Yes I can do that using save and load, but my code is not finish and to debug it I overuse plot... > (2) Can you install a newer scilab version? Which ubuntu are you using? Hum... 16.04. I know, I have to update. About Scilab, I also used 6.1 but not on my computer. (One day I should "rationalize" my numerical tools.) I wonder if the segfault comes from multiple CPU use, but I don't know how to check that. Thanks, --Jean-Yves From p.muehlmann at gmail.com Thu Jan 28 20:15:28 2021 From: p.muehlmann at gmail.com (P M) Date: Thu, 28 Jan 2021 20:15:28 +0100 Subject: [Scilab-users] Update library and help In-Reply-To: References: Message-ID: Hello Jean-Yves, please let me forward Samuel Gougeon's answer to your question. Best Regards, Philipp Hello Jean-Yves, Jan 18, 2021; 2:54pm jbaudais[Scilab-users] Update library and help Hello, When I modify the file myfunction.sci in my librairie "mylib", the update works as expected when I restard Scilab with the following lines in my .scilab file genlib(SCIHOME+"/mylib/macros") load(SCIHOME+"/mylib/macros/lib") add_help_chapter("Librairie perso",SCIHOME+"mylib/jar") I would like to do the update without Scilab exit and restart, so I do --> del_help_chapter("Librairie perso") --> clear mylib myfunction --> genlib(SCIHOME+"/mylib/macros") --> help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR"); --> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR"); --> load(SCIHOME+"/mylib/macros/lib") --> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar") Excepted genlib and xmltojar, not all the code lines work all the time (some time yes and some time no). Do you get any error message that tells that this line is KO while by default other ones are OK? Please note that the compilation of the documentation can (quite often) yield some errors that are NOT displayed in the Scilab console (but, on Windows, in the so-called consolebox()). After such "silent" errors, some involved files can stay locked (or simply not updated), and next instructions might look as failing. I understand nothing because I not able to reproduce "deterministically" the success, or not! So I think my code is wrong. On Windows, displaying the consolebox("on") when compiling some documentation is the best and only way i know to see where are the problems and fix them in source files. Without this, we blindly work. I hope this helps. Best regards Samuel Gougeon PS: Thanks to Philipp for forwarding this answer without breaking the thread. ---------------------------------- Am Mo., 18. Jan. 2021 um 14:55 Uhr schrieb Jean-Yves Baudais < Jean-Yves.Baudais at insa-rennes.fr>: > Hello, > > When I modify the file myfunction.sci in my librairie "mylib", the > update works as expected when I restard Scilab with the following lines > in my .scilab file > > genlib(SCIHOME+"/mylib/macros") > load(SCIHOME+"/mylib/macros/lib") > add_help_chapter("Librairie perso",SCIHOME+"mylib/jar") > > I would like to do the update without Scilab exit and restart, so I do > > --> del_help_chapter("Librairie perso") > --> clear mylib myfunction > --> genlib(SCIHOME+"/mylib/macros") > --> > > help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR"); > --> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR"); > --> load(SCIHOME+"/mylib/macros/lib") > --> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar") > > Excepted genlib and xmltojar, not all the code lines work all the time > (some time yes and some time no). I understand nothing because I not > able to reproduce "deterministically" the success, or not! So I think my > code is wrong. > > What is the good code to update library and help after changing a file? > > -- > Jean-Yves Baudais > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jean-Yves.Baudais at insa-rennes.fr Fri Jan 29 18:47:28 2021 From: Jean-Yves.Baudais at insa-rennes.fr (Jean-Yves Baudais) Date: Fri, 29 Jan 2021 18:47:28 +0100 (CET) Subject: [Scilab-users] Update library and help In-Reply-To: References: Message-ID: <651679944.417448.1611942448778.JavaMail.zimbra@insa-rennes.fr> Hello, Thanks for the message. ----- Original Message ----- > Do you get any error message that tells that this line is KO while by default > other ones are OK? > Please note that the compilation of the documentation can (quite often) yield > some errors that are [ http://bugzilla.scilab.org/7255 | NOT displayed in the > Scilab console ] (but, on Windows, in the so-called consolebox()). > After such "silent" errors, some involved files [ > http://bugzilla.scilab.org/8430 | can > stay locked ] (or simply not updated), and next instructions might look as > failing. I saw that some messages are written on XTERM and not on Scilab window. Well, I did new test with a simple function in home+"/macros" function out=testadd(a,b) // To test process for lib // // Syntax // out=testlib(a,b) // Parameters // a: scalar // b: scalar // Description // Add to scalar // Author // Me // Bibliography // Nothing out=a+b; endfunction and I generate the lib "testlib". Contrary to what I wrote, that works fine. I did mistake when I used clear. It must be --> clear testlib testadd and not --> clear testlib, testadd (testadd should also be cleared if it has been called, because load("macros/lib") is not enough to replace the function already loaded in Scilab memory, I guess) So, there is no problem with the updated library though the load is fisrtly done in .scilab. I don't need to restart Scilab to use the updated library "testlib". The problem still remains for the help: --> help_from_sci("macros","help/gl_GL") help_from_sci: Reading from directory macros help_from_sci: Processing of file: macros/testadd to help/gl_GL/testadd help_from_sci: processed 1 files. ans = "" Of course I created the help/gl_GL directory before, otherwise there is an error, and testadd.xml is created (gl is for globish, english is out of my reach) --> xmltojar("help/gl_GL","My test lib","gl_GL") jar/scilab_gl_GL_help.jar is udpated, and there is also a message in the linux XTERM with the number of generated files. --> add_help_chapter("My test lib","jar") T --> help The chapter "My test lib" is in the help window with the function testadd. --> del_help_chapter("My test lib") --> help The chapter is not in the help, as expected. --> add_help_chapter("My test lib","jar") T I change the head comment and rebuilt the help: --> help_from_sci("macros","help/gl_GL") a warning mentions that the file exists, but I choose "create anyway" --> xmltojar("help/gl_GL","My test lib","gl_GL") the files are updated --> help Could not load file: /home/jbaudais/jar/scilab_gl_GL_help.jar. Please check its contents, must be a Java Help file. Error message: Could not parse Got an IOException (JAR entry scilab_gl_GL_help/jhelpset.hs not found in /home/jbaudais/jar/scilab_gl_GL_help.jar) Parsing failed for null However, I can open the file "jhelpset.hs", so the message is wrong, the entry "scilab_gl_GL_help/jhelpset.hs" exists in the file "/home/jbaudais/jar/scilab_gl_GL_help.jar", on the filesystem of course, but Scilab use its memory (stack, heap?) and not the filesystem. Maybe the "scilab_gl_GL_help.jar" is corrupted by xmltojar on the Scilab memory. What do you think? I try --> del_help_chapter("My test lib") before modification, and --> add_help_chapter("My test lib","jar") but that change nothing. I must restart scilab and --> add_help_chapter("My test lib","jar") --> help it works fine. So, I have no solution to rebuilt the help without Scilab restart, from scratch! I think the corresponding Scilab memory is not correctly updated or is corrupted somewhere (xmltojar, add_help_chapter?), so we must restart Scilab. Do you have the same behaviour? -- Jean-Yves PS : I read the discussion about profile and did test. Is there similar tool to check memory within Scilab, or do we need to use external tools as valgrind? From sgougeon at free.fr Sat Jan 30 15:42:19 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 30 Jan 2021 15:42:19 +0100 Subject: [Scilab-users] Update library and help In-Reply-To: <651679944.417448.1611942448778.JavaMail.zimbra@insa-rennes.fr> References: <651679944.417448.1611942448778.JavaMail.zimbra@insa-rennes.fr> Message-ID: <4cf60797-6e58-a4e5-30ca-a2193cd58c5f@free.fr> Thanks Philipp, Now i can answer inside the recovered thread: Jean-Yves, i remember -- from another thread -- that you are running all this with Scilab 5.5.2. Aren't you? Le 29/01/2021 ? 18:47, Jean-Yves Baudais a ?crit?: > .../... > Well, I did new test with a simple function in home+"/macros" > > function out=testadd(a,b) > // To test process for lib > // > // Syntax > // out=testlib(a,b) > // Parameters > // a: scalar > // b: scalar > // Description > // Add to scalar > // Author > // Me > // Bibliography > // Nothing > out=a+b; > endfunction > > and I generate the lib "testlib". Contrary to what I wrote, that works fine. I did mistake when I used clear. It must be > --> clear testlib testadd > and not > --> clear testlib, testadd > (testadd should also be cleared if it has been called, because load("macros/lib") is not enough to replace the function already loaded in Scilab memory, I guess) > > So, there is no problem with the updated library though the load is fisrtly done in .scilab. I don't need to restart Scilab to use the updated library "testlib". > > The problem still remains for the help: > > --> help_from_sci("macros","help/gl_GL") > help_from_sci: Reading from directory macros > help_from_sci: Processing of file: macros/testadd to help/gl_GL/testadd > help_from_sci: processed 1 files. > ans = > "" Well, for more than 6 years that 5.5.2 was released, a lot of things were done, noticeably about fixing some help_from_sci bugs. Have you checked fixed bugs? If you installed uman, --> uman help_from_sci b If the issue is not among the fixed ones, you might send your .sci file to me by private email if you prefer, in order to reproduce the issue. Or report on bugzilla, with an attachment. By the way, why don't you edit and work directly with the xml file, instead of through the .sci header + help_from_sci? Notepad++ with its XML add-on is really nice to do that, and working with the xml allows much more things than from the heading comments (noticeably globish multilinguism :-). Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jan 31 07:23:51 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 31 Jan 2021 07:23:51 +0100 Subject: [Scilab-users] axis number style => axes.ticks_format In-Reply-To: <2b13c61a-91e2-b4c4-6464-fa00298213a2@fceia.unr.edu.ar> References: <2b13c61a-91e2-b4c4-6464-fa00298213a2@fceia.unr.edu.ar> Message-ID: Hello Federico, Le 20/08/2020 ? 18:18, Federico Miyara a ?crit?: > > Dear all, > > When plotting some data the axes present ticks labelled with numbers. > However, the digits of the different numbers on the same axis may > differ, for instance 0.8, 0.9, 1, 1.1. It would be better if the > default presentation were 0.8, 0.9, 1.0, 1.1. Is there a way to set > this as a default? Yes: --> gca().ticks_format(1) = "%.1f"; Because of the bug 14790 , new ticks labels are not rendered. But there is a work-around: --> a = gca(); a.x_ticks.labels(1) = a.x_ticks.labels(1); forces displaying new ticks labels. As an expected side effect, this automatically sets a.auto_ticks(1) = "off", but labels are well formatted. Example: x = 0:0.1:2; plot(x,sin(5*x)) a = gca(); a.ticks_format(1) = "%.1f"; a.x_ticks.labels(1) = a.x_ticks.labels(1); HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bbjmenbikokllhgm.png Type: image/png Size: 5178 bytes Desc: not available URL: From sgougeon at free.fr Sun Jan 31 07:30:46 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 31 Jan 2021 07:30:46 +0100 Subject: [Scilab-users] mprintf("%c") actual action, and vs mprintf("%s") ? In-Reply-To: <995e6d64-53ba-d3bc-3313-574f5efc1bfa@free.fr> References: <995e6d64-53ba-d3bc-3313-574f5efc1bfa@free.fr> Message-ID: Le 21/10/2020 ? 20:12, Samuel Gougeon a ?crit?: > > Hello, > > The printf_conversion page > > tells that the "/"%c" directive accepts and displays an integer value > converted to a character"/. > Yet, with Scilab 6.1.0 > > --> msprintf("AB %c\n", 3) > msprintf: Wrong number of input arguments: data doesn't fit with format. > > --> mprintf("AB %c\n", "5") > AB 5 > > --> mprintf("AB %c\n", "R") > AB R > > --> mprintf("AB %c\n", "RB") > AB RB > > So, what's the difference between the %c and %s printing formats? > In C language, *%c expects an **ascii code* and converts it into the corresponding character. But Scilab' implementation of this format does not match C's one. This is reported as bug 16564 . At least, Scilab's printf_conversion page could be more accurate. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jan 31 07:39:13 2021 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 31 Jan 2021 07:39:13 +0100 Subject: [Scilab-users] Impossibility to open a scg file with datatips recorded with scilab 5.5.2 - Bugzilla #16374 In-Reply-To: References: Message-ID: <100991a6-7bc6-dbcf-f746-113d71a329e2@free.fr> Le 16/03/2020 ? 08:10, Perrichon a ?crit?: > > Hello, > > It's no more possible to open a scg file with datatips recorded coming > from Scilab 5.5.2 to Scilab 6.1.0 > This is fortunately fixed for Scilab 6.1.1 Thanks for having reported this issue. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Jan 31 09:17:34 2021 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 31 Jan 2021 09:17:34 +0100 Subject: [Scilab-users] Impossibility to open a scg file with datatips recorded with scilab 5.5.2 - Bugzilla #16374 In-Reply-To: <100991a6-7bc6-dbcf-f746-113d71a329e2@free.fr> References: <100991a6-7bc6-dbcf-f746-113d71a329e2@free.fr> Message-ID: <3d99571e-51da-05f9-48d3-d0872215321e@gmail.com> Hi Scilabers >fixed for Scilab 6.1.1 The latest edition of Scilab is 6.1.0 online at https://www.scilab.org/ Does anyone know when the next Scilab will be released? The last edition was released on 15th February 2020. Maybe Scilab is updated annually? ... with the next one in a few short weeks? Cheers, Claus On 31-01-2021 07:39, Samuel Gougeon wrote: > Le 16/03/2020 ? 08:10, Perrichon a ?crit?: >> >> Hello, >> >> It's no more possible to open a scg file with datatips recorded >> coming from Scilab 5.5.2 to Scilab 6.1.0 >> > This is fortunately fixed for Scilab 6.1.1 > Thanks for having reported this issue. > Samuel > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: