From Christophe.Dang at sidel.com Thu Oct 1 09:05:47 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 1 Oct 2020 07:05:47 +0000 Subject: [Scilab-users] {EXT} Fwd: plotting dots vs xfarc In-Reply-To: References: Message-ID: Hello, > De la part de P M > Envoy? : mercredi 30 septembre 2020 16:50 > > exact dot-coordinates, drawn as filled circles. > All pixel coordinates of such an area would have to have exactly one single pixel value. > The resulting graphic right now is stored via: xs2bmp. > [...] > - It seems that the resulting pixels of the dot in the final image are not equally colored. I suspect the following thing: pixels are squares, not dots. So it may be that xs2bmp somehow inter-/extrapolate the colours. You then have a "leak" between the coloured pixel and its neighbours. You may try to draw squares of the exact size of the final pixel (e.g. 1/320 width and 1/200 height of the graphical window for a 320 ? 200 raster picture). You may also try some functions from the image processing toolboxes. Hope this helps Regards -- Christophe Dang Ngoc Chan cdang at wanadoo.fr 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 antoine.monmayrant at laas.fr Thu Oct 1 10:25:21 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 1 Oct 2020 10:25:21 +0200 Subject: [Scilab-users] {EXT} Fwd: plotting dots vs xfarc In-Reply-To: References: Message-ID: <68930433-0c96-028a-1a00-77aafb559434@laas.fr> On 01/10/2020 09:05, Dang Ngoc Chan, Christophe wrote: > Hello, > >> De la part de P M >> Envoy? : mercredi 30 septembre 2020 16:50 >> >> exact dot-coordinates, drawn as filled circles. >> All pixel coordinates of such an area would have to have exactly one single pixel value. >> The resulting graphic right now is stored via: xs2bmp. >> [...] >> - It seems that the resulting pixels of the dot in the final image are not equally colored. > I suspect the following thing: pixels are squares, not dots. > > So it may be that xs2bmp somehow inter-/extrapolate the colours. > You then have a "leak" between the coloured pixel and its neighbours. > > You may try to draw squares of the exact size of the final pixel (e.g. 1/320 width and 1/200 height of the graphical window for a 320 ? 200 raster picture). > > You may also try some functions from the image processing toolboxes. Well, another approach would be to: - use Matplot to display your image as a matrix, let's say [0:255] range. - modify the data in the matrix to be displayed where you went to get your "dot": like your change your data to 256 - use a colormap that is grayscale from [0:255] and has a fancy color for 256 (blue?). If you do this, you should get a perfect co-registration of your image and your "overlayed" markers. Of course, your markers will not be circular dots, just a single pixel with what I described above, but you can also generate your own shapes (bigger squares, crosses, ~circles), provided that you use an odd number of pixels. Hope it helps, Antoine > > Hope this helps > > Regards > > -- > Christophe Dang Ngoc Chan > cdang at wanadoo.fr > > 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 p.muehlmann at gmail.com Fri Oct 2 10:12:07 2020 From: p.muehlmann at gmail.com (P M) Date: Fri, 2 Oct 2020 10:12:07 +0200 Subject: [Scilab-users] {EXT} Fwd: plotting dots vs xfarc In-Reply-To: <68930433-0c96-028a-1a00-77aafb559434@laas.fr> References: <68930433-0c96-028a-1a00-77aafb559434@laas.fr> Message-ID: Hi, I think I'll modify the pixels in the image....like: img(x,y) = 255; If necessary I will also change some neighboured pixels to enlarge the "dot"-size. I do not need them blue...this was just to demonstrate that plot(x,y,'o') ( = white) and xfarc(x_arc,y_arc, w_arc,h_arc,0,360*64) (= blue) do not always plot at the same location....even all coordinates are just simple integers. So far I could see, this does not change, even if one changes the pixel_drawing_mode attribute. Thanks for your ideas, Philipp Am Do., 1. Okt. 2020 um 10:25 Uhr schrieb Antoine Monmayrant < antoine.monmayrant at laas.fr>: > > On 01/10/2020 09:05, Dang Ngoc Chan, Christophe wrote: > > Hello, > > > >> De la part de P M > >> Envoy? : mercredi 30 septembre 2020 16:50 > >> > >> exact dot-coordinates, drawn as filled circles. > >> All pixel coordinates of such an area would have to have exactly one > single pixel value. > >> The resulting graphic right now is stored via: xs2bmp. > >> [...] > >> - It seems that the resulting pixels of the dot in the final image are > not equally colored. > > I suspect the following thing: pixels are squares, not dots. > > > > So it may be that xs2bmp somehow inter-/extrapolate the colours. > > You then have a "leak" between the coloured pixel and its neighbours. > > > > You may try to draw squares of the exact size of the final pixel (e.g. > 1/320 width and 1/200 height of the graphical window for a 320 ? 200 raster > picture). > > > > You may also try some functions from the image processing toolboxes. > Well, another approach would be to: > - use Matplot to display your image as a matrix, let's say [0:255] range. > - modify the data in the matrix to be displayed where you went to get > your "dot": like your change your data to 256 > - use a colormap that is grayscale from [0:255] and has a fancy color > for 256 (blue?). > > If you do this, you should get a perfect co-registration of your image > and your "overlayed" markers. > Of course, your markers will not be circular dots, just a single pixel > with what I described above, but you can also generate your own shapes > (bigger squares, crosses, ~circles), provided that you use an odd number > of pixels. > > Hope it helps, > > Antoine > > > > > Hope this helps > > > > Regards > > > > -- > > Christophe Dang Ngoc Chan > > cdang at wanadoo.fr > > > > 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 > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cheze at cea.fr Fri Oct 2 11:48:35 2020 From: david.cheze at cea.fr (CHEZE David 227480) Date: Fri, 2 Oct 2020 09:48:35 +0000 Subject: [Scilab-users] Sci-IPOpt updated In-Reply-To: <5fd09fd5-ebc3-c30b-4b96-7e2f7c0f700d@utc.fr> References: <20200929215919.Horde.EPILtwMaWXa7KD33mo6iZVJ@webmail.utc.fr> <5152cd50-9956-f1e1-aa6e-7345e294c8d1@utc.fr> <5fd09fd5-ebc3-c30b-4b96-7e2f7c0f700d@utc.fr> Message-ID: Hi Stephane, It?s still not loaded, as you can see below the copyfile command fails. Because of previous attempt of loading the sci_ipopt module by atoms when starting Scilab? David --> path = atomsGetInstalledPath('sci_ipopt') path = "SCI\contrib\sci_ipopt\1.0" --> copyfile(fullfile(path,'thirdparty','Windows','bin','libifcoremd.dll'),... > fullfile(SCI,'bin','libifcoremd.dll')) ans = 0. --> [status,message]=copyfile(fullfile(path,'thirdparty','Windows','bin','libifcoremd.dll'),fullfile(SCI,'bin','libifcoremd.dll')) status = 0. message = " Le processus ne peut pas acc?der au fichier car ce fichier est utilis? par un autre processus. De : users De la part de St?phane Mottelet Envoy? : mercredi 30 septembre 2020 19:27 ? : users at lists.scilab.org Objet : Re: [Scilab-users] Sci-IPOpt updated Ok. I am sorry for this mistake, the identifier is wrong in the windows_ifort_fix.sce script. I have updated the binary package at the Atoms portal but you should be fine after replacing atomsGetInstalledPath('Sci-IPopt') by atomsGetInstalledPath('sci_ipopt') in the script. S. Le 30/09/2020 ? 17:57, CHEZE David 227480 a ?crit : libifcoremd.dll, intel fortan comiler RTL (thread-safe), 27/10/2017 17:32, version fichier 14.0.103.103,produit intel visual fortran compiler, version produit 14.0 update A De : users De la part de St?phane Mottelet Envoy? : mercredi 30 septembre 2020 16:48 ? : users at lists.scilab.org Objet : Re: [Scilab-users] Sci-IPOpt updated That's what the windows_ifort_fix.sce script is supposed to fix. Can you verify the libifcoremd.dll (date, size) in the bin/ folder of your Scilab ? Le 30/09/2020 ? 15:41, CHEZE David 227480 a ?crit : Hi, It fails equally with the following windows error message box : Scilex.exe Point d?entr?e introuvable Le point d?entr?e de proc?dure for_realloc_lhs est introuvable dans la biblioth?que de liens dynamiques \AppData\Local\scilab-6.1.0\contrib\sci_ipopt\1.0\thirdparty\Windows\bin\ipopt-3.dll Let me know if I can help further in any way. Regards, David De : users De la part de St?phane Mottelet Envoy? : mercredi 30 septembre 2020 12:14 ? : users at lists.scilab.org Objet : Re: [Scilab-users] Sci-IPOpt updated Hi, Can you restart Scilab but in console mode ? You should have a dialog box giving more information about the link problem) S. Le 30/09/2020 ? 09:51, CHEZE David 227480 a ?crit : Hello St?phane, I?ve just make an attempt to install the Sci-IPOpt toolbox from atoms on windows_10_64bits OS, following your recommendations below. I got message that the fix (after exec windows_ifort_fix.sce) was successfully applied but once I restart Scilab (6.1.0 release), the module fails to load with the message: Start SciIPOpt Load gateways atomsLoad : Une erreur est survenue au cours du chargement de 'sci_ipopt-1.0': exec: error on line #18: "link : La biblioth?que partag?e n'a pas ?t? charg?e: Unknown Error" nb: I?ve quite recent Intel visual fortran composer xe (2018) installed on this machine which may interfere with the fix ? Regards, David De : users De la part de stephane.mottelet at utc.fr Envoy? : mardi 29 septembre 2020 21:59 ? : Users mailing list for Scilab Objet : Re: [Scilab-users] Sci-IPOpt updated Hello, This year Christmas arrived in september: although Windows really sucks, I managed with the help of Antoine to build a version of the toolbox for this operating system. Windows users should be able to install sci_ipopt from the atoms GUI (Optimization category). However, there is a little glitch because the Intel Fortran runtime bundled with Scilab is a little bit outdated and this is a problem for the thirdparty ipopt DLL. Hence, once you have installed the toolbox, loading it after a restart will fail. Hopefully there is an easy fix and I have bundled a little script dedicated to this. Hence, after the Scilab restart and the failing Sci-IPOpt load, just type the following at Scilab's prompt: --> cd(atomsGetInstalledPath("sci_ipopt")) --> exec windows_ifort_fix.sce then restart Scilab: the toolbox should load just fine (run one of the demos to make sure that everything works). The Intel Fortran runtime will surely be updated for the next Scilab release and this fix won't be anymore necessary. S. St?phane Mottelet > a ?crit : Hello, The Sci-IPOpt toolbox has been updated and now work (smoothly) for Scilab 6.1. Users needing a serious tool for doing optimization with general nonlinear constraint should give it a try. There is no Windows version for the moment but I hope we will have one before Christmas ! Enjoy ! -- 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.orghttps://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 _______________________________________________ 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: From stephane.mottelet at utc.fr Fri Oct 2 12:20:05 2020 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Fri, 2 Oct 2020 12:20:05 +0200 Subject: [Scilab-users] Sci-IPOpt updated Message-ID: <611EE412-A444-462B-9333-6B6F0B8625C4@utc.fr> Can you try to copy the file manually after exiting from Scilab ? > Le 2 oct. 2020 ? 11:49, CHEZE David 227480 a ?crit : > From maxime.zhu at live.fr Sat Oct 3 17:42:37 2020 From: maxime.zhu at live.fr (Maxime2) Date: Sat, 3 Oct 2020 08:42:37 -0700 (MST) Subject: [Scilab-users] unable to download files Message-ID: <1601739757937-0.post@n3.nabble.com> Apparently, I'm unable to download the little AppleScript or basically anything from the website. I tested on several other macbooks on Catalina. Any fixes or help in mind ? -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From lcabey at live.co.uk Mon Oct 5 04:52:45 2020 From: lcabey at live.co.uk (LECABEY) Date: Sun, 4 Oct 2020 19:52:45 -0700 (MST) Subject: [Scilab-users] ilib_build: "cppsci" format is not supported by your compiler. Message-ID: <1601866365667-0.post@n3.nabble.com> Hi,I'd like to use the "*cppsci*" interface on gateway functions but I get the following error:*/ilib_build: "cppsci" format is not supported by your compile./*I'm using the mingw toolbox with the recommendedd gcc 8.3 x64 compiler on windows 10.The contents of *ilib_language()* scilab function are shown below. As you can see *"cppsci"* is missing./function l = ilib_language() l = ["cmex","fmex","Fmex","csci","csci6","fsci","direct"];endfunction/Any advice on what I need to do to enable the use of the "cppsci" gateway interface?CheersLE -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Oct 5 11:15:02 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 5 Oct 2020 11:15:02 +0200 Subject: [Scilab-users] unable to download files In-Reply-To: <1601739757937-0.post@n3.nabble.com> References: <1601739757937-0.post@n3.nabble.com> Message-ID: <3ce3deb8-59b8-fae5-ee83-d0e5e8700285@utc.fr> The downloads seems to be OK now on www.utc.fr S. Le 03/10/2020 ? 17:42, Maxime2 a ?crit?: > download fail Apparently, I'm unable to download the little > AppleScript or basically anything from the website. I tested on > several other macbooks on Catalina. Any fixes or help in mind ? > ------------------------------------------------------------------------ > Sent from the Scilab users - Mailing Lists Archives mailing list > archive > > at Nabble.com. > > _______________________________________________ > 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 stepan.podhorsky at gmail.com Tue Oct 6 10:22:20 2020 From: stepan.podhorsky at gmail.com (Steve) Date: Tue, 6 Oct 2020 01:22:20 -0700 (MST) Subject: [Scilab-users] C code in Xcos simulation In-Reply-To: <1601103801079-0.post@n3.nabble.com> References: <1601103801079-0.post@n3.nabble.com> Message-ID: <1601972540055-0.post@n3.nabble.com> The answer is that it is possible to have multiple instances of one block containing the c code in a given simulation. I have got up and running that with the CBLOCK4 block and usage of the /work/ pointer in the /scicos_block/ structure. This pointer contains address somewhere on the heap where the persistent data of the CBLOCK4 are stored. Below is the modification of the code above #include "scicos_block4.h" #define U ((double *)GetRealInPortPtrs(block, 1)) #define Y ((double *)GetRealOutPortPtrs(block, 1)) // parameters #define Tu (GetRparPtrs(block)[0]) #define Td (GetRparPtrs(block)[1]) #define T (GetRparPtrs(block)[2]) typedef struct { double target; double inputDelta; double out; }Ramp_work; void Ramp(scicos_block *block, int flag) { Ramp_work *work; if(flag == 4) { /* init */ if((*(block->work) = (Ramp_work*)scicos_malloc(sizeof(Ramp_work))) == NULL) { set_block_error(-16); return; } work = *(block->work); work->target = 0; work->inputDelta = 0; work->out = 0; } else if(flag == 1) { work = *(block->work); /* output computation */ if(U[0] != work->target) { work->target = U[0]; if(work->target - Y[0] < 0) { work->inputDelta = Y[0] - work->target; } else { work->inputDelta = work->target - Y[0]; } } if(work->target > Y[0]) { work->out += work->inputDelta*T/Tu; if(work->out > work->target) { work->out = work->target; } } else if(work->target < Y[0]) { work->out -= work->inputDelta*T/Td; if(work->out < work->target) { work->out = work->target; } } Y[0] = work->out; } else if (flag == 5) { /* ending */ scicos_free(*(block->work)); } } -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From stepan.podhorsky at gmail.com Tue Oct 6 10:34:38 2020 From: stepan.podhorsky at gmail.com (Steve) Date: Tue, 6 Oct 2020 01:34:38 -0700 (MST) Subject: [Scilab-users] PID controller simulation in Scilab/Xcos In-Reply-To: <1600252984695-0.post@n3.nabble.com> References: <1600252984695-0.post@n3.nabble.com> Message-ID: <1601973278118-0.post@n3.nabble.com> I have just revealed that the results are in accordance with each other in case I use one common clock source for controlling of the timing of the whole simulation. Based on that finding a doubt regarding the timing of my simulation popped up in my mind. Can anybody give me an advice how to correctly control timing of my simulation i.e simulation containing discrete system in parallel to continuous system with sample and hold block as an interface between them. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From acj119 at nifty.com Wed Oct 7 04:24:25 2020 From: acj119 at nifty.com (jaipur) Date: Tue, 6 Oct 2020 19:24:25 -0700 (MST) Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1573394574575-0.post@n3.nabble.com> References: <1573304375900-0.post@n3.nabble.com> <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> <1573307358434-0.post@n3.nabble.com> <1573307988786-0.post@n3.nabble.com> <16e50892cf9.b9282649153604.3801530889688600942@bytecode-asia.com> <1573364218730-0.post@n3.nabble.com> <78f966f1-462a-a964-ebd3-9d4f2c9c0436@free.fr> <1573389961407-0.post@n3.nabble.com> <1573394574575-0.post@n3.nabble.com> Message-ID: <1602037465640-0.post@n3.nabble.com> Hello, Following your suggestion, gce().clip_state = 'off' could succeed zoom in. While I continue to zoom in to watch the detail of a hill top, the top is clipped by another something. Could someone teach me the cause of this clipping and how to avoid it? -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From antoine.monmayrant at laas.fr Wed Oct 7 08:44:23 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 7 Oct 2020 08:44:23 +0200 Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1602037465640-0.post@n3.nabble.com> References: <1573304375900-0.post@n3.nabble.com> <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> <1573307358434-0.post@n3.nabble.com> <1573307988786-0.post@n3.nabble.com> <16e50892cf9.b9282649153604.3801530889688600942@bytecode-asia.com> <1573364218730-0.post@n3.nabble.com> <78f966f1-462a-a964-ebd3-9d4f2c9c0436@free.fr> <1573389961407-0.post@n3.nabble.com> <1573394574575-0.post@n3.nabble.com> <1602037465640-0.post@n3.nabble.com> Message-ID: <31b132d5-b249-16c6-adba-aa23723e2d45@laas.fr> Le 07/10/2020 ? 04:24, jaipur a ?crit?: > Hello, > > Following your suggestion, gce().clip_state = 'off' could succeed zoom in. > > While I continue to zoom in to watch the detail of a hill top, the top is > clipped by another something. > Could someone teach me the cause of this clipping and how to avoid it? > > Hello, It seems that you are zooming in both x,y and z. The clipping you see for the hill (and similarly for the valley in the upper left corner is likely due to your curve going beyond the zoomed z axis. Zooming in 3D on a 2D screen is not that straight forward. As a text-based alternative, you can try to set gca().data_bounds by hand. Antoine > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Sun Oct 11 14:01:15 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 11 Oct 2020 14:01:15 +0200 Subject: [Scilab-users] xsave or save In-Reply-To: <6c42c750-7959-1a15-e462-e9a07b8ae880@laas.fr> References: <6c42c750-7959-1a15-e462-e9a07b8ae880@laas.fr> Message-ID: Hello Antoine, Le 28/09/2020 ? 17:20, Antoine Monmayrant a ?crit?: > Hello all, > > Just wondering what is the normal way to save graphics nowadays. > I just had a look at 'help xsave' to see whether it is deprecated or > whether this is the official way to do it. > This page reads: > > "For graphics xsave(file_name,win_num) use preferably > save(file_name,scf(win_num))." This indication is clearly outdated, since save() now processes only named variables: expressions like "scf(win_num)" are no longer accepted . I agree that the motivation for using xsave() instead of save is quite obscur. Maybe there were some good reasons to implement a specific function (or may be not), but today xsave(filename, idf) appears to be only a shortcut for idf = findobj("figure_id",idf); save(filename, "idf") clear idf Is it really worth having a specific public function, instead for instance of opening the overload for save(filemane, figure_handle) ? > Hmm, I don't get it. > Does it mean that I should better use "save(file_name,scf(win_num))" > for graphics objects? > If it's the case, what is the point of xsave? > > I'm a bit lost... If you do not think it's worth keeping xsave, please do not hesitate asking on bugzilla for obsoleting it and opening save() to overloading according to it's 2nd argument. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From arvid at softube.com Fri Oct 16 13:35:13 2020 From: arvid at softube.com (=?utf-8?B?QXJ2aWQgUm9zw6lu?=) Date: Fri, 16 Oct 2020 11:35:13 +0000 Subject: [Scilab-users] Scilab 6 - Problem with scope and nested lists Message-ID: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> Hi! We have found a tricky issue when moving over from Scilab 5 to Scilab 6 in my organization. We have a lot of code which works with nested lists, and functions modifying those lists. However, when a function is called with some nested lists as an input argument, the body of that function can change the value of the variable in the calling scope. This was not the case in Scilab 5, and the issue is super tricky to hunt down in our quite extensive code base. Below is a short example of the problem, and how to reproduce it. I have also filed a bug report here: https://bugzilla.scilab.org/show_bug.cgi?id=16556 Is anyone else seeing this problem? And do you have any workarounds or other suggestions? Cheers, Arvid ------ // Define variables testArray = list(); for i=1:1:10 testArray($+1) = list(); for j=1:1:10 testArray(i)($+1) = []; testArray(i)(j).testMember = 1; end end testArrayOrig = testArray; // Define functions function outArray = testFunc(inArray) for i=1:1:10 for j=1:1:10 inArray(i)(j).testMember = 5 end end outArray = inArray; endfunction // Send the variable as argument to the function if %t testArrayOut = testFunc2(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end end -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Oct 16 13:39:51 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 16 Oct 2020 13:39:51 +0200 Subject: [Scilab-users] Scilab 6 - Problem with scope and nested lists In-Reply-To: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> References: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> Message-ID: Hello, I think that this is a sufficiently serious issue to diserve a report in bugzilla.scilab.org. But could you prepare a more compact example ? S. Le 16/10/2020 ? 13:35, Arvid Ros?n a ?crit?: > > Hi! > > We have found a tricky issue when moving over from Scilab 5 to Scilab > 6 in my organization. We have a lot of code which works with nested > lists, and functions modifying those lists. However, when a function > is called with some nested lists as an input argument, the body of > that function can change the value of the variable in the calling > scope. This was not the case in Scilab 5, and the issue is super > tricky to hunt down in our quite extensive code base. Below is a short > example of the problem, and how to reproduce it. > > I have also filed a bug report here: > https://bugzilla.scilab.org/show_bug.cgi?id=16556 > > Is anyone else seeing this problem? And do you have any workarounds or > other suggestions? > > Cheers, > > Arvid > > ------ > > // Define variables > > testArray = list(); > > for i=1:1:10 > > ??? testArray($+1) = list(); > > ??? for j=1:1:10 > > ??????? testArray(i)($+1) = []; > > ??????? testArray(i)(j).testMember = 1; > > ??? end > > end > > testArrayOrig = testArray; > > // Define functions > > function outArray = testFunc(inArray) > > ??? for i=1:1:10 > > ??????? for j=1:1:10 > > ??????????? inArray(i)(j).testMember = 5 > > ??????? end > > ??? end > > ??? outArray = inArray; > > endfunction > > // Send the variable as argument to the function > > if %t > > ??? testArrayOut = testFunc2(testArray); > > ??? if testArrayOut(1)(1).testMember == testArray(1)(1).testMember > > ??????? error("Error! inputArgument was changed by function"); > > ??? end > > end > > > _______________________________________________ > 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 arvid at softube.com Fri Oct 16 14:15:50 2020 From: arvid at softube.com (=?utf-8?B?QXJ2aWQgUm9zw6lu?=) Date: Fri, 16 Oct 2020 12:15:50 +0000 Subject: [Scilab-users] Scilab 6 - Problem with scope and nested lists In-Reply-To: References: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> Message-ID: <285DA550-BF4C-4446-8E9D-E49C07DCE5D3@softube.com> Hi, I already filed a report here: https://bugzilla.scilab.org/show_bug.cgi?id=16556 Do you want a more compact example than that? Here is an even more slimmed version. Cheers, Arvid ---------- // Define variables testArray = list(list([])); testArray(1)(1).testMember = 1; testArrayOrig = testArray; // Define function function outArray = testFunc(inArray) inArray(1)(1).testMember = 5 outArray = inArray; endfunction // Send the variable as argument to the function testArrayOut = testFunc(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end -- From: Scilab Users List on behalf of St?phane Mottelet Reply to: Users mailing list for Scilab Date: Friday, 16 October 2020 at 13:40 To: "users at lists.scilab.org" Subject: Re: [Scilab-users] Scilab 6 - Problem with scope and nested lists Hello, I think that this is a sufficiently serious issue to diserve a report in bugzilla.scilab.org. But could you prepare a more compact example ? S. Le 16/10/2020 ? 13:35, Arvid Ros?n a ?crit : Hi! We have found a tricky issue when moving over from Scilab 5 to Scilab 6 in my organization. We have a lot of code which works with nested lists, and functions modifying those lists. However, when a function is called with some nested lists as an input argument, the body of that function can change the value of the variable in the calling scope. This was not the case in Scilab 5, and the issue is super tricky to hunt down in our quite extensive code base. Below is a short example of the problem, and how to reproduce it. I have also filed a bug report here: https://bugzilla.scilab.org/show_bug.cgi?id=16556 Is anyone else seeing this problem? And do you have any workarounds or other suggestions? Cheers, Arvid ------ // Define variables testArray = list(); for i=1:1:10 testArray($+1) = list(); for j=1:1:10 testArray(i)($+1) = []; testArray(i)(j).testMember = 1; end end testArrayOrig = testArray; // Define functions function outArray = testFunc(inArray) for i=1:1:10 for j=1:1:10 inArray(i)(j).testMember = 5 end end outArray = inArray; endfunction // Send the variable as argument to the function if %t testArrayOut = testFunc2(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end end _______________________________________________ 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 stephane.mottelet at utc.fr Fri Oct 16 14:19:48 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 16 Oct 2020 14:19:48 +0200 Subject: [Scilab-users] Scilab 6 - Problem with scope and nested lists In-Reply-To: <285DA550-BF4C-4446-8E9D-E49C07DCE5D3@softube.com> References: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> <285DA550-BF4C-4446-8E9D-E49C07DCE5D3@softube.com> Message-ID: <0406b159-b52e-370f-a4cc-81adede63f55@utc.fr> Your test mix struct and lists can you reproduce it without using a struct ? Le 16/10/2020 ? 14:15, Arvid Ros?n a ?crit?: > > Hi, > > I already filed a report here: > > https://bugzilla.scilab.org/show_bug.cgi?id=16556 > > > Do you want a more compact example than that? > > Here is an even more slimmed version. > > Cheers, > > Arvid > > ---------- > > // Define variables > > testArray = list(list([])); > > testArray(1)(1).testMember = 1; > > testArrayOrig = testArray; > > // Define function > > function outArray = testFunc(inArray) > > inArray(1)(1).testMember = 5 > > outArray = inArray; > > endfunction > > // Send the variable as argument to the function > > testArrayOut = testFunc(testArray); > > if testArrayOut(1)(1).testMember == testArray(1)(1).testMember > > error("Error! inputArgument was changed by function"); > > end > > -- > > *From: *Scilab Users List on behalf > of St?phane Mottelet > *Reply to: *Users mailing list for Scilab > *Date: *Friday, 16 October 2020 at 13:40 > *To: *"users at lists.scilab.org" > *Subject: *Re: [Scilab-users] Scilab 6 - Problem with scope and nested > lists > > Hello, > > I think that this is a sufficiently serious issue to diserve a report > in bugzilla.scilab.org. But could you prepare a more compact example ? > > S. > > Le 16/10/2020 ? 13:35, Arvid Ros?n a ?crit?: > > Hi! > > We have found a tricky issue when moving over from Scilab 5 to > Scilab 6 in my organization. We have a lot of code which works > with nested lists, and functions modifying those lists. However, > when a function is called with some nested lists as an input > argument, the body of that function can change the value of the > variable in the calling scope. This was not the case in Scilab 5, > and the issue is super tricky to hunt down in our quite extensive > code base. Below is a short example of the problem, and how to > reproduce it. > > I have also filed a bug report here: > https://bugzilla.scilab.org/show_bug.cgi?id=16556 > > > Is anyone else seeing this problem? And do you have any > workarounds or other suggestions? > > Cheers, > > Arvid > > ------ > > // Define variables > > testArray = list(); > > for i=1:1:10 > > testArray($+1) = list(); > > ??? for j=1:1:10 > > testArray(i)($+1) = []; > > testArray(i)(j).testMember = 1; > > ??? end > > end > > testArrayOrig = testArray; > > // Define functions > > function outArray = testFunc(inArray) > > ??? for i=1:1:10 > > ??????? for j=1:1:10 > > inArray(i)(j).testMember = 5 > > ??????? end > > ??? end > > ??? outArray = inArray; > > endfunction > > // Send the variable as argument to the function > > if %t > > testArrayOut = testFunc2(testArray); > > ??? if testArrayOut(1)(1).testMember == testArray(1)(1).testMember > > error("Error! inputArgument was changed by function"); > > ??? end > > end > > > > _______________________________________________ > > 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: From arvid at softube.com Fri Oct 16 14:55:33 2020 From: arvid at softube.com (=?utf-8?B?QXJ2aWQgUm9zw6lu?=) Date: Fri, 16 Oct 2020 12:55:33 +0000 Subject: [Scilab-users] Scilab 6 - Problem with scope and nested lists In-Reply-To: <0406b159-b52e-370f-a4cc-81adede63f55@utc.fr> References: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> <285DA550-BF4C-4446-8E9D-E49C07DCE5D3@softube.com> <0406b159-b52e-370f-a4cc-81adede63f55@utc.fr> Message-ID: Hi, The minimal case I posted mimics the situation where the problem was found. Removing the struct, and using just to levels of lists, does not trigger the same problem. I have played around with this a bit, and yet haven?t found a smaller case to trigger the issue. Cheers, Arvid From: Scilab Users List on behalf of St?phane Mottelet Reply to: Users mailing list for Scilab Date: Friday, 16 October 2020 at 14:20 To: "users at lists.scilab.org" Subject: Re: [Scilab-users] Scilab 6 - Problem with scope and nested lists Your test mix struct and lists can you reproduce it without using a struct ? Le 16/10/2020 ? 14:15, Arvid Ros?n a ?crit : Hi, I already filed a report here: https://bugzilla.scilab.org/show_bug.cgi?id=16556 Do you want a more compact example than that? Here is an even more slimmed version. Cheers, Arvid ---------- // Define variables testArray = list(list([])); testArray(1)(1).testMember = 1; testArrayOrig = testArray; // Define function function outArray = testFunc(inArray) inArray(1)(1).testMember = 5 outArray = inArray; endfunction // Send the variable as argument to the function testArrayOut = testFunc(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end -- From: Scilab Users List on behalf of St?phane Mottelet Reply to: Users mailing list for Scilab Date: Friday, 16 October 2020 at 13:40 To: "users at lists.scilab.org" Subject: Re: [Scilab-users] Scilab 6 - Problem with scope and nested lists Hello, I think that this is a sufficiently serious issue to diserve a report in bugzilla.scilab.org. But could you prepare a more compact example ? S. Le 16/10/2020 ? 13:35, Arvid Ros?n a ?crit : Hi! We have found a tricky issue when moving over from Scilab 5 to Scilab 6 in my organization. We have a lot of code which works with nested lists, and functions modifying those lists. However, when a function is called with some nested lists as an input argument, the body of that function can change the value of the variable in the calling scope. This was not the case in Scilab 5, and the issue is super tricky to hunt down in our quite extensive code base. Below is a short example of the problem, and how to reproduce it. I have also filed a bug report here: https://bugzilla.scilab.org/show_bug.cgi?id=16556 Is anyone else seeing this problem? And do you have any workarounds or other suggestions? Cheers, Arvid ------ // Define variables testArray = list(); for i=1:1:10 testArray($+1) = list(); for j=1:1:10 testArray(i)($+1) = []; testArray(i)(j).testMember = 1; end end testArrayOrig = testArray; // Define functions function outArray = testFunc(inArray) for i=1:1:10 for j=1:1:10 inArray(i)(j).testMember = 5 end end outArray = inArray; endfunction // Send the variable as argument to the function if %t testArrayOut = testFunc2(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end end _______________________________________________ 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: From stephane.mottelet at utc.fr Fri Oct 16 15:14:19 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 16 Oct 2020 15:14:19 +0200 Subject: [Scilab-users] Scilab 6 - Problem with scope and nested lists In-Reply-To: References: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> <285DA550-BF4C-4446-8E9D-E49C07DCE5D3@softube.com> <0406b159-b52e-370f-a4cc-81adede63f55@utc.fr> Message-ID: OK. To me, this is a problem in the recursive insertion, which is built-in for most native types since Scilab 6. S. Le 16/10/2020 ? 14:55, Arvid Ros?n a ?crit?: > > Hi, > > The minimal case I posted mimics the situation where the problem was > found. Removing the struct, and using just to levels of lists, does > not trigger the same problem. I have played around with this a bit, > and yet haven?t found a smaller case to trigger the issue. > > Cheers, > > Arvid > > *From: *Scilab Users List on behalf > of St?phane Mottelet > *Reply to: *Users mailing list for Scilab > *Date: *Friday, 16 October 2020 at 14:20 > *To: *"users at lists.scilab.org" > *Subject: *Re: [Scilab-users] Scilab 6 - Problem with scope and nested > lists > > Your test mix struct and lists can you reproduce it without using a > struct ? > > Le 16/10/2020 ? 14:15, Arvid Ros?n a ?crit?: > > Hi, > > I already filed a report here: > > https://bugzilla.scilab.org/show_bug.cgi?id=16556 > > > Do you want a more compact example than that? > > Here is an even more slimmed version. > > > Cheers, > > Arvid > > ---------- > > // Define variables > > testArray = list(list([])); > > testArray(1)(1).testMember = 1; > > testArrayOrig = testArray; > > // Define function > > function outArray = testFunc(inArray) > > ??? inArray(1)(1).testMember = 5 > > ??? outArray = inArray; > > endfunction > > // Send the variable as argument to the function > > testArrayOut = testFunc(testArray); > > if testArrayOut(1)(1).testMember == testArray(1)(1).testMember > > ??? error("Error! inputArgument was changed by function"); > > end > > -- > > *From: *Scilab Users List > on behalf of St?phane > Mottelet > *Reply to: *Users mailing list for Scilab > > *Date: *Friday, 16 October 2020 at 13:40 > *To: *"users at lists.scilab.org" > > *Subject: *Re: [Scilab-users] Scilab 6 - Problem with scope and > nested lists > > Hello, > > I think that this is a sufficiently serious issue to diserve a > report in bugzilla.scilab.org. But could you prepare a more > compact example ? > > S. > > Le 16/10/2020 ? 13:35, Arvid Ros?n a ?crit?: > > Hi! > > We have found a tricky issue when moving over from Scilab 5 to > Scilab 6 in my organization. We have a lot of code which works > with nested lists, and functions modifying those lists. > However, when a function is called with some nested lists as > an input argument, the body of that function can change the > value of the variable in the calling scope. This was not the > case in Scilab 5, and the issue is super tricky to hunt down > in our quite extensive code base. Below is a short example of > the problem, and how to reproduce it. > > I have also filed a bug report here: > https://bugzilla.scilab.org/show_bug.cgi?id=16556 > > > Is anyone else seeing this problem? And do you have any > workarounds or other suggestions? > > Cheers, > > Arvid > > ------ > > // Define variables > > testArray = list(); > > for i=1:1:10 > > testArray($+1) = list(); > > ??? for j=1:1:10 > > testArray(i)($+1) = []; > > testArray(i)(j).testMember = 1; > > ??? end > > end > > testArrayOrig = testArray; > > // Define functions > > function outArray = testFunc(inArray) > > ??? for i=1:1:10 > > for j=1:1:10 > > inArray(i)(j).testMember = 5 > > end > > ??? end > > outArray = inArray; > > endfunction > > // Send the variable as argument to the function > > if %t > > testArrayOut = testFunc2(testArray); > > ??? if testArrayOut(1)(1).testMember == testArray(1)(1).testMember > > error("Error! inputArgument was changed by function"); > > ??? end > > end > > > > > _______________________________________________ > > 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 > > --> > > > _______________________________________________ > 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 arvid at softube.com Fri Oct 16 15:55:51 2020 From: arvid at softube.com (=?utf-8?B?QXJ2aWQgUm9zw6lu?=) Date: Fri, 16 Oct 2020 13:55:51 +0000 Subject: [Scilab-users] Scilab 6 - Problem with scope and nested lists In-Reply-To: References: <11EEE9A2-23E6-47E5-96A1-AC3DD5561DA4@contoso.com> <285DA550-BF4C-4446-8E9D-E49C07DCE5D3@softube.com> <0406b159-b52e-370f-a4cc-81adede63f55@utc.fr> Message-ID: <209C2AAF-FD30-4DA0-A5CB-B55B861A687F@softube.com> Hi again, I believe you are onto something. This actually works! Cheers, Arvid --- // Define variables testArray = list(list([])); testArray(1)(1).testMember = 1; testArrayOrig = testArray; // Define function function outArray = testFunc(inArray) X = inArray(1)(1); X.testMember = 5; inArray(1)(1) = X; outArray = inArray; endfunction // Send the variable as argument to the function testArrayOut = testFunc(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end From: Scilab Users List on behalf of St?phane Mottelet Reply to: Users mailing list for Scilab Date: Friday, 16 October 2020 at 15:14 To: "users at lists.scilab.org" Subject: Re: [Scilab-users] Scilab 6 - Problem with scope and nested lists OK. To me, this is a problem in the recursive insertion, which is built-in for most native types since Scilab 6. S. Le 16/10/2020 ? 14:55, Arvid Ros?n a ?crit : Hi, The minimal case I posted mimics the situation where the problem was found. Removing the struct, and using just to levels of lists, does not trigger the same problem. I have played around with this a bit, and yet haven?t found a smaller case to trigger the issue. Cheers, Arvid From: Scilab Users List on behalf of St?phane Mottelet Reply to: Users mailing list for Scilab Date: Friday, 16 October 2020 at 14:20 To: "users at lists.scilab.org" Subject: Re: [Scilab-users] Scilab 6 - Problem with scope and nested lists Your test mix struct and lists can you reproduce it without using a struct ? Le 16/10/2020 ? 14:15, Arvid Ros?n a ?crit : Hi, I already filed a report here: https://bugzilla.scilab.org/show_bug.cgi?id=16556 Do you want a more compact example than that? Here is an even more slimmed version. Cheers, Arvid ---------- // Define variables testArray = list(list([])); testArray(1)(1).testMember = 1; testArrayOrig = testArray; // Define function function outArray = testFunc(inArray) inArray(1)(1).testMember = 5 outArray = inArray; endfunction // Send the variable as argument to the function testArrayOut = testFunc(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end -- From: Scilab Users List on behalf of St?phane Mottelet Reply to: Users mailing list for Scilab Date: Friday, 16 October 2020 at 13:40 To: "users at lists.scilab.org" Subject: Re: [Scilab-users] Scilab 6 - Problem with scope and nested lists Hello, I think that this is a sufficiently serious issue to diserve a report in bugzilla.scilab.org. But could you prepare a more compact example ? S. Le 16/10/2020 ? 13:35, Arvid Ros?n a ?crit : Hi! We have found a tricky issue when moving over from Scilab 5 to Scilab 6 in my organization. We have a lot of code which works with nested lists, and functions modifying those lists. However, when a function is called with some nested lists as an input argument, the body of that function can change the value of the variable in the calling scope. This was not the case in Scilab 5, and the issue is super tricky to hunt down in our quite extensive code base. Below is a short example of the problem, and how to reproduce it. I have also filed a bug report here: https://bugzilla.scilab.org/show_bug.cgi?id=16556 Is anyone else seeing this problem? And do you have any workarounds or other suggestions? Cheers, Arvid ------ // Define variables testArray = list(); for i=1:1:10 testArray($+1) = list(); for j=1:1:10 testArray(i)($+1) = []; testArray(i)(j).testMember = 1; end end testArrayOrig = testArray; // Define functions function outArray = testFunc(inArray) for i=1:1:10 for j=1:1:10 inArray(i)(j).testMember = 5 end end outArray = inArray; endfunction // Send the variable as argument to the function if %t testArrayOut = testFunc2(testArray); if testArrayOut(1)(1).testMember == testArray(1)(1).testMember error("Error! inputArgument was changed by function"); end end _______________________________________________ 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 --> _______________________________________________ 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 sdr at durietz.se Sat Oct 17 16:48:52 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 17 Oct 2020 16:48:52 +0200 Subject: [Scilab-users] callback delay Message-ID: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> Hello, in the latest version Scilab 6.1.0, I have noticed that sometimes there is a long delay before the execution of a callback, If I try to measure it, e.g. by using tic() "callback","tic();myfunction()" and then, in the beginning of myfunction(), having disp(toc()) the time is very short despite a delay of half a minute! Can anybody explain this and tell me how to find out what is going on? Thanks i advance Stefan From stephane.mottelet at utc.fr Sat Oct 17 17:10:54 2020 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sat, 17 Oct 2020 17:10:54 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> Message-ID: <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> Hello Stefan, Do you have a complete example using e.g. an uicontrol or else ? S. > Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : > > ?Hello, > > in the latest version Scilab 6.1.0, I have noticed that sometimes there is a long delay before the execution of a callback, If I try to measure it, e.g. by using tic() > > "callback","tic();myfunction()" > > and then, in the beginning of myfunction(), having > > disp(toc()) > > the time is very short despite a delay of half a minute! Can anybody explain this and tell me how to find out what is going on? > > Thanks i advance > Stefan > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users From sdr at durietz.se Sat Oct 17 21:00:07 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 17 Oct 2020 21:00:07 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> Message-ID: <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> Hello Stephane and Antoine, I tried to explain why I cannot. After I have pressed the button with the callback, I can see that it takes a long time until the toc() message from the start of myfunction arrives. I don't know how to get the time from my button-press. Any idea? Stefan On 2020-10-17 17:10, St?phane Mottelet wrote: > Hello Stefan, > > Do you have a complete example using e.g. an uicontrol or else ? > > S. > >> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >> >> ?Hello, >> >> in the latest version Scilab 6.1.0, I have noticed that sometimes there is a long delay before the execution of a callback, If I try to measure it, e.g. by using tic() >> >> "callback","tic();myfunction()" >> >> and then, in the beginning of myfunction(), having >> >> disp(toc()) >> >> the time is very short despite a delay of half a minute! Can anybody explain this and tell me how to find out what is going on? >> >> Thanks i advance >> Stefan >> _______________________________________________ >> 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 > http://lists.scilab.org/mailman/listinfo/users > From antoine.monmayrant at laas.fr Sun Oct 18 10:06:55 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Sun, 18 Oct 2020 10:06:55 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> Message-ID: <86b3640e-15f3-e8f4-74f7-d0315945d1be@laas.fr> On 17/10/2020 21:00, Stefan Du Rietz wrote: > Hello Stephane and Antoine, > > I tried to explain why I cannot. After I have pressed the button with > the callback, I can see that it takes a long time until the toc() > message from the start of myfunction arrives. I don't know how to get > the time from my button-press. Any idea? No, I'm afraid it goes beyond my field of expertise. It seems to me that the issue is that java is taking for ever to tell scilab to call the callback function after you pressed the button. I don't see how you can catch it using "callback","tic();myfunction()"as for me I think the time-line is like: [Java] ButtonHasBeenReleased ... wait forever for unknown reason ... oh, by the way, I'm supposed to register that the ButtonHasBeenReleased [Java] > [Scilab] ButtonHasBeenReleased, I call? "tic();myfunction()" [Scilab]. I think you need a way to measure this delay for within Java. I am not sure you can do it from within Scilab. Sorry I cannot help more, Antoine > > Stefan > > > > On 2020-10-17 17:10, St?phane Mottelet wrote: >> Hello Stefan, >> >> Do you have a complete example using e.g. an uicontrol or else ? >> >> S. >> >>> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >>> >>> ?Hello, >>> >>> in the latest version Scilab 6.1.0, I have noticed that sometimes >>> there is a long delay before the execution of a callback, If I try >>> to measure it, e.g. by using tic() >>> >>> ? "callback","tic();myfunction()" >>> >>> and then, in the beginning of myfunction(), having >>> >>> ? disp(toc()) >>> >>> the time is very short despite a delay of half a minute! Can anybody >>> explain this and tell me how to find out what is going on? >>> >>> Thanks i advance >>> Stefan >>> _______________________________________________ >>> 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 >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From antoine.monmayrant at laas.fr Sun Oct 18 10:10:47 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Sun, 18 Oct 2020 10:10:47 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> Message-ID: <6c05b991-aa0b-4f00-388a-4290276de9be@laas.fr> Even If you cannot measure the issue, if you have a minimum working example that triggers this bug, it would be helpful to share it with us so we can try to reproduce the issue and maybe link it to some version of java or your os. By the way, did you try to take another computer and do a vanilla install of scilab and try to reproduce the issue? Maybe trying different os/java jdk might give some hint at the source for this bug... Antoine On 17/10/2020 21:00, Stefan Du Rietz wrote: > Hello Stephane and Antoine, > > I tried to explain why I cannot. After I have pressed the button with > the callback, I can see that it takes a long time until the toc() > message from the start of myfunction arrives. I don't know how to get > the time from my button-press. Any idea? > > Stefan > > > > On 2020-10-17 17:10, St?phane Mottelet wrote: >> Hello Stefan, >> >> Do you have a complete example using e.g. an uicontrol or else ? >> >> S. >> >>> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >>> >>> ?Hello, >>> >>> in the latest version Scilab 6.1.0, I have noticed that sometimes >>> there is a long delay before the execution of a callback, If I try >>> to measure it, e.g. by using tic() >>> >>> ? "callback","tic();myfunction()" >>> >>> and then, in the beginning of myfunction(), having >>> >>> ? disp(toc()) >>> >>> the time is very short despite a delay of half a minute! Can anybody >>> explain this and tell me how to find out what is going on? >>> >>> Thanks i advance >>> Stefan >>> _______________________________________________ >>> 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 >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sun Oct 18 10:43:33 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sun, 18 Oct 2020 10:43:33 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <6c05b991-aa0b-4f00-388a-4290276de9be@laas.fr> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> <6c05b991-aa0b-4f00-388a-4290276de9be@laas.fr> Message-ID: <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> Hello Antoine, thank you very much for your replies, especially your hint about Java. The problem is that my GUI is rather complex with several levels and the delay is not always happening. However, when it does, it is extremely annoying! It never happened in Scilab 6.0.2. I will try to analyze the issue deeper according to your propositions, and if I manage to isolate it, I will provide an example. Stefan On 2020-10-18 10:10, Antoine Monmayrant wrote: > Even If you cannot measure the issue, if you have a minimum working > example that triggers this bug, it would be helpful to share it with us > so we can try to reproduce the issue and maybe link it to some version > of java or your os. > > By the way, did you try to take another computer and do a vanilla > install of scilab and try to reproduce the issue? > Maybe trying different os/java jdk might give some hint at the source > for this bug... > > Antoine > > On 17/10/2020 21:00, Stefan Du Rietz wrote: >> Hello Stephane and Antoine, >> >> I tried to explain why I cannot. After I have pressed the button with >> the callback, I can see that it takes a long time until the toc() >> message from the start of myfunction arrives. I don't know how to get >> the time from my button-press. Any idea? >> >> Stefan >> >> >> >> On 2020-10-17 17:10, St?phane Mottelet wrote: >>> Hello Stefan, >>> >>> Do you have a complete example using e.g. an uicontrol or else ? >>> >>> S. >>> >>>> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >>>> >>>> ?Hello, >>>> >>>> in the latest version Scilab 6.1.0, I have noticed that sometimes >>>> there is a long delay before the execution of a callback, If I try >>>> to measure it, e.g. by using tic() >>>> >>>> ? "callback","tic();myfunction()" >>>> >>>> and then, in the beginning of myfunction(), having >>>> >>>> ? disp(toc()) >>>> >>>> the time is very short despite a delay of half a minute! Can anybody >>>> explain this and tell me how to find out what is going on? >>>> >>>> Thanks in advance >>>> Stefan >>>> _______________________________________________ >>>> 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 >>> http://lists.scilab.org/mailman/listinfo/users >>> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Sun Oct 18 16:12:13 2020 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sun, 18 Oct 2020 16:12:13 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> References: <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> Message-ID: <943FAB66-BB7A-46BF-AA95-1B4FE621977F@utc.fr> Hello, Did you try to play with the callback_property ? I think that making the callback interruptible or non interruptible may change things. S. > Le 18 oct. 2020 ? 10:44, Stefan Du Rietz a ?crit : > > ?Hello Antoine, > > thank you very much for your replies, especially your hint about Java. The problem is that my GUI is rather complex with several levels and the delay is not always happening. However, when it does, it is extremely annoying! It never happened in Scilab 6.0.2. > > I will try to analyze the issue deeper according to your propositions, and if I manage to isolate it, I will provide an example. > > Stefan > > >> On 2020-10-18 10:10, Antoine Monmayrant wrote: >> Even If you cannot measure the issue, if you have a minimum working example that triggers this bug, it would be helpful to share it with us so we can try to reproduce the issue and maybe link it to some version of java or your os. >> By the way, did you try to take another computer and do a vanilla install of scilab and try to reproduce the issue? >> Maybe trying different os/java jdk might give some hint at the source for this bug... >> Antoine >>> On 17/10/2020 21:00, Stefan Du Rietz wrote: >>> Hello Stephane and Antoine, >>> >>> I tried to explain why I cannot. After I have pressed the button with the callback, I can see that it takes a long time until the toc() message from the start of myfunction arrives. I don't know how to get the time from my button-press. Any idea? >>> >>> Stefan >>> >>> >>> >>> On 2020-10-17 17:10, St?phane Mottelet wrote: >>>> Hello Stefan, >>>> >>>> Do you have a complete example using e.g. an uicontrol or else ? >>>> >>>> S. >>>> >>>>> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >>>>> >>>>> ?Hello, >>>>> >>>>> in the latest version Scilab 6.1.0, I have noticed that sometimes there is a long delay before the execution of a callback, If I try to measure it, e.g. by using tic() >>>>> >>>>> "callback","tic();myfunction()" >>>>> >>>>> and then, in the beginning of myfunction(), having >>>>> >>>>> disp(toc()) >>>>> >>>>> the time is very short despite a delay of half a minute! Can anybody explain this and tell me how to find out what is going on? >>>>> >>>>> Thanks in advance >>>>> Stefan >>>>> _______________________________________________ >>>>> 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 >>>> >>>> _______________________________________________ >>>> 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 >>> >> _______________________________________________ >> 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 From antoine.monmayrant at laas.fr Sun Oct 18 19:34:31 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Sun, 18 Oct 2020 19:34:31 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> <6c05b991-aa0b-4f00-388a-4290276de9be@laas.fr> <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> Message-ID: <0dc90354-139a-1dc5-d00b-ac282c7a57be@laas.fr> On 18/10/2020 10:43, Stefan Du Rietz wrote: > Hello Antoine, > > thank you very much for your replies, especially your hint about Java. > The problem is that my GUI is rather complex with several levels and > the delay is not always happening. However, when it does, it is > extremely annoying!? It never happened in Scilab 6.0.2. OK, that's a thing you can try: can you test 6.1.0 & 6.0.2 on the same computer, with everything else being identical but for the version of scilab? Antoine > > I will try to analyze the issue deeper according to your propositions, > and if I manage to isolate it, I will provide an example. > > Stefan > > > On 2020-10-18 10:10, Antoine Monmayrant wrote: >> Even If you cannot measure the issue, if you have a minimum working >> example that triggers this bug, it would be helpful to share it with >> us so we can try to reproduce the issue and maybe link it to some >> version of java or your os. >> >> By the way, did you try to take another computer and do a vanilla >> install of scilab and try to reproduce the issue? >> Maybe trying different os/java jdk might give some hint at the source >> for this bug... >> >> Antoine >> >> On 17/10/2020 21:00, Stefan Du Rietz wrote: >>> Hello Stephane and Antoine, >>> >>> I tried to explain why I cannot. After I have pressed the button >>> with the callback, I can see that it takes a long time until the >>> toc() message from the start of myfunction arrives. I don't know how >>> to get the time from my button-press. Any idea? >>> >>> Stefan >>> >>> >>> >>> On 2020-10-17 17:10, St?phane Mottelet wrote: >>>> Hello Stefan, >>>> >>>> Do you have a complete example using e.g. an uicontrol or else ? >>>> >>>> S. >>>> >>>>> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >>>>> >>>>> ?Hello, >>>>> >>>>> in the latest version Scilab 6.1.0, I have noticed that sometimes >>>>> there is a long delay before the execution of a callback, If I try >>>>> to measure it, e.g. by using tic() >>>>> >>>>> ? "callback","tic();myfunction()" >>>>> >>>>> and then, in the beginning of myfunction(), having >>>>> >>>>> ? disp(toc()) >>>>> >>>>> the time is very short despite a delay of half a minute! Can >>>>> anybody explain this and tell me how to find out what is going on? >>>>> >>>>> Thanks in advance >>>>> Stefan >>>>> _______________________________________________ >>>>> 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 >>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Mon Oct 19 13:11:45 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 19 Oct 2020 13:11:45 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <0dc90354-139a-1dc5-d00b-ac282c7a57be@laas.fr> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> <6c05b991-aa0b-4f00-388a-4290276de9be@laas.fr> <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> <0dc90354-139a-1dc5-d00b-ac282c7a57be@laas.fr> Message-ID: <09f1fc44-3c7d-b304-c1c9-1a8595f57c52@durietz.se> On 2020-10-18 19:34, Antoine Monmayrant wrote: > > On 18/10/2020 10:43, Stefan Du Rietz wrote: >> Hello Antoine, >> >> thank you very much for your replies, especially your hint about Java. >> The problem is that my GUI is rather complex with several levels and >> the delay is not always happening. However, when it does, it is >> extremely annoying!? It never happened in Scilab 6.0.2. > > OK, that's a thing you can try: can you test 6.1.0 & 6.0.2 on the same > computer, with everything else being identical but for the version of > scilab? > > Antoine > That is exactly what I have done! On a computer with 64-bit Xubuntu (Ubuntu with XFCE) 18.04 LTS with everything updated. These files are exactly alike: /usr/local/scilab/scilab-6.0.2/thirdparty/java/release /usr/local/scilab/scilab-6.1.0/thirdparty/java/release Please look further below! Stefan >> >> I will try to analyze the issue deeper according to your propositions, >> and if I manage to isolate it, I will provide an example. >> >> Stefan >> >> >> On 2020-10-18 10:10, Antoine Monmayrant wrote: >>> Even If you cannot measure the issue, if you have a minimum working >>> example that triggers this bug, it would be helpful to share it with >>> us so we can try to reproduce the issue and maybe link it to some >>> version of java or your os. >>> >>> By the way, did you try to take another computer and do a vanilla >>> install of scilab and try to reproduce the issue? >>> Maybe trying different os/java jdk might give some hint at the source >>> for this bug... >>> >>> Antoine >>> I have now done that with a small, simple (Atom processor) computer with 32-bit Windows 10 (updated) and there is no extra delay compared to Scilab 5.5.2 on the same computer (everything is pretty slow with Java GUI's compared to previous Scilab versions with Tcl/Tk!). Stefan >>> On 17/10/2020 21:00, Stefan Du Rietz wrote: >>>> Hello Stephane and Antoine, >>>> >>>> I tried to explain why I cannot. After I have pressed the button >>>> with the callback, I can see that it takes a long time until the >>>> toc() message from the start of myfunction arrives. I don't know how >>>> to get the time from my button-press. Any idea? >>>> >>>> Stefan >>>> >>>> >>>> >>>> On 2020-10-17 17:10, St?phane Mottelet wrote: >>>>> Hello Stefan, >>>>> >>>>> Do you have a complete example using e.g. an uicontrol or else ? >>>>> >>>>> S. >>>>> >>>>>> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >>>>>> >>>>>> ?Hello, >>>>>> >>>>>> in the latest version Scilab 6.1.0, I have noticed that sometimes >>>>>> there is a long delay before the execution of a callback, If I try >>>>>> to measure it, e.g. by using tic() >>>>>> >>>>>> ? "callback","tic();myfunction()" >>>>>> >>>>>> and then, in the beginning of myfunction(), having >>>>>> >>>>>> ? disp(toc()) >>>>>> >>>>>> the time is very short despite a delay of half a minute! Can >>>>>> anybody explain this and tell me how to find out what is going on? >>>>>> >>>>>> Thanks in advance >>>>>> Stefan >>>>>> _______________________________________________ >>>>>> 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 >>>>> http://lists.scilab.org/mailman/listinfo/users >>>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sdr at durietz.se Mon Oct 19 22:38:52 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 19 Oct 2020 22:38:52 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <09f1fc44-3c7d-b304-c1c9-1a8595f57c52@durietz.se> References: <6ed9baff-678e-eb53-29ab-f5f1a96883d3@durietz.se> <1C378BD9-9D36-4D8B-934B-591D31F986BF@utc.fr> <63a5e34a-0de2-2b2b-46c2-aa204773aca3@durietz.se> <6c05b991-aa0b-4f00-388a-4290276de9be@laas.fr> <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> <0dc90354-139a-1dc5-d00b-ac282c7a57be@laas.fr> <09f1fc44-3c7d-b304-c1c9-1a8595f57c52@durietz.se> Message-ID: On 2020-10-19 13:11, Stefan Du Rietz wrote: > > On 2020-10-18 19:34, Antoine Monmayrant wrote: >> >> On 18/10/2020 10:43, Stefan Du Rietz wrote: >>> Hello Antoine, >>> >>> thank you very much for your replies, especially your hint about >>> Java. The problem is that my GUI is rather complex with several >>> levels and the delay is not always happening. However, when it does, >>> it is extremely annoying!? It never happened in Scilab 6.0.2. >> >> OK, that's a thing you can try: can you test 6.1.0 & 6.0.2 on the same >> computer, with everything else being identical but for the version of >> scilab? >> >> Antoine >> > That is exactly what I have done! On a computer with 64-bit Xubuntu > (Ubuntu with XFCE) 18.04 LTS with everything updated. > > These files are exactly alike: > /usr/local/scilab/scilab-6.0.2/thirdparty/java/release > /usr/local/scilab/scilab-6.1.0/thirdparty/java/release > > Please look further below! > > Stefan >>> >>> I will try to analyze the issue deeper according to your >>> propositions, and if I manage to isolate it, I will provide an example. >>> >>> Stefan >>> >>> >>> On 2020-10-18 10:10, Antoine Monmayrant wrote: >>>> Even If you cannot measure the issue, if you have a minimum working >>>> example that triggers this bug, it would be helpful to share it with >>>> us so we can try to reproduce the issue and maybe link it to some >>>> version of java or your os. >>>> >>>> By the way, did you try to take another computer and do a vanilla >>>> install of scilab and try to reproduce the issue? >>>> Maybe trying different os/java jdk might give some hint at the >>>> source for this bug... >>>> >>>> Antoine >>>> > I have now done that with a small, simple (Atom processor) computer with > 32-bit Windows 10 (updated) and there is no extra delay compared to > Scilab 5.5.2 on the same computer (everything is pretty slow with Java > GUI's compared to previous Scilab versions with Tcl/Tk!). > > Stefan > And the same Java version in Window as in Linux aboves: C:\Program Files\scilab-6.1.0\java\JRE\release "1.8.0.151" Stefan >>>> On 17/10/2020 21:00, Stefan Du Rietz wrote: >>>>> Hello Stephane and Antoine, >>>>> >>>>> I tried to explain why I cannot. After I have pressed the button >>>>> with the callback, I can see that it takes a long time until the >>>>> toc() message from the start of myfunction arrives. I don't know >>>>> how to get the time from my button-press. Any idea? >>>>> >>>>> Stefan >>>>> >>>>> >>>>> >>>>> On 2020-10-17 17:10, St?phane Mottelet wrote: >>>>>> Hello Stefan, >>>>>> >>>>>> Do you have a complete example using e.g. an uicontrol or else ? >>>>>> >>>>>> S. >>>>>> >>>>>>> Le 17 oct. 2020 ? 16:49, Stefan Du Rietz a ?crit : >>>>>>> >>>>>>> ?Hello, >>>>>>> >>>>>>> in the latest version Scilab 6.1.0, I have noticed that sometimes >>>>>>> there is a long delay before the execution of a callback, If I >>>>>>> try to measure it, e.g. by using tic() >>>>>>> >>>>>>> ? "callback","tic();myfunction()" >>>>>>> >>>>>>> and then, in the beginning of myfunction(), having >>>>>>> >>>>>>> ? disp(toc()) >>>>>>> >>>>>>> the time is very short despite a delay of half a minute! Can >>>>>>> anybody explain this and tell me how to find out what is going on? >>>>>>> >>>>>>> Thanks in advance >>>>>>> Stefan >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>> http://lists.scilab.org/mailman/listinfo/users >>>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users >>>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sdr at durietz.se Wed Oct 21 12:39:33 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Wed, 21 Oct 2020 12:39:33 +0200 Subject: [Scilab-users] callback delay In-Reply-To: <943FAB66-BB7A-46BF-AA95-1B4FE621977F@utc.fr> References: <016905ea-dffe-c807-b8ed-bb3eba436230@durietz.se> <943FAB66-BB7A-46BF-AA95-1B4FE621977F@utc.fr> Message-ID: On 2020-10-18 16:12, St?phane Mottelet wrote: > Hello, > > Did you try to play with the callback_property ? I think that making the callback interruptible or non interruptible may change things. > > S. > Hello St?phane, thanks for the proposition, which never concurred to me! But, since there is no delay under windows (my later reply: 2020-10-19 13:11), is there any use doing that? I would, however, like to understand the different Callback_Type values. The Scilab help under "uicontrol properties" is not obvious to me. What is, e.g., the difference between "a Scilab function" and "Scilab instructions"? Isn't "myfunction()" an instruction? Stefan From sgougeon at free.fr Wed Oct 21 20:12:12 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 21 Oct 2020 20:12:12 +0200 Subject: [Scilab-users] mprintf("%c") actual action, and vs mprintf("%s") ? Message-ID: <995e6d64-53ba-d3bc-3313-574f5efc1bfa@free.fr> 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? The Scilab 5.5 behavior was the same, except that only the first character of the input was printed: -->msprintf("AB %c\n", "RB") ?ans? = ?AB R Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From parravicini.anna at gmail.com Thu Oct 29 11:55:04 2020 From: parravicini.anna at gmail.com (anna28) Date: Thu, 29 Oct 2020 03:55:04 -0700 (MST) Subject: [Scilab-users] for-loop error Message-ID: <1603968904285-0.post@n3.nabble.com> Hello all, I'm facing a trouble with a (in principle) very basic script... but I really don't understand the reason. Inside a bigger script, I have the following code: "Nentries=283; Nticks=20; Nstep=15; for j=1:Nticks k=j*Nstep; disp("j="+string(j)+"; Nstep="+string(Nstep)+"; k="+string(k)+" j*Nstep="+string(j*Nstep)); if(k<=Nentries) then str1=strsplit(matrix(k,1),[11,20])(2); str2 = strsubst(str1, "_","="); else str2="="; end tick_array_step_rot(j)="$\text {\rotatebox{90}{"+str2+"}}$" end" where "matrix" is a 283x5 string matrix. It usually works, but it sometimes gives me error of "invalid index" at the line of "str1". That's why I asked to "disp" all the indexes and I find the following output: j=1; Nstep=18; k=18 j*Nstep=18 j=2; Nstep=18; k=36 j*Nstep=36 j=3; Nstep=18; k=54 j*Nstep=54 j=4; Nstep=18; k=72 j*Nstep=72 j=5; Nstep=18; k=90 j*Nstep=90 j=6; Nstep=18; k=108 j*Nstep=108 j=7; Nstep=18; k=126 j*Nstep=126 j=8; Nstep=18; k=-112 j*Nstep=-112 If I change the matrix and the number of rows, I detect similar problems: at a certain point, the multiplication j*Nstep gets wrong. Do you have any suggestions? many thanks Anna -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Thu Oct 29 14:39:50 2020 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 29 Oct 2020 13:39:50 +0000 Subject: [Scilab-users] for-loop error In-Reply-To: <1603968904285-0.post@n3.nabble.com> References: <1603968904285-0.post@n3.nabble.com> Message-ID: Hi, Are you sure that all the strings in matrix have at least 20 characters? PS: Not related to the index issue but probably not a good idea to use a variable with same name as existing function matrix. Regards, Rafael -----Original Message----- From: users On Behalf Of anna28 Sent: Thursday, October 29, 2020 12:55 PM To: users at lists.scilab.org Subject: [Scilab-users] for-loop error Hello all, I'm facing a trouble with a (in principle) very basic script... but I really don't understand the reason. Inside a bigger script, I have the following code: "Nentries=283; Nticks=20; Nstep=15; for j=1:Nticks k=j*Nstep; disp("j="+string(j)+"; Nstep="+string(Nstep)+"; k="+string(k)+" j*Nstep="+string(j*Nstep)); if(k<=Nentries) then str1=strsplit(matrix(k,1),[11,20])(2); str2 = strsubst(str1, "_","="); else str2="="; end tick_array_step_rot(j)="$\text {\rotatebox{90}{"+str2+"}}$" end" where "matrix" is a 283x5 string matrix. It usually works, but it sometimes gives me error of "invalid index" at the line of "str1". That's why I asked to "disp" all the indexes and I find the following output: j=1; Nstep=18; k=18 j*Nstep=18 j=2; Nstep=18; k=36 j*Nstep=36 j=3; Nstep=18; k=54 j*Nstep=54 j=4; Nstep=18; k=72 j*Nstep=72 j=5; Nstep=18; k=90 j*Nstep=90 j=6; Nstep=18; k=108 j*Nstep=108 j=7; Nstep=18; k=126 j*Nstep=126 j=8; Nstep=18; k=-112 j*Nstep=-112 If I change the matrix and the number of rows, I detect similar problems: at a certain point, the multiplication j*Nstep gets wrong. Do you have any suggestions? many thanks Anna -------------- next part -------------- An HTML attachment was scrubbed... URL: From parravicini.anna at gmail.com Thu Oct 29 15:07:40 2020 From: parravicini.anna at gmail.com (anna28) Date: Thu, 29 Oct 2020 07:07:40 -0700 (MST) Subject: [Scilab-users] for-loop error In-Reply-To: References: <1603968904285-0.post@n3.nabble.com> Message-ID: <1603980460201-0.post@n3.nabble.com> Hello, thanks for your answer. About the "PS", in fact, in my script, the name is not "matrix"... I've simplified the name to report it in the post (with a not 'clever' name, actually). About the answer itself, yes, all the elements have 20 characters. The point is the following: " j=7; Nstep=18; k=126 j*Nstep=126 j=8; Nstep=18; k=-112 j*Nstep=-112" Why does it make 8*18=-112? The matrix would have the index 8*18=144 but clearly it doesn't the index -112.... -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Thu Oct 29 15:28:26 2020 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 29 Oct 2020 14:28:26 +0000 Subject: [Scilab-users] for-loop error In-Reply-To: <1603980460201-0.post@n3.nabble.com> References: <1603968904285-0.post@n3.nabble.com> <1603980460201-0.post@n3.nabble.com> Message-ID: That is weird. Your code in my Scilab 6.1 on Win 10, shows: "j=7; Nstep=18; k=126 j*Nstep=126" "j=8; Nstep=18; k=144 j*Nstep=144" Regards, Rafael -----Original Message----- From: users On Behalf Of anna28 Sent: Thursday, October 29, 2020 4:08 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] for-loop error Hello, thanks for your answer. About the "PS", in fact, in my script, the name is not "matrix"... I've simplified the name to report it in the post (with a not 'clever' name, actually). About the answer itself, yes, all the elements have 20 characters. The point is the following: " j=7; Nstep=18; k=126 j*Nstep=126 j=8; Nstep=18; k=-112 j*Nstep=-112" Why does it make 8*18=-112? The matrix would have the index 8*18=144 but clearly it doesn't the index -112.... -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From parravicini.anna at gmail.com Thu Oct 29 15:39:29 2020 From: parravicini.anna at gmail.com (anna28) Date: Thu, 29 Oct 2020 07:39:29 -0700 (MST) Subject: [Scilab-users] for-loop error In-Reply-To: <1603968904285-0.post@n3.nabble.com> References: <1603968904285-0.post@n3.nabble.com> Message-ID: <1603982369993-0.post@n3.nabble.com> I've disabled everything inside the loop, in order to understand how the "i*Nstep" goes on. That's the result: i=1; Nstep=13; k=13 i*Nstep=13 i=2; Nstep=13; k=26 i*Nstep=26 i=3; Nstep=13; k=39 i*Nstep=39 i=4; Nstep=13; k=52 i*Nstep=52 i=5; Nstep=13; k=65 i*Nstep=65 i=6; Nstep=13; k=78 i*Nstep=78 i=7; Nstep=13; k=91 i*Nstep=91 i=8; Nstep=13; k=104 i*Nstep=104 i=9; Nstep=13; k=117 i*Nstep=117 i=10; Nstep=13; k=-126 i*Nstep=-126 i=11; Nstep=13; k=-113 i*Nstep=-113 i=12; Nstep=13; k=-100 i*Nstep=-100 i=13; Nstep=13; k=-87 i*Nstep=-87 i=14; Nstep=13; k=-74 i*Nstep=-74 i=15; Nstep=13; k=-61 i*Nstep=-61 i=16; Nstep=13; k=-48 i*Nstep=-48 i=17; Nstep=13; k=-35 i*Nstep=-35 i=18; Nstep=13; k=-22 i*Nstep=-22 i=19; Nstep=13; k=-9 i*Nstep=-9 i=20; Nstep=13; k=4 i*Nstep=4 does anybody have an idea??? thanks! anna -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From parravicini.anna at gmail.com Thu Oct 29 15:51:26 2020 From: parravicini.anna at gmail.com (anna28) Date: Thu, 29 Oct 2020 07:51:26 -0700 (MST) Subject: [Scilab-users] for-loop error In-Reply-To: <1603980460201-0.post@n3.nabble.com> References: <1603968904285-0.post@n3.nabble.com> <1603980460201-0.post@n3.nabble.com> Message-ID: <1603983086151-0.post@n3.nabble.com> sorry to everybody, I understood my fault: I defined Nstep=int8 and that was avoiding number larger than 127... ...I was sure it should do a naif mistake. cheers Anna -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From wozai at protonmail.ch Thu Oct 29 16:57:40 2020 From: wozai at protonmail.ch (Wozai) Date: Thu, 29 Oct 2020 08:57:40 -0700 (MST) Subject: [Scilab-users] for-loop error In-Reply-To: <1603980460201-0.post@n3.nabble.com> References: <1603968904285-0.post@n3.nabble.com> <1603980460201-0.post@n3.nabble.com> Message-ID: <1603987060971-0.post@n3.nabble.com> --> int8(8)*18 ans = -112 -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html