From perrichon.pierre at wanadoo.fr Fri Nov 1 10:58:05 2019 From: perrichon.pierre at wanadoo.fr (Pierre PERRICHON) Date: Fri, 1 Nov 2019 10:58:05 +0100 (CET) Subject: [Scilab-users] Nysquist instruction - fmin fmax parameters vectorized controlling Message-ID: <45436636.897.1572602285692.JavaMail.www@wwinf1h13> ? Hello, ? Many thanks to Samuel, ? So at the begining of next week; I open a bugzilla as "improvement" of nyquist instruction, in respect of its own documentation about vectorized aspect for fmin and fmax fields. It will be more confortable to present the aim and exhange ? Sincerely Pierre ? ? ? > Message du 31/10/19 18:53 > De : "Samuel Gougeon" > A : users at lists.scilab.org > Copie ? : > Objet : Re: [Scilab-users] Nysquist instruction - fmin fmax parameters vectorized controlling > > Le 31/10/2019 ? 18:34, Pierre PERRICHON a ?crit?: > > Dear all, > > As said in the nyquist help instruction, it is possible to get a > nyquist plan using this instruction > > nyquist( sl,[fmin,fmax] [,step] [,comments] [,symmetry]) > > ... and this example in the same doc : > > nyquist([Plant;Plant*PID],0.5,100,["Plant";"Plant and PID corrector"]); > > Here, we see that s1 can be a vectorized siso. Also, the legend is > vectorized in the same size. > > Perfect. > > But 0.5 and 100 are not vectorize, and as to stay in final in a same > quarter, as hope, I need to impose min > and mas for h1, h2, h3 ...hn on the siso matrix. > > But this is not the case for fmin and fmax, even if it is described in > the documentation: > > "The frequencies are given by the bounds fmin,fmax (in Hz) > or by a row-vector (or a matrix for multi-output) frq" > > It doesn't work, I get error, and I'm not able to precise each min and > max in that syntax, > Could you please provide an actual full and minimal example enabling to reproduce the error? Apparently, this frq input argument really aims to process vectorized cases. So, at last, it should work. Thanks _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From wknoelly at gmail.com Sat Nov 2 17:41:21 2019 From: wknoelly at gmail.com (knobs) Date: Sat, 2 Nov 2019 09:41:21 -0700 (MST) Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> Message-ID: <1572712881008-0.post@n3.nabble.com> Hi Heinz,Did you find a fix?I had SciLab 6 running perfectly well on my Macs under both Mojave and High Sierra without installing Java 6. This is not an Apple problem, but a SciLab issue. Honestly, I do not understand why SciLab has to use be Java 6 ?!! Seems backwards to me.There was a way to tell old java apps to use the new up-to-date java. I just do not remember how I did this anymore. So after installing Catalina, Scilab does not work anymore. It must have removed my java links/fix.Once I figure it out again, I let you know.CheersWilli -- 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 Sat Nov 2 21:56:57 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sat, 2 Nov 2019 21:56:57 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <1572712881008-0.post@n3.nabble.com> References: <1572712881008-0.post@n3.nabble.com> Message-ID: <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> Hello, > Le 2 nov. 2019 ? 17:41, knobs a ?crit : > > ?Hi Heinz, Did you find a fix? I had SciLab 6 running perfectly well on my Macs under both Mojave and High Sierra without installing Java 6. This is not an Apple problem, but a SciLab issue. This IS an Apple issue. > Honestly, I do not understand why SciLab has to use be Java 6 ?!! Seems backwards to me. There was a way to tell old java apps to use the new up-to-date java. I just do not remember how I did this anymore. See https://derflounder.wordpress.com/2015/08/08/modifying-oracles-java-sdk-to-run-java-applications-on-os-x/ > So after installing Catalina, Scilab does not work anymore. It must have removed my java links/fix. Once I figure it out again, I let you know. Cheers Willi The first thing you can do is to launch Scilab from the command line and post the error message. S. > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at me.com Sat Nov 2 22:33:12 2019 From: heinznabielek at me.com (Heinz Nabielek) Date: Sat, 2 Nov 2019 22:33:12 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> References: <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> Message-ID: On 02.11.2019, at 21:56, St?phane Mottelet wrote: > > Hello, > >> Le 2 nov. 2019 ? 17:41, knobs a ?crit : >> >> ?Hi Heinz, Did you find a fix? I had SciLab 6 running perfectly well on my Macs under both Mojave and High Sierra without installing Java 6. This is not an Apple problem, but a SciLab issue. > > This IS an Apple issue. > >> Honestly, I do not understand why SciLab has to use be Java 6 ?!! Seems backwards to me. There was a way to tell old java apps to use the new up-to-date java. I just do not remember how I did this anymore. > > See > > https://derflounder.wordpress.com/2015/08/08/modifying-oracles-java-sdk-to-run-java-applications-on-os-x/ > >> So after installing Catalina, Scilab does not work anymore. It must have removed my java links/fix. Once I figure it out again, I let you know. Cheers Willi > > The first thing you can do is to launch Scilab from the command line and post the error message. Exactly same error window messages and ... /Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab -nw true No Java runtime present, requesting install. h From stephane.mottelet at utc.fr Sat Nov 2 22:50:39 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sat, 2 Nov 2019 22:50:39 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: References: Message-ID: > Le 2 nov. 2019 ? 22:33, Heinz Nabielek a ?crit : > > ?On 02.11.2019, at 21:56, St?phane Mottelet wrote: >> >> Hello, >> >>>> Le 2 nov. 2019 ? 17:41, knobs a ?crit : >>> >>> ?Hi Heinz, Did you find a fix? I had SciLab 6 running perfectly well on my Macs under both Mojave and High Sierra without installing Java 6. This is not an Apple problem, but a SciLab issue. >> >> This IS an Apple issue. >> >>> Honestly, I do not understand why SciLab has to use be Java 6 ?!! Seems backwards to me. There was a way to tell old java apps to use the new up-to-date java. I just do not remember how I did this anymore. >> >> See >> >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/derflounder.wordpress.com/2015/08/08/modifying-oracles-java-sdk-to-run-java-applications-on-os-x/ >> >>> So after installing Catalina, Scilab does not work anymore. It must have removed my java links/fix. Once I figure it out again, I let you know. Cheers Willi >> >> The first thing you can do is to launch Scilab from the command line and post the error message. > > > Exactly same error window messages and ... > > /Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab -nw > true > No Java runtime present, requesting install. > > h From stephane.mottelet at utc.fr Sat Nov 2 22:52:52 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sat, 2 Nov 2019 22:52:52 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: References: Message-ID: <6BA780C1-A9A3-4716-89CE-C2B2A49A7153@utc.fr> Hello Heinz Please install Oracle JDK 1.8 and follow the instructions in the link I gave below. S. > Le 2 nov. 2019 ? 22:33, Heinz Nabielek a ?crit : > > ?On 02.11.2019, at 21:56, St?phane Mottelet wrote: >> Hello, >>>>> Le 2 nov. 2019 ? 17:41, knobs a ?crit : >>>> ?Hi Heinz, Did you find a fix? I had SciLab 6 running perfectly well on my Macs under both Mojave and High Sierra without installing Java 6. This is not an Apple problem, but a SciLab issue. >> This IS an Apple issue. >>> Honestly, I do not understand why SciLab has to use be Java 6 ?!! Seems backwards to me. There was a way to tell old java apps to use the new up-to-date java. I just do not remember how I did this anymore. >> See >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/derflounder.wordpress.com/2015/08/08/modifying-oracles-java-sdk-to-run-java-applications-on-os-x/ >>> So after installing Catalina, Scilab does not work anymore. It must have removed my java links/fix. Once I figure it out again, I let you know. Cheers Willi >> The first thing you can do is to launch Scilab from the command line and post the error message. > > > Exactly same error window messages and ... > > /Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab -nw > true > No Java runtime present, requesting install. > > h From stephane.mottelet at utc.fr Sat Nov 2 22:56:10 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sat, 2 Nov 2019 22:56:10 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: References: Message-ID: <0560BA4F-4090-4B49-8721-BB7EC0F9AFCF@utc.fr> BTW can you launch Scilab on the command line with -nwni flag in order to see other (besides Java) potential problems ? S. > Le 2 nov. 2019 ? 22:33, Heinz Nabielek a ?crit : > > ?On 02.11.2019, at 21:56, St?phane Mottelet wrote: >> >> Hello, >> >>>> Le 2 nov. 2019 ? 17:41, knobs a ?crit : >>> >>> ?Hi Heinz, Did you find a fix? I had SciLab 6 running perfectly well on my Macs under both Mojave and High Sierra without installing Java 6. This is not an Apple problem, but a SciLab issue. >> >> This IS an Apple issue. >> >>> Honestly, I do not understand why SciLab has to use be Java 6 ?!! Seems backwards to me. There was a way to tell old java apps to use the new up-to-date java. I just do not remember how I did this anymore. >> >> See >> >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/derflounder.wordpress.com/2015/08/08/modifying-oracles-java-sdk-to-run-java-applications-on-os-x/ >> >>> So after installing Catalina, Scilab does not work anymore. It must have removed my java links/fix. Once I figure it out again, I let you know. Cheers Willi >> >> The first thing you can do is to launch Scilab from the command line and post the error message. > > > Exactly same error window messages and ... > > /Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab -nw > true > No Java runtime present, requesting install. > > h From heinznabielek at me.com Sat Nov 2 23:01:37 2019 From: heinznabielek at me.com (Heinz Nabielek) Date: Sat, 2 Nov 2019 23:01:37 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <0560BA4F-4090-4B49-8721-BB7EC0F9AFCF@utc.fr> References: <0560BA4F-4090-4B49-8721-BB7EC0F9AFCF@utc.fr> Message-ID: Same error message windows, but starting on the command line. Great! Would I have full SciLab power here? Heinz /Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab -nwni true Scilab 6.0.2 (Aug 19 2019, 11:47:50) --> a=sqrt(3) a = 1.7320508 --> 3-a*a ans = 4.441D-16 --> exit > On 02.11.2019, at 22:56, St?phane Mottelet wrote: > > BTW can you launch Scilab on the command line with -nwni flag in order to see other (besides Java) potential problems ? > > S. > >> Le 2 nov. 2019 ? 22:33, Heinz Nabielek a ?crit : >> >> ?On 02.11.2019, at 21:56, St?phane Mottelet wrote: >>> >>> Hello, >>> >>>>> Le 2 nov. 2019 ? 17:41, knobs a ?crit : >>>> >>>> ?Hi Heinz, Did you find a fix? I had SciLab 6 running perfectly well on my Macs under both Mojave and High Sierra without installing Java 6. This is not an Apple problem, but a SciLab issue. >>> >>> This IS an Apple issue. >>> >>>> Honestly, I do not understand why SciLab has to use be Java 6 ?!! Seems backwards to me. There was a way to tell old java apps to use the new up-to-date java. I just do not remember how I did this anymore. >>> >>> See >>> >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/derflounder.wordpress.com/2015/08/08/modifying-oracles-java-sdk-to-run-java-applications-on-os-x/ >>> >>>> So after installing Catalina, Scilab does not work anymore. It must have removed my java links/fix. Once I figure it out again, I let you know. Cheers Willi >>> >>> The first thing you can do is to launch Scilab from the command line and post the error message. >> >> >> Exactly same error window messages and ... >> >> /Applications/scilab-6.0.2.app/Contents/MacOS/bin/scilab -nw >> true >> No Java runtime present, requesting install. >> >> h > From wknoelly at gmail.com Sun Nov 3 00:03:38 2019 From: wknoelly at gmail.com (knobs) Date: Sat, 2 Nov 2019 16:03:38 -0700 (MST) Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> Message-ID: <1572735818872-0.post@n3.nabble.com> Hi, Thank you :-) After running the python script from the link that you had provided, Scilabs 6.0.1. starts under Catalina :-) https://github.com/rtrouton/rtrouton_scripts/blob/master/rtrouton_scripts/update_oracle_java_jdk_jvmcapabilities/update_oracle_java_jdk_jvmcapabilities.py I have not installed the latest version from Scilab, ... one fix at a time ;-) As for java, SE version 1.8.0_231 and the jdk 13.0.1 are installed. I also made sure, that macOS 10.15 is recognised in the scilab start script. Cheers W. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From wknoelly at gmail.com Sun Nov 3 00:34:09 2019 From: wknoelly at gmail.com (knobs) Date: Sat, 2 Nov 2019 16:34:09 -0700 (MST) Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <1572735818872-0.post@n3.nabble.com> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> Message-ID: <1572737649020-0.post@n3.nabble.com> Hi, Just installed Scilab 6.0.2. and now the real funs starts. ATOMS has issues: --> atomsList(); Scanning repository http://atoms.scilab.org/6.0 ... Done at line 65 of function atomsDESCRIPTIONread ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci line 125 ) at line 227 of function atomsDESCRIPTIONget ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONget.sci line 246 ) at line 38 of function atomsList ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atomsList.sci line 54 ) regexp: Unknown error. I don't have this issue with 6.0.1. W. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From stephane.mottelet at utc.fr Sun Nov 3 13:48:10 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sun, 3 Nov 2019 13:48:10 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <1572737649020-0.post@n3.nabble.com> References: <1572737649020-0.post@n3.nabble.com> Message-ID: <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> > Le 3 nov. 2019 ? 00:34, knobs a ?crit : > > ?Hi, > > Just installed Scilab 6.0.2. and now the real funs starts. Frankly, I don?t appreciate your sense of humour. Keeping Scilab *alive* on OSX remains on the work of guys like you and me. So don?t be sarcastic when you report issues... > ATOMS has issues: > > --> atomsList(); > Scanning repository https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/atoms.scilab.org/6.0 ... Done > > at line 65 of function atomsDESCRIPTIONread ( > /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci > line 125 ) > at line 227 of function atomsDESCRIPTIONget ( > /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONget.sci > line 246 ) > at line 38 of function atomsList ( > /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atomsList.sci > line 54 ) > > regexp: Unknown error. > > I don't have this issue with 6.0.1. > > W. > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users From wknoelly at gmail.com Sun Nov 3 15:45:59 2019 From: wknoelly at gmail.com (knobs) Date: Sun, 3 Nov 2019 07:45:59 -0700 (MST) Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> <1572737649020-0.post@n3.nabble.com> <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> Message-ID: <1572792359249-0.post@n3.nabble.com> Hi St?phane, Sorry, if you felt offended. I was simply reporting a bug. I am spending hours trying to get SciLab to work on macOS and compiling atoms toolboxes from scratch that are not available (yet) for macOS. At 2 a.m. I can crack a joke. Otherwise I would go insane. The world is not that black and white. In any case, I found a work around, not a real solution. When starting scilab through the Terminal window I can kind of load ATOMS, but not when starting the app. Cheers Willi -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From chinluh.tan at bytecode-asia.com Sun Nov 3 16:51:49 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Sun, 03 Nov 2019 23:51:49 +0800 Subject: [Scilab-users] How to know which is the system's font? In-Reply-To: <63309a28-8083-ea6a-df2a-1f80a6441712@free.fr> References: <1572312128342-0.post@n3.nabble.com> <16e1a73cd16.11a1ad31a664978.2997785307874790923@bytecode-asia.com> <8a60463d-8532-ec07-6295-ee5aa7d943e0@free.fr> <63309a28-8083-ea6a-df2a-1f80a6441712@free.fr> Message-ID: <16e31f71fb2.aca7ebd961297.2462827739258819043@bytecode-asia.com> Hi Samuel,? I see. In this case I am sorry for not able to help much, the last thing I could suggest (only for windows) is might be looking into the registry value.? unix_w('REG QUERY HKCU\Console\ /s') will shows the different shell fontface. so if you lauch the scilab-cli and change the font from the properties, you should be able to see the changes. however, it only for windows, and it does not tell the font used in Wscilex. rgds, CL ---- On Thu, 31 Oct 2019 19:24:10 +0800 Samuel Gougeon wrote ---- Le 31/10/2019 ? 12:15, Samuel Gougeon a ?crit?: Le 30/10/2019 ? 03:17, Chin Luh Tan a ?crit?: .../... --> my_font = xmlGetValues("//fonts/body/fonts", ["font-face", "font-name", "font-size", "item", "latex", "system"]) my_font? = !plain? Monospaced? 13? Console? 15? true? ! .../... But i don't know what the "item" stands for in this tag. It could set the preselected item Console|Scinotes of the "Custom font" section, but, after checking, it's not the case. Actually, it is the case (i might have forgotten doing something, saving the change?, when first testing): this attribute sets the preselected item of the Custom font section, when opening the GUI. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Sun Nov 3 17:20:29 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Mon, 04 Nov 2019 00:20:29 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <1572792359249-0.post@n3.nabble.com> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> <1572737649020-0.post@n3.nabble.com> <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> <1572792359249-0.post@n3.nabble.com> Message-ID: <16e32115ef4.10f5c295163306.1352580579141367502@bytecode-asia.com> Hi St?phane, Willi, First of all, thanks for the fix on the java issues and the Scilab could be launch in Catalina! Secondly, Willi, I was facing the same atoms issue with you when first launching the Scilab from the app, then I switch to the terminal and get it running. After the first time running from terminal, it seems to be alright to run from app after that. Could you confirm that? Thanks. rgds, CL ---- On Sun, 03 Nov 2019 22:45:59 +0800 knobs wrote ---- Hi St?phane, Sorry, if you felt offended. I was simply reporting a bug. I am spending hours trying to get SciLab to work on macOS and compiling atoms toolboxes from scratch that are not available (yet) for macOS. At 2 a.m. I can crack a joke. Otherwise I would go insane. The world is not that black and white. In any case, I found a work around, not a real solution. When starting scilab through the Terminal window I can kind of load ATOMS, but not when starting the app. Cheers Willi -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Sun Nov 3 17:23:43 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Mon, 04 Nov 2019 00:23:43 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <16e32115ef4.10f5c295163306.1352580579141367502@bytecode-asia.com> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> <1572737649020-0.post@n3.nabble.com> <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> <1572792359249-0.post@n3.nabble.com> <16e32115ef4.10f5c295163306.1352580579141367502@bytecode-asia.com> Message-ID: <16e3214554b.ef87cec863411.4658907353687882197@bytecode-asia.com> One more thing, the macos compilation guide which is using fink might be a bit outdated, anyone having any idea, should we use homebrew, mac_port, instead? thanks again. rgds, CL ---- On Mon, 04 Nov 2019 00:20:29 +0800 Chin Luh Tan wrote ---- Hi St?phane, Willi, First of all, thanks for the fix on the java issues and the Scilab could be launch in Catalina! Secondly, Willi, I was facing the same atoms issue with you when first launching the Scilab from the app, then I switch to the terminal and get it running. After the first time running from terminal, it seems to be alright to run from app after that. Could you confirm that? Thanks. rgds, CL ---- On Sun, 03 Nov 2019 22:45:59 +0800 knobs wrote ---- _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Hi St?phane, Sorry, if you felt offended. I was simply reporting a bug. I am spending hours trying to get SciLab to work on macOS and compiling atoms toolboxes from scratch that are not available (yet) for macOS. At 2 a.m. I can crack a joke. Otherwise I would go insane. The world is not that black and white. In any case, I found a work around, not a real solution. When starting scilab through the Terminal window I can kind of load ATOMS, but not when starting the app. Cheers Willi -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list mailto: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 Sun Nov 3 18:30:37 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Sun, 3 Nov 2019 18:30:37 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <1572792359249-0.post@n3.nabble.com> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> <1572737649020-0.post@n3.nabble.com> <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> <1572792359249-0.post@n3.nabble.com> Message-ID: Le 03/11/2019 ? 15:45, knobs a ?crit?: > Hi St?phane, > > Sorry, if you felt offended. I was simply reporting a bug. I am spending > hours trying to get SciLab to work on macOS You are not alone... > and compiling atoms toolboxes > from scratch that are not available (yet) for macOS. Glad to hear that kind of good news ! Which packages are you working on ? > At 2 a.m. I can crack a > joke. Otherwise I would go insane. The world is not that black and white. > > In any case, I found a work around, not a real solution. When starting > scilab through the Terminal window I can kind of load ATOMS, but not when > starting the app. I remember I had this problem (regexp error) when working on Mojave compatibility. Are you sure to have the latest 6.0.2 build (please give the full getversion() output) ? S. > > Cheers > Willi > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > 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 stephane.mottelet at utc.fr Sun Nov 3 18:32:20 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Sun, 3 Nov 2019 18:32:20 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <16e32115ef4.10f5c295163306.1352580579141367502@bytecode-asia.com> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> <1572737649020-0.post@n3.nabble.com> <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> <1572792359249-0.post@n3.nabble.com> <16e32115ef4.10f5c295163306.1352580579141367502@bytecode-asia.com> Message-ID: <3fef1d69-ca02-d678-9339-e8752626c7c9@utc.fr> Le 03/11/2019 ? 17:20, Chin Luh Tan a ?crit?: > Hi St?phane, Willi, > > First of all, thanks for the fix on the java issues and the Scilab > could be launch in Catalina! We should be able to bundle the JRE with Scilab. I hope for the next release. > > Secondly, Willi, I was facing the same atoms issue with you when first > launching the Scilab from the app, then I switch to the terminal and > get it running. After the first time running from terminal, it seems > to be alright to run from app after that. Could you confirm that? > > Thanks. > > rgds, > CL > > > ---- On Sun, 03 Nov 2019 22:45:59 +0800 *knobs * > wrote ---- > > Hi St?phane, > > Sorry, if you felt offended. I was simply reporting a bug. I am > spending > hours trying to get SciLab to work on macOS and compiling atoms > toolboxes > from scratch that are not available (yet) for macOS. At 2 a.m. I > can crack a > joke. Otherwise I would go insane. The world is not that black and > white. > > In any case, I found a work around, not a real solution. When starting > scilab through the Terminal window I can kind of load ATOMS, but > not when > starting the app. > > Cheers > Willi > > > > -- > 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 > > > > > > _______________________________________________ > 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 Sun Nov 3 18:42:07 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Sun, 3 Nov 2019 18:42:07 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <16e3214554b.ef87cec863411.4658907353687882197@bytecode-asia.com> References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> <1572737649020-0.post@n3.nabble.com> <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> <1572792359249-0.post@n3.nabble.com> <16e32115ef4.10f5c295163306.1352580579141367502@bytecode-asia.com> <16e3214554b.ef87cec863411.4658907353687882197@bytecode-asia.com> Message-ID: <6a78f555-a8fc-3827-cedd-8b0b1a2fca98@utc.fr> Le 03/11/2019 ? 17:23, Chin Luh Tan a ?crit?: > One more thing, the macos compilation guide which is using fink might > be a bit outdated, The official 6.0.2 build has been done on a High Sierra machine which is completely dedicated to this task. Starting from Mojave working with Fink began to be very painfull, and as far as Catalina is concerned, the Fink maintainers started to fix things only after the official Apple release. > anyone having any idea, should we use homebrew, mac_port, instead? On the other hand, the Homebrew guys prepared the transition during all the beta stage of Catalina. I have already made some Scilab builds with Homebrew and think I will use it for the next Scilab release. However, a bit of tweaking is necessary as some libraries have too recent versions (for example the libmatio recipe has to be modified to use hdf5 at 1.8 instead of 1.10). S. > > thanks again. > > rgds, > CL > > > ---- On Mon, 04 Nov 2019 00:20:29 +0800 *Chin Luh Tan > * wrote ---- > > Hi St?phane, Willi, > > First of all, thanks for the fix on the java issues and the Scilab > could be launch in Catalina! > > Secondly, Willi, I was facing the same atoms issue with you when > first launching the Scilab from the app, then I switch to the > terminal and get it running. After the first time running from > terminal, it seems to be alright to run from app after that. Could > you confirm that? > > Thanks. > > rgds, > CL > > > ---- On Sun, 03 Nov 2019 22:45:59 +0800 *knobs >* wrote ---- > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > Hi St?phane, > > Sorry, if you felt offended. I was simply reporting a bug. I > am spending > hours trying to get SciLab to work on macOS and compiling > atoms toolboxes > from scratch that are not available (yet) for macOS. At 2 a.m. > I can crack a > joke. Otherwise I would go insane. The world is not that black > and white. > > In any case, I found a work around, not a real solution. When > starting > scilab through the Terminal window I can kind of load ATOMS, > but not when > starting the app. > > Cheers > Willi > > > > -- > 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 > > > > > > _______________________________________________ > 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 wknoelly at gmail.com Sun Nov 3 20:47:45 2019 From: wknoelly at gmail.com (knobs) Date: Sun, 3 Nov 2019 12:47:45 -0700 (MST) Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: References: <12801866-CB20-4840-AE8D-DF1B233F4EB4@me.com> <1572712881008-0.post@n3.nabble.com> <596AC828-1FA1-4283-A7A0-FBA0D57313D9@utc.fr> <1572735818872-0.post@n3.nabble.com> <1572737649020-0.post@n3.nabble.com> <4837B145-D9B9-4B84-B9CE-6F5C0E919AD9@utc.fr> <1572792359249-0.post@n3.nabble.com> Message-ID: <1572810465872-0.post@n3.nabble.com> Hi, I had worked on CelestLab and different CV packages and compiled them in Sierra or High Sierra (not sure anymore). IPCV and SciCV. Both are now readily available... No more need to compile them ;-) I am not compiling SciLab from scratch. That would be beyond my capabilities. I only use Homebrew. No Fink no MacPorts. So far I am very happy with what I can find on Homebrew. There are still issues with ATOMS when start it through the Menu. Starting scilab through the Terminal window helped populating and downloading the list of package and categories. After that I can start the ATOMS GUI when starting SciLab as an app. I can hence confirm Chin Luh Tan's experience. E.g. CelestLab could be installed through the Menu and the GUI. No issues at all. After the SciLab restart, I could not install IPCV or other toolboxes this way. Different messages. Typically it cannot find certain files or the html links are broken. So maybe it is either the file/directory structure of the zip file or the link to the zip file does not exist anymore. Thus it might actually be neither a SciLab nor an ATOMS issue (indirectly maybe). Then I deleted all leftovers of IPCV in the contrib folder and used atomsInstall('IPCV'), which put the files in the share/.../contrib folder, but I realized the folder structure is wrong (not recognised?). I had to move all files and subdirectories from the .../IPCV/IPCV folder to .../IPCV/4.1/ Then everything works perfectly. Very tricky. BTW, output from getversion() is "scilab-6.0.2". W. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From stephane.mottelet at utc.fr Sun Nov 3 21:44:17 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sun, 3 Nov 2019 21:44:17 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <1572810465872-0.post@n3.nabble.com> References: <1572810465872-0.post@n3.nabble.com> Message-ID: <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> > Le 3 nov. 2019 ? 20:48, knobs a ?crit : > > ?Hi, > > I had worked on CelestLab and different CV packages and compiled them in > Sierra or High Sierra (not sure anymore). IPCV and SciCV. Both are now > readily available... No more need to compile them ;-) > > I am not compiling SciLab from scratch. That would be beyond my > capabilities. > > I only use Homebrew. No Fink no MacPorts. So far I am very happy with what > I can find on Homebrew. > > There are still issues with ATOMS when start it through the Menu. Starting > scilab through the Terminal window helped populating and downloading the > list of package and categories. After that I can start the ATOMS GUI when > starting SciLab as an app. I can hence confirm Chin Luh Tan's experience. > > E.g. CelestLab could be installed through the Menu and the GUI. No issues at > all. After the SciLab restart, I could not install IPCV or other toolboxes > this way. Different messages. Typically it cannot find certain files or the > html links are broken. So maybe it is either the file/directory structure of > the zip file or the link to the zip file does not exist anymore. Thus it > might actually be neither a SciLab nor an ATOMS issue (indirectly maybe). > > Then I deleted all leftovers of IPCV in the contrib folder and used > atomsInstall('IPCV'), which put the files in the share/.../contrib folder, > but I realized the folder structure is wrong (not recognised?). I had to > move all files and subdirectories from the .../IPCV/IPCV folder to > .../IPCV/4.1/ Then everything works perfectly. > > Very tricky. > > BTW, output from getversion() is "scilab-6.0.2". > > W. > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Sun Nov 3 21:54:48 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Sun, 3 Nov 2019 21:54:48 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> Message-ID: <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> I meant [version, opts] = getversion() Le 03/11/2019 ? 21:44, St?phane Mottelet a ?crit?: > >> Le 3 nov. 2019 ? 20:48, knobs a ?crit : >> >> ?Hi, >> >> I had worked on CelestLab and different CV packages and compiled them in >> Sierra or High Sierra (not sure anymore). IPCV and SciCV. Both are now >> readily available... No more need to compile them ;-) >> >> I am not compiling SciLab from scratch. That would be beyond my >> capabilities. >> >> I only use Homebrew. No Fink no MacPorts. So far I am very happy with what >> I can find on Homebrew. >> >> There are still issues with ATOMS when start it through the Menu. Starting >> scilab through the Terminal window helped populating and downloading the >> list of package and categories. After that I can start the ATOMS GUI when >> starting SciLab as an app. I can hence confirm Chin Luh Tan's experience. >> >> E.g. CelestLab could be installed through the Menu and the GUI. No issues at >> all. After the SciLab restart, I could not install IPCV or other toolboxes >> this way. Different messages. Typically it cannot find certain files or the >> html links are broken. So maybe it is either the file/directory structure of >> the zip file or the link to the zip file does not exist anymore. Thus it >> might actually be neither a SciLab nor an ATOMS issue (indirectly maybe). >> >> Then I deleted all leftovers of IPCV in the contrib folder and used >> atomsInstall('IPCV'), which put the files in the share/.../contrib folder, >> but I realized the folder structure is wrong (not recognised?). I had to >> move all files and subdirectories from the .../IPCV/IPCV folder to >> .../IPCV/4.1/ Then everything works perfectly. >> >> Very tricky. >> >> BTW, output from getversion() is "scilab-6.0.2". >> >> W. >> >> >> >> -- >> Sent from: https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html >> _______________________________________________ >> 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 -- 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 perrichon.pierre at wanadoo.fr Sun Nov 3 23:54:30 2019 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Sun, 3 Nov 2019 23:54:30 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> Message-ID: Hello Could you continue your conversion in private ? Thanks for everybody P. Before printing, think about ENVIRONMENTAL responsabity -----Message d'origine----- De : users De la part de St?phane Mottelet Envoy? : dimanche 3 novembre 2019 21:55 ? : users at lists.scilab.org Objet : Re: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? I meant [version, opts] = getversion() Le 03/11/2019 ? 21:44, St?phane Mottelet a ?crit : > >> Le 3 nov. 2019 ? 20:48, knobs a ?crit : >> >> ?Hi, >> >> I had worked on CelestLab and different CV packages and compiled them >> in Sierra or High Sierra (not sure anymore). IPCV and SciCV. Both are >> now readily available... No more need to compile them ;-) >> >> I am not compiling SciLab from scratch. That would be beyond my >> capabilities. >> >> I only use Homebrew. No Fink no MacPorts. So far I am very happy >> with what I can find on Homebrew. >> >> There are still issues with ATOMS when start it through the Menu. >> Starting scilab through the Terminal window helped populating and >> downloading the list of package and categories. After that I can >> start the ATOMS GUI when starting SciLab as an app. I can hence confirm Chin Luh Tan's experience. >> >> E.g. CelestLab could be installed through the Menu and the GUI. No >> issues at all. After the SciLab restart, I could not install IPCV or >> other toolboxes this way. Different messages. Typically it cannot >> find certain files or the html links are broken. So maybe it is >> either the file/directory structure of the zip file or the link to >> the zip file does not exist anymore. Thus it might actually be neither a SciLab nor an ATOMS issue (indirectly maybe). >> >> Then I deleted all leftovers of IPCV in the contrib folder and used >> atomsInstall('IPCV'), which put the files in the share/.../contrib >> folder, but I realized the folder structure is wrong (not >> recognised?). I had to move all files and subdirectories from the >> .../IPCV/IPCV folder to .../IPCV/4.1/ Then everything works perfectly. >> >> Very tricky. >> >> BTW, output from getversion() is "scilab-6.0.2". >> >> W. >> >> >> >> -- >> Sent from: >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti >> spam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.sci >> lab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti >> spam.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 http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: PERRICHON Pierre.vcf Type: text/x-vcard Size: 3135 bytes Desc: not available URL: From chinluh.tan at bytecode-asia.com Mon Nov 4 02:08:30 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Mon, 04 Nov 2019 09:08:30 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> Message-ID: <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> Hi Perrichon, Apologize in advance but I think the this conversation is actually solving quite some issues in MacOS and I felt that it could be helpful to continue in mailing list. However, I've no objection to bring it private as well, please keep me in the loop if it goes private. :) For MacOS users I think they are couple of issues which has been resolved (or some workaround) by this thread. Base on the conversation, I think we could come out with some guideline which could be helpful: 1. for version before High Sierra (10.13), everything works fine, from scilab 6.0.1 to 6.0.2, and I could confirm that atomsInstall for modules such as IPCV works perfectly on this platform for both 6.0.1 and 6.0.2 2. with Stephen help, using the patch for Java, Scilab 6.0.2 could launch on Catalina (10.15) successfully. 3. Issues with atoms on MacOS arise since Majove (10.14), including Catalina,? the very same module during the installation gives issue, which has been reported here: http://forge.scilab.org/index.php/p/ipcv/issues/1919/?. 4. This prompt us to explore further, and found out that modules with only macros seems ok, but the one with gateway will have this issues. 5. We have to emphasis, the very same module works on Scilab 6.0.2 MacOS High Sierra, It only broke since Majove where the extractions of modules seems to be very very different with previous version of Mac. I would not say it is MacOS or Scilab issue, but obviously it seems to be some changes in MacOS that caused this behavior? In summary, with Stephen's fix, the Scilab 6.0.2 could now run on MacOS Catalina, while with Willi finding on the modules folders disorganization and how to manually move them around, we could make the modules run as well. I think this is quite a great achievement so far to provide Mac users a workaround for current issues, and let's make it even better in coming release! Cheers! Thanks Regards, Chin Luh ---- On Mon, 04 Nov 2019 06:54:30 +0800 Perrichon wrote ---- Hello Could you continue your conversion in private ? Thanks for everybody P. Before printing, think about ENVIRONMENTAL responsabity -----Message d'origine----- De : users De la part de St?phane Mottelet Envoy? : dimanche 3 novembre 2019 21:55 ? : mailto:users at lists.scilab.org Objet : Re: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? I meant [version, opts] = getversion() Le 03/11/2019 ? 21:44, St?phane Mottelet a ?crit : > >> Le 3 nov. 2019 ? 20:48, knobs a ?crit : >> >> ?Hi, >> >> I had worked on CelestLab and different CV packages and compiled them >> in Sierra or High Sierra (not sure anymore). IPCV and SciCV. Both are >> now readily available... No more need to compile them ;-) >> >> I am not compiling SciLab from scratch. That would be beyond my >> capabilities. >> >> I only use Homebrew. No Fink no MacPorts. So far I am very happy >> with what I can find on Homebrew. >> >> There are still issues with ATOMS when start it through the Menu. >> Starting scilab through the Terminal window helped populating and >> downloading the list of package and categories. After that I can >> start the ATOMS GUI when starting SciLab as an app. I can hence confirm Chin Luh Tan's experience. >> >> E.g. CelestLab could be installed through the Menu and the GUI. No >> issues at all. After the SciLab restart, I could not install IPCV or >> other toolboxes this way. Different messages. Typically it cannot >> find certain files or the html links are broken. So maybe it is >> either the file/directory structure of the zip file or the link to >> the zip file does not exist anymore. Thus it might actually be neither a SciLab nor an ATOMS issue (indirectly maybe). >> >> Then I deleted all leftovers of IPCV in the contrib folder and used >> atomsInstall('IPCV'), which put the files in the share/.../contrib >> folder, but I realized the folder structure is wrong (not >> recognised?). I had to move all files and subdirectories from the >> .../IPCV/IPCV folder to .../IPCV/4.1/ Then everything works perfectly. >> >> Very tricky. >> >> BTW, output from getversion() is "scilab-6.0.2". >> >> W. >> >> >> >> -- >> Sent from: >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti >> spam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.sci >> lab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html >> _______________________________________________ >> users mailing list >> mailto:users at lists.scilab.org >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti >> spam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org >> /mailman/listinfo/users > _______________________________________________ > users mailing list > mailto: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 mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Mon Nov 4 04:34:04 2019 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Mon, 4 Nov 2019 04:34:04 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> Message-ID: <001801d592c0$ba59c880$2f0d5980$@wanadoo.fr> Dear tan Many thanks for your poem. It is so romantic. No sure you speak to the right person I have no mac at home sincerely yours De : users De la part de Chin Luh Tan Envoy? : lundi 4 novembre 2019 02:09 ? : Users mailing list for Scilab Cc : 'Users mailing list for Scilab' Objet : Re: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? Hi Perrichon, Apologize in advance but I think the this conversation is actually solving quite some issues in MacOS and I felt that it could be helpful to continue in mailing list. However, I've no objection to bring it private as well, please keep me in the loop if it goes private. :) For MacOS users I think they are couple of issues which has been resolved (or some workaround) by this thread. Base on the conversation, I think we could come out with some guideline which could be helpful: 1. for version before High Sierra (10.13), everything works fine, from scilab 6.0.1 to 6.0.2, and I could confirm that atomsInstall for modules such as IPCV works perfectly on this platform for both 6.0.1 and 6.0.2 2. with Stephen help, using the patch for Java, Scilab 6.0.2 could launch on Catalina (10.15) successfully. 3. Issues with atoms on MacOS arise since Majove (10.14), including Catalina, the very same module during the installation gives issue, which has been reported here: http://forge.scilab.org/index.php/p/ipcv/issues/1919/ . 4. This prompt us to explore further, and found out that modules with only macros seems ok, but the one with gateway will have this issues. 5. We have to emphasis, the very same module works on Scilab 6.0.2 MacOS High Sierra, It only broke since Majove where the extractions of modules seems to be very very different with previous version of Mac. I would not say it is MacOS or Scilab issue, but obviously it seems to be some changes in MacOS that caused this behavior? In summary, with Stephen's fix, the Scilab 6.0.2 could now run on MacOS Catalina, while with Willi finding on the modules folders disorganization and how to manually move them around, we could make the modules run as well. I think this is quite a great achievement so far to provide Mac users a workaround for current issues, and let's make it even better in coming release! Cheers! Thanks Regards, Chin Luh ---- On Mon, 04 Nov 2019 06:54:30 +0800 Perrichon > wrote ---- Hello Could you continue your conversion in private ? Thanks for everybody P. Before printing, think about ENVIRONMENTAL responsabity -----Message d'origine----- De : users > De la part de St?phane Mottelet Envoy? : dimanche 3 novembre 2019 21:55 ? : users at lists.scilab.org Objet : Re: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? I meant [version, opts] = getversion() Le 03/11/2019 ? 21:44, St?phane Mottelet a ?crit : > >> Le 3 nov. 2019 ? 20:48, knobs > a ?crit : >> >> ?Hi, >> >> I had worked on CelestLab and different CV packages and compiled them >> in Sierra or High Sierra (not sure anymore). IPCV and SciCV. Both are >> now readily available... No more need to compile them ;-) >> >> I am not compiling SciLab from scratch. That would be beyond my >> capabilities. >> >> I only use Homebrew. No Fink no MacPorts. So far I am very happy >> with what I can find on Homebrew. >> >> There are still issues with ATOMS when start it through the Menu. >> Starting scilab through the Terminal window helped populating and >> downloading the list of package and categories. After that I can >> start the ATOMS GUI when starting SciLab as an app. I can hence confirm Chin Luh Tan's experience. >> >> E.g. CelestLab could be installed through the Menu and the GUI. No >> issues at all. After the SciLab restart, I could not install IPCV or >> other toolboxes this way. Different messages. Typically it cannot >> find certain files or the html links are broken. So maybe it is >> either the file/directory structure of the zip file or the link to >> the zip file does not exist anymore. Thus it might actually be neither a SciLab nor an ATOMS issue (indirectly maybe). >> >> Then I deleted all leftovers of IPCV in the contrib folder and used >> atomsInstall('IPCV'), which put the files in the share/.../contrib >> folder, but I realized the folder structure is wrong (not >> recognised?). I had to move all files and subdirectories from the >> .../IPCV/IPCV folder to .../IPCV/4.1/ Then everything works perfectly. >> >> Very tricky. >> >> BTW, output from getversion() is "scilab-6.0.2". >> >> W. >> >> >> >> -- >> Sent from: >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti >> spam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.sci >> lab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti >> spam.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 http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 4 12:58:29 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 12:58:29 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> Message-ID: <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> Hello, Concerning the ATOMS problems with 6.0.2 on OSX Catalina (Windows users please stop reading further... ;-)), I have the following error on a freshly installed configuration (dedicated partition on my machine): Scilab 6.0.2 (Aug 19 2019, 11:47:50) ? --> ATOMSLIST atomsDownload: The following file hasn't been downloaded: - URL? ? ? : 'http://atoms.scilab.org/6.0/TOOLBOXES/64/macosx.gz' - Local location : '/private/var/folders/pp/hrld62h917x_ccf55yzn78z00000gn/T/SCI_TMP_1093_DIw7vR/.atoms/1_TOOLBOXES.gz' WARNING: error: Wrong type for input argument #1: string expected. Scanning repository http://atoms.scilab.org/6.0 ... Skipped ? at line ? 198 of function atomsDESCRIPTIONget ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONget.sci line 217 ) at line? ? 38 of function atomsList ? ? ? ? ? ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atomsList.sci line 54 ) ? All ATOMS repositories scan failed. In fact the temp folder? /private/var/folders/pp/hrld62h917x_ccf55yzn78z00000gn/T/SCI_TMP_1093_DIw7vR/.atoms is empty.?This is not a network problem as the following command succeeds: ? --> GETURL HTTP://ATOMS.SCILAB.ORG/6.0/TOOLBOXES/64/MACOSX.GZ? ?ans? = ? ? ?/Users/mottelet/macosx.gz Samuel do you have an idea ? S. Chin Luh Tan a ?crit?: > Hi Perrichon, > ? > Apologize in advance but I think the this conversation is > actually solving quite some issues in MacOS and I felt that it could > be helpful to continue in mailing list. However, I've no objection > to bring it private as well, please keep me in the loop if it goes > private. :) > ? > For MacOS users I think they are couple of issues which has been > resolved (or some workaround) by this thread. Base on the > conversation, I think we could come out with some guideline which > could be helpful: > ? > 1. for version before High Sierra (10.13), everything works fine, > from scilab 6.0.1 to 6.0.2, and I could confirm that atomsInstall > for modules such as IPCV works perfectly on this platform for both > 6.0.1 and 6.0.2 > ? > 2. with Stephen help, using the patch for Java, Scilab 6.0.2 > could launch on Catalina (10.15) successfully. > ? > 3. Issues with atoms on MacOS arise since Majove (10.14), > including Catalina,? the very same module during the installation > gives issue, which has been reported here: > http://forge.scilab.org/index.php/p/ipcv/issues/1919/[1]?. > ? > 4. This prompt us to explore further, and found out that modules > with only macros seems ok, but the one with gateway will have this > issues. > ? > 5. We have to emphasis, the very same module works on Scilab > 6.0.2 MacOS High Sierra, It only broke since Majove where the > extractions of modules seems to be very very different with previous > version of Mac. I would not say it is MacOS or Scilab issue, but > obviously it seems to be some changes in MacOS that caused this > behavior? > ? > In summary, with Stephen's fix, the Scilab 6.0.2 could now run on > MacOS Catalina, while with Willi finding on the modules folders > disorganization and how to manually move them around, we could make > the modules run as well. I think this is quite a great achievement > so far to provide Mac users a workaround for current issues, and > let's make it even better in coming release! > ? > Cheers! > ? > Thanks > ? > Regards, > Chin Luh > ? > ? > ? > ? > ---- On Mon, 04 Nov 2019 06:54:30 +0800 PERRICHON > wrote ---- > ? > >> Hello >> Could you continue your conversion in private ? >> Thanks for everybody >> P. >> >> Before printing, think about ENVIRONMENTAL responsabity >> >> -----Message d'origine----- >> De : users De la part de St?phane Mottelet >> Envoy? : dimanche 3 novembre 2019 21:55 >> ? : users at lists.scilab.org >> Objet : Re: [Scilab-users] Scilab cannot work on macOS 10.15 >> Catalina: Any progress in sight? >> >> I meant >> >> [version, opts] = getversion() >> >> Le 03/11/2019 ? 21:44, St?phane Mottelet a ?crit : >>> >>>> Le 3 nov. 2019 ? 20:48, knobs a ?crit : >>>> >>>> ?Hi, >>>> >>>> I had worked on CelestLab and different CV packages and compiled them >>>> in Sierra or High Sierra (not sure anymore). IPCV and SciCV. Both are >>>> now readily available... No more need to compile them ;-) >>>> >>>> I am not compiling SciLab from scratch. That would be beyond my >>>> capabilities. >>>> >>>> I only use Homebrew. No Fink no MacPorts. So far I am very happy >>>> with what I can find on Homebrew. >>>> >>>> There are still issues with ATOMS when start it through the Menu. >>>> Starting scilab through the Terminal window helped populating and >>>> downloading the list of package and categories. After that I can >>>> start the ATOMS GUI when starting SciLab as an app. I can hence >>>> confirm Chin Luh Tan's experience. >>>> >>>> E.g. CelestLab could be installed through the Menu and the GUI. No >>>> issues at all. After the SciLab restart, I could not install IPCV or >>>> other toolboxes this way. Different messages. Typically it cannot >>>> find certain files or the html links are broken. So maybe it is >>>> either the file/directory structure of the zip file or the link to >>>> the zip file does not exist anymore. Thus it might actually be >>>> neither a SciLab nor an ATOMS issue (indirectly maybe). >>>> >>>> Then I deleted all leftovers of IPCV in the contrib folder and used >>>> atomsInstall('IPCV'), which put the files in the share/.../contrib >>>> folder, but I realized the folder structure is wrong (not >>>> recognised?). I had to move all files and subdirectories from the >>>> .../IPCV/IPCV folder to .../IPCV/4.1/ Then everything works perfectly. >>>> >>>> Very tricky. >>>> >>>> BTW, output from getversion() is "scilab-6.0.2". >>>> >>>> W. >>>> >>>> >>>> >>>> -- >>>> Sent from: >>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti[2] >>>> spam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.sci >>>> lab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti[2] >>>> spam.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[3] >>> .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[4] >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users[5] >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users[5] > > ? Liens: ------ [1] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/forge.scilab.org/index.php/p/ipcv/issues/1919/ [2] https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/anti [3] https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists [4] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet [5] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at me.com Mon Nov 4 13:17:28 2019 From: heinznabielek at me.com (Heinz Nabielek) Date: Mon, 4 Nov 2019 13:17:28 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> Message-ID: On 04.11.2019, at 12:58, stephane.mottelet at utc.fr wrote: > > atomsList Never used atoms nor do I know, what they are good for, but my 6.02 in Catalina gives --> atomsList animaGIF - stand-alone creation of an animated GIF image from images files or from a live figure ANN_Toolbox - Artificial Neural Network toolbox apifun - Check input arguments in macros Altogether 66 lines. Is there something that I can check for you? Heinz From stephane.mottelet at utc.fr Mon Nov 4 13:31:24 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 13:31:24 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> Message-ID: <20191104133124.Horde.MFtNzosjXWCi8Z69h5LGoFC@webmail.utc.fr> Thanks Heinz, this is weird. In fact the problem comes from the libcurl which is bundled with Scilab. I think the lib was bundled for historical reasons (libcurl was likely needed for old OSX versions). Since the problem occurs for a Catalina clean install, without any additionnal software such as Xcode, developper tools, command line tools (which could eventually install a different curl binary), I think we should remove these libraries from SCI/../../lib/thirdparty/, or at least change the order in the DYLD_LIBRARY_PATH in the bin/scilab script. S. Heinz Nabielek a ?crit?: > On 04.11.2019, at 12:58, stephane.mottelet at utc.fr wrote: >> atomsList > > Never used atoms nor do I know, what they are good for, but my 6.02 > in Catalina gives > > --> atomsList > ? ? ? ? ? ? ? ? ? ? ? ?animaGIF - stand-alone creation of an > animated GIF image from images files or from a live figure > ? ? ? ? ? ? ? ? ? ? ANN_Toolbox - Artificial Neural Network toolbox > ? ? ? ? ? ? ? ? ? ? ? ? ?apifun - Check input arguments in macros > > Altogether 66 lines. > > Is there something that I can check for you?Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Mon Nov 4 13:38:06 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Mon, 04 Nov 2019 20:38:06 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104133124.Horde.MFtNzosjXWCi8Z69h5LGoFC@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <20191104133124.Horde.MFtNzosjXWCi8Z69h5LGoFC@webmail.utc.fr> Message-ID: <16e366c1fd2.ef977b3d161691.5432729002748743@bytecode-asia.com> hi, as willi suggested, hv u tried to launch the scilab from terminal and run the command again? thanks. rdgs, CL ---- On Mon, 04 Nov 2019 20:31:24 +0800 wrote ---- Thanks Heinz, this is weird. In fact the problem comes from the libcurl which is bundled with Scilab. I think the lib was bundled for historical reasons (libcurl was likely needed for old OSX versions). Since the problem occurs for a Catalina clean install, without any additionnal software such as Xcode, developper tools, command line tools (which could eventually install a different curl binary), I think we should remove these libraries from SCI/../../lib/thirdparty/, or at least change the order in the DYLD_LIBRARY_PATH in the bin/scilab script. S. Heinz Nabielek a ?crit?: On 04.11.2019, at 12:58, mailto:stephane.mottelet at utc.fr wrote: atomsList Never used atoms nor do I know, what they are good for, but my 6.02 in Catalina gives --> atomsList ? ? ? ? ? ? ? ? ? ? ? ?animaGIF - stand-alone creation of an animated GIF image from images files or from a live figure ? ? ? ? ? ? ? ? ? ? ANN_Toolbox - Artificial Neural Network toolbox ? ? ? ? ? ? ? ? ? ? ? ? ?apifun - Check input arguments in macros Altogether 66 lines. Is there something that I can check for you?Heinz _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 4 13:42:41 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 13:42:41 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <16e366c1fd2.ef977b3d161691.5432729002748743@bytecode-asia.com> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <20191104133124.Horde.MFtNzosjXWCi8Z69h5LGoFC@webmail.utc.fr> <16e366c1fd2.ef977b3d161691.5432729002748743@bytecode-asia.com> Message-ID: <20191104134241.Horde.RQsyTStGqEN_LseEquu-uui@webmail.utc.fr> I made the test from the command line. However, I think the regexp problem (which I didn't have) has a different origin. S. Chin Luh Tan a ?crit?: > hi, > ? > as willi suggested, hv u tried to launch the scilab from terminal > and run the command again? > ? > thanks. > ? > rdgs, > CL > > > ---- On Mon, 04 Nov 2019 20:31:24 +0800 > wrote ---- > >> Thanks Heinz, this is weird. In fact the problem comes from the >> libcurl which is bundled with Scilab. I think the lib was bundled >> for historical reasons (libcurl was likely needed for old OSX >> versions). >> >> Since the problem occurs for a Catalina clean install, without any >> additionnal software such as Xcode, developper tools, command line >> tools (which could eventually install a different curl binary), I >> think we should remove these libraries from >> SCI/../../lib/thirdparty/, or at least change the order in the >> DYLD_LIBRARY_PATH in the bin/scilab script. >> >> S. >> >> Heinz Nabielek a ?crit?: >> >>> On 04.11.2019, at 12:58, stephane.mottelet at utc.fr wrote: >>> >>>> atomsList >>> >>> Never used atoms nor do I know, what they are good for, but my >>> 6.02 in Catalina gives >>> >>> --> atomsList >>> ? ? ? ? ? ? ? ? ? ? ? ?animaGIF - stand-alone creation of an >>> animated GIF image from images files or from a live figure >>> ? ? ? ? ? ? ? ? ? ? ANN_Toolbox - Artificial Neural Network toolbox >>> ? ? ? ? ? ? ? ? ? ? ? ? ?apifun - Check input arguments in macros >>> >>> Altogether 66 lines. >>> >>> Is there something that I can check for you?Heinz >> >> >> ? >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Mon Nov 4 13:48:38 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Mon, 04 Nov 2019 20:48:38 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104134241.Horde.RQsyTStGqEN_LseEquu-uui@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <20191104133124.Horde.MFtNzosjXWCi8Z69h5LGoFC@webmail.utc.fr> <16e366c1fd2.ef977b3d161691.5432729002748743@bytecode-asia.com> <20191104134241.Horde.RQsyTStGqEN_LseEquu-uui@webmail.utc.fr> Message-ID: <16e3675c536.f030eccd163536.6005092305852644487@bytecode-asia.com> i see, sorry for overlooked the error message. 1 last stupid suggestion, could u also try to launch the scilab with sudo from command line? rgds, CL ---- On Mon, 04 Nov 2019 20:42:41 +0800 wrote ---- I made the test from the command line. However, I think the regexp problem (which I didn't have) has a different origin. S. Chin Luh Tan a ?crit?: hi, ? as willi suggested, hv u tried to launch the scilab from terminal and run the command again? ? thanks. ? rdgs, CL ---- On Mon, 04 Nov 2019 20:31:24 +0800 wrote ---- Thanks Heinz, this is weird. In fact the problem comes from the libcurl which is bundled with Scilab. I think the lib was bundled for historical reasons (libcurl was likely needed for old OSX versions). Since the problem occurs for a Catalina clean install, without any additionnal software such as Xcode, developper tools, command line tools (which could eventually install a different curl binary), I think we should remove these libraries from SCI/../../lib/thirdparty/, or at least change the order in the DYLD_LIBRARY_PATH in the bin/scilab script. S. Heinz Nabielek a ?crit?: On 04.11.2019, at 12:58, mailto:stephane.mottelet at utc.fr wrote: atomsList Never used atoms nor do I know, what they are good for, but my 6.02 in Catalina gives --> atomsList ? ? ? ? ? ? ? ? ? ? ? ?animaGIF - stand-alone creation of an animated GIF image from images files or from a live figure ? ? ? ? ? ? ? ? ? ? ANN_Toolbox - Artificial Neural Network toolbox ? ? ? ? ? ? ? ? ? ? ? ? ?apifun - Check input arguments in macros Altogether 66 lines. Is there something that I can check for you?Heinz ? _______________________________________________ users mailing list mailto: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 sgougeon at free.fr Mon Nov 4 14:16:19 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 4 Nov 2019 14:16:19 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> Message-ID: <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> Le 04/11/2019 ? 12:58, stephane.mottelet at utc.fr a ?crit?: > > Hello, > > Concerning the ATOMS problems with 6.0.2 on OSX Catalina (Windows > users please stop reading further... ;-)), I have the following error > on a freshly installed configuration (dedicated partition on my machine): > > Scilab 6.0.2 (Aug 19 2019, 11:47:50) > > --> *atomsList* > > atomsDownload: The following file hasn't been downloaded: > > - URL : 'http://atoms.scilab.org/6.0/TOOLBOXES/64/macosx.gz' > > - Local location : > '/private/var/folders/pp/hrld62h917x_ccf55yzn78z00000gn/T/SCI_TMP_1093_DIw7vR/.atoms/1_TOOLBOXES.gz' > > WARNING: error: Wrong type for input argument #1: string expected. > > Scanning repository http://atoms.scilab.org/6.0 ... Skipped > > at line 198 of function atomsDESCRIPTIONget ( > /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONget.sci > line 217 ) > > at line 38 of function atomsList ? ? ? ? ? ( > /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atomsList.sci > line 54 ) > > All ATOMS repositories scan failed. > > > In fact the temp folder > > /private/var/folders/pp/hrld62h917x_ccf55yzn78z00000gn/T/SCI_TMP_1093_DIw7vR/.atoms > > is empty.?This is not a network problem as the following command succeeds: > > --> *getURL http://atoms.scilab.org/6.0/TOOLBOXES/64/macosx.gz * > > ?ans? = > > ?/Users/mottelet/macosx.gz > > Samuel do you have an idea ? > It is possibly either a file-locking issue (for instance due to a previous error without closing the file, that atoms then tries to overwrite. Possible workaround : quit the session to unlock the file, and retry), or an unzip issue (there were formerly many issues due to the fact that unzipping did not force overwritting ; but that should be completely fixed in 6.0.2). For some (fortunately very rare) ATOMS modules, the software used by the author to bundle the ATOMS archive of the module is not a standard one, and the ATOMS unzip command is not able to do the job. But it's not the case here. The regexp error is very likely due to an empty case after failing to get a vector (of packages names or either): --> regexp([],"hk") regexp: Wrong type for input argument #1: string expected. It's hard to debug when an issue is transient or not fully reproducible. By the way, i have no easy access to a MacOS computer. For contribution Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 4 14:55:17 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 14:55:17 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> Message-ID: <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg CL, Heinz, Willi can you test it ? I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing S. Samuel Gougeon a ?crit?: > Le 04/11/2019 ? 12:58, stephane.mottelet at utc.fr a ?crit?: > >> ? Hello, Concerning the ATOMS problems with 6.0.2 on OSX Catalina (Windows users please stop reading further... ;-)), I have the following error on a freshly installed configuration (dedicated partition on my machine): Scilab 6.0.2 (Aug 19 2019, 11:47:50) ? --> ATOMSLIST atomsDownload: The following file hasn't been downloaded: - URL? ? ? : 'http://atoms.scilab.org/6.0/TOOLBOXES/64/macosx.gz[1]' - Local location : '/private/var/folders/pp/hrld62h917x_ccf55yzn78z00000gn/T/SCI_TMP_1093_DIw7vR/.atoms/1_TOOLBOXES.gz' WARNING: error: Wrong type for input argument #1: string expected. Scanning repository http://atoms.scilab.org/6.0[2] ... Skipped ? at line ? 198 of function atomsDESCRIPTIONget ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONget.sci line 217 ) at line? ? 38 of function atomsList ? ? ? ? ? ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atomsList.sci line 54 ) ? All ATOMS repositories scan failed. In fact the temp folder? /private/var/folders/pp/hrld62h917x_ccf55yzn78z00000gn/T/SCI_TMP_1093_DIw7vR/.atoms is empty.?This is not a network problem as the following command succeeds: ? --> GETURL HTTP://ATOMS.SCILAB.ORG/6.0/TOOLBOXES/64/MACOSX.GZ[1]? ?ans? = ? ? ?/Users/mottelet/macosx.gz Samuel do you have an idea ? ? It is possibly either a file-locking issue (for instance due to a previous error without closing the file, that atoms then tries to overwrite. Possible workaround : quit the session to unlock the file, and retry), or an unzip issue (there were formerly many issues due to the fact that unzipping did not force overwritting ; but that should be completely fixed in 6.0.2). For some (fortunately very rare) ATOMS modules, the software used by the author to bundle the ATOMS archive of the module is not a standard one, and the ATOMS unzip command is not able to do the job. But it's not the case here. The regexp error is very likely due to an empty case after failing to get a vector (of packages names or either): --> regexp([],"hk") regexp: Wrong type for input argument #1: string expected. It's hard to debug when an issue is transient or not fully reproducible. By the way, i have no easy access to a MacOS computer. For contribution Samuel ? Liens: ------ [1] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/atoms.scilab.org/6.0/TOOLBOXES/64/macosx.gz [2] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/atoms.scilab.org/6.0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at me.com Mon Nov 4 15:34:26 2019 From: heinznabielek at me.com (Heinz Nabielek) Date: Mon, 4 Nov 2019 15:34:26 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> Message-ID: <71207106-7A87-44B0-9972-54837875A74A@me.com> On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: > > Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: > > http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg > > CL, Heinz, Willi can you test it ? Works to perfection and without this funny warning. > I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing Thanks. Very helpful. Great suggestion. I would not have thought of it?.. Thanks for your dedication to this work. Heinz From stephane.mottelet at utc.fr Mon Nov 4 15:40:20 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 15:40:20 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <71207106-7A87-44B0-9972-54837875A74A@me.com> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> Message-ID: <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> Did you test the Atoms stuff ? Heinz Nabielek a ?crit?: > On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: >> Thanks Samuel. So the regexp error can eventually have the same >> cause (libcurl version mismatch). I have packaged a scilab-6.0.2 >> without these libraries (and removing the 10.15 warning) for OSX >> users at the following URL: >> >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg >> >> CL, Heinz, Willi can you test it ? > > Works to perfection and without this funny warning. > >> I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 >> directory before testing > > Thanks. Very helpful. Great suggestion. I would not have thought of it?.. > > Thanks for your dedication to this work.Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Mon Nov 4 16:43:20 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Mon, 04 Nov 2019 23:43:20 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> Message-ID: <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> Hi,? from my end: 1. The warning for the 10.15 gone.? 2. First launch from the app still give the regexp error when running atomsList, but after running one time from terminal and get it run successfully, I could run it from the app as after all.? 3. atomsInstall for the module with gateway folder still extracted to 2 separate folders which need to be manually move in order for it to run. No issue for macros only module.? Thanks for the great effort. Is is possible to share the compilation steps?? rgds, CL ---- On Mon, 04 Nov 2019 22:40:20 +0800 wrote ---- Did you test the Atoms stuff ? Heinz Nabielek a ?crit?: On 04.11.2019, at 14:55, mailto:stephane.mottelet at utc.fr wrote: Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg CL, Heinz, Willi can you test it ? Works to perfection and without this funny warning. I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing Thanks. Very helpful. Great suggestion. I would not have thought of it?.. Thanks for your dedication to this work.Heinz _______________________________________________ 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 Mon Nov 4 16:52:29 2019 From: heinznabielek at me.com (Heinz Nabielek) Date: Mon, 4 Nov 2019 16:52:29 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> Message-ID: <4BACAECB-14BD-4414-999E-4C99C0492D1F@me.com> all 66 atoms here, as before Greetings from Heinz > On 04.11.2019, at 15:40, stephane.mottelet at utc.fr wrote: > > Did you test the Atoms stuff ? > > Heinz Nabielek a ?crit : > >>> On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: >>> >>> Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: >>> >>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg >>> >>> CL, Heinz, Willi can you test it ? >>> >> Works to perfection and without this funny warning. >> >>> I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing >>> >> Thanks. Very helpful. Great suggestion. I would not have thought of it?.. >> >> Thanks for your dedication to this work.Heinz > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 4 17:10:37 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 17:10:37 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> Message-ID: <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> Hello, I don't have the regexp error. Here is my complete workflow: 1 - Delete the eventual previous Sciab 6.0.2 I had in the /Applications/ folder? 2 - Delete my .Scilab folder 3 - extract the .dmg I downloaded from?http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg 4 - double click the Scilab icon (with first launch usual but annoying details...) 5 - click the ATOMS gui icon or type atomsList at Scilab prompt Concerning the problem with IPCV (and maybe other packages with gateways, I only tested IPCV), I did not address it in the above archive. I only modified the scilab script (I will create a commit on codereview.scilab.org) and removed the libcurl.dylib that was shipped in lib/thirdparty folder. Best, S. Chin Luh Tan a ?crit?: > Hi,? > ? > from my end: > ? > 1. The warning for the 10.15 gone.? > 2. First launch from the app still give the regexp error when > running atomsList, but after running one time from terminal and get > it run successfully, I could run it from the app as after all.? > 3. atomsInstall for the module with gateway folder still > extracted to 2 separate folders which need to be manually move in > order for it to run. No issue for macros only module.? > ? > Thanks for the great effort. Is is possible to share the > compilation steps?? > ? > rgds, > CL > > > ---- On Mon, 04 Nov 2019 22:40:20 +0800 > wrote ---- > >> Did you test the Atoms stuff ? >> >> Heinz Nabielek a ?crit?: >> >>> On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: >>> >>>> Thanks Samuel. So the regexp error can eventually have the same >>>> cause (libcurl version mismatch). I have packaged a scilab-6.0.2 >>>> without these libraries (and removing the 10.15 warning) for OSX >>>> users at the following URL: >>>> >>>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg[1] >>>> >>>> CL, Heinz, Willi can you test it ? >>> >>> Works to perfection and without this funny warning. >>> >>>> I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 >>>> directory before testing >>> >>> Thanks. Very helpful. Great suggestion. I would not have thought of it?.. >>> >>> Thanks for your dedication to this work.Heinz >> >> >> ? >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > ? Liens: ------ [1] https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 4 17:24:53 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 17:24:53 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> Message-ID: <20191104172453.Horde.VRQJkcjMluT8JFb3GuPw_Z1@webmail.utc.fr> Obviously, between points 3 and 4 I moved the Scilab app from the archive in the Appplication folder. stephane.mottelet at utc.fr a ?crit?: > Hello, > > I don't have the regexp error. Here is my complete workflow: > > 1 - Delete the eventual previous Sciab 6.0.2 I had in the > /Applications/ folder? > 2 - Delete my .Scilab folder > 3 - extract the .dmg I downloaded > from?http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg > 4 - double click the Scilab icon (with first launch usual but > annoying details...) > 5 - click the ATOMS gui icon or type atomsList at Scilab prompt > > Concerning the problem with IPCV (and maybe other packages with > gateways, I only tested IPCV), I did not address it in the above > archive. I only modified the scilab script (I will create a commit > on codereview.scilab.org) and removed the libcurl.dylib that was > shipped in lib/thirdparty folder. > > Best, > > S. > > Chin Luh Tan a ?crit?: > >> Hi,? >> ? >> from my end: >> ? >> 1. The warning for the 10.15 gone.? >> 2. First launch from the app still give the regexp error when >> running atomsList, but after running one time from terminal and get >> it run successfully, I could run it from the app as after all.? >> 3. atomsInstall for the module with gateway folder still >> extracted to 2 separate folders which need to be manually move in >> order for it to run. No issue for macros only module.? >> ? >> Thanks for the great effort. Is is possible to share the >> compilation steps?? >> ? >> rgds, >> CL >> >> >> ---- On Mon, 04 Nov 2019 22:40:20 +0800 >> wrote ---- >> >>> Did you test the Atoms stuff ? >>> >>> Heinz Nabielek a ?crit?: >>> >>>> On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: >>>> >>>>> Thanks Samuel. So the regexp error can eventually have the same >>>>> cause (libcurl version mismatch). I have packaged a scilab-6.0.2 >>>>> without these libraries (and removing the 10.15 warning) for OSX >>>>> users at the following URL: >>>>> >>>>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg[1] >>>>> >>>>> CL, Heinz, Willi can you test it ? >>>> >>>> Works to perfection and without this funny warning. >>>> >>>>> I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 >>>>> directory before testing >>>> >>>> Thanks. Very helpful. Great suggestion. I would not have thought of it?.. >>>> >>>> Thanks for your dedication to this work.Heinz >>> >>> >>> ? >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> ? > > > ? Liens: ------ [1] https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Mon Nov 4 17:43:56 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 05 Nov 2019 00:43:56 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104172453.Horde.VRQJkcjMluT8JFb3GuPw_Z1@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> <20191104172453.Horde.VRQJkcjMluT8JFb3GuPw_Z1@webmail.utc.fr> Message-ID: <16e374d31e8.117b2bdea221215.5434202010947762014@bytecode-asia.com> ok, i did: 1. Del both previous scilab and the scilab from your link installed just now to make it clean 2. Totally remove the .Scilab folder under home folder by using sudo rm -R .Scilab 3. Re-download the link? 4. Double click and install (by dragging the scilab icon to application folder) 5. run scilab from the app and type atomsList Same regexp error until i launch it from terminal, and then it is ok.? noted on the atoms issue for the modules with gateway, will try to look into it. p/s: will continue any extra testing tomorrow.? rgds, CL ---- On Tue, 05 Nov 2019 00:24:53 +0800 wrote ---- Obviously, between points 3 and 4 I moved the Scilab app from the archive in the Appplication folder. mailto:stephane.mottelet at utc.fr a ?crit?: Hello, I don't have the regexp error. Here is my complete workflow: 1 - Delete the eventual previous Sciab 6.0.2 I had in the /Applications/ folder? 2 - Delete my .Scilab folder 3 - extract the .dmg I downloaded from?http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg 4 - double click the Scilab icon (with first launch usual but annoying details...) 5 - click the ATOMS gui icon or type atomsList at Scilab prompt Concerning the problem with IPCV (and maybe other packages with gateways, I only tested IPCV), I did not address it in the above archive. I only modified the scilab script (I will create a commit on codereview.scilab.org) and removed the libcurl.dylib that was shipped in lib/thirdparty folder. Best, S. Chin Luh Tan a ?crit?: Hi,? ? from my end: ? 1. The warning for the 10.15 gone.? 2. First launch from the app still give the regexp error when running atomsList, but after running one time from terminal and get it run successfully, I could run it from the app as after all.? 3. atomsInstall for the module with gateway folder still extracted to 2 separate folders which need to be manually move in order for it to run. No issue for macros only module.? ? Thanks for the great effort. Is is possible to share the compilation steps?? ? rgds, CL ---- On Mon, 04 Nov 2019 22:40:20 +0800 wrote ---- Did you test the Atoms stuff ? Heinz Nabielek a ?crit?: On 04.11.2019, at 14:55, mailto:stephane.mottelet at utc.fr wrote: Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg CL, Heinz, Willi can you test it ? Works to perfection and without this funny warning. I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing Thanks. Very helpful. Great suggestion. I would not have thought of it?.. Thanks for your dedication to this work.Heinz ? _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ? ? _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 4 18:06:37 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Mon, 04 Nov 2019 18:06:37 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <16e374d31e8.117b2bdea221215.5434202010947762014@bytecode-asia.com> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> <20191104172453.Horde.VRQJkcjMluT8JFb3GuPw_Z1@webmail.utc.fr> <16e374d31e8.117b2bdea221215.5434202010947762014@bytecode-asia.com> Message-ID: <20191104180637.Horde.YxGe58KcXZKB3k4G0kxXtWt@webmail.utc.fr> There is a big difference in the inherited environment when scilab is launched from the command line and by clicking the icon. In the past I solved a problem with the LANG variable https://codereview.scilab.org/#/c/20787/ https://codereview.scilab.org/#/c/21069/ the second one is still not merged in master but has been included in 19 august build of Scilab 6.0.2 for OSX (the one available from www.scilab.org), since it was really blocking for many users. Just to say that the regexp problem may be due to a similar problem (locale, encoding, ...) S. Chin Luh Tan a ?crit?: > ok, i did: > ? > 1. Del both previous scilab and the scilab from your link > installed just now to make it clean > 2. Totally remove the .Scilab folder under home folder by using > sudo rm -R .Scilab > 3. Re-download the link? > 4. Double click and install (by dragging the scilab icon to > application folder) > 5. run scilab from the app and type atomsList > ? > Same regexp error until i launch it from terminal, and then it is ok.? > ? > noted on the atoms issue for the modules with gateway, will try > to look into it. > ? > p/s: will continue any extra testing tomorrow.? > ? > rgds, > CL > ? > ? > ---- On Tue, 05 Nov 2019 00:24:53 +0800 > wrote ---- > ? > >> Obviously, between points 3 and 4 I moved the Scilab app from the >> archive in the Appplication folder. >> >> stephane.mottelet at utc.fr a ?crit?: >> >>> Hello, >>> >>> I don't have the regexp error. Here is my complete workflow: >>> >>> 1 - Delete the eventual previous Sciab 6.0.2 I had in the >>> /Applications/ folder? >>> 2 - Delete my .Scilab folder >>> 3 - extract the .dmg I downloaded >>> from?http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg[1] >>> 4 - double click the Scilab icon (with first launch usual but >>> annoying details...) >>> 5 - click the ATOMS gui icon or type atomsList at Scilab prompt >>> >>> Concerning the problem with IPCV (and maybe other packages with >>> gateways, I only tested IPCV), I did not address it in the above >>> archive. I only modified the scilab script (I will create a commit >>> on codereview.scilab.org) and removed the libcurl.dylib that was >>> shipped in lib/thirdparty folder. >>> >>> Best, >>> >>> S. >>> >>> Chin Luh Tan a ?crit?: >>> >>>> Hi,? >>>> ? >>>> from my end: >>>> ? >>>> 1. The warning for the 10.15 gone.? >>>> 2. First launch from the app still give the regexp error >>>> when running atomsList, but after running one time from terminal >>>> and get it run successfully, I could run it from the app as after >>>> all.? >>>> 3. atomsInstall for the module with gateway folder still >>>> extracted to 2 separate folders which need to be manually move in >>>> order for it to run. No issue for macros only module.? >>>> ? >>>> Thanks for the great effort. Is is possible to share the >>>> compilation steps?? >>>> ? >>>> rgds, >>>> CL >>>> ? >>>> ? >>>> ---- On Mon, 04 Nov 2019 22:40:20 +0800 >>>> wrote ---- >>>> ? >>>> >>>>> Did you test the Atoms stuff ? >>>>> >>>>> Heinz Nabielek a ?crit?: >>>>> >>>>>> On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: >>>>>> >>>>>>> Thanks Samuel. So the regexp error can eventually have the >>>>>>> same cause (libcurl version mismatch). I have packaged a >>>>>>> scilab-6.0.2 without these libraries (and removing the 10.15 >>>>>>> warning) for OSX users at the following URL: >>>>>>> >>>>>>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg[2] >>>>>>> >>>>>>> CL, Heinz, Willi can you test it ? >>>>>> >>>>>> Works to perfection and without this funny warning. >>>>>> ? >>>>>> ? >>>>>> >>>>>>> I recommend temporary renaming/moving your >>>>>>> .Scilab/scilab-6.0.2 directory before testing >>>>>> >>>>>> Thanks. Very helpful. Great suggestion. I would >>>>>> not have thought of it?.. >>>>>> ? >>>>>> Thanks for your dedication to this work.Heinz >>>>> >>>>> >>>>> ? >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users[3] >>>> >>>> ? >>> >>> >>> ? >> >> >> ? >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > ? Liens: ------ [1] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg [2] https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg [3] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Tue Nov 5 07:15:36 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 05 Nov 2019 14:15:36 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <20191104180637.Horde.YxGe58KcXZKB3k4G0kxXtWt@webmail.utc.fr> References: <1572810465872-0.post@n3.nabble.com> <599148A4-5D59-4109-9DE1-FF76CB2D65CB@utc.fr> <5dca73a6-ba26-50af-0fc7-d91b4dc4b147@utc.fr> <16e33f4c8cd.ec35381175366.4866114685434930568@bytecode-asia.com> <20191104125829.Horde.WVn5OP_5ozk4Oqq5SFmH-hS@webmail.utc.fr> <0c8a3b71-956f-03b1-131f-42b5a2836a2a@free.fr> <20191104145517.Horde.0FmchXMC7KlctuXSWcLJpB6@webmail.utc.fr> <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> <20191104172453.Horde.VRQJkcjMluT8JFb3GuPw_Z1@webmail.utc.fr> <16e374d31e8.117b2bdea221215.5434202010947762014@bytecode-asia.com> <20191104180637.Horde.YxGe58KcXZKB3k4G0kxXtWt@webmail.utc.fr> Message-ID: <16e3a344cae.ce4833ea287659.1763238608395281499@bytecode-asia.com> Hi, just to add on to the issue on the atomsInstall. I finally find out that the issue was due to the extra "__MACOSX" folder created during zip process under MAC. "The __MACOSX folder is created when a Mac user creates and archive (also called a zip file) using the Mac. If the Mac user sends the zip file to another Mac user, the folder will not appear -?this is a hidden folder.?" ? During the atomsInstall process, the module zip file will be downloaded in the SCI\contrib\module_name\module_name.zip (or the SCIHOME atoms) and extract it. In this stage, for windows and linux, it will be only one directory in?SCI\contrib\module_name, namely module_name, and it will be renamed to version number, such as 1.0, and the module installation would be successful.? In Mac, it will have extra __MACOSX folder (unless the module packager manually remove it) and it will cause the system to detect this folder as the newly created module, and rename this to the version number, which the actual folder module_name, will remained as it is and gives error during module loading. ? While guideline could be given to the modules developer to remove the _MACOSX folder before releasing it, we could also add the following line in atomsExtract function to ensure the renaming function find the correct folder instead of __MACOSX folder.? atomsExtract.sci ??? // Get the list of directories after the extraction ??? // ========================================================================= ??? dirs_after = atomsListDir(dir_out); ??? dirs_after(dirs_after=='__MACOSX') = [];? ?// <-- extra line proposed to add ??? ??? // Get the name of the created directory ??? // ========================================================================= ??? dir_created = []; ??? for j=1:size(dirs_after,"*") ??????? if find(dirs_after(j) == dirs_before) == [] then ??????????? dir_created = dirs_after(j); ??????????? break; ??????? end ??? end ? This shall solve the issue of module installation problem under MACOS. Thanks. Regards, CL ---- On Tue, 05 Nov 2019 01:06:37 +0800 wrote ---- There is a big difference in the inherited environment when scilab is launched from the command line and by clicking the icon. In the past I solved a problem with the LANG variable https://codereview.scilab.org/#/c/20787/ https://codereview.scilab.org/#/c/21069/ the second one is still not merged in master but has been included in 19 august build of Scilab 6.0.2 for OSX (the one available from www.scilab.org), since it was really blocking for many users. Just to say that the regexp problem may be due to a similar problem (locale, encoding, ...) S. Chin Luh Tan a ?crit?: ok, i did: ? 1. Del both previous scilab and the scilab from your link installed just now to make it clean 2. Totally remove the .Scilab folder under home folder by using sudo rm -R .Scilab 3. Re-download the link? 4. Double click and install (by dragging the scilab icon to application folder) 5. run scilab from the app and type atomsList ? Same regexp error until i launch it from terminal, and then it is ok.? ? noted on the atoms issue for the modules with gateway, will try to look into it. ? p/s: will continue any extra testing tomorrow.? ? rgds, CL ? ? ---- On Tue, 05 Nov 2019 00:24:53 +0800 wrote ---- ? ? _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Obviously, between points 3 and 4 I moved the Scilab app from the archive in the Appplication folder. mailto:stephane.mottelet at utc.fr a ?crit?: Hello, I don't have the regexp error. Here is my complete workflow: 1 - Delete the eventual previous Sciab 6.0.2 I had in the /Applications/ folder? 2 - Delete my .Scilab folder 3 - extract the .dmg I downloaded from?https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg 4 - double click the Scilab icon (with first launch usual but annoying details...) 5 - click the ATOMS gui icon or type atomsList at Scilab prompt Concerning the problem with IPCV (and maybe other packages with gateways, I only tested IPCV), I did not address it in the above archive. I only modified the scilab script (I will create a commit on codereview.scilab.org) and removed the libcurl.dylib that was shipped in lib/thirdparty folder. Best, S. Chin Luh Tan a ?crit?: Hi,? ? from my end: ? 1. The warning for the 10.15 gone.? 2. First launch from the app still give the regexp error when running atomsList, but after running one time from terminal and get it run successfully, I could run it from the app as after all.? 3. atomsInstall for the module with gateway folder still extracted to 2 separate folders which need to be manually move in order for it to run. No issue for macros only module.? ? Thanks for the great effort. Is is possible to share the compilation steps?? ? rgds, CL ? ? ---- On Mon, 04 Nov 2019 22:40:20 +0800 wrote ---- ? Did you test the Atoms stuff ? Heinz Nabielek a ?crit?: On 04.11.2019, at 14:55, mailto:stephane.mottelet at utc.fr wrote: Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg CL, Heinz, Willi can you test it ? Works to perfection and without this funny warning. ? ? I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing Thanks. Very helpful. Great suggestion. I would not have thought of it?.. ? Thanks for your dedication to this work.Heinz ? _______________________________________________ users mailing list mailto:users at lists.scilab.org https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users ? ? ? _______________________________________________ users mailing list mailto: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 Tue Nov 5 08:18:35 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Tue, 5 Nov 2019 08:18:35 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <16e3a344cae.ce4833ea287659.1763238608395281499@bytecode-asia.com> References: <16e3a344cae.ce4833ea287659.1763238608395281499@bytecode-asia.com> Message-ID: <4BD40FBC-97B0-41F2-B752-42EAF444479D@utc.fr> Great analysis ! > Le 5 nov. 2019 ? 07:16, Chin Luh Tan a ?crit : > > ? > Hi, > > just to add on to the issue on the atomsInstall. I finally find out that the issue was due to the extra "__MACOSX" folder created during zip process under MAC. > > "The __MACOSX folder is created when a Mac user creates and archive (also called a zip file) using the Mac. If the Mac user sends the zip file to another Mac user, the folder will not appear - this is a hidden folder. " > > During the atomsInstall process, the module zip file will be downloaded in the SCI\contrib\module_name\module_name.zip (or the SCIHOME atoms) and extract it. > > In this stage, for windows and linux, it will be only one directory in SCI\contrib\module_name, namely module_name, and it will be renamed to version number, such as 1.0, and the module installation would be successful. > > In Mac, it will have extra __MACOSX folder (unless the module packager manually remove it) and it will cause the system to detect this folder as the newly created module, and rename this to the version number, which the actual folder module_name, will remained as it is and gives error during module loading. > > While guideline could be given to the modules developer to remove the _MACOSX folder before releasing it, we could also add the following line in atomsExtract function to ensure the renaming function find the correct folder instead of __MACOSX folder. > > atomsExtract.sci > > // Get the list of directories after the extraction > // ========================================================================= > > dirs_after = atomsListDir(dir_out); > > dirs_after(dirs_after=='__MACOSX') = []; // <-- extra line proposed to add > > // Get the name of the created directory > // ========================================================================= > > dir_created = []; > > for j=1:size(dirs_after,"*") > if find(dirs_after(j) == dirs_before) == [] then > dir_created = dirs_after(j); > break; > end > end > > > This shall solve the issue of module installation problem under MACOS. > > Thanks. > > Regards, > CL > > > > > ---- On Tue, 05 Nov 2019 01:06:37 +0800 wrote ---- > > There is a big difference in the inherited environment when scilab is launched from the command line and by clicking the icon. > In the past I solved a problem with the LANG variable > > https://codereview.scilab.org/#/c/20787/ > https://codereview.scilab.org/#/c/21069/ > > the second one is still not merged in master but has been included in 19 august build of Scilab 6.0.2 for OSX (the one available from www.scilab.org), since it was really blocking for many users. > > Just to say that the regexp problem may be due to a similar problem (locale, encoding, ...) > > S. > > Chin Luh Tan a ?crit : > > ok, i did: > > 1. Del both previous scilab and the scilab from your link installed just now to make it clean > 2. Totally remove the .Scilab folder under home folder by using sudo rm -R .Scilab > 3. Re-download the link > 4. Double click and install (by dragging the scilab icon to application folder) > 5. run scilab from the app and type atomsList > > Same regexp error until i launch it from terminal, and then it is ok. > > noted on the atoms issue for the modules with gateway, will try to look into it. > > p/s: will continue any extra testing tomorrow. > > rgds, > CL > > > ---- On Tue, 05 Nov 2019 00:24:53 +0800 wrote ---- > > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > Obviously, between points 3 and 4 I moved the Scilab app from the archive in the Appplication folder. > > stephane.mottelet at utc.fr a ?crit : > > Hello, > > I don't have the regexp error. Here is my complete workflow: > > 1 - Delete the eventual previous Sciab 6.0.2 I had in the /Applications/ folder > 2 - Delete my .Scilab folder > 3 - extract the .dmg I downloaded from http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg > 4 - double click the Scilab icon (with first launch usual but annoying details...) > 5 - click the ATOMS gui icon or type atomsList at Scilab prompt > > Concerning the problem with IPCV (and maybe other packages with gateways, I only tested IPCV), I did not address it in the above archive. I only modified the scilab script (I will create a commit on codereview.scilab.org) and removed the libcurl.dylib that was shipped in lib/thirdparty folder. > > Best, > > S. > > Chin Luh Tan a ?crit : > > Hi, > > from my end: > > 1. The warning for the 10.15 gone. > 2. First launch from the app still give the regexp error when running atomsList, but after running one time from terminal and get it run successfully, I could run it from the app as after all. > 3. atomsInstall for the module with gateway folder still extracted to 2 separate folders which need to be manually move in order for it to run. No issue for macros only module. > > Thanks for the great effort. Is is possible to share the compilation steps? > > rgds, > CL > > > ---- On Mon, 04 Nov 2019 22:40:20 +0800 wrote ---- > > Did you test the Atoms stuff ? > > Heinz Nabielek a ?crit : > > On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: > > Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: > > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg > > CL, Heinz, Willi can you test it ? > > Works to perfection and without this funny warning. > > > I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing > > Thanks. Very helpful. Great suggestion. I would not have thought of it?.. > > Thanks for your dedication to this work.Heinz > > > > _______________________________________________ > 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 > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Tue Nov 5 10:52:42 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 5 Nov 2019 10:52:42 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: <4BD40FBC-97B0-41F2-B752-42EAF444479D@utc.fr> References: <16e3a344cae.ce4833ea287659.1763238608395281499@bytecode-asia.com> <4BD40FBC-97B0-41F2-B752-42EAF444479D@utc.fr> Message-ID: Le 05/11/2019 ? 08:18, St?phane Mottelet a ?crit?: > Great analysis ! > >> Le 5 nov. 2019 ? 07:16, Chin Luh Tan >> a ?crit?: >> >> ? >> Hi, >> >> just to add on to the issue on the atomsInstall. I finally find out >> that the issue was due to the extra "__MACOSX" folder created during >> zip process under MAC. >> >> "The __MACOSX folder is created when a Mac user creates and archive >> (also called a zip file) using the Mac. If the Mac user sends the zip >> file to another Mac user, the folder will not appear - this is a >> hidden folder." >> >> During the atomsInstall process, the module zip file will be >> downloaded in the SCI\contrib\module_name\module_name.zip (or the >> SCIHOME atoms) and extract it. >> >> In this stage, for windows and linux, it will be only one directory >> in?SCI\contrib\module_name, namely module_name, The packaging rules do not impose that the package root dir has the name "module_name". For example latest scicv has root dir "scicv-0.4". If the zip or tar.gz contains more than one directory (by accident, or else) then it can break atomsExtract, on every platform. The atomsInstall process should end when such an incoherence is detected. In the meantime (before the proposed above fix), to avoid repackaging all OSX zip packages it would be simpler to use the -x flag of unzip, e.g. like this unzip IPCV-4.1-MacOS-bin.zip -x __MACOSX/* ??? elseif regexp(archive_in,"/\.zip$/","o") <> [] then ??????? if getos() == "Windows" then ??????????? extract_cmd = """" + getshortpathname(pathconvert(SCI+"/tools/zip/unzip.exe",%F)) + """"; ??????? else ??????????? extract_cmd = "unzip"; ??????? end ??????? extract_cmd = extract_cmd + " -q -o """ + archive_in + """ -d """ + pathconvert(dir_out,%F) +""""; *??????? if getos() == "Darwin"** **??????????? extract_cmd = extract_cmd + " -x __MACOSX/*"** **??????? end* ??? end ??? [rep,stat,err] = unix_g(extract_cmd); >> and it will be renamed to version number, such as 1.0, and the module >> installation would be successful. >> >> In Mac, it will have extra __MACOSX folder (unless the module >> packager manually remove it) and it will cause the system to detect >> this folder as the newly created module, and rename this to the >> version number, which the actual folder module_name, will remained as >> it is and gives error during module loading. >> >> While guideline could be given to the modules developer to remove the >> _MACOSX folder before releasing it, we could also add the following >> line in atomsExtract function to ensure the renaming function find >> the correct folder instead of __MACOSX folder. >> >> atomsExtract.sci >> >> ??? // Get the list of directories after the extraction >> ??? // >> ========================================================================= >> >> ??? dirs_after = atomsListDir(dir_out); >> >> *??? dirs_after(dirs_after=='__MACOSX') = [];? ?// <-- extra line >> proposed to add* >> >> ??? // Get the name of the created directory >> ??? // >> ========================================================================= >> >> ??? dir_created = []; >> >> ??? for j=1:size(dirs_after,"*") >> ??????? if find(dirs_after(j) == dirs_before) == [] then >> ??????????? dir_created = dirs_after(j); >> ??????????? break; >> ??????? end >> ??? end >> >> >> This shall solve the issue of module installation problem under MACOS. >> >> Thanks. >> >> Regards, >> CL >> >> >> >> >> ---- On Tue, 05 Nov 2019 01:06:37 +0800 ** >> wrote ---- >> >> There is a big difference in the inherited environment when >> scilab is launched from the command line and by clicking the icon. >> In the past I solved a problem with the LANG variable >> >> https://codereview.scilab.org/#/c/20787/ >> >> https://codereview.scilab.org/#/c/21069/ >> >> >> the second one is still not merged in master but has been >> included in 19 august build of Scilab 6.0.2 for OSX (the one >> available from www.scilab.org), since it was really blocking for >> many users. >> >> Just to say that the regexp problem may be due to a similar >> problem (locale, encoding, ...) >> >> S. >> >> Chin Luh Tan > > a ?crit?: >> >> ok, i did: >> >> 1. Del both previous scilab and the scilab from your link >> installed just now to make it clean >> 2. Totally remove the .Scilab folder under home folder by >> using sudo rm -R .Scilab >> 3. Re-download the link >> 4. Double click and install (by dragging the scilab icon to >> application folder) >> 5. run scilab from the app and type atomsList >> >> Same regexp error until i launch it from terminal, and then >> it is ok. >> >> noted on the atoms issue for the modules with gateway, will >> try to look into it. >> >> p/s: will continue any extra testing tomorrow. >> >> rgds, >> CL >> >> >> ---- On Tue, 05 Nov 2019 00:24:53 +0800 >> *> >* wrote ---- >> >> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> >> Obviously, between points 3 and 4 I moved the Scilab app from >> the archive in the Appplication folder. >> >> stephane.mottelet at utc.fr a >> ?crit?: >> >> Hello, >> >> I don't have the regexp error. Here is my complete workflow: >> >> 1 - Delete the eventual previous Sciab 6.0.2 I had in the >> /Applications/ folder >> 2 - Delete my .Scilab folder >> 3 - extract the .dmg I downloaded from >> http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg >> >> 4 - double click the Scilab icon (with first launch usual >> but annoying details...) >> 5 - click the ATOMS gui icon or type atomsList at Scilab >> prompt >> >> Concerning the problem with IPCV (and maybe other >> packages with gateways, I only tested IPCV), I did not >> address it in the above archive. I only modified the >> scilab script (I will create a commit on >> codereview.scilab.org) and removed the libcurl.dylib that >> was shipped in lib/thirdparty folder. >> >> Best, >> >> S. >> >> Chin Luh Tan > > a ?crit?: >> >> Hi, >> >> from my end: >> >> 1. The warning for the 10.15 gone. >> 2. First launch from the app still give the regexp >> error when running atomsList, but after running one >> time from terminal and get it run successfully, I >> could run it from the app as after all. >> 3. atomsInstall for the module with gateway folder >> still extracted to 2 separate folders which need to >> be manually move in order for it to run. No issue for >> macros only module. >> >> Thanks for the great effort. Is is possible to share >> the compilation steps? >> >> rgds, >> CL >> >> >> ---- On Mon, 04 Nov 2019 22:40:20 +0800 >> *> >* wrote ---- >> >> Did you test the Atoms stuff ? >> >> Heinz Nabielek > > a ?crit?: >> >> On 04.11.2019, at 14:55, >> stephane.mottelet at utc.fr >> wrote: >> >> Thanks Samuel. So the regexp error can >> eventually have the same cause (libcurl >> version mismatch). I have packaged a >> scilab-6.0.2 without these libraries (and >> removing the 10.15 warning) for OSX users >> at the following URL: >> >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg >> >> >> CL, Heinz, Willi can you test it ? >> >> Works to perfection and without this funny >> warning. >> >> >> I recommend temporary renaming/moving >> your .Scilab/scilab-6.0.2 directory >> before testing >> >> Thanks. Very helpful. Great suggestion. I >> would not have thought of it?.. >> >> Thanks for your dedication to this work.Heinz >> >> >> _______________________________________________ >> 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 >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Tue Nov 5 11:04:57 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 05 Nov 2019 18:04:57 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: References: <16e3a344cae.ce4833ea287659.1763238608395281499@bytecode-asia.com> <4BD40FBC-97B0-41F2-B752-42EAF444479D@utc.fr> Message-ID: <16e3b06468a.df26568697376.5768737696563203589@bytecode-asia.com> Hi,? I totally agreed to use -x instead to exclude the folder, this will also eliminate the extra unnecessary folder. Thanks for the better fix.? As for the extra folder case, it could be very tricky as there are many possibilities of the dev packaging an module,? it could make the packaging flexible,? but also lacking of standardization? Just my thought Thanks Rgds, CL ---- On Tue, 05 Nov 2019 17:52:42 +0800 stephane.mottelet at utc.fr wrote ---- Le 05/11/2019 ? 08:18, St?phane Mottelet a ?crit?: Great analysis ! Le 5 nov. 2019 ? 07:16, Chin Luh Tan a ?crit?: ? Hi, just to add on to the issue on the atomsInstall. I finally find out that the issue was due to the extra "__MACOSX" folder created during zip process under MAC. "The __MACOSX folder is created when a Mac user creates and archive (also called a zip file) using the Mac. If the Mac user sends the zip file to another Mac user, the folder will not appear -?this is a hidden folder.?" ? During the atomsInstall process, the module zip file will be downloaded in the SCI\contrib\module_name\module_name.zip (or the SCIHOME atoms) and extract it. In this stage, for windows and linux, it will be only one directory in?SCI\contrib\module_name, namely module_name, The packaging rules do not impose that the package root dir has the name "module_name". For example latest scicv has root dir "scicv-0.4". If the zip or tar.gz contains more than one directory (by accident, or else) then it can break atomsExtract, on every platform. The atomsInstall process should end when such an incoherence is detected. In the meantime (before the proposed above fix), to avoid repackaging all OSX zip packages it would be simpler to use the -x flag of unzip, e.g. like this unzip IPCV-4.1-MacOS-bin.zip -x __MACOSX/* ??? elseif regexp(archive_in,"/\.zip$/","o") <> [] then ??????? if getos() == "Windows" then ??????????? extract_cmd = """" + getshortpathname(pathconvert(SCI+"/tools/zip/unzip.exe",%F)) + """"; ??????? else ??????????? extract_cmd = "unzip"; ??????? end ??????? extract_cmd = extract_cmd + " -q -o """ + archive_in + """ -d """ + pathconvert(dir_out,%F) +""""; ??????? ??????? if getos() == "Darwin" ??????????? extract_cmd = extract_cmd + " -x __MACOSX/*" ??????? end ??? end ??? [rep,stat,err] = unix_g(extract_cmd); and it will be renamed to version number, such as 1.0, and the module installation would be successful.? In Mac, it will have extra __MACOSX folder (unless the module packager manually remove it) and it will cause the system to detect this folder as the newly created module, and rename this to the version number, which the actual folder module_name, will remained as it is and gives error during module loading. ? While guideline could be given to the modules developer to remove the _MACOSX folder before releasing it, we could also add the following line in atomsExtract function to ensure the renaming function find the correct folder instead of __MACOSX folder.? atomsExtract.sci ??? // Get the list of directories after the extraction ??? // ========================================================================= ??? dirs_after = atomsListDir(dir_out); ??? dirs_after(dirs_after=='__MACOSX') = [];? ?// <-- extra line proposed to add ??? ??? // Get the name of the created directory ??? // ========================================================================= ??? dir_created = []; ??? for j=1:size(dirs_after,"*") ??????? if find(dirs_after(j) == dirs_before) == [] then ??????????? dir_created = dirs_after(j); ??????????? break; ??????? end ??? end ? This shall solve the issue of module installation problem under MACOS. Thanks. Regards, CL ---- On Tue, 05 Nov 2019 01:06:37 +0800 wrote ---- There is a big difference in the inherited environment when scilab is launched from the command line and by clicking the icon. In the past I solved a problem with the LANG variable https://codereview.scilab.org/#/c/20787/ https://codereview.scilab.org/#/c/21069/ the second one is still not merged in master but has been included in 19 august build of Scilab 6.0.2 for OSX (the one available from www.scilab.org), since it was really blocking for many users. Just to say that the regexp problem may be due to a similar problem (locale, encoding, ...) S. Chin Luh Tan a ?crit?: ok, i did: ? 1. Del both previous scilab and the scilab from your link installed just now to make it clean 2. Totally remove the .Scilab folder under home folder by using sudo rm -R .Scilab 3. Re-download the link? 4. Double click and install (by dragging the scilab icon to application folder) 5. run scilab from the app and type atomsList ? Same regexp error until i launch it from terminal, and then it is ok.? ? noted on the atoms issue for the modules with gateway, will try to look into it. ? p/s: will continue any extra testing tomorrow.? ? rgds, CL ? ? ---- On Tue, 05 Nov 2019 00:24:53 +0800 wrote ---- ? ? _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Obviously, between points 3 and 4 I moved the Scilab app from the archive in the Appplication folder. stephane.mottelet at utc.fr a ?crit?: Hello, I don't have the regexp error. Here is my complete workflow: 1 - Delete the eventual previous Sciab 6.0.2 I had in the /Applications/ folder? 2 - Delete my .Scilab folder 3 - extract the .dmg I downloaded from?http://www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg 4 - double click the Scilab icon (with first launch usual but annoying details...) 5 - click the ATOMS gui icon or type atomsList at Scilab prompt Concerning the problem with IPCV (and maybe other packages with gateways, I only tested IPCV), I did not address it in the above archive. I only modified the scilab script (I will create a commit on codereview.scilab.org) and removed the libcurl.dylib that was shipped in lib/thirdparty folder. Best, S. Chin Luh Tan a ?crit?: Hi,? ? from my end: ? 1. The warning for the 10.15 gone.? 2. First launch from the app still give the regexp error when running atomsList, but after running one time from terminal and get it run successfully, I could run it from the app as after all.? 3. atomsInstall for the module with gateway folder still extracted to 2 separate folders which need to be manually move in order for it to run. No issue for macros only module.? ? Thanks for the great effort. Is is possible to share the compilation steps?? ? rgds, CL ? ? ---- On Mon, 04 Nov 2019 22:40:20 +0800 wrote ---- ? Did you test the Atoms stuff ? Heinz Nabielek a ?crit?: On 04.11.2019, at 14:55, stephane.mottelet at utc.fr wrote: Thanks Samuel. So the regexp error can eventually have the same cause (libcurl version mismatch). I have packaged a scilab-6.0.2 without these libraries (and removing the 10.15 warning) for OSX users at the following URL: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet/scilab/download/6.0.2/scilab-6.0.2-x86_64-2019-11-04.dmg CL, Heinz, Willi can you test it ? Works to perfection and without this funny warning. ? ? I recommend temporary renaming/moving your .Scilab/scilab-6.0.2 directory before testing Thanks. Very helpful. Great suggestion. I would not have thought of it?.. ? Thanks for your dedication to this work.Heinz ? _______________________________________________ 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 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 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Wed Nov 6 02:54:46 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Wed, 06 Nov 2019 09:54:46 +0800 Subject: [Scilab-users] Accessing sound device using java api from scilab In-Reply-To: <672a-5db95480-2f-23c7de40@192363629> References: <672a-5db95480-2f-23c7de40@192363629> Message-ID: <16e3e6bde2c.c9bca705470467.8104761170861531955@bytecode-asia.com> Hi all,? We are pleased to announce the release of Scilab Audio module for non blocking recording.? https://atoms.scilab.org/toolboxes/bytecode_audio/1.0 atomsInstall("bytecode_audio") Hi Samuel,? the source code hosted in github as stated in the atoms page, feel free to have a look and perhaps we could work together with your group to make this module even more complete. Thanks. Regards, CL ---- On Wed, 30 Oct 2019 17:14:37 +0800 Antoine Monmayrant wrote ---- Hi all, For a small demo project, I am trying to show both the temporal signal and the spectrum of the sound recorded by the microphone of my laptop. I managed to hack together a proof of principle that relies on the linux command "arecord" and uses "unix_g" scilab function. I would be happy to go for a more portable way of recording the sound from scilab. I know there is a java api for sound: As anyone here ever worked with it or tried to call it from scilab? I've never tried to call a java api from within scilab. If you have any ressource and/or tutorial on the sound java api or on calling a java api from scilab, it would be of great help. Thanks in advance, Antoine _______________________________________________ users mailing list mailto: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 Wed Nov 6 09:08:46 2019 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 6 Nov 2019 09:08:46 +0100 Subject: [Scilab-users] Accessing sound device using java api from scilab In-Reply-To: <16e3e6bde2c.c9bca705470467.8104761170861531955@bytecode-asia.com> References: <672a-5db95480-2f-23c7de40@192363629> <16e3e6bde2c.c9bca705470467.8104761170861531955@bytecode-asia.com> Message-ID: <3fa59ee5-5310-ad22-506b-e066044aef89@laas.fr> Hello, I just installed it under 6.0.2. It seems that the help is not built properly ( i.e. I cannot find anything using "help audio_getLine" or other functions). Antoine Le 06/11/2019 ? 02:54, Chin Luh Tan a ?crit?: > Hi all, > > We are pleased to announce the release of Scilab Audio module for non > blocking recording. > > https://atoms.scilab.org/toolboxes/bytecode_audio/1.0 > > atomsInstall("bytecode_audio") > > Hi Samuel, > > the source code hosted in github as stated in the atoms page, feel > free to have a look and perhaps we could work together with your group > to make this module even more complete. > > Thanks. > > Regards, > CL > > > > > ---- On Wed, 30 Oct 2019 17:14:37 +0800 *Antoine Monmayrant > * wrote ---- > > Hi all, > > For a small demo project, I am trying to show both the temporal > signal and the spectrum of the sound recorded by the microphone of > my laptop. > I managed to hack together a proof of principle that relies on the > linux command "arecord" and uses "unix_g" scilab function. > I would be happy to go for a more portable way of recording the > sound from scilab. > I know there is a java api for sound: As anyone here ever worked > with it or tried to call it from scilab? > > I've never tried to call a java api from within scilab. > If you have any ressource and/or tutorial on the sound java api or > on calling a java api from scilab, it would be of great help. > > Thanks in advance, > > Antoine > > _______________________________________________ > 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 antoine.monmayrant at laas.fr Wed Nov 6 09:12:30 2019 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 6 Nov 2019 09:12:30 +0100 Subject: [Scilab-users] Accessing sound device using java api from scilab In-Reply-To: <16e3e6bde2c.c9bca705470467.8104761170861531955@bytecode-asia.com> References: <672a-5db95480-2f-23c7de40@192363629> <16e3e6bde2c.c9bca705470467.8104761170861531955@bytecode-asia.com> Message-ID: <6cba1d59-628e-dfe3-be93-5f76a9e01361@laas.fr> Hello again, For a more positive feedback, I just parsed some of the xml help files to run some examples and they seem to work. I'll try to wrap my spectrum analyser demo around this. Thanks a lot. Antoine Le 06/11/2019 ? 02:54, Chin Luh Tan a ?crit?: > Hi all, > > We are pleased to announce the release of Scilab Audio module for non > blocking recording. > > https://atoms.scilab.org/toolboxes/bytecode_audio/1.0 > > atomsInstall("bytecode_audio") > > Hi Samuel, > > the source code hosted in github as stated in the atoms page, feel > free to have a look and perhaps we could work together with your group > to make this module even more complete. > > Thanks. > > Regards, > CL > > > > > ---- On Wed, 30 Oct 2019 17:14:37 +0800 *Antoine Monmayrant > * wrote ---- > > Hi all, > > For a small demo project, I am trying to show both the temporal > signal and the spectrum of the sound recorded by the microphone of > my laptop. > I managed to hack together a proof of principle that relies on the > linux command "arecord" and uses "unix_g" scilab function. > I would be happy to go for a more portable way of recording the > sound from scilab. > I know there is a java api for sound: As anyone here ever worked > with it or tried to call it from scilab? > > I've never tried to call a java api from within scilab. > If you have any ressource and/or tutorial on the sound java api or > on calling a java api from scilab, it would be of great help. > > Thanks in advance, > > Antoine > > _______________________________________________ > 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 chinluh.tan at bytecode-asia.com Wed Nov 6 09:28:32 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Wed, 06 Nov 2019 16:28:32 +0800 Subject: [Scilab-users] Accessing sound device using java api from scilab In-Reply-To: <3fa59ee5-5310-ad22-506b-e066044aef89@laas.fr> References: <672a-5db95480-2f-23c7de40@192363629> <16e3e6bde2c.c9bca705470467.8104761170861531955@bytecode-asia.com> <3fa59ee5-5310-ad22-506b-e066044aef89@laas.fr> Message-ID: <16e3fd45cc5.10c3e994d28543.3250802794725859569@bytecode-asia.com> Hi, In some cases, close help page and launch it again would help thanks. CL ---- On Wed, 06 Nov 2019 16:08:46 +0800 Antoine Monmayrant wrote ---- Hello, I just installed it under 6.0.2. It seems that the help is not built properly ( i.e. I cannot find anything using "help audio_getLine" or other functions). Antoine Le 06/11/2019 ? 02:54, Chin Luh Tan a ?crit?: _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Hi all,? We are pleased to announce the release of Scilab Audio module for non blocking recording.? https://atoms.scilab.org/toolboxes/bytecode_audio/1.0 atomsInstall("bytecode_audio") Hi Samuel,? the source code hosted in github as stated in the atoms page, feel free to have a look and perhaps we could work together with your group to make this module even more complete. Thanks. Regards, CL ---- On Wed, 30 Oct 2019 17:14:37 +0800 Antoine Monmayrant mailto:amonmayr at laas.fr wrote ---- Hi all, For a small demo project, I am trying to show both the temporal signal and the spectrum of the sound recorded by the microphone of my laptop. I managed to hack together a proof of principle that relies on the linux command "arecord" and uses "unix_g" scilab function. I would be happy to go for a more portable way of recording the sound from scilab. I know there is a java api for sound: As anyone here ever worked with it or tried to call it from scilab? I've never tried to call a java api from within scilab. If you have any ressource and/or tutorial on the sound java api or on calling a java api from scilab, it would be of great help. Thanks in advance, Antoine _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list mailto: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 Sat Nov 9 05:34:07 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Sat, 9 Nov 2019 01:34:07 -0300 Subject: [Scilab-users] example of library Message-ID: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> Dear all, I'm trying to create some examples illustrating types in Scilab and functions such as type and typeof. However, I cannot find a native library of functions to test type 14. The documentation for library https://help.scilab.org/docs/6.0.2/en_US/library.html gives an example using elementary_functionlib, but when running the sample script I get the error message Undefined variable: elementary_functionlib Is it possible that the name has changed and the example has not been updated yet? Thanks. Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Sat Nov 9 06:13:03 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Sat, 9 Nov 2019 02:13:03 -0300 Subject: [Scilab-users] example of library In-Reply-To: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> Message-ID: <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> Dear all, I could finally work it out: The function librarieslist() provides a list of Scilab libraries, and the elementary function library is called elementary_functionslib instead of elementary_functionlib There is a typo in the example (a plural is missing)--thrice!. That's why the example didn't work! Somebody told me I could edit the documentation by myself. I need some permission? How I can get access to edit the help pages? Regards, Federico Miyara On 09/11/2019 01:34, Federico Miyara wrote: > > Dear all, > > I'm trying to create some examples illustrating types in Scilab and > functions such as type and typeof. > > However, I cannot find a native library of functions to test type 14. > > The documentation for library > > https://help.scilab.org/docs/6.0.2/en_US/library.html > > gives an example using elementary_functionlib, but when running the > sample script I get the error message > > Undefined variable: elementary_functionlib > > Is it possible that the name has changed and the example has not been > updated yet? > > Thanks. > > Federico Miyara > > _______________________________________________ > 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 Sat Nov 9 08:23:56 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Sat, 9 Nov 2019 04:23:56 -0300 Subject: [Scilab-users] mtlb_sparse Message-ID: Dear all, Is the function mtlb_sparse still supported? I try to run the example in the documentation https://help.scilab.org/docs/6.0.2/en_US/mtlb_sparse.html and I get an error: Undefined variable: mtlb_sparse Is there another way to generate a type 7 variable? Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Nov 9 12:47:02 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Nov 2019 12:47:02 +0100 Subject: [Scilab-users] mtlb_sparse and "Matlab sparse" type 7 In-Reply-To: References: Message-ID: <38ebf550-7359-4b50-85e8-6b522fed0bcb@free.fr> Le 09/11/2019 ? 08:23, Federico Miyara a ?crit?: > > Dear all, > > Is the function mtlb_sparse still supported? > > I try to run the example in the documentation > > https://help.scilab.org/docs/6.0.2/en_US/mtlb_sparse.html > > and I get an error: > > Undefined variable: mtlb_sparse http://bugzilla.scilab.org/14477 > > Is there another way to generate a type 7 variable? This type is one of the misteries of Scilab. May be it was created before that loadmatfile() and savematfile() were available. Now that both of these functions exist, any required conversion of sparse matrix is automatically done through them. IMHO this data type is obsolete and should be properly and completely removed, as you have also mentionned it in the Bugzilla thread. Thanks for having put this topic on the public place. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From acj119 at nifty.com Sat Nov 9 13:59:35 2019 From: acj119 at nifty.com (jaipur) Date: Sat, 9 Nov 2019 05:59:35 -0700 (MST) Subject: [Scilab-users] How to zoom in correctly Message-ID: <1573304375900-0.post@n3.nabble.com> I'm looking forward to your suggestion. After drawing 3D image, you can zoom in by using mouse wheel. When I draw plot3d and want to zoom in at the top of hill, for example, mouse wheel result in vacant hole as the following image. Could someone suggest how to zoom in at the desired point of a image? Shall I treat properties of axes? Regards Hiroshi Tachihara -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From acj119 at nifty.com Sat Nov 9 14:19:44 2019 From: acj119 at nifty.com (jaipur) Date: Sat, 9 Nov 2019 06:19:44 -0700 (MST) Subject: [Scilab-users] How to create transparent polygon Message-ID: <1573305584430-0.post@n3.nabble.com> Dear all When making a polygon by xpoly for example, can we set transparency effect as the following polygon? If it's possible, could you suggest the way of doing? Regards Hiroshi Tachihara -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From chinluh.tan at bytecode-asia.com Sat Nov 9 14:22:40 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Sat, 09 Nov 2019 21:22:40 +0800 Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1573304375900-0.post@n3.nabble.com> References: <1573304375900-0.post@n3.nabble.com> Message-ID: <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> have u tried "pan down"? hold left mouse button and move the mouse. rgds, CL ---- On Sat, 09 Nov 2019 20:59:35 +0800 jaipur wrote ---- I'm looking forward to your suggestion. After drawing 3D image, you can zoom in by using mouse wheel. When I draw plot3d and want to zoom in at the top of hill, for example, mouse wheel result in vacant hole as the following image. Could someone suggest how to zoom in at the desired point of a image? Shall I treat properties of axes? Regards Hiroshi Tachihara -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Nov 9 14:37:37 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Nov 2019 14:37:37 +0100 Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> References: <1573304375900-0.post@n3.nabble.com> <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> Message-ID: <439b2df5-054b-87ad-efee-bfc7da072eb8@free.fr> Le 09/11/2019 ? 14:22, Chin Luh Tan a ?crit?: > have u tried "pan down"? hold left mouse button and move the mouse. Yes, but the ALT key (as ALTitude) must be pressed (this is not documented). It is also possible to use the 3D selection zoom: Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cifklmlnkjeldnle.png Type: image/png Size: 20035 bytes Desc: not available URL: From acj119 at nifty.com Sat Nov 9 14:49:18 2019 From: acj119 at nifty.com (jaipur) Date: Sat, 9 Nov 2019 06:49:18 -0700 (MST) Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> References: <1573304375900-0.post@n3.nabble.com> <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> Message-ID: <1573307358434-0.post@n3.nabble.com> Yes, I know the way of holding left mouse button and move. But it works just after some activity of zooming in. When making first zooming in, vacant hole appears on the top of hill. In order to keep the top of hill (the point I want to zoom in) within the image, I may have to set up some properties of axes. However, I don't know that way. H.T. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From heinznabielek at me.com Sat Nov 9 14:56:53 2019 From: heinznabielek at me.com (Heinz Nabielek) Date: Sat, 9 Nov 2019 14:56:53 +0100 Subject: [Scilab-users] fill the area between two curves with a colour? In-Reply-To: <1573307358434-0.post@n3.nabble.com> References: <1573304375900-0.post@n3.nabble.com> <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> <1573307358434-0.post@n3.nabble.com> Message-ID: Is there a way, to fill the area between two 2d-curves with a colour? Heinz From acj119 at nifty.com Sat Nov 9 14:59:48 2019 From: acj119 at nifty.com (jaipur) Date: Sat, 9 Nov 2019 06:59:48 -0700 (MST) Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1573307358434-0.post@n3.nabble.com> References: <1573304375900-0.post@n3.nabble.com> <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> <1573307358434-0.post@n3.nabble.com> Message-ID: <1573307988786-0.post@n3.nabble.com> Thank you very much, Mr. Samuel GOUGEON. I understand both ways of ALT key pressed pan and 3D selection zoom. Best regards, Hiroshi Tachihara -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sat Nov 9 15:18:42 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Nov 2019 15:18:42 +0100 Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1573307988786-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> Message-ID: Le 09/11/2019 ? 14:59, jaipur a ?crit?: > Thank you very much, Mr. Samuel GOUGEON. > > I understand both ways of ALT key pressed pan and 3D selection zoom. You can do the same with the *gca().zoom_box* property. About it: Beware that the order of entries is not regular: As documented, the correct setting is| [xmin,ymin, xmax,ymax, zmin,zmax] NOT || [xmin,ymin,zmin, xmax,ymax,zmax] NOR |||[xmin,xmax, ymin,ymax, zmin,zmax] | | as we could have expected, but that do not do what we want. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Nov 9 15:19:58 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Nov 2019 15:19:58 +0100 Subject: [Scilab-users] fill the area between two curves with a colour? In-Reply-To: References: <1573304375900-0.post@n3.nabble.com> <16e5054b901.ccb03616142505.5253678799810298646@bytecode-asia.com> <1573307358434-0.post@n3.nabble.com> Message-ID: Le 09/11/2019 ? 14:56, Heinz Nabielek a ?crit?: > Is there a way, to fill the area between two 2d-curves with a colour? Please stop hijacking an existing thread with a new topic. Open a fresh thread. Thanks From chinluh.tan at bytecode-asia.com Sat Nov 9 15:19:57 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Sat, 09 Nov 2019 22:19:57 +0800 Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1573307988786-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> Message-ID: <16e50892cf9.b9282649153604.3801530889688600942@bytecode-asia.com> Hi, Thanks samuel for pointing out the ALT key.? Another way of zooming in with certain point as the center is to point your mouse cursor to the location you want to show all time, (for e.g ur case, the peak), and only then you scroll the mouse wheel. rgds, CL ---- On Sat, 09 Nov 2019 21:59:48 +0800 jaipur wrote ---- Thank you very much, Mr. Samuel GOUGEON. I understand both ways of ALT key pressed pan and 3D selection zoom. Best regards, Hiroshi Tachihara -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Nov 9 15:24:23 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Nov 2019 15:24:23 +0100 Subject: [Scilab-users] How to create transparent polygon In-Reply-To: <1573305584430-0.post@n3.nabble.com> References: <1573305584430-0.post@n3.nabble.com> Message-ID: <541e2cca-92a7-1c3f-d9ab-976dfc17c309@free.fr> Le 09/11/2019 ? 14:19, jaipur a ?crit?: > Dear all > > When making a polygon by xpoly for example, can we set transparency effect > as the following polygon? No, AFAIK it is not properly possible. There is just the *gcf().**pixel_drawing_mode property*, but it's a global one for the whole figure, and it is not easy to manage. This way is rather a hack. help.scilab.org/docs/6.0.2/en_US/pixel_drawing_mode.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Nov 9 17:02:46 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Nov 2019 17:02:46 +0100 Subject: [Scilab-users] example of library In-Reply-To: <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> Message-ID: Le 09/11/2019 ? 06:13, Federico Miyara a ?crit?: > > Dear all, > > I could finally work it out: The function > > librarieslist() > > provides a list of Scilab libraries, and the elementary function > library is called > > elementary_functionslib > > instead of > > elementary_functionlib > > There is a typo in the example (a plural is missing)--thrice!. That's > why the example didn't work! > > Somebody told me I could edit the documentation by myself. I need some > permission? How I can get access to edit the help pages? * login on the CodeReview portal, with your usual (Bugzilla) Scilab login and password: https://codereview.scilab.org => Sign in, in the top right * Contribute to an existing commit, just through the web interface. Creating new commits and managing them is (quite) more complicated (at least it was, for me). But many contributions are possible directly with the web interface, without knowing GIT, including editing files. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Nov 9 22:12:14 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 9 Nov 2019 22:12:14 +0100 Subject: [Scilab-users] CLR design component is not clear in scilab 6.0.2 x64 W10 In-Reply-To: References: <8fefe77d-6d87-398f-dbdb-ab78bbcce384@free.fr> <7ef33bf3-8911-f379-1f83-f20c147b4d0c@fceia.unr.edu.ar> <3f0b1982-620f-af6c-9a6f-7bf1cf800a9c@fceia.unr.edu.ar> Message-ID: Le 31/10/2019 ? 00:15, Samuel Gougeon a ?crit?: > .../... > > It would be /v//ery/ hard (and easily prone to errors, due to many > specific cases, using parentheses, etc) to parse the input to detect > all possible cases (1-char symbols, multiple-char symbols, literal > numbers with or without exponential notations, real or complex, etc) > and adapt the multiplication symbol accordingly. > Actually, the detection of multiple cases is doable. There are not so many. Example: Here is the list of tested cases, with an arbitrary number of spaces before and after *: 1.23* 3.32 x 1.23* -3.32 x var* -1.23 x )* -1.23 x var * 1.23 cdot var* var cdot )* 1.23 cdot All other cases => small space \, , noticeably: 1.23* (-3.32 \, 1.23* var \, var* (... \, )* var \, )*( \, When a literal number ends with a point, like "3.", it still works, as with "3". Unless there are some final remarks, i will push this on review on the forge for the CLR, DLR, EXPRESSION and scifunc_block_m blocks interfaces. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: landkeeemnjimldk.png Type: image/png Size: 4479 bytes Desc: not available URL: From acj119 at nifty.com Sun Nov 10 06:36:58 2019 From: acj119 at nifty.com (jaipur) Date: Sat, 9 Nov 2019 22:36:58 -0700 (MST) Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <16e50892cf9.b9282649153604.3801530889688600942@bytecode-asia.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> Message-ID: <1573364218730-0.post@n3.nabble.com> Thanks for all. I understand correct way to zoom in. Then I have one more question. At my first question, I found vacant holes appear when zooming in. Why do these holes appear and how can we zoom in without such holes? Shall I treat some properties of axes or figure? -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sun Nov 10 12:02:34 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Nov 2019 12:02:34 +0100 Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1573364218730-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> Message-ID: <78f966f1-462a-a964-ebd3-9d4f2c9c0436@free.fr> Le 10/11/2019 ? 06:36, jaipur a ?crit?: > Thanks for all. I understand correct way to zoom in. > > Then I have one more question. > At my first question, I found vacant holes appear when zooming in. > Why do these holes appear and how can we zoom in without such holes? Shall I > treat some properties of axes or figure? The surface is hollow, and any part of a graphic beyond the axes bounds is clipped. Do you mean you are looking for filling the flat ceiling and flooring parts with some opaque paint? If so, AFAIK there is no way to do this. From acj119 at nifty.com Sun Nov 10 13:46:01 2019 From: acj119 at nifty.com (jaipur) Date: Sun, 10 Nov 2019 05:46:01 -0700 (MST) Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <78f966f1-462a-a964-ebd3-9d4f2c9c0436@free.fr> 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> Message-ID: <1573389961407-0.post@n3.nabble.com> I would like to say that I expected a plot3d image expands with automatic expansion of x-, y- and z-axes during zooming in by wheel. However, axes box size actually does not expand and x-, y-, z-ticks just move within the box. This reached to the result that axes box size is unchanged and a plot3d image is clipped at the boundaries as holes. To avoid this clip and let whole image of plot3d expand, shall I change some property of axes concerning clipping and so on? -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sun Nov 10 13:56:02 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Nov 2019 13:56:02 +0100 Subject: [Scilab-users] How to zoom in correctly In-Reply-To: <1573389961407-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> Message-ID: Le 10/11/2019 ? 13:46, jaipur a ?crit?: > I would like to say that I expected a plot3d image expands with automatic > expansion of x-, y- and z-axes during zooming in by wheel. However, axes box > size actually does not expand and x-, y-, z-ticks just move within the box. > This reached to the result that axes box size is unchanged and a plot3d > image is clipped at the boundaries as holes. > > To avoid this clip and let whole image of plot3d expand, shall I change some > property of axes concerning clipping and so on? gce().clip_state = "off"; -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: opfmkkmcnhnfegkj.png Type: image/png Size: 41470 bytes Desc: not available URL: From acj119 at nifty.com Sun Nov 10 15:02:54 2019 From: acj119 at nifty.com (jaipur) Date: Sun, 10 Nov 2019 07:02:54 -0700 (MST) Subject: [Scilab-users] How to zoom in correctly In-Reply-To: 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> Message-ID: <1573394574575-0.post@n3.nabble.com> I understand that the handle of which property of 'clip_state ' have to be set to 'off' is gce(), not gca()!!! Thanks a lot a lot a lot. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From domec at ac-bordeaux.fr Mon Nov 11 01:22:40 2019 From: domec at ac-bordeaux.fr (Domec Jean Louis) Date: Mon, 11 Nov 2019 01:22:40 +0100 Subject: [Scilab-users] Bug scilab-6 libjava.so Message-ID: <24ff58f3-1914-e56e-f55b-2ac5420b00b1@ac-bordeaux.fr> Hello, I just begin with this list. I have a? problem with scilab6: On different PC 64bits, i boot with knoppix-8.6 It uses ? Linux kernel 5.2.5 and Xorg 7.7 (core 1.20.4) for supporting current computer hardware. Whem i start scilab-6.02 (installed by scilab-6.0.2.bin.linux-x86_64.tar.gz ): /usr/bin/scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory Have you an idea to solve this problem ? Thank you -- ____________________________________________________________________________ Jean-louis Domec Professeur de Physique appliqu?e domecCHEZac-bordeaux.fr Laboratoire de Physique Appliqu?e: Tel 0559282228 poste 314 Fax: 0559280631 Lyc?e du Pays de Soule - Ch?raute (64) Courrier r?alis? avec le Logiciel Libre Mozilla . Sous le Syst?me d'exploitation Libre, Linux Mandriva 2008 Logiciels libres: Le partage des connaissances http://www.april.org/ http://www.ofset.org ____________________________________________________________________________ From wknoelly at gmail.com Mon Nov 11 17:33:55 2019 From: wknoelly at gmail.com (knobs) Date: Mon, 11 Nov 2019 09:33:55 -0700 (MST) Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: References: <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> <20191104172453.Horde.VRQJkcjMluT8JFb3GuPw_Z1@webmail.utc.fr> <16e374d31e8.117b2bdea221215.5434202010947762014@bytecode-asia.com> <20191104180637.Horde.YxGe58KcXZKB3k4G0kxXtWt@webmail.utc.fr> <16e3a344cae.ce4833ea287659.1763238608395281499@bytecode-asia.com> <4BD40FBC-97B0-41F2-B752-42EAF444479D@utc.fr> Message-ID: <1573490035965-0.post@n3.nabble.com> Hi, Great detective work. Thank you! Sorry, I have been too busy to try out the new beta version (S.?s dmg). Will do this soon, probably on the weekend. W. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From chinluh.tan at bytecode-asia.com Mon Nov 11 18:01:31 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 12 Nov 2019 01:01:31 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? Message-ID: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> Hi,? I just aware that Samuel has pointed out about the "hijacking" a thread, in fact, this topic was hijacked from the original topic "[Scilab-users] lincos instruction : example file pendulum_anim45.zcos is corrupted - Buggzilla 16221" . Look at this link: http://mailinglists.scilab.org/Scilab-users-lincos-instruction-example-file-pendulum-anim45-zcos-is-corrupted-Buggzilla-16221-tc4039887.html We would not able to see the topic on MacOS but instead, it is hiding under the lincos topic.? How it happens?? I think a lot of time when we wanted to post to the user list, we just simple open one email, and the click reply, delete the contents and put in new subjects, and this is how we hijacked a topic. So the original topic looks very active, but it was talking about something else.? >From email, it looks ok, but if you refer to the link above, we can see the problem. I've to admit that I've done that before as well. :) What's the impact? The thread become very messy and misleading for future reference. So to avoid this happen again, click on new email and sent to the user list, it will create a new thread.? I've create a new thread for this MacOS case, please reply to this thread for only this topic. :) Thanks everyone. Regards, CL -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Mon Nov 11 18:03:58 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 12 Nov 2019 01:03:58 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> References: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> Message-ID: <16e5b6c0fa5.c83df7ae327427.3006523777998671415@bytecode-asia.com> correction, i meant, this topic had hijacked the topic?"[Scilab-users] lincos instruction : example file pendulum_anim45.zcos is corrupted - Buggzilla 16221" , not the other way.? apologize to?Pierre PERRICHON for hijacking your thread. :) rgds, CL ---- On Tue, 12 Nov 2019 01:01:31 +0800 Chin Luh Tan wrote ---- Hi,? I just aware that Samuel has pointed out about the "hijacking" a thread, in fact, this topic was hijacked from the original topic "[Scilab-users] lincos instruction : example file pendulum_anim45.zcos is corrupted - Buggzilla 16221" . Look at this link: http://mailinglists.scilab.org/Scilab-users-lincos-instruction-example-file-pendulum-anim45-zcos-is-corrupted-Buggzilla-16221-tc4039887.html We would not able to see the topic on MacOS but instead, it is hiding under the lincos topic.? How it happens?? I think a lot of time when we wanted to post to the user list, we just simple open one email, and the click reply, delete the contents and put in new subjects, and this is how we hijacked a topic. So the original topic looks very active, but it was talking about something else.? >From email, it looks ok, but if you refer to the link above, we can see the problem. I've to admit that I've done that before as well. :) What's the impact? The thread become very messy and misleading for future reference. So to avoid this happen again, click on new email and sent to the user list, it will create a new thread.? I've create a new thread for this MacOS case, please reply to this thread for only this topic. :) Thanks everyone. Regards, CL _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Nov 11 20:39:01 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 11 Nov 2019 20:39:01 +0100 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> References: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> Message-ID: <966ee2f1-fd1e-d164-2cb0-e89a9ec27681@free.fr> Le 11/11/2019 ? 18:01, Chin Luh Tan a ?crit?: > Hi, > > I just aware that Samuel has pointed out about the "hijacking" a > thread, in fact, this topic was hijacked from the original topic > "[Scilab-users] lincos instruction : example file pendulum_anim45.zcos > is corrupted - Buggzilla 16221" . > > Look at this link: > > http://mailinglists.scilab.org/Scilab-users-lincos-instruction-example-file-pendulum-anim45-zcos-is-corrupted-Buggzilla-16221-tc4039887.html > > We would not able to see the topic on MacOS but instead, it is hiding > under the lincos topic. > > How it happens? > > I think a lot of time when we wanted to post to the user list, we just > simple open one email, and the click reply, delete the contents and > put in new subjects, and this is how we hijacked a topic. So the > original topic looks very active, but it was talking about something > else. > > From email, it looks ok, Thank you, Chin Luh. It's the same issue with emails, if the mailer is set to thread mails (i could not work without this feature. Who could?). If a hijacked thread is folded, the hijacking discussion becomes completely hidden. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mnflbegggcpejejm.png Type: image/png Size: 30573 bytes Desc: not available URL: From chinluh.tan at bytecode-asia.com Tue Nov 12 03:12:27 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 12 Nov 2019 10:12:27 +0800 Subject: [Scilab-users] Bug scilab-6 libjava.so In-Reply-To: <24ff58f3-1914-e56e-f55b-2ac5420b00b1@ac-bordeaux.fr> References: <24ff58f3-1914-e56e-f55b-2ac5420b00b1@ac-bordeaux.fr> Message-ID: <16e5d6235c6.11dfd1ff3366356.7883288394125967151@bytecode-asia.com> Hi,? A few suggestion to try out: 1. Try to locate the libjava.so to see whether java is install. if you, u could try to temporary set the JAVA_HOME and try to run scilab again e.g.: $ locate libjava.so? or $ update-java-alternatives -l and then $ export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"? ?<-- use the path obtained from above $ scilab or $ SCIPATH/scilab 2. If the installed java does not works, try to install the openjdk-11 jre $ sudo apt-get install openjdk-11-jre repeat the export and run the scilab again. If it works, u could set the JAVA_HOME path at .bashrc to make it permanent Hope this helps. rgds, CL? ---- On Mon, 11 Nov 2019 08:22:40 +0800 Domec Jean Louis wrote ---- Hello, I just begin with this list. I have a? problem with scilab6: On different PC 64bits, i boot with knoppix-8.6 It uses ? Linux kernel 5.2.5 and Xorg 7.7 (core 1.20.4) for supporting current computer hardware. Whem i start scilab-6.02 (installed by scilab-6.0.2.bin.linux-x86_64.tar.gz ): /usr/bin/scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory Have you an idea to solve this problem ? Thank you -- ____________________________________________________________________________ Jean-louis Domec Professeur de Physique appliqu?e domecCHEZac-bordeaux.fr Laboratoire de Physique Appliqu?e: Tel 0559282228 poste 314 Fax: 0559280631 Lyc?e du Pays de Soule - Ch?raute (64) Courrier r?alis? avec le Logiciel Libre Mozilla . Sous le Syst?me d'exploitation Libre, Linux Mandriva 2008 Logiciels libres: Le partage des connaissances http://www.april.org/ http://www.ofset.org ____________________________________________________________________________ _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Tue Nov 12 03:16:57 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 12 Nov 2019 10:16:57 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <966ee2f1-fd1e-d164-2cb0-e89a9ec27681@free.fr> References: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> <966ee2f1-fd1e-d164-2cb0-e89a9ec27681@free.fr> Message-ID: <16e5d66538b.e863b82c366618.3999748358236362474@bytecode-asia.com> Thanks Samuel for pointing this out. yes, you're right, if we've group the email, it will be the same as the one seen in the link, unless we've chosen the "Flatten" view in the email client.? We shall open another new thread on this discussion or else it will not match the subject again. :) rgds, CL ---- On Tue, 12 Nov 2019 03:39:01 +0800 Samuel Gougeon wrote ---- Le 11/11/2019 ? 18:01, Chin Luh Tan a ?crit?: Hi,? I just aware that Samuel has pointed out about the "hijacking" a thread, in fact, this topic was hijacked from the original topic "[Scilab-users] lincos instruction : example file pendulum_anim45.zcos is corrupted - Buggzilla 16221" . Look at this link: http://mailinglists.scilab.org/Scilab-users-lincos-instruction-example-file-pendulum-anim45-zcos-is-corrupted-Buggzilla-16221-tc4039887.html We would not able to see the topic on MacOS but instead, it is hiding under the lincos topic.? How it happens?? I think a lot of time when we wanted to post to the user list, we just simple open one email, and the click reply, delete the contents and put in new subjects, and this is how we hijacked a topic. So the original topic looks very active, but it was talking about something else.? >From email, it looks ok, Thank you, Chin Luh. It's the same issue with emails, if the mailer is set to thread mails (i could not work without this feature. Who could?). If a hijacked thread is folded, the hijacking discussion becomes completely hidden. Regards _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 30573 bytes Desc: not available URL: From chinluh.tan at bytecode-asia.com Tue Nov 12 03:42:00 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 12 Nov 2019 10:42:00 +0800 Subject: [Scilab-users] Good Practices for Sending to Scilab Mailer Message-ID: <16e5d7d4482.110bc12c5368113.841871498267271676@bytecode-asia.com> Hi,? Just some opinions after Samuel bringing out the issue of maintaining nice threads in Scilab mailer, perhaps a few simple guideline for our own reminder will keep the Scilab Mailer clean and useful for others to search. 1. When posting a new topic, never use any other existing email and click reply, then edit the contents and subject. In this case the new topic will hide under the existing thread.?? ? *Image from Samuel previous email. 2. Another precaution to be taken is trying not to create a new thread with similar topic, by copy and paste the subject to a new email. It will split the conversation into multiple threads.? feel free to add any comments on this. rgds, CL -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1573526214277000_2099359832.png Type: image/png Size: 50272 bytes Desc: not available URL: From chinluh.tan at bytecode-asia.com Tue Nov 12 04:39:38 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 12 Nov 2019 11:39:38 +0800 Subject: [Scilab-users] How to create transparent polygon In-Reply-To: <1573305584430-0.post@n3.nabble.com> References: <1573305584430-0.post@n3.nabble.com> Message-ID: <16e5db207a4.c6e0de8e371598.8452149506634162088@bytecode-asia.com> Hi, If it is not necessary to have real transparent color mixing, but just want to have the transparent effect, you could try to play with the "pixel_drawing_mode".? f = figure("background", 1,"pixel_drawing_mode", "or"); plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); x=sin(2*%pi*(0:4)/5); y=cos(2*%pi*(0:4)/5); plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); gca().foreground = 12; xfpoly(x,y); gca().foreground = 27; xfpoly(x+0.3,y+0.3) example from?https://help.scilab.org/docs/6.0.2/en_US/pixel_drawing_mode.html rgds, CL ---- On Sat, 09 Nov 2019 21:19:44 +0800 jaipur wrote ---- Dear all When making a polygon by xpoly for example, can we set transparency effect as the following polygon? If it's possible, could you suggest the way of doing? Regards Hiroshi Tachihara -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1573529900382000_2099359832.png Type: image/png Size: 8541 bytes Desc: not available URL: From chinluh.tan at bytecode-asia.com Tue Nov 12 04:53:11 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 12 Nov 2019 11:53:11 +0800 Subject: [Scilab-users] How to create transparent polygon In-Reply-To: <16e5db207a4.c6e0de8e371598.8452149506634162088@bytecode-asia.com> References: <1573305584430-0.post@n3.nabble.com> <16e5db207a4.c6e0de8e371598.8452149506634162088@bytecode-asia.com> Message-ID: <16e5dbe6dc1.f07643ad372601.7382403086314350365@bytecode-asia.com> the previous method is the implementation as suggested by Samuel, another approach would be using Matplot. you could play with the last line obj1 and obj2 (alpha blending) to get the desired intersection color.? x = zeros(100,100,3); obj1 = x; obj2 = x; obj1(21:60,21:60) = 1; obj1(:,:,2:3) = 0; obj2(41:80,41:80,2) = 1; obj2(:,:,[1,3]) = 0; Matplot(obj1+obj2) ---- On Tue, 12 Nov 2019 11:39:38 +0800 Chin Luh Tan wrote ---- Hi, If it is not necessary to have real transparent color mixing, but just want to have the transparent effect, you could try to play with the "pixel_drawing_mode".? f = figure("background", 1,"pixel_drawing_mode", "or"); plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); x=sin(2*%pi*(0:4)/5); y=cos(2*%pi*(0:4)/5); plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); gca().foreground = 12; xfpoly(x,y); gca().foreground = 27; xfpoly(x+0.3,y+0.3) example from?https://help.scilab.org/docs/6.0.2/en_US/pixel_drawing_mode.html rgds, CL ---- On Sat, 09 Nov 2019 21:19:44 +0800 jaipur wrote ---- _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Dear all When making a polygon by xpoly for example, can we set transparency effect as the following polygon? If it's possible, could you suggest the way of doing? Regards Hiroshi Tachihara -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1573530752660000_2099359832.png Type: image/png Size: 11364 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 8541 bytes Desc: not available URL: From wknoelly at gmail.com Tue Nov 12 22:03:26 2019 From: wknoelly at gmail.com (knobs) Date: Tue, 12 Nov 2019 14:03:26 -0700 (MST) Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any        progress in sight? In-Reply-To: References: <71207106-7A87-44B0-9972-54837875A74A@me.com> <20191104154020.Horde.-OBuBsaZ_z7AQx-f3uBDVbR@webmail.utc.fr> <16e3715b644.11e0fbaa4210563.4976003527567069095@bytecode-asia.com> <20191104171037.Horde.KsMpl0kdCUYfWpDTQqLRuTI@webmail.utc.fr> <20191104172453.Horde.VRQJkcjMluT8JFb3GuPw_Z1@webmail.utc.fr> <16e374d31e8.117b2bdea221215.5434202010947762014@bytecode-asia.com> <20191104180637.Horde.YxGe58KcXZKB3k4G0kxXtWt@webmail.utc.fr> <16e3a344cae.ce4833ea287659.1763238608395281499@bytecode-asia.com> <4BD40FBC-97B0-41F2-B752-42EAF444479D@utc.fr> Message-ID: <1573592606789-0.post@n3.nabble.com> Hi, I installed the Scilab from the new dmg: ========= --> [version, opts] = getversion() opts = !GCC x64 modelicac release Aug 19 2019 11:47:50 ! version = scilab-6.0.2 ========= When running Atoms from the menu it still would start nor populate the atoms-list. Running from terminal, this allows to run atomsList from command line but not from. In fact the menu does not react to the mouse. atomsInstall works from the command line, though. Edited the atomsExtract.sci as described above, but I guess the sci has to be re-compiled, correct? Anyway, I restarted scilab ap by clicking on the app icon, and now I could start the atoms GUI from the menu. IPCV still shows the sub-directory issues. I fixed this again manually by moving files and sue-dirs around. Then I tried to install another module ("Neural Networks ..."). Again the regex issue: ======= Startup execution: loading initial environment Start CelestLab => Version 3.3.1 Start IPCV 4.1 for Scilab 6.0 Image Processing and Computer Vision Toolbox for Scilab 2019 - Bytecode Malaysia Load macros Load dependencies Pre-Compiled OpenCV lib used Load gateways Load help Load demos at line 5 of function processHTMLLinks ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci line 427 ) at line 113 of function updateDescFrame ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci line 286 ) at line 22 of function cbAtomsGui ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci line 36 ) regexp: Unknown error. ======= So... no apparent change on my machine to the previous version (official stable release) of Scilab 6.0.2.. Sorry. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From chinluh.tan at bytecode-asia.com Wed Nov 13 02:05:07 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Wed, 13 Nov 2019 09:05:07 +0800 Subject: [Scilab-users] Scilab cannot work on macOS 10.15 Catalina: Any progress in sight? In-Reply-To: <966ee2f1-fd1e-d164-2cb0-e89a9ec27681@free.fr> References: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> <966ee2f1-fd1e-d164-2cb0-e89a9ec27681@free.fr> Message-ID: <16e624aebf2.105189c2c578225.1069874689406818022@bytecode-asia.com> Hi, We have move the MacOS discussion to this new thread, please reply to this thread in the future for this discussion. I will answer the modification on the atomsExtract.sci first.? Once you have edit the function, you need to run the sci file above in order to use the updated code. However, this will only valid for temporary as long as you Scilab is active, and you did not run the command "clear" in Scilab. To make it permanent for your machines, u can run the buildmacros.sci in the modules/atoms/macros (to be confirm, i am on windows now), the it will "compile" the sci file and make it permanent for you. Thanks. rgds, CL ----------------------- Hi, I installed the Scilab from the new dmg: ========= --> [version, opts] = getversion() opts = !GCC x64 modelicac release Aug 19 2019 11:47:50 ! version = scilab-6.0.2 ========= When running Atoms from the menu it still would start nor populate the atoms-list. Running from terminal, this allows to run atomsList from command line but not from. In fact the menu does not react to the mouse. atomsInstall works from the command line, though. Edited the atomsExtract.sci as described above, but I guess the sci has to be re-compiled, correct? Anyway, I restarted scilab ap by clicking on the app icon, and now I could start the atoms GUI from the menu. IPCV still shows the sub-directory issues. I fixed this again manually by moving files and sue-dirs around. Then I tried to install another module ("Neural Networks ..."). Again the regex issue: ======= Startup execution: loading initial environment Start CelestLab => Version 3.3.1 Start IPCV 4.1 for Scilab 6.0 Image Processing and Computer Vision Toolbox for Scilab 2019 - Bytecode Malaysia ????Load macros ????Load dependencies Pre-Compiled OpenCV lib used ????Load gateways ????Load help ????Load demos at line 5 of function processHTMLLinks ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci line 427 ) at line 113 of function updateDescFrame ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci line 286 ) at line 22 of function cbAtomsGui ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci line 36 ) regexp: Unknown error. ======= So... no apparent change on my machine to the previous version (official stable release) of Scilab 6.0.2.. Sorry. -- Sent from:?http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-philippe.grivet at wanadoo.fr Wed Nov 13 10:50:10 2019 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Wed, 13 Nov 2019 10:50:10 +0100 Subject: [Scilab-users] strange behaviof of function isreal In-Reply-To: <16e624aebf2.105189c2c578225.1069874689406818022@bytecode-asia.com> References: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> <966ee2f1-fd1e-d164-2cb0-e89a9ec27681@free.fr> <16e624aebf2.105189c2c578225.1069874689406818022@bytecode-asia.com> Message-ID: Hello, I have stumbled upon the following strange behavior of function "isreal" (Scilab 6.02, win7): --> z = [1,2,3*%i] ?z? = ?? 1.?? 2.?? 3.i --> isreal(z(1)) ?ans? = ? F What did I miss ? Rhank you for your help. J.-P. Grivet From Christophe.Dang at sidel.com Wed Nov 13 11:09:53 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Wed, 13 Nov 2019 10:09:53 +0000 Subject: [Scilab-users] {EXT} strange behaviof of function isreal In-Reply-To: References: <16e5b69d0a5.c8b5609c327015.7978380028462823689@bytecode-asia.com> <966ee2f1-fd1e-d164-2cb0-e89a9ec27681@free.fr> <16e624aebf2.105189c2c578225.1069874689406818022@bytecode-asia.com> Message-ID: Hello, > De : De la part de Jean-Philippe Grivet > Envoy? : mercredi 13 novembre 2019 10:50 > > --> z = [1,2,3*%i] > z = > 1. 2. 3.i > --> isreal(z(1)) > ans = > F > What did I miss ? Rhank you for your help. https://help.scilab.org/docs/6.0.2/en_US/brackets.html "In some limits, brackets may be applied on a set of data having different but compatible types. In this case, some data are converted into the dominating type available in the set. The main conversion rules are the following: [...] 3. The result becomes complex-encoded as soon as a complex-encoded component -- value, polynomial, or rational -- is met in the list (even with a null imaginary part)" 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 stephane.mottelet at utc.fr Wed Nov 13 11:16:45 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 13 Nov 2019 11:16:45 +0100 Subject: [Scilab-users] {EXT} strange behaviof of function isreal Message-ID: <39e33a27-124f-45df-7b67-8f450522b3f8@utc.fr> Le 13/11/2019 ? 11:09, Dang Ngoc Chan, Christophe a ?crit?: > Hello, > >> De : De la part de Jean-Philippe Grivet >> Envoy? : mercredi 13 novembre 2019 10:50 >> >> --> z = [1,2,3*%i] >> z = >> 1. 2. 3.i >> --> isreal(z(1)) >> ans = >> F >> What did I miss ? Rhank you for your help. > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/brackets.html > > "In some limits, brackets may be applied on a set of data having different but compatible types. In this case, some data are converted into the dominating type available in the set. The main conversion rules are the following: > [...] > 3. The result becomes complex-encoded as soon as a complex-encoded component -- value, polynomial, or rational -- is met in the list (even with a null imaginary part)" This non-intuitive behavior will be fixed as soon as the patch https://codereview.scilab.org/#/c/21090/ will be merged ! S. > > 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 > https:// -- 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 wofaiewa at yahoo.com Wed Nov 13 11:46:56 2019 From: wofaiewa at yahoo.com (Wofai Ewa) Date: Wed, 13 Nov 2019 10:46:56 +0000 (UTC) Subject: [Scilab-users] QUESTION References: <218397395.2365207.1573642016596.ref@mail.yahoo.com> Message-ID: <218397395.2365207.1573642016596@mail.yahoo.com> What is the advantage of SciLab over MATLAB? _________________________________________________ Wofai?Ewa (Engr) [MSc, MNSE,?COREN,?APM,?CIArb,?PRINCE?2?] -?Chartered?Engineer -?Arbitrator?(CIArb,?UK) -?Project?Mgmt.?Expert? -?Prince?2??Practitioner ....................................................................... M:?+234?(0)?8059076867 T:??+234?(0)?8102221112 P Please consider the environment before printing this e-mail This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of his business. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ral6330 at gmail.com Wed Nov 13 11:46:54 2019 From: ral6330 at gmail.com (Ral Okafor) Date: Wed, 13 Nov 2019 11:46:54 +0100 Subject: [Scilab-users] Query Message-ID: How can I solve an ordinary differential equation? -------------- next part -------------- An HTML attachment was scrubbed... URL: From chijikem at yahoo.com Wed Nov 13 11:47:51 2019 From: chijikem at yahoo.com (chinagorom ajike) Date: Wed, 13 Nov 2019 10:47:51 +0000 (UTC) Subject: [Scilab-users] Scilab vs Matlab References: <1038934635.3290623.1573642071181.ref@mail.yahoo.com> Message-ID: <1038934635.3290623.1573642071181@mail.yahoo.com> Pls what is the striking advantage of scilab over matlab -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Wed Nov 13 11:49:22 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Wed, 13 Nov 2019 10:49:22 +0000 Subject: [Scilab-users] {EXT} Query In-Reply-To: References: Message-ID: Hello, > De : Ral Okafor > Envoy? : mercredi 13 novembre 2019 11:47 > > How can I solve an ordinary differential equation? Please look at the ode() function https://help.scilab.org/docs/6.0.2/en_US/ode.html 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 engroganyicity at yahoo.com Wed Nov 13 11:49:41 2019 From: engroganyicity at yahoo.com (Oganyi Okwudili) Date: Wed, 13 Nov 2019 10:49:41 +0000 (UTC) Subject: [Scilab-users] (no subject) References: <1864831470.3292676.1573642181431.ref@mail.yahoo.com> Message-ID: <1864831470.3292676.1573642181431@mail.yahoo.com> How can I solve quadratic equation Sent from Yahoo Mail on Android -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Wed Nov 13 11:51:55 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Wed, 13 Nov 2019 10:51:55 +0000 Subject: [Scilab-users] {EXT} Scilab vs Matlab In-Reply-To: <1038934635.3290623.1573642071181@mail.yahoo.com> References: <1038934635.3290623.1573642071181.ref@mail.yahoo.com> <1038934635.3290623.1573642071181@mail.yahoo.com> Message-ID: > De : chinagorom ajike > Envoy? : mercredi 13 novembre 2019 11:48 > > Pls what is the striking advantage of scilab over matlab http://mailinglists.scilab.org/Scilab-users-Scilab-vs-matlab-tp4034631.html -- 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 apebsonfreedom at yahoo.com Wed Nov 13 11:51:06 2019 From: apebsonfreedom at yahoo.com (Engr Apebo Samson) Date: Wed, 13 Nov 2019 11:51:06 +0100 Subject: [Scilab-users] Enquiry References: <681a31fe-c387-4e12-892c-56b291c40558.ref@email.android.com> Message-ID: <681a31fe-c387-4e12-892c-56b291c40558@email.android.com> An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Nov 13 11:58:45 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 13 Nov 2019 11:58:45 +0100 Subject: [Scilab-users] {EXT} strange behaviof of function isreal In-Reply-To: <39e33a27-124f-45df-7b67-8f450522b3f8@utc.fr> References: <39e33a27-124f-45df-7b67-8f450522b3f8@utc.fr> Message-ID: Dear all, Le 13/11/2019 ? 11:16, St?phane Mottelet a ?crit?: > Le 13/11/2019 ? 11:09, Dang Ngoc Chan, Christophe a ?crit?: > >> Hello, >> >>> De : De la part de Jean-Philippe Grivet >>> Envoy? : mercredi 13 novembre 2019 10:50 >>> >>> --> z = [1,2,3*%i] >>> ?? z? = >>> ???? 1.?? 2.?? 3.i >>> --> isreal(z(1)) >>> ?? ans? = >>> ??? F >>> What did I miss ? Rhank you for your help. >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/brackets.html >> >> >> "In some limits, brackets may be applied on a set of data having >> different but compatible types. In this case, some data are converted >> into the dominating type available in the set. The main conversion >> rules are the following: >> [...] >> 3. The result becomes complex-encoded as soon as a complex-encoded >> component -- value, polynomial, or rational -- is met in the list >> (even with a null imaginary part)" > > This non-intuitive behavior will be fixed as soon as the patch > > https://codereview.scilab.org/#/c/21090/ > > will be merged ! I hope no. I would strongy disagree with it. The proper syntax for this test is *isreal(z(1), 0)*. Without its second argument, isreal(z(1)) tests the encoding, not the realness. This is already documented.? Still improving the isreal() documentation page is planned for Scilab 6.1.0. To me, the only issue with the current isreal() implementation is that when it is used with its second argument, it should work element-wise. Presently, it is not the case. Thus, isreal(z,0) would answer [%T %T %F], while presently it returns the single %F as and([%T %T %F]). This is the only point. St?phane's proposal would make isreal(1+0*%i) returning %T, while isreal([1+0*%i, 0]) would still return %F. To me, this would be a far too? specific case, would be still more puzzling than the current behavior, and in addition would? break isreal()'s consistency. Much worse than today, today's issue rather being a documentation one, and isreal() and-wise behavior. In the way improving isreal() in a not back-compatible way, the only consistent way that i see is to make isreal(z,tol) working element-wise. Then, we would have --> isreal([1+0*%i, 0, %i], 0)? // => [%T %T %F] This has been somewhat discussed in thebug 14552 report. The way to somewhat bypass this discussion through the duplicate reported bug 14197 does not cancel the first. Best regards Samuel PS: Thank you St?phane for having re-posted the initial hijacking question in this new thread. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Nov 13 12:32:12 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 13 Nov 2019 12:32:12 +0100 Subject: [Scilab-users] {EXT} strange behaviof of function isreal In-Reply-To: References: <39e33a27-124f-45df-7b67-8f450522b3f8@utc.fr> Message-ID: Le 13/11/2019 ? 11:58, Samuel Gougeon a ?crit?: > Dear all, > > Le 13/11/2019 ? 11:16, St?phane Mottelet a ?crit?: >> Le 13/11/2019 ? 11:09, Dang Ngoc Chan, Christophe a ?crit?: >> >>> Hello, >>> >>>> De : De la part de Jean-Philippe Grivet >>>> Envoy? : mercredi 13 novembre 2019 10:50 >>>> >>>> --> z = [1,2,3*%i] >>>> ?? z? = >>>> ???? 1.?? 2.?? 3.i >>>> --> isreal(z(1)) >>>> ?? ans? = >>>> ??? F >>>> What did I miss ? Rhank you for your help. >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/brackets.html >>> >>> >>> "In some limits, brackets may be applied on a set of data having >>> different but compatible types. In this case, some data are >>> converted into the dominating type available in the set. The main >>> conversion rules are the following: >>> [...] >>> 3. The result becomes complex-encoded as soon as a complex-encoded >>> component -- value, polynomial, or rational -- is met in the list >>> (even with a null imaginary part)" >> >> This non-intuitive behavior will be fixed as soon as the patch >> >> https://codereview.scilab.org/#/c/21090/ >> >> will be merged ! > > > I hope no. I would strongy disagree with it. > > The proper syntax for this test is *isreal(z(1), 0)*. Without its > second argument, isreal(z(1)) tests the encoding, not the realness. > This is already documented.? Still improving the isreal() > documentation page is planned for Scilab 6.1.0. > > To me, the only issue with the current isreal() implementation is that > when it is used with its second argument, it should work element-wise. > Presently, it is not the case. Thus, isreal(z,0) would answer [%T %T > %F], while presently it returns the single %F as and([%T %T %F]). This > is the only point. > > St?phane's proposal would make isreal(1+0*%i) returning %T, > No. Please take time to read the details of the commit. In the patch decomplexification occurs only *at extraction time*. Of course, the modified help page (still to be pushed) should be part of the commit to take into account the new behavior. I am sorry to say that, but Scilab should not provide basic functions with the same name as Matlab ones but different behavior for the same input,? and impose a different API > while isreal([1+0*%i, 0]) would still return %F. > To me, this would be a far too? specific case, would be still more > puzzling than the current behavior, and in addition would break > isreal()'s consistency. Much worse than today, today's issue rather > being a documentation one, and isreal() and-wise behavior. > > In the way improving isreal() in a not back-compatible way, the only > consistent > This would be even worse, see my rematk above > > way that i see is to make isreal(z,tol) working element-wise. Then, we > would have > --> isreal([1+0*%i, 0, %i], 0)? // => [%T %T %F] > > This has been somewhat discussed in thebug 14552 > > report. The way to somewhat bypass this discussion through the > duplicate reported bug 14197 > > does not cancel the first. > > Best regards > Samuel > > PS: Thank you St?phane for having re-posted the initial hijacking > question in this new thread. > > > _______________________________________________ > 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 sgougeon at free.fr Wed Nov 13 12:36:16 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 13 Nov 2019 12:36:16 +0100 Subject: [Scilab-users] {EXT} strange behaviof of function isreal In-Reply-To: References: <39e33a27-124f-45df-7b67-8f450522b3f8@utc.fr> Message-ID: Le 13/11/2019 ? 11:58, Samuel Gougeon a ?crit?: > Dear all, > > Le 13/11/2019 ? 11:16, St?phane Mottelet a ?crit?: >> Le 13/11/2019 ? 11:09, Dang Ngoc Chan, Christophe a ?crit?: >> >>> Hello, >>> >>>> De : De la part de Jean-Philippe Grivet >>>> Envoy? : mercredi 13 novembre 2019 10:50 >>>> >>>> --> z = [1,2,3*%i] >>>> ?? z? = >>>> ???? 1.?? 2.?? 3.i >>>> --> isreal(z(1)) >>>> ?? ans? = >>>> ??? F >>>> What did I miss ? Rhank you for your help. >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/brackets.html >>> >>> >>> "In some limits, brackets may be applied on a set of data having >>> different but compatible types. In this case, some data are >>> converted into the dominating type available in the set. The main >>> conversion rules are the following: >>> [...] >>> 3. The result becomes complex-encoded as soon as a complex-encoded >>> component -- value, polynomial, or rational -- is met in the list >>> (even with a null imaginary part)" >> >> This non-intuitive behavior will be fixed as soon as the patch >> >> https://codereview.scilab.org/#/c/21090/ >> >> will be merged ! > > > I hope no. I would strongy disagree with it. > > The proper syntax for this test is *isreal(z(1), 0)*. Without its > second argument, isreal(z(1)) tests the encoding, not the realness. > This is already documented.? Still improving the isreal() > documentation page is planned for Scilab 6.1.0. > > To me, the only issue with the current isreal() implementation is that > when it is used with its second argument, it should work element-wise. > Presently, it is not the case. Thus, isreal(z,0) would answer [%T %T > %F], while presently it returns the single %F as and([%T %T %F]). This > is the only point. > > St?phane's proposal would make isreal(1+0*%i) returning %T, while > isreal([1+0*%i, 0]) would still return %F. > To me, this would be a far too? specific case, would be still more > puzzling than the current behavior, and in addition would break > isreal()'s consistency. Much worse than today, today's issue rather > being a documentation one, and isreal() and-wise behavior. > > In the way improving isreal() in a not back-compatible way, the only > consistent way that i see is to make isreal(z,tol) working > element-wise. Then, we would have > --> isreal([1+0*%i, 0, %i], 0)? // => [%T %T %F] > Humm, actually, making isreal(z, 0) working element-wise WOULD BE back-compatible, since any if/while vectorial condition already applies and() on the condition, as presently isreal() applies and() to its element-wise primary internal result. --> if [%T %F] then ? >???? disp("OR is applied") ? > end -->??? // (nothing printed) I am right? So, i do not see any possible issue about this suggestion. Do you? Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From uzohuzochukwu at gmail.com Wed Nov 13 20:42:22 2019 From: uzohuzochukwu at gmail.com (Uzoh Uzochukwu) Date: Wed, 13 Nov 2019 12:42:22 -0700 Subject: [Scilab-users] (no subject) Message-ID: unsubscribe me from the mailing ;ist -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Nov 13 13:01:38 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 13 Nov 2019 13:01:38 +0100 Subject: [Scilab-users] {EXT} strange behaviof of function isreal In-Reply-To: References: <39e33a27-124f-45df-7b67-8f450522b3f8@utc.fr> Message-ID: <9778098b-ca59-0b15-5012-370f8dc01e6e@free.fr> Le 13/11/2019 ? 12:32, St?phane Mottelet a ?crit?: > > > Le 13/11/2019 ? 11:58, Samuel Gougeon a ?crit?: >> Dear all, >> >> Le 13/11/2019 ? 11:16, St?phane Mottelet a ?crit?: >>> Le 13/11/2019 ? 11:09, Dang Ngoc Chan, Christophe a ?crit?: >>> >>>> Hello, >>>> >>>>> De : De la part de Jean-Philippe Grivet >>>>> Envoy? : mercredi 13 novembre 2019 10:50 >>>>> >>>>> --> z = [1,2,3*%i] >>>>> ?? z? = >>>>> ???? 1.?? 2.?? 3.i >>>>> --> isreal(z(1)) >>>>> ?? ans? = >>>>> ??? F >>>>> What did I miss ? Rhank you for your help. >>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/brackets.html >>>> >>>> >>>> "In some limits, brackets may be applied on a set of data having >>>> different but compatible types. In this case, some data are >>>> converted into the dominating type available in the set. The main >>>> conversion rules are the following: >>>> [...] >>>> 3. The result becomes complex-encoded as soon as a complex-encoded >>>> component -- value, polynomial, or rational -- is met in the list >>>> (even with a null imaginary part)" >>> >>> This non-intuitive behavior will be fixed as soon as the patch >>> >>> https://codereview.scilab.org/#/c/21090/ >>> >>> will be merged ! >> >> >> I hope no. I would strongy disagree with it. >> >> The proper syntax for this test is *isreal(z(1), 0)*. Without its >> second argument, isreal(z(1)) tests the encoding, not the realness. >> This is already documented.? Still improving the isreal() >> documentation page is planned for Scilab 6.1.0. >> >> To me, the only issue with the current isreal() implementation is >> that when it is used with its second argument, it should work >> element-wise. >> Presently, it is not the case. Thus, isreal(z,0) would answer [%T %T >> %F], while presently it returns the single %F as and([%T %T %F]). >> This is the only point. >> >> St?phane's proposal would make isreal(1+0*%i) returning %T, >> > No. Please take time to read the details of the commit. In the patch > decomplexification occurs only *at extraction time*. Of course, the > modified help page (still to be pushed) should be part of the commit > to take into account the new behavior. > I did read the duplicate? report and the commit when you pushed them. But again, their aim is IMO to badly answer to a bad usage but to a good question. With your current proposal, we would have: --> z = complex(1,0); --> isreal(z)??? // => %F --> isreal(z(1)) // => %T How could this appear not puzzling to us? What an unjustified price just to not use the tolerance argument cleverly proposed by Scilab, unlike Matlab and Octave. By the way, this would differ from the documented Matlab behavior (while Octave differs from it). As Matlab, Octave does not propose a tolerance as second argument. It's their weakness. I am not sorry to say that, with it, Scilab is more clever than both. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Nov 13 13:22:02 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 13 Nov 2019 13:22:02 +0100 Subject: [Scilab-users] {EXT} strange behaviof of function isreal In-Reply-To: <9778098b-ca59-0b15-5012-370f8dc01e6e@free.fr> References: <39e33a27-124f-45df-7b67-8f450522b3f8@utc.fr> <9778098b-ca59-0b15-5012-370f8dc01e6e@free.fr> Message-ID: Le 13/11/2019 ? 13:01, Samuel Gougeon a ?crit?: > Le 13/11/2019 ? 12:32, St?phane Mottelet a ?crit?: >> >> >> Le 13/11/2019 ? 11:58, Samuel Gougeon a ?crit?: >>> Dear all, >>> >>> Le 13/11/2019 ? 11:16, St?phane Mottelet a ?crit?: >>>> Le 13/11/2019 ? 11:09, Dang Ngoc Chan, Christophe a ?crit?: >>>> >>>>> Hello, >>>>> >>>>>> De : De la part de Jean-Philippe Grivet >>>>>> Envoy? : mercredi 13 novembre 2019 10:50 >>>>>> >>>>>> --> z = [1,2,3*%i] >>>>>> ?? z? = >>>>>> ???? 1.?? 2.?? 3.i >>>>>> --> isreal(z(1)) >>>>>> ?? ans? = >>>>>> ??? F >>>>>> What did I miss ? Rhank you for your help. >>>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/brackets.html >>>>> >>>>> >>>>> "In some limits, brackets may be applied on a set of data having >>>>> different but compatible types. In this case, some data are >>>>> converted into the dominating type available in the set. The main >>>>> conversion rules are the following: >>>>> [...] >>>>> 3. The result becomes complex-encoded as soon as a complex-encoded >>>>> component -- value, polynomial, or rational -- is met in the list >>>>> (even with a null imaginary part)" >>>> >>>> This non-intuitive behavior will be fixed as soon as the patch >>>> >>>> https://codereview.scilab.org/#/c/21090/ >>>> >>>> will be merged ! >>> >>> >>> I hope no. I would strongy disagree with it. >>> >>> The proper syntax for this test is *isreal(z(1), 0)*. Without its >>> second argument, isreal(z(1)) tests the encoding, not the realness. >>> This is already documented. Still improving the isreal() >>> documentation page is planned for Scilab 6.1.0. >>> >>> To me, the only issue with the current isreal() implementation is >>> that when it is used with its second argument, it should work >>> element-wise. >>> Presently, it is not the case. Thus, isreal(z,0) would answer [%T %T >>> %F], while presently it returns the single %F as and([%T %T %F]). >>> This is the only point. >>> >>> St?phane's proposal would make isreal(1+0*%i) returning %T, >>> >> No. Please take time to read the details of the commit. In the patch >> decomplexification occurs only *at extraction time*. Of course, the >> modified help page (still to be pushed) should be part of the commit >> to take into account the new behavior. >> > I did read the duplicate? report and the commit when you pushed them. > But again, their aim is IMO to badly answer to a bad usage but to a > good question. > With your current proposal, we would have: > > --> z = complex(1,0); > --> isreal(z)??? // => %F > --> isreal(z(1)) // => %T > > How could this appear not puzzling to us? What an unjustified price > just to not use the tolerance argument cleverly proposed by Scilab, > unlike Matlab and Octave. > By the way, this would differ from the documented Matlab behavior > (while Octave differs from it). > As Matlab, Octave does not propose a tolerance as second argument. > It's their weakness. > > I am not sorry to say that, with it, Scilab is more clever than both. > Nothing puzzling here. "z" denotes the original vector as a? well defined *reference*, while z(1) denotes a temporary value (yielded by an extraction). This is subtle, but clever, sorry to say that. > > Regards > Samuel > > > > _______________________________________________ > 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 kingsleynwauba at gmail.com Wed Nov 13 22:01:16 2019 From: kingsleynwauba at gmail.com (Kingsley nwauba) Date: Wed, 13 Nov 2019 22:01:16 +0100 Subject: [Scilab-users] Email Message-ID: <6A793E27-4BAB-4D44-B7CE-1BB7624084AA@gmail.com> Kingsleynwauba at gmail.com Sent from my iPhone From fmiyara at fceia.unr.edu.ar Wed Nov 13 22:31:13 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Wed, 13 Nov 2019 18:31:13 -0300 Subject: [Scilab-users] QUESTION In-Reply-To: <218397395.2365207.1573642016596@mail.yahoo.com> References: <218397395.2365207.1573642016596.ref@mail.yahoo.com> <218397395.2365207.1573642016596@mail.yahoo.com> Message-ID: <90cb29d3-1afb-fa58-f20c-82e51c85259b@fceia.unr.edu.ar> Wofai, Chinagorom, Apebo, This is my answer to your three very similar questions: The most striking advantage is that Scilab is free (in both senses) and open source, and this goes along with a superb support system where many users and even developers can help you with almost no delay. You can easily report and discuss bugs, propose new features or improvements with the confidence that if your proposal is reasonble and interesting, you'll be heard. And if you are knowledgeable at application programming, you can even become a developer. You'll never have this opportunity in Matlab without becoming an employee and signing heavily restrictive non-disclosure agreements. You'll never experience with Scilab what many of former Matlab users have suffered or will eventually suffer: a nasty notice that the license is about to expire. Another valuable feature is how it handles strings. In Matlab a string is an ASCII vector, so you can compare "hello" with "world" to conclude they are different but you cannot compare "hello" with "Lucy" because in this case they are vectors of different length and you get an error message. In Scilab you can compare a word with a novel since both are scalar strings, a type in its own right. There are many other advantages, such as being natively multi platform. Discovering them is fun, I promise. Regards, Federico Miyara On 13/11/2019 07:46, Wofai Ewa wrote: > What is the advantage of SciLab over MATLAB? > > > _________________________________________________ > Wofai?Ewa (Engr) > [MSc, MNSE,?COREN,?APM,?CIArb,?PRINCE?2?] > -?Chartered?Engineer > -?Arbitrator?(CIArb,?UK) > -?Project?Mgmt.?Expert > -?Prince?2??Practitioner > ....................................................................... > M:?+234?(0)?8059076867 > T:??+234?(0)?8102221112 > > > *P*Please consider the environment before printing this e-mail > *//* > */ > > /* > *This email and any attachments to it may be confidential and are > intended solely for the use of the individual to whom it is addressed. > Any views or opinions expressed are solely those of the author and do > not necessarily represent those of his business.* > *If you are not the intended recipient of this email, you must neither > take any action based upon its contents, nor copy or show it to anyone.* > *Please contact the sender if you believe you have received this email > in error.* > > _______________________________________________ > 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 Wed Nov 13 23:31:19 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Wed, 13 Nov 2019 19:31:19 -0300 Subject: [Scilab-users] (no subject) In-Reply-To: References: Message-ID: <758d6ec8-e54d-bcc9-db69-016dd84a2090@fceia.unr.edu.ar> You can unsubscibe visiting the link at the bottom of any message and once there, clicking on the "unsubscribe or edit options" button at the end. On 13/11/2019 16:42, Uzoh Uzochukwu wrote: > unsubscribe me from the mailing ;ist > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Thu Nov 14 09:07:45 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 14 Nov 2019 08:07:45 +0000 Subject: [Scilab-users] QUESTION Message-ID: Hello, > De : Federico Miyara > Envoy? : mercredi 13 novembre 2019 22:31 > > Wofai, Chinagorom, Apebo, I also started to answer but I'm puzzled by the batch of short questions originating from new subscribers with a Gmail address. It looks like spamming: searching for messages in the archives, posting something inspired by that to appear legitimate, then posting a link to a commercial or fishing URL. 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 sgougeon at free.fr Thu Nov 14 12:33:37 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 14 Nov 2019 12:33:37 +0100 Subject: [Scilab-users] QUESTION In-Reply-To: References: Message-ID: Le 14/11/2019 ? 09:07, Dang Ngoc Chan, Christophe a ?crit?: > Hello, >> De : Federico Miyara >> Envoy? : mercredi 13 novembre 2019 22:31 >> >> Wofai, Chinagorom, Apebo, > I also started to answer but I'm puzzled by the batch of short questions originating from new subscribers with a Gmail address. > > It looks like spamming: > searching for messages in the archives, > posting something inspired by that to appear legitimate, then posting a link to a commercial or fishing URL. Yes, but since there is no url redirection in the messages, i would rather wonder about some people in the same academic class, with some questions feeding an exam session... And we, feeding their answer. ;-) Anyway, i personnaly do not see a reason to take 20 s to answer to some subscribers that did not take 5 s to put a subject and? that evidently did not spend 15 more seconds to look around the official website and all redirections, noticeably to the online documentation. I guess that it might also be an exam about how to create a robot creating an account and spamming a test target. The last question was about how to make the robot unsubscribing. And one have failed. ;-) Now, i am aware that this is just an how-to take 5 mn to wonder and comment about not taking 20 s to answer to some improbable spam.. Best, Samuel PS: IMHO, the best way to deter such practice is to shortly and massively answer /in private/ to such mails. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wofaiewa at yahoo.com Thu Nov 14 13:03:02 2019 From: wofaiewa at yahoo.com (Wofai Okoi Ewa) Date: Thu, 14 Nov 2019 12:03:02 +0000 (UTC) Subject: [Scilab-users] QUESTION In-Reply-To: References: Message-ID: <1339256245.81601.1573732982679@mail.yahoo.com> Hi All, My sincere apologies for the seeming spam message. We (Post Graduate Students) have just been enrolled into a 5-day SciLab Training Workshop at the University of Nigeria, Nsukka, facilitated by Prof. S. O. Enibe, who asked us to get subscribed and also seek answers from the SciLab community. Hence the messages and questions. However, I commend those who are cautious about the possibility of spamming, and should retain such caution, going forward. Many thanks and best regards, Wofai? PSThanks Federico, for your brilliant feedback. ? ________________________________________________________________ Wofai O. Ewa? [MSc, MNSE, MNICE, COREN,?APM, ACIArb,?PRINCE?2?] -?Chartered?Engineer -?Arbitrator?(CIArb,?UK) -?Project?Mgmt.?Expert? -?Prince?2??Practitioner ....................................................................... M:?+234?(0)?8102221112 T: ?+234?(0)?8059076867 ?P?Pleaseconsider the environment before printing this e-mail? ?Thisemail and any attachments to it may be confidential and are intended solely forthe use of the individual to whom it is addressed. Any views or opinionsexpressed are solely those of the author and do not necessarily represent thoseof his business. If youare not the intended recipient of this email, you must neither take any actionbased upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email inerror. On Thursday, November 14, 2019, 12:34:15 PM GMT+1, Samuel Gougeon wrote: Le 14/11/2019 ? 09:07, Dang Ngoc Chan, Christophe a ?crit?: Hello, De : Federico Miyara Envoy? : mercredi 13 novembre 2019 22:31 Wofai, Chinagorom, Apebo, I also started to answer but I'm puzzled by the batch of short questions originating from new subscribers with a Gmail address. It looks like spamming: searching for messages in the archives, posting something inspired by that to appear legitimate, then posting a link to a commercial or fishing URL. Yes, but since there is no url redirection in the messages, i would rather wonder about some people in the same academic class, with some questions feeding an exam session... And we, feeding their answer. ;-) Anyway, i personnaly do not see a reason to take 20 s to answer to some subscribers that did not take 5 s to put a subject and? that evidently did not spend 15 more seconds to look around the official website and all redirections, noticeably to the online documentation. I guess that it might also be an exam about how to create a robot creating an account and spamming a test target. The last question was about how to make the robot unsubscribing. And one have failed. ;-) Now, i am aware that this is just an how-to take 5 mn to wonder and comment about not taking 20 s to answer to some improbable spam.. Best, Samuel PS: IMHO, the best way to deter such practice is to shortly and massively answer in private to such mails. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Thu Nov 14 13:24:38 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 14 Nov 2019 12:24:38 +0000 Subject: [Scilab-users] {EXT} Re: QUESTION In-Reply-To: <1339256245.81601.1573732982679@mail.yahoo.com> References: <1339256245.81601.1573732982679@mail.yahoo.com> Message-ID: Hello, > De : Wofai Okoi Ewa > Envoy? : jeudi 14 novembre 2019 13:03 > > We (Post Graduate Students) have just been enrolled into a 5-day > SciLab Training Workshop at the University of Nigeria, Nsukka, > facilitated by Prof. S. O. Enibe Much clearer now. Sorry for having suspecting you and your classmates. Generally, you can have most answers looking at help.scilab.org Solving an ordinary differential equation? Looke at the ode() (type "ode" in the search bar) Solving a quadratic equation : there are several ways but you might look at root() (which is designed to find root of a polynomial). Differences between Sci- and Mat-lab? Go back to the home page of the online help, click on "Wiki" then select From "Matlab to Scilab" Or browse the Mailing list archives Also, do not hesitate to go at the scilab.org page and click on "Tutorials" 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 acj119 at nifty.com Sun Nov 17 14:52:17 2019 From: acj119 at nifty.com (jaipur) Date: Sun, 17 Nov 2019 06:52:17 -0700 (MST) Subject: [Scilab-users] How to create transparent polygon In-Reply-To: <16e5db207a4.c6e0de8e371598.8452149506634162088@bytecode-asia.com> References: <1573305584430-0.post@n3.nabble.com> <16e5db207a4.c6e0de8e371598.8452149506634162088@bytecode-asia.com> Message-ID: <1573998737175-0.post@n3.nabble.com> Thank you all. I understand that scilab has the ability to draw transparent polygon any way. But changing of pixel_drawing_mode property affect already existent way of drawing, we have to be careful when doing. Especially when changing of pixel_drawing_mode property two or more times. Thank you. H.T. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From fmiyara at fceia.unr.edu.ar Sun Nov 17 23:29:06 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Sun, 17 Nov 2019 19:29:06 -0300 Subject: [Scilab-users] example of library In-Reply-To: References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> Message-ID: <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> Samuel, >> Somebody told me I could edit the documentation by myself. I need >> some permission? How I can get access to edit the help pages? > > * login on the CodeReview portal, with your usual (Bugzilla) Scilab > login and password: > https://codereview.scilab.org => Sign in, in the top right > * Contribute to an existing commit, just through the web interface. > > Creating new commits and managing them is (quite) more complicated (at > least it was, for me). > But many contributions are possible directly with the web interface, > without knowing GIT, > including editing files. Would you please give me some extra hints? I'm quite serious about starting to contribute corrections and improvements to some help pages, the only area where I feel confident that I can put my two cents for the time being (besides just detecting bugs). I've been able to login, I arrive at this page: https://codereview.scilab.org/#/q/status:open There are many open subjects, of course none of them matches the bug I've filed earlier: http://bugzilla.scilab.org/show_bug.cgi?id=16250 Anyway, I proceed and open the first one: https://codereview.scilab.org/#/c/20723/ But now I'm completely at a loss. How do I locate the help page I want to edit from here? Thanks in advance. Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Mon Nov 18 06:44:07 2019 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 17 Nov 2019 22:44:07 -0700 (MST) Subject: [Scilab-users] How to fix the round off error of "intg" Message-ID: <1574055847012-0.post@n3.nabble.com> My objective is to find a variable x which set the derivative of the function f (x) with respect to x to zero. The function f (x) is the integration of g(x, z) from a to b with respect to z., that is, f (x) = ?g(x, z) dz over (a, b). The function g (x, z) is a well-behaved function that has one peak with respect to z. I used "intg" to calculate ?g(x, z)dz. I used "numuderivatibe" to calculate f '(x) I used "fsoleve" to find x where f '(x) = 0. When executed it, it stopped with the following warning. "fsolve: numderivative: Error while evaluating the function: "intg: Error: Round-off error detected, the requested tolerance (or default) cannot be achieved. Try using bigger tolerances." I would like to ask two questions. 1. Can I investigate the cause of rounding error by adding "disp" line in macros "numderivative" or "intg" in order to monitor the variables? 2. Where can I modify to increase the tolerances of "intg"? Thank you. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Mon Nov 18 08:40:24 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Nov 2019 08:40:24 +0100 Subject: [Scilab-users] How to fix the round off error of "intg" In-Reply-To: <1574055847012-0.post@n3.nabble.com> References: <1574055847012-0.post@n3.nabble.com> Message-ID: Le 18/11/2019 ? 06:44, fujimoto2005 a ?crit?: > My objective is to find a variable x which set the derivative of the function > f (x) with respect to x to zero. > The function f (x) is the integration of g(x, z) from a to b with respect to > z., that is, > f (x) = ?g(x, z) dz over (a, b). > The function g (x, z) is a well-behaved function that has one peak with > respect to z. > I used "intg" to calculate ?g(x, z)dz. > I used "numuderivatibe" to calculate f '(x) > I used "fsoleve" to find x where f '(x) = 0. > > When executed it, it stopped with the following warning. > > "fsolve: numderivative: Error while evaluating the function: "intg: Error: > Round-off error detected, the requested tolerance (or default) cannot be > achieved. Try using bigger tolerances." > > I would like to ask two questions. > 1. Can I investigate the cause of rounding error by adding "disp" line in > macros "numderivative" Yes, why not. > or "intg" No, since it's a hard-coded function, not a macro > in order to monitor the variables? > 2. Where can I modify to increase the tolerances of "intg"? There are named "ea" and "er" in the help page: https://help.scilab.org/docs/6.0.2/en_US/intg.html From stephane.mottelet at utc.fr Mon Nov 18 10:44:46 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 18 Nov 2019 10:44:46 +0100 Subject: [Scilab-users] example of library In-Reply-To: <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> Message-ID: Hello Frederico, In order to*create new commits* you cannot avoid to start with installing GIT on your computer and getting the Scilab source files (which includes the documentation). Depending on your OS using GIT can be a different experience, but using the command line is not a must. For example under Windows you have https://gitforwindows.org/. Once you have installed any flavor of GIT, the remaining instructions are inside this Wiki https://wiki.scilab.org/gerrit If all those things are too complicated for you, just give us (for example me or Samuel) the modified files and we will create the commit and you will be able to edit/update it directly on codereview.scilab.org S. Le 17/11/2019 ? 23:29, Federico Miyara a ?crit?: > > Samuel, > >>> Somebody told me I could edit the documentation by myself. I need >>> some permission? How I can get access to edit the help pages? >> >> * login on the CodeReview portal, with your usual (Bugzilla) Scilab >> login and password: >> https://codereview.scilab.org => Sign in, in the top right >> * Contribute to an existing commit, just through the web interface. >> >> Creating new commits and managing them is (quite) more complicated >> (at least it was, for me). >> But many contributions are possible directly with the web interface, >> without knowing GIT, >> including editing files. > > Would you please give me some extra hints? > > I'm quite serious about starting to contribute corrections and > improvements to some help pages, the only area where I feel confident > that I can put my two cents for the time being (besides just detecting > bugs). > > I've been able to login, I arrive at this page: > > https://codereview.scilab.org/#/q/status:open > > There are many open subjects, of course none of them matches the bug > I've filed earlier: > > http://bugzilla.scilab.org/show_bug.cgi?id=16250 > > Anyway, I proceed and open the first one: > > https://codereview.scilab.org/#/c/20723/ > > But now I'm completely at a loss. How do I locate the help page I want > to edit from here? > > Thanks in advance. > > Federico Miyara > > _______________________________________________ > 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 p.muehlmann at gmail.com Mon Nov 18 16:15:42 2019 From: p.muehlmann at gmail.com (P M) Date: Mon, 18 Nov 2019 16:15:42 +0100 Subject: [Scilab-users] using transparency in Scilab Message-ID: Dear Scilab developers, it seems that the topic of using transparency in Scilab pops up now and then. So wouldn't it be useful to implement transparency once and for all into Scilab instead of using work-arounds? Just a humble question :-) Best regards, Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 18 16:27:10 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 18 Nov 2019 16:27:10 +0100 Subject: [Scilab-users] using transparency in Scilab In-Reply-To: References: Message-ID: <3efeb708-b8fb-1d6b-25c2-41e48f037fa4@utc.fr> Le 18/11/2019 ? 16:15, P M a ?crit?: > Dear Scilab developers, > > it seems that the topic of using transparency in Scilab pops up now > and then. > > So wouldn't it be useful to implement transparency once and for all > into Scilab instead of using work-arounds? Of course yes. But prepare to find a JoGL specialist knowing Scilab internals (kind of Unicorn...) > > Just a humble question :-) > > Best regards, > Philipp > > > _______________________________________________ > 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 fujimoto2005 at gmail.com Mon Nov 18 17:54:59 2019 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Mon, 18 Nov 2019 09:54:59 -0700 (MST) Subject: [Scilab-users] How to fix the round off error of "intg" In-Reply-To: <1574055847012-0.post@n3.nabble.com> References: <1574055847012-0.post@n3.nabble.com> Message-ID: <1574096099201-0.post@n3.nabble.com> Dear Samuel Thank you for your reply. Inside the function f(x),I added "disp" to display the value of x and error flag "ierr" after "intg" line . The "fsolve" and "numderivative" called f many times for many x around the correct solution x, and the values of x and ierr were displayed for many calls. I couldn't find regularity because ierr = 2 occurs for x very close to x with ierr = 0. I couldn't find the cause of the rounding error. I couldn't proceed further since the inside of "intg" could not be monitored. However, when "ierr" is output, it turns out that the code did not stop even if the rounding error occurs. As a result, fsolve could find the correct x. I adopted this ad-hoc solution. Since the inside of g (x, z) have not been improved so that rounding errors do not occur reliably, similar problems may occur in the future, but I decided to satisfy this ad-hoc solution. Best regards, Masahiro Fujimoto -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From fmiyara at fceia.unr.edu.ar Tue Nov 19 08:01:10 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 19 Nov 2019 04:01:10 -0300 Subject: [Scilab-users] symbolic functions Message-ID: <83cbc208-4f97-4f63-1cc6-b1a22fd6ebaf@fceia.unr.edu.ar> Dear all, I've found in a tutorial (http://ryanrossi.com/teaching/search/papers/scilabguide.pdf) reference to some symbolic functions such as addf or trianfml, and even official Scilab help pages seemingly for an earlier version (https://help.scilab.org/docs/5.5.2/en_US/trianfml.html), but they have been removed from version 6. Any idea why? Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Tue Nov 19 08:31:39 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 19 Nov 2019 04:31:39 -0300 Subject: [Scilab-users] example of library In-Reply-To: References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> Message-ID: St?phane, Thanks for your answer. I'll try, as soon as I can, to see if I'm able to go into the GIT world, but it may take much more time than your second option. So my next question is, how do I find the files to modify? Should I download the source code? And--this is embarrassing--I cannot track back what help page my own correction, http://bugzilla.scilab.org/show_bug.cgi?id=16250 refers to, and as the bug is a very unspecific typo I cannot recall it. Thank you very much for your patience! Regards, Federico Miyara On 18/11/2019 06:44, St?phane Mottelet wrote: > > Hello Frederico, > > In order to*create new commits* you cannot avoid to start with > installing GIT on your computer and getting the Scilab source files > (which includes the documentation). Depending on your OS using GIT can > be a different experience, but using the command line is not a must. > For example under Windows you have https://gitforwindows.org/. Once > you have installed any flavor of GIT, the remaining instructions are > inside this Wiki https://wiki.scilab.org/gerrit > > If all those things are too complicated for you, just give us (for > example me or Samuel) the modified files and we will create the commit > and you will be able to edit/update it directly on codereview.scilab.org > > S. > > Le 17/11/2019 ? 23:29, Federico Miyara a ?crit?: >> >> Samuel, >> >>>> Somebody told me I could edit the documentation by myself. I need >>>> some permission? How I can get access to edit the help pages? >>> >>> * login on the CodeReview portal, with your usual (Bugzilla) >>> Scilab login and password: >>> https://codereview.scilab.org => Sign in, in the top right >>> * Contribute to an existing commit, just through the web interface. >>> >>> Creating new commits and managing them is (quite) more complicated >>> (at least it was, for me). >>> But many contributions are possible directly with the web interface, >>> without knowing GIT, >>> including editing files. >> >> Would you please give me some extra hints? >> >> I'm quite serious about starting to contribute corrections and >> improvements to some help pages, the only area where I feel confident >> that I can put my two cents for the time being (besides just >> detecting bugs). >> >> I've been able to login, I arrive at this page: >> >> https://codereview.scilab.org/#/q/status:open >> >> There are many open subjects, of course none of them matches the bug >> I've filed earlier: >> >> http://bugzilla.scilab.org/show_bug.cgi?id=16250 >> >> Anyway, I proceed and open the first one: >> >> https://codereview.scilab.org/#/c/20723/ >> >> But now I'm completely at a loss. How do I locate the help page I >> want to edit from here? >> >> Thanks in advance. >> >> Federico Miyara >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Tue Nov 19 10:01:07 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 19 Nov 2019 10:01:07 +0100 Subject: [Scilab-users] example of library In-Reply-To: References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> Message-ID: Hello, the text is in the file: ./modules/elementary_functions/help/en_US/integer_representation/dec2base.xml I have created the commit for you there: https://codereview.scilab.org/#/c/21131/ S. Le 19/11/2019 ? 08:31, Federico Miyara a ?crit?: > > St?phane, > > Thanks for your answer. > > I'll try, as soon as I can, to see if I'm able to go into the GIT > world, but it may take much more time than your second option. > > So my next question is, how do I find the files to modify? > > Should I download the source code? > > And--this is embarrassing--I cannot track back what help page my own > correction, > > http://bugzilla.scilab.org/show_bug.cgi?id=16250 > > > refers to, and as the bug is a very unspecific typo I cannot recall it. > > Thank you very much for your patience! > > Regards, > > Federico Miyara > > > > On 18/11/2019 06:44, St?phane Mottelet wrote: >> >> Hello Frederico, >> >> In order to*create new commits* you cannot avoid to start with >> installing GIT on your computer and getting the Scilab source files >> (which includes the documentation). Depending on your OS using GIT >> can be a different experience, but using the command line is not a >> must. For example under Windows you have https://gitforwindows.org/. >> Once you have installed any flavor of GIT, the remaining instructions >> are inside this Wiki https://wiki.scilab.org/gerrit >> >> If all those things are too complicated for you, just give us (for >> example me or Samuel) the modified files and we will create the >> commit and you will be able to edit/update it directly on >> codereview.scilab.org >> >> S. >> >> Le 17/11/2019 ? 23:29, Federico Miyara a ?crit?: >>> >>> Samuel, >>> >>>>> Somebody told me I could edit the documentation by myself. I need >>>>> some permission? How I can get access to edit the help pages? >>>> >>>> * login on the CodeReview portal, with your usual (Bugzilla) >>>> Scilab login and password: >>>> https://codereview.scilab.org => Sign in, in the top right >>>> * Contribute to an existing commit, just through the web interface. >>>> >>>> Creating new commits and managing them is (quite) more complicated >>>> (at least it was, for me). >>>> But many contributions are possible directly with the web >>>> interface, without knowing GIT, >>>> including editing files. >>> >>> Would you please give me some extra hints? >>> >>> I'm quite serious about starting to contribute corrections and >>> improvements to some help pages, the only area where I feel >>> confident that I can put my two cents for the time being (besides >>> just detecting bugs). >>> >>> I've been able to login, I arrive at this page: >>> >>> https://codereview.scilab.org/#/q/status:open >>> >>> There are many open subjects, of course none of them matches the bug >>> I've filed earlier: >>> >>> http://bugzilla.scilab.org/show_bug.cgi?id=16250 >>> >>> Anyway, I proceed and open the first one: >>> >>> https://codereview.scilab.org/#/c/20723/ >>> >>> But now I'm completely at a loss. How do I locate the help page I >>> want to edit from here? >>> >>> Thanks in advance. >>> >>> Federico Miyara >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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 Tue Nov 19 18:47:08 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 19 Nov 2019 14:47:08 -0300 Subject: [Scilab-users] example of library In-Reply-To: References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> Message-ID: <95c4f0ee-3476-f44a-37d4-3ef688dc7fd1@fceia.unr.edu.ar> St?phane, Thanks, this has been very useful. With this help I've been able to locate the XML help page in my locally downloaded source code. I hope this will allow me to process future documetation fixes. Regards, Federico Miyara On 19/11/2019 06:01, St?phane Mottelet wrote: > > Hello, > > the text is in the file: > > ./modules/elementary_functions/help/en_US/integer_representation/dec2base.xml > > I have created the commit for you there: > > https://codereview.scilab.org/#/c/21131/ > > S. > > Le 19/11/2019 ? 08:31, Federico Miyara a ?crit?: >> >> St?phane, >> >> Thanks for your answer. >> >> I'll try, as soon as I can, to see if I'm able to go into the GIT >> world, but it may take much more time than your second option. >> >> So my next question is, how do I find the files to modify? >> >> Should I download the source code? >> >> And--this is embarrassing--I cannot track back what help page my own >> correction, >> >> http://bugzilla.scilab.org/show_bug.cgi?id=16250 >> >> >> refers to, and as the bug is a very unspecific typo I cannot recall it. >> >> Thank you very much for your patience! >> >> Regards, >> >> Federico Miyara >> >> >> >> On 18/11/2019 06:44, St?phane Mottelet wrote: >>> >>> Hello Frederico, >>> >>> In order to*create new commits* you cannot avoid to start with >>> installing GIT on your computer and getting the Scilab source files >>> (which includes the documentation). Depending on your OS using GIT >>> can be a different experience, but using the command line is not a >>> must. For example under Windows you have https://gitforwindows.org/. >>> Once you have installed any flavor of GIT, the remaining >>> instructions are inside this Wiki https://wiki.scilab.org/gerrit >>> >>> If all those things are too complicated for you, just give us (for >>> example me or Samuel) the modified files and we will create the >>> commit and you will be able to edit/update it directly on >>> codereview.scilab.org >>> >>> S. >>> >>> Le 17/11/2019 ? 23:29, Federico Miyara a ?crit?: >>>> >>>> Samuel, >>>> >>>>>> Somebody told me I could edit the documentation by myself. I need >>>>>> some permission? How I can get access to edit the help pages? >>>>> >>>>> * login on the CodeReview portal, with your usual (Bugzilla) >>>>> Scilab login and password: >>>>> https://codereview.scilab.org => Sign in, in the top right >>>>> * Contribute to an existing commit, just through the web interface. >>>>> >>>>> Creating new commits and managing them is (quite) more complicated >>>>> (at least it was, for me). >>>>> But many contributions are possible directly with the web >>>>> interface, without knowing GIT, >>>>> including editing files. >>>> >>>> Would you please give me some extra hints? >>>> >>>> I'm quite serious about starting to contribute corrections and >>>> improvements to some help pages, the only area where I feel >>>> confident that I can put my two cents for the time being (besides >>>> just detecting bugs). >>>> >>>> I've been able to login, I arrive at this page: >>>> >>>> https://codereview.scilab.org/#/q/status:open >>>> >>>> There are many open subjects, of course none of them matches the >>>> bug I've filed earlier: >>>> >>>> http://bugzilla.scilab.org/show_bug.cgi?id=16250 >>>> >>>> Anyway, I proceed and open the first one: >>>> >>>> https://codereview.scilab.org/#/c/20723/ >>>> >>>> But now I'm completely at a loss. How do I locate the help page I >>>> want to edit from here? >>>> >>>> Thanks in advance. >>>> >>>> Federico Miyara >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at me.com Fri Nov 22 06:35:29 2019 From: heinznabielek at me.com (Heinz Nabielek) Date: Fri, 22 Nov 2019 06:35:29 +0100 Subject: [Scilab-users] Answer: Is there a way, to fill the area between two non-intersecting 2d-curves with a colour? Message-ID: <3C7952BD-D809-4242-AAD8-A5D464D7895E@me.com> Is there a way, to fill the area between two non-intersecting 2d-curves with a colour? was my question from 9 November. With the help of p.muehlmann at gmail.com, here is the answer: ?xfpoly?. In detail, below. Best greetings Heinz _____________________________ xx= [(100:100:1500)';(100:100:1500)']; // input measurements M(15,4) after = [M(:,3);M(:,4)]; before= [M(:,1);M(:,2)]; xc=(25:30:1645)'; // input bounding curves N(30,2) polyX = [xc;flipdim(xc,1)]; polyY = [N(:,1);flipdim(N(:,2),1)]; xfpoly(polyX, polyY,3); plot(xx, after, 'r.'); plot(xx, before,'k.'); pos=22; xarrows([xc(pos) xc(pos)],[N(pos,2) N(pos,1)]); xtitle('Property as a Function of Temperature','temperature (?C)','PROPERTY'); legend("The effect of the treatment", "measured values after","measured values before"); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Improvement.pdf Type: application/pdf Size: 32927 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Nov 23 15:35:31 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 23 Nov 2019 15:35:31 +0100 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: References: Message-ID: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> HelloPhilipp, and to all (former ;-) matlabers, Le 16/10/2019 ? 11:46, P M a ?crit?: > Dear experts, > > trying to convert a matlab code to scilab I come across following line: > [~,~,Minstances_hat] = unique(B(:)); > How to replace the "~" symbol? > B is the blue channel of a RGB image...hence a m x n matrix of > integers (type(B) = 8 ) This issue is now reported as bug 16250 . Solving this issue would improve the converter. I may contribute to solve it. However, I do not use to use Matlab or Octave. So i don't know how the ~ placeholder set in the list of /inputs/ is processed inside the called function. This message is a call for information about this topic. Ignoring an output is trivial. As suggested by St?phane, the ans variable is a good candidate as replacement for ~, just as a fake recipient, as in "[~, ia] = unique(A)"?? => "[ans, ia] = unique(A)" The meaning of ignoring an input is a priori completely different, at least from a Scilab point of view. This leads to the fact that, on the "function ..." line, the converter will have to distinguish the list of inputs from the list of outputs, and then process the same ~ character in 2 different ways. This processing would have to run also when the "function ..." line is split on several rows with the "..." continuation marks. First, i will need an actual example of function call with ~ in the input list, runnable in Octave. Any compact suggestion is welcome. At least 2 use cases are expected: one calling a function written in Octave/Matlab language (improperly called "macros" in Scilab), the other one calling a hard-coded function. Let's consider the first case, with a "macro": * What does? the ~ sent placeholder pass to the function? How is it detected/detectable inside the macro ? * How is it processed by the function? Is there a generic default processing, as replacing it with the empty matrix [], or whatever else? Hope reading your contributions, Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Sun Nov 24 16:35:40 2019 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Sun, 24 Nov 2019 16:35:40 +0100 Subject: [Scilab-users] 2019.11.24 - Strange Bug open file Windows Message-ID: Dear, I am writing a big project for hydraulic water consideration using scilab/xcos w10 v 5.5.2 In one corner of the project, I propose to load parameters coming from expertise, with the instruction ParFile = uigetfile(["*.par"],directory, "Load OpstSim : Chargement d''un fichier de param?trisation", %f); if ParFile=="" then return; end; >From time to time, Scilab is killed (one over 100). I also mean that this is not possible to stop Scilab with the windo manager (top of this system). The only way to escape is to turn off the pc battery of the pc (power down !) . Any explainations ? I don?t see what i have to do but i take all solutions to go on. I am sad on this and desapointed. I don?t see what to do Best regards -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 55154 bytes Desc: not available URL: From uzohuzochukwu at gmail.com Sun Nov 24 19:21:24 2019 From: uzohuzochukwu at gmail.com (Uzoh Uzochukwu) Date: Sun, 24 Nov 2019 19:21:24 +0100 Subject: [Scilab-users] URGENT Message-ID: Please delist me from the mailing list -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sun Nov 24 19:53:00 2019 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 24 Nov 2019 11:53:00 -0700 (MST) Subject: [Scilab-users] row-sum of a hyper-matrix without loop Message-ID: <1574621580901-0.post@n3.nabble.com> Is it posible to get a 2-dimension matrix y(j,k) =?_i x(i,j,k) from 3 dimension hyper- matrix x(i,j,k) without using k-loop? If there is such a way, please teach me. Best regards, Masahiro Fujimoto -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sun Nov 24 20:01:32 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 24 Nov 2019 20:01:32 +0100 Subject: [Scilab-users] row-sum of a hyper-matrix without loop In-Reply-To: <1574621580901-0.post@n3.nabble.com> References: <1574621580901-0.post@n3.nabble.com> Message-ID: Le 24/11/2019 ? 19:53, fujimoto2005 a ?crit?: > Is it posible to get a 2-dimension matrix y(j,k) =?_i x(i,j,k) from 3 > dimension hyper- matrix x(i,j,k) without using k-loop? > If there is such a way, please teach me. --> h = grand(4,3,2,"uin",0,3) ?h? = (:,:,1) ?? 0.?? 0.?? 2. ?? 2.?? 3.?? 3. ?? 2.?? 1.?? 3. ?? 1.?? 1.?? 1. (:,:,2) ?? 0.?? 3.?? 1. ?? 2.?? 0.?? 1. ?? 3.?? 1.?? 3. ?? 0.?? 2.?? 3. --> matrix(sum(h,1),-1,size(h,2)) ?ans? = ?? 5.?? 9.?? 6. ?? 5.?? 5.?? 8. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Nov 24 20:09:44 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 24 Nov 2019 20:09:44 +0100 Subject: [Scilab-users] row-sum of a hyper-matrix without loop In-Reply-To: References: <1574621580901-0.post@n3.nabble.com> Message-ID: <01d22cd5-00e7-e1ec-640a-4d1fe9578694@free.fr> Le 24/11/2019 ? 20:01, Samuel Gougeon a ?crit?: > Le 24/11/2019 ? 19:53, fujimoto2005 a ?crit?: >> Is it posible to get a 2-dimension matrix y(j,k) =?_i x(i,j,k) from 3 >> dimension hyper- matrix x(i,j,k) without using k-loop? >> If there is such a way, please teach me. > > --> h = grand(4,3,2,"uin",0,3) > ?h? = > (:,:,1) > ?? 0.?? 0.?? 2. > ?? 2.?? 3.?? 3. > ?? 2.?? 1.?? 3. > ?? 1.?? 1.?? 1. > (:,:,2) > ?? 0.?? 3.?? 1. > ?? 2.?? 0.?? 1. > ?? 3.?? 1.?? 3. > ?? 0.?? 2.?? 3. > > --> matrix(sum(h,1),-1,size(h,2)) > ?ans? = > ?? 5.?? 9.?? 6. > ?? 5.?? 5.?? 8. > Sorry, the correct algorithm is --> h = grand(4,3,2,"uin",0,3) ?h? = (:,:,1) ?? 2.?? 0.?? 1. ?? 2.?? 3.?? 2. ?? 0.?? 0.?? 2. ?? 1.?? 1.?? 3. (:,:,2) ?? 1.?? 0.?? 1. ?? 1.?? 2.?? 0. ?? 3.?? 3.?? 1. ?? 0.?? 0.?? 2. --> matrix(sum(h,1),size(h,2), -1) ?ans? = ?? 5.?? 5. ?? 4.?? 5. ?? 8.?? 4. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Mon Nov 25 05:58:41 2019 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 24 Nov 2019 21:58:41 -0700 (MST) Subject: [Scilab-users] row-sum of a hyper-matrix without loop In-Reply-To: <01d22cd5-00e7-e1ec-640a-4d1fe9578694@free.fr> References: <1574621580901-0.post@n3.nabble.com> <01d22cd5-00e7-e1ec-640a-4d1fe9578694@free.fr> Message-ID: <1574657921961-0.post@n3.nabble.com> Dear Samuel Thanks for your answer. Best?regards, Masahiro Fujimoto -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From fujimoto2005 at gmail.com Mon Nov 25 06:01:09 2019 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 24 Nov 2019 22:01:09 -0700 (MST) Subject: [Scilab-users] Multiplication of hyper-matrix Message-ID: <1574658069243-0.post@n3.nabble.com> Is it possible to do the following code without k loop? A=rand(5,4,10) B=rand(5,4,10) C=zeros(4,4,10) for k=1:10 X=matrix(A(:,:,k),5,4) Y=matrix(B(:,:,k),5,4) C(:,:,k)=Y'*X end Best regards, Masahiro Fujimoto -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Mon Nov 25 16:02:42 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 25 Nov 2019 16:02:42 +0100 Subject: [Scilab-users] sparse() to build a block-diagonal matrix? Message-ID: Hello, In the sysdiag() page , it is stated that sparse() can be used to build a block-diagonal matrix: "Beside this function, you can also use|sparse ()|primitive to build a/block diagonal sparse matrix/." But i did not find any description nor example of such a feature in thesparse() page . I have quickly tried some "exotic" syntaxes, without result. Does anyone know if this feature actually exists, and if so what's its syntax? I know that sysdiag() works also with sparse objects. There are several issues in the sysdiag() page, and i would like to have clear ideas about the reference to sparse. Thanks Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From uzohuzochukwu at gmail.com Mon Nov 25 17:56:28 2019 From: uzohuzochukwu at gmail.com (Uzoh Uzochukwu) Date: Mon, 25 Nov 2019 17:56:28 +0100 Subject: [Scilab-users] (no subject) Message-ID: Please Remove my name from the mailing list ....or How do I unsubscribe from the mailing list -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 25 18:56:50 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Mon, 25 Nov 2019 18:56:50 +0100 Subject: [Scilab-users] (no subject) In-Reply-To: References: Message-ID: <63B86E03-DB42-494B-9B17-C09C5408E377@utc.fr> Click on the link in the footer of this message, starting with https://lists.scilab.org... S. > Le 25 nov. 2019 ? 17:56, Uzoh Uzochukwu a ?crit : > > ? > Please Remove my name from the mailing list ....or > How do I unsubscribe from the mailing list > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Mon Nov 25 21:20:52 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 25 Nov 2019 21:20:52 +0100 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> Message-ID: <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> Le 23/11/2019 ? 15:35, Samuel Gougeon a ?crit?: > HelloPhilipp, and to all (former ;-) matlabers, > > Le 16/10/2019 ? 11:46, P M a ?crit?: >> Dear experts, >> >> trying to convert a matlab code to scilab I come across following line: >> [~,~,Minstances_hat] = unique(B(:)); >> How to replace the "~" symbol? >> B is the blue channel of a RGB image...hence a m x n matrix of >> integers (type(B) = 8 ) > > > This issue is now reported as bug 16250 > . > > Solving this issue would improve the converter. > I may contribute to solve it. However, I do not use to use Matlab or > Octave. So i don't know how the ~ placeholder set in the list of > /inputs/ is processed inside the called function. This message is a > call for information about this topic. > > Ignoring an output is trivial. As suggested by St?phane, the ans > variable is a good candidate as replacement for ~, > just as a fake recipient, as in "[~, ia] = unique(A)"?? => "[ans, ia] > = unique(A)" > > The meaning of ignoring an input is a priori completely different, at > least from a Scilab point of view. > > This leads to the fact that, on the "function ..." line, the converter > will have to distinguish the list of inputs from the list of outputs, > and then process the same ~ character in 2 different ways. > This processing would have to run also when the "function ..." line is > split on several rows with the "..." continuation marks. > > First, i will need an actual example of function call with ~ in the > input list, runnable in Octave. > Any compact suggestion is welcome. > At least 2 use cases are expected: one calling a function written in > Octave/Matlab language (improperly called "macros" in Scilab), the > other one calling a hard-coded function. > > Let's consider the first case, with a "macro": > > * What does? the ~ sent placeholder pass to the function? How is it > detected/detectable inside the macro ? > * How is it processed by the function? Is there a generic default > processing, as replacing it with the empty matrix [], or whatever > else? > Where is the crowd of matlabers? The page describing this feature: https://fr.mathworks.com/help/matlab/matlab_prog/ignore-function-inputs.html But i do not clearly understand it. Apparently, "canceling" an input is done (only?) at the function definition, not when calling it, unlike for the outputs. If so, then /ans/ could also be used as a replacement, meaning that anyway this input won't be used inside the function. A test of call with Octave yields an error: >> function [r, s] = funtest(a,b,c) end >> funtest(1,~,3) parse error: ? invalid use of empty argument (~) in index expression >>> funtest(1,~,3) ???????????????? ^ >> Any further insight is welcome. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Nov 25 22:06:47 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 25 Nov 2019 22:06:47 +0100 Subject: [Scilab-users] example of library In-Reply-To: <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> References: <3fb9ea69-5a83-664c-fea5-b42fc0782a3e@fceia.unr.edu.ar> <9d69f245-8a59-1697-1c18-ce720eff95d7@fceia.unr.edu.ar> <24eed7bb-77c1-08de-8fcd-632fde193a54@fceia.unr.edu.ar> Message-ID: <3ebe4c43-7ecd-8c46-fcba-64b08798e5e7@free.fr> Dear Federico, I am not sure that this users@ list in the prefered one to talk about technical details to contribute to Scilab development. dev@ should rather be targeted for this. Please do not hesitate to subscribe also to this other list (if not yet done). For the time being, and my last answer here, i reply in the body of your message: Le 17/11/2019 ? 23:29, Federico Miyara a ?crit?: > > Samuel, > > Would you please give me some extra hints? > > I'm quite serious about starting to contribute corrections and > improvements to some help pages, the only area where I feel confident > that I can put my two cents for the time being (besides just detecting > bugs). > > I've been able to login, I arrive at this page: > > https://codereview.scilab.org/#/q/status:open > Excellent! Now we can view your id in the list of possible reviewers :-) > There are many open subjects, of course none of them matches the bug > I've filed earlier: About fixing and improving the documentation: I use to open and feed on a quite regular way a commit titled something like "/[doc] Misc. fixes, typos and small improvements/". When you posted your messages, the last bag was just merged (after being fed and pending for more than 8 months) (click on "merged" on the top left of the portal, and then on my name in the "Owner" column). You can freely contribute to feed this commit. To add a editable file to the commit list of files : * push the "Edit" button * then click on "add" * in the input field: start typing the beginning of the filename you want to edit: you will see a proposed short list of the first matches of your input. Add some characters up to find the right file in the list: * Open the file. Update its content. Save and quit the file. * Then in the list, you will see the file. * Quit the edit mode * Click on the file: the changes that you have made are highlighted. This simple procedure is OK only for small changes, or wider changes that you have validated on your local computer (by properly compiling heavily changed pages). In addition, it can't be used to add binary files (like images, etc). If you want more information, please get in touch with me or with St?phane in private (as he already answered). You may also get in touch with Stanislav K, who uses to contribute via the CodeReview interface for the Russian version of pages. If you prefer having your own dedicated "bag of help miscellanities", we can also open it for you. Best regards Samuel PS : To locate a feature in a file among all Scilab sources file: * Source files must be downloaded, preferably from the master version of Scilab. GIT does it in an handy way, but you can also do it by hand. * You need to use a local editor. If you work on Windows: Notepad++ is an excellent choice, with its XML add-on. It is able to search a feature in all files (or selected ones according to some extension filter like *.xml *.sci etc) in a given directory and all its subdirectories. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eglnnngnolmgjddk.png Type: image/png Size: 31236 bytes Desc: not available URL: From chinluh.tan at bytecode-asia.com Tue Nov 26 03:33:37 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 26 Nov 2019 10:33:37 +0800 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> Message-ID: <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> Hi Samuel,? I think your assumption likely correct on the input and the output using ~ https://www.mathworks.com/matlabcentral/answers/288016-tilde-doesn-t-work-for-ignoring-my-inputs " You can use tilde to ignore input arguments when you define the function. You cannot use tilde to ignore input arguments when you call the function. You cannot use tilde to ignore output arguments when you define the function. You can use tilde to ignore output arguments when you call the function. If you want to be able to specify only the third argument, there must be some way for your function to disambiguate the one-input call from a call that specifies only the third input. Usually in MathWorks function this is done by specifying [] for the arguments for which the user doesn't want to specify. In that case the code would use the default value if either nargin is too small or if nargin is large enough and the specified input argument isempty. " >From what I could think off, mat2sci conversion to replace ~ at the output arguments should always be safe. As for the input, since the tilde could not be used as input when calling function, I think there should not be any cases that need to be implemented in conversion? Thanks. Regards, CL ---- On Tue, 26 Nov 2019 04:20:52 +0800 Samuel Gougeon wrote ---- Le 23/11/2019 ? 15:35, Samuel Gougeon a ?crit?: Hello Philipp, and to all (former ;-) matlabers, Le 16/10/2019 ? 11:46, P M a ?crit?: Dear experts, trying to convert a matlab code to scilab I come across following line: [~,~,Minstances_hat] = unique(B(:)); How to replace the "~" symbol? B is the blue channel of a RGB image...hence a m x n matrix of integers (type(B) = 8 ) This issue is now reported as http://bugzilla.scilab.org/show_bug.cgi?id=16254. Solving this issue would improve the converter. I may contribute to solve it. However, I do not use to use Matlab or Octave. So i don't know how the ~ placeholder set in the list of inputs is processed inside the called function. This message is a call for information about this topic. Ignoring an output is trivial. As suggested by St?phane, the ans variable is a good candidate as replacement for ~, just as a fake recipient, as in "[~, ia] = unique(A)"?? =>? "[ans, ia] = unique(A)" The meaning of ignoring an input is a priori completely different, at least from a Scilab point of view. This leads to the fact that, on the "function ..." line, the converter will have to distinguish the list of inputs from the list of outputs, and then process the same ~ character in 2 different ways. This processing would have to run also when the "function ..." line is split on several rows with the "..." continuation marks. First, i will need an actual example of function call with ~ in the input list, runnable in Octave. Any compact suggestion is welcome. At least 2 use cases are expected: one calling a function written in Octave/Matlab language (improperly called "macros" in Scilab), the other one calling a hard-coded function. Let's consider the first case, with a "macro": What does? the ~ sent placeholder pass to the function? How is it detected/detectable inside the macro ? How is it processed by the function? Is there a generic default processing, as replacing it with the empty matrix [], or whatever else? Where is the crowd of matlabers? The page describing this feature:https://fr.mathworks.com/help/matlab/matlab_prog/ignore-function-inputs.html But i do not clearly understand it. Apparently, "canceling" an input is done (only?) at the function definition, not when calling it, unlike for the outputs. If so, then ans could also be used as a replacement, meaning that anyway this input won't be used inside the function. A test of call with Octave yields an error: >> function [r, s] = funtest(a,b,c) end >> funtest(1,~,3) parse error: ? invalid use of empty argument (~) in index expression >>> funtest(1,~,3) ???????????????? ^ >> Any further insight is welcome. 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 chinluh.tan at bytecode-asia.com Tue Nov 26 03:43:45 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 26 Nov 2019 10:43:45 +0800 Subject: [Scilab-users] sparse() to build a block-diagonal matrix? In-Reply-To: References: Message-ID: <16ea597e31c.e8f5e7dc99311.1774696429608657223@bytecode-asia.com> Hi,? from the first glance on the documentation you show: "Beside this function, you can also use sparse() primitive to build a block diagonal sparse matrix." it sound to me that this statement said the sparse could be used to create block diagonal matrix with the similar inputs to sysdiag. But after a trying to stare at it again... I think it might mean: " to convert the block diagonal matrix to?block diagonal sparse matrix " which likely is the one shown in the example:? S=sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16]) S=sparse.html(S) which simply to say that we could use sparse to convert the full matrix created by sysdiag to sparse? Thanks. CL ---- On Mon, 25 Nov 2019 23:02:42 +0800 Samuel Gougeon wrote ---- Hello, In thehttps://help.scilab.org/docs/6.0.2/en_US/sysdiag.html, it is stated that sparse() can be used to build a block-diagonal matrix: "Beside this function, you can also use?https://help.scilab.org/docs/6.0.2/fr_FR/sparse.html()?primitive to build a?block diagonal sparse matrix." But i did not find any description nor example of such a feature in thehttps://help.scilab.org/docs/6.0.2/en_US/sparse.html. I have quickly tried some "exotic" syntaxes, without result. Does anyone know if this feature actually exists, and if so what's its syntax? I know that sysdiag() works also with sparse objects. There are several issues in the sysdiag() page, and i would like to have clear ideas about the reference to sparse. Thanks Samuel _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Tue Nov 26 03:50:41 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 26 Nov 2019 10:50:41 +0800 Subject: [Scilab-users] 2019.11.24 - Strange Bug open file Windows In-Reply-To: References: Message-ID: <16ea59e3e1f.dca884d399745.8402673850733945637@bytecode-asia.com> Hi,? I am not sure how big the data you're trying to import into Scilab, it sould to me that this "one over 100" case might be something to do with memory management. A few thing you could trouble shoot: 1. Is there any loop, or repeated tasks that import the data into Scilab.? 2. Use the task manager and see whether the Scilab memory increase overtime during the execution of your program. 3. You might need to clear some huge variable (even thinking it might be reuse, try to clear it if it is no longer needed over that period of time) 4. Monitor the memory again after implementing the "clear" at step 3. hope this helps. rgds, CL? ---- On Sun, 24 Nov 2019 23:35:40 +0800 Perrichon wrote ---- Dear, I am writing a big ?project ?for hydraulic water consideration using scilab/xcos w10 v 5.5.2 ? In one corner of the project, I propose to load parameters coming from expertise, with the instruction ? ?????????????? ParFile = uigetfile(["*.par"],directory, "Load OpstSim : Chargement d''un fichier de param?trisation", %f); ?????????????? if ParFile=="" then return; end; ? >From time to time, Scilab is killed (one over 100). I also mean that this is not possible to stop Scilab with the windo manager (top of this system). The only way to escape is to turn off the pc battery of the pc (power down??!) . Any explainations?? I don?t see what i have to do but i take all solutions to go on. I am sad on this ?and desapointed. I don?t see what to do ? ? ? ? Best regards ? ? _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.jpg Type: image/jpeg Size: 55154 bytes Desc: not available URL: From chinluh.tan at bytecode-asia.com Tue Nov 26 03:54:41 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 26 Nov 2019 10:54:41 +0800 Subject: [Scilab-users] 2019.11.24 - Strange Bug open file Windows In-Reply-To: <16ea59e3e1f.dca884d399745.8402673850733945637@bytecode-asia.com> References: <16ea59e3e1f.dca884d399745.8402673850733945637@bytecode-asia.com> Message-ID: <16ea5a1e76e.b7d4bc94100000.3471509648220212689@bytecode-asia.com> oh yes, since you are using Scilab 5.5.2, while checking on the below suggestion, you might want to look into increasing the stacksize?? rgds, CL ---- On Tue, 26 Nov 2019 10:50:41 +0800 Chin Luh Tan wrote ---- Hi,? I am not sure how big the data you're trying to import into Scilab, it sould to me that this "one over 100" case might be something to do with memory management. A few thing you could trouble shoot: 1. Is there any loop, or repeated tasks that import the data into Scilab.? 2. Use the task manager and see whether the Scilab memory increase overtime during the execution of your program. 3. You might need to clear some huge variable (even thinking it might be reuse, try to clear it if it is no longer needed over that period of time) 4. Monitor the memory again after implementing the "clear" at step 3. hope this helps. rgds, CL? ---- On Sun, 24 Nov 2019 23:35:40 +0800 Perrichon wrote ---- Dear, I am writing a big ?project ?for hydraulic water consideration using scilab/xcos w10 v 5.5.2 ? In one corner of the project, I propose to load parameters coming from expertise, with the instruction ? ?????????????? ParFile = uigetfile(["*.par"],directory, "Load OpstSim : Chargement d''un fichier de param?trisation", %f); ?????????????? if ParFile=="" then return; end; ? >From time to time, Scilab is killed (one over 100). I also mean that this is not possible to stop Scilab with the windo manager (top of this system). The only way to escape is to turn off the pc battery of the pc (power down??!) . Any explainations?? I don?t see what i have to do but i take all solutions to go on. I am sad on this ?and desapointed. I don?t see what to do ? ? ? ? Best regards ? ? _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.jpg Type: image/jpeg Size: 55154 bytes Desc: not available URL: From sgougeon at free.fr Tue Nov 26 13:36:01 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 26 Nov 2019 13:36:01 +0100 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> Message-ID: <15592a62-84f9-1e00-dacb-979572d69d65@free.fr> Hello Chin Luh, Thanks a lot for your input. Both cases -- input and output will have to be converted --, since the converter is also made to convert (sets of) functions definitions, not only scripts. About the input case: Steven's answer is still not really clear to me. Doing some tests on Octave, we must anyway provide some input at calling time when? ~ is used as default input in the definition. AFAIU, this ~ could just be to make sure that no variable name used inside the function matches the name of the input argument in the function definition, since "~" alone can't be actually used as variable's name. In this case, for Scilab, any input ~ could be replaced with an improbable variable name like "%unused" or "%kwzxq", and that should do it. Please, correct me if someone understands something else. Best regards Samuel Le 26/11/2019 ? 03:33, Chin Luh Tan a ?crit?: > Hi Samuel, > > I think your assumption likely correct on the input and the output using ~ > > https://www.mathworks.com/matlabcentral/answers/288016-tilde-doesn-t-work-for-ignoring-my-inputs > > " > Youcanuse tilde to ignore input arguments when youdefinethe function. > Youcannotuse tilde to ignore input arguments when youcallthe function. > Youcannotuse tilde to ignore output arguments when youdefinethe function. > Youcanuse tilde to ignore output arguments when youcallthe function. > If you want to be able to specify only the third argument, there must > be some way for your function to disambiguate the one-input call from > a call that specifies only the third input. Usually in MathWorks > function this is done by specifying [] for the arguments for which the > user doesn't want to specify. In that case the code would use the > default value if eithernarginis too small or ifnarginis large enough > and the specified input argumentisempty. > " > From what I could think off, mat2sci conversion to replace ~ at the > output arguments should always be safe. As for the input, since the > tilde could not be used as input when calling function, I think there > should not be any cases that need to be implemented in conversion? > Thanks. > Regards, > CL > > > ---- On Tue, 26 Nov 2019 04:20:52 +0800 *Samuel Gougeon > * wrote ---- > > Le 23/11/2019 ? 15:35, Samuel Gougeon a ?crit?: > > HelloPhilipp, and to all (former ;-) matlabers, > > Le 16/10/2019 ? 11:46, P M a ?crit?: > > Dear experts, > > trying to convert a matlab code to scilab I come across > following line: > > [~,~,Minstances_hat] = unique(B(:)); > > How to replace the "~" symbol? > > B is the blue channel of a RGB image...hence a m x n > matrix of integers (type(B) = 8 ) > > > This issue is now reported as bug 16250 > . > > Solving this issue would improve the converter. > I may contribute to solve it. However, I do not use to use > Matlab or Octave. So i don't know how the ~ placeholder set in > the list of /inputs/ is processed inside the called function. > This message is a call for information about this topic. > > Ignoring an output is trivial. As suggested by St?phane, the > ans variable is a good candidate as replacement for ~, > just as a fake recipient, as in "[~, ia] = unique(A)"?? =>? > "[ans, ia] = unique(A)" > > The meaning of ignoring an input is a priori completely > different, at least from a Scilab point of view. > > This leads to the fact that, on the "function ..." line, the > converter will have to distinguish the list of inputs from the > list of outputs, and then process the same ~ character in 2 > different ways. > This processing would have to run also when the "function ..." > line is split on several rows with the "..." continuation marks. > > First, i will need an actual example of function call with ~ > in the input list, runnable in Octave. > Any compact suggestion is welcome. > At least 2 use cases are expected: one calling a function > written in Octave/Matlab language (improperly called "macros" > in Scilab), the other one calling a hard-coded function. > > Let's consider the first case, with a "macro": > > * What does? the ~ sent placeholder pass to the function? > How is it detected/detectable inside the macro ? > * How is it processed by the function? Is there a generic > default processing, as replacing it with the empty matrix > [], or whatever else? > > Where is the crowd of matlabers? > > The page describing this > feature:https://fr.mathworks.com/help/matlab/matlab_prog/ignore-function-inputs.html > But i do not clearly understand it. > Apparently, "canceling" an input is done (only?) at the function > definition, not when calling it, unlike for the outputs. > If so, then /ans/ could also be used as a replacement, meaning > that anyway this input won't be used inside the function. > > A test of call with Octave yields an error: > > >> function [r, s] = funtest(a,b,c) > end > >> funtest(1,~,3) > parse error: > ? invalid use of empty argument (~) in index expression > >>> funtest(1,~,3) > ???????????????? ^ > >> > > Any further insight is welcome. > 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 sgougeon at free.fr Tue Nov 26 13:51:43 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 26 Nov 2019 13:51:43 +0100 Subject: [Scilab-users] sparse() to build a block-diagonal matrix? In-Reply-To: <16ea597e31c.e8f5e7dc99311.1774696429608657223@bytecode-asia.com> References: <16ea597e31c.e8f5e7dc99311.1774696429608657223@bytecode-asia.com> Message-ID: <808f247e-55c6-4221-ddfb-2fe8081ed6ca@free.fr> Le 26/11/2019 ? 03:43, Chin Luh Tan a ?crit?: > Hi, > > from the first glance on the documentation you show: > > "Beside this function, you can also use sparse() primitive to build a > block diagonal sparse matrix." > > it sound to me that this statement said the sparse could be used to > create block diagonal matrix with the similar inputs to sysdiag. > > > But after a trying to stare at it again... I think it might mean: > > " to convert the *block diagonal matrix* to *block diagonal /sparse > /matrix "* > > which likely is the one shown in the example: > S=sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16]) > S=sparse (S) > which simply to say that we could use sparse to convert the full > matrix created by sysdiag to sparse? > Chin Luh, You are right. Yesterday evening i posted awish to improve sysdiag (), and also to rename it /blockdiag/() (but both aspects are distinct). I have rewritten sysdiag() as indicated in the wish, and made an additional improvement, that is: When at least one input is sparse, the result is built as a sparse/from the beginning/, instead of only when the first sparse input is met and included in the result. Hence, the probability of a memory issue is decreased. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Tue Nov 26 16:15:59 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Tue, 26 Nov 2019 23:15:59 +0800 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: <15592a62-84f9-1e00-dacb-979572d69d65@free.fr> References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> <15592a62-84f9-1e00-dacb-979572d69d65@free.fr> Message-ID: <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> Hi Samuel,? In fact I've not been using matlab for more than 10 years, so I try to understand this as well.? The input tilde is still abit confusing for me as well, I am trying to understand its' usage as this page:?https://octave.org/doc/v4.4.1/Ignoring-Arguments.html function val = pick2nd (~, arg2) ? val = arg2; endfunction I can't see the reason why the input need to ignored in this case, is it defined but not being user due to bad user overlooked it? or is it neglected and the default value would be used? Then I find this :?https://stackoverflow.com/questions/25204074/correct-use-of-tilde-operator-for-input-arguments "The tilde is only for function declaration. Matlab's mlint recommends to replace unused arguments by ~. The result is a function declared like this function output = MyFunction(a, b, ~, c). This is a very bad practice. Since you have a function where the parameters are optional, you must call the function with empty arguments output=MyFunction(str1,str2,[],[],...,true)." It sound to me that the input tilde is suggested by the matlab? mlint to improve the code so that the unused variable need not to pass into the function, and to improve memory management?? So there are 2 possibilities for the input tilde : 1. used to replace unused variable in the input which defined by user, but not being used. So the mlint recomment to replace with tilde, it could be be remove possibly due to the project has been calling the functions for many time, and changing the 4th to 3rd argument might need to change a lot of codes. In this case, the %unused would be good.? 2. Tilde used to tell the function to use default value, then replacing it with % unused might cause error.? Think we need some x-matlaber to confirm which case.? Thanks again. rgds, CL? ---- On Tue, 26 Nov 2019 20:36:01 +0800 Samuel Gougeon wrote ---- Hello Chin Luh, Thanks a lot for your input. Both cases -- input and output will have to be converted --, since the converter is also made to convert (sets of) functions definitions, not only scripts. About the input case: Steven's answer is still not really clear to me. Doing some tests on Octave, we must anyway provide some input at calling time when? ~ is used as default input in the definition. AFAIU, this ~ could just be to make sure that no variable name used inside the function matches the name of the input argument in the function definition, since "~" alone can't be actually used as variable's name. In this case, for Scilab, any input ~ could be replaced with an improbable variable name like "%unused" or "%kwzxq", and that should do it. Please, correct me if someone understands something else. Best regards Samuel Le 26/11/2019 ? 03:33, Chin Luh Tan a ?crit?: _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Hi Samuel,? I think your assumption likely correct on the input and the output using ~ https://www.mathworks.com/matlabcentral/answers/288016-tilde-doesn-t-work-for-ignoring-my-inputs " You can use tilde to ignore input arguments when you define the function. You cannot use tilde to ignore input arguments when you call the function. You cannot use tilde to ignore output arguments when you define the function. You can use tilde to ignore output arguments when you call the function. If you want to be able to specify only the third argument, there must be some way for your function to disambiguate the one-input call from a call that specifies only the third input. Usually in MathWorks function this is done by specifying [] for the arguments for which the user doesn't want to specify. In that case the code would use the default value if either nargin is too small or if nargin is large enough and the specified input argument isempty. " >From what I could think off, mat2sci conversion to replace ~ at the output arguments should always be safe. As for the input, since the tilde could not be used as input when calling function, I think there should not be any cases that need to be implemented in conversion? Thanks. Regards, CL ---- On Tue, 26 Nov 2019 04:20:52 +0800 Samuel Gougeon mailto:sgougeon at free.fr wrote ---- Le 23/11/2019 ? 15:35, Samuel Gougeon a ?crit?: Hello Philipp, and to all (former ;-) matlabers, Le 16/10/2019 ? 11:46, P M a ?crit?: Dear experts, trying to convert a matlab code to scilab I come across following line: [~,~,Minstances_hat] = unique(B(:)); How to replace the "~" symbol? B is the blue channel of a RGB image...hence a m x n matrix of integers (type(B) = 8 ) This issue is now reported as http://bugzilla.scilab.org/show_bug.cgi?id=16254. Solving this issue would improve the converter. I may contribute to solve it. However, I do not use to use Matlab or Octave. So i don't know how the ~ placeholder set in the list of inputs is processed inside the called function. This message is a call for information about this topic. Ignoring an output is trivial. As suggested by St?phane, the ans variable is a good candidate as replacement for ~, just as a fake recipient, as in "[~, ia] = unique(A)"?? =>? "[ans, ia] = unique(A)" The meaning of ignoring an input is a priori completely different, at least from a Scilab point of view. This leads to the fact that, on the "function ..." line, the converter will have to distinguish the list of inputs from the list of outputs, and then process the same ~ character in 2 different ways. This processing would have to run also when the "function ..." line is split on several rows with the "..." continuation marks. First, i will need an actual example of function call with ~ in the input list, runnable in Octave. Any compact suggestion is welcome. At least 2 use cases are expected: one calling a function written in Octave/Matlab language (improperly called "macros" in Scilab), the other one calling a hard-coded function. Let's consider the first case, with a "macro": What does? the ~ sent placeholder pass to the function? How is it detected/detectable inside the macro ? How is it processed by the function? Is there a generic default processing, as replacing it with the empty matrix [], or whatever else? Where is the crowd of matlabers? The page describing this feature:https://fr.mathworks.com/help/matlab/matlab_prog/ignore-function-inputs.html But i do not clearly understand it. Apparently, "canceling" an input is done (only?) at the function definition, not when calling it, unlike for the outputs. If so, then ans could also be used as a replacement, meaning that anyway this input won't be used inside the function. A test of call with Octave yields an error: >> function [r, s] = funtest(a,b,c) end >> funtest(1,~,3) parse error: ? invalid use of empty argument (~) in index expression >>> funtest(1,~,3) ???????????????? ^ >> Any further insight is welcome. Samuel _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Nov 26 16:31:35 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 26 Nov 2019 16:31:35 +0100 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> <15592a62-84f9-1e00-dacb-979572d69d65@free.fr> <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> Message-ID: Le 26/11/2019 ? 16:15, Chin Luh Tan a ?crit?: > 2. Tilde used to tell the function to use default value, then > replacing it with % unused might cause error. But then, even if such a global default value exists, assigned to and reachable from what, since ~ can't be a variable name? > > Think we need some x-matlaber to confirm which case. Right, but case #2 looks quite improbable. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.elias at scilab-enterprises.com Tue Nov 26 19:23:08 2019 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Tue, 26 Nov 2019 19:23:08 +0100 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> <15592a62-84f9-1e00-dacb-979572d69d65@free.fr> <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> Message-ID: Hello, Or when you have to write a function following a specific prototype ( graphic events, optim, ode, ...) If I would write a function that call another, I have to specify a prototype to allow user to call my function. But in some case, the final user does not need all parameters so he can replace unused inputs by ~. I think that only syntactic sugar. example: function for_each(iterable, fn) ??? for i=1:size(iterable, "*") ??? ??? fn(iterable(i), i, iterable); //item, index, array ??? end endfunction Users can define fn like this if tthey only need item and don't want to use index and whole array function my_func(a, ~, ~) ??? //blabla end I don't say that's essential :p That's my understanding Antoine Le 26/11/2019 ? 16:15, Chin Luh Tan a ?crit?: > Hi Samuel, > > In fact I've not been using matlab for more than 10 years, so I try to > understand this as well. > > The input tilde is still abit confusing for me as well, I am trying to > understand its' usage as this page: > https://octave.org/doc/v4.4.1/Ignoring-Arguments.html > > function val = pick2nd (~, arg2) > ? val = arg2; > endfunction > > I can't see the reason why the input need to ignored in this case, is > it defined but not being user due to bad user overlooked it? or is it > neglected and the default value would be used? > > Then I find this : > https://stackoverflow.com/questions/25204074/correct-use-of-tilde-operator-for-input-arguments > > */"The tilde is only for function declaration. Matlab's mlint > recommends to replace unused arguments by ~. The result is a function > declared like this function output = MyFunction(a, b, ~, c). This is a > very bad practice. /**/ > /* > */ > /* > */Since you have a function where the parameters are optional, you > must call the function with empty arguments > output=MyFunction(str1,str2,[],[],...,true)."/* > > It sound to me that the input tilde is suggested by the matlab mlint > to improve the code so that the unused variable need not to pass into > the function, and to improve memory management? > > So there are 2 possibilities for the input tilde : > > 1. used to replace unused variable in the input which defined by user, > but not being used. So the mlint recomment to replace with tilde, it > could be be remove possibly due to the project has been calling the > functions for many time, and changing the 4th to 3rd argument might > need to change a lot of codes. In this case, the %unused would be good. > > 2. Tilde used to tell the function to use default value, then > replacing it with % unused might cause error. > > Think we need some x-matlaber to confirm which case. > > Thanks again. > > rgds, > CL > > > > ---- On Tue, 26 Nov 2019 20:36:01 +0800 *Samuel Gougeon > >* wrote ---- > > Hello Chin Luh, > > Thanks a lot for your input. > > Both cases -- input and output will have to be converted --, since > the converter is also made to convert (sets of) functions > definitions, not only scripts. > > About the input case: Steven's answer is still not really clear to > me. Doing some tests on Octave, we must anyway provide some input > at calling time when? ~ is used as default input in the > definition. AFAIU, this ~ could just be to make sure that no > variable name used inside the function matches the name of the > input argument in the function definition, since "~" alone can't > be actually used as variable's name. In this case, for Scilab, any > input ~ could be replaced with an improbable variable name like > "%unused" or "%kwzxq", and that should do it. > > Please, correct me if someone understands something else. > > Best regards > Samuel > > Le 26/11/2019 ? 03:33, Chin Luh Tan a ?crit?: > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > Hi Samuel, > > I think your assumption likely correct on the input and the > output using ~ > > https://www.mathworks.com/matlabcentral/answers/288016-tilde-doesn-t-work-for-ignoring-my-inputs > > " > You *can*use tilde to ignore input arguments when you > *define*the function. > You *cannot*use tilde to ignore input arguments when you > *call*the function. > You *cannot*use tilde to ignore output arguments when you > *define*the function. > You *can*use tilde to ignore output arguments when you > *call*the function. > If you want to be able to specify only the third argument, > there must be some way for your function to disambiguate the > one-input call from a call that specifies only the third > input. Usually in MathWorks function this is done by > specifying [] for the arguments for which the user doesn't > want to specify. In that case the code would use the default > value if either narginis too small or if narginis large enough > and the specified input argument isempty. > " > From what I could think off, mat2sci conversion to replace ~ > at the output arguments should always be safe. As for the > input, since the tilde could not be used as input when calling > function, I think there should not be any cases that need to > be implemented in conversion? > Thanks. > Regards, > CL > > > ---- On Tue, 26 Nov 2019 04:20:52 +0800 *Samuel Gougeon > * wrote ---- > > Le 23/11/2019 ? 15:35, Samuel Gougeon a ?crit?: > > HelloPhilipp, and to all (former ;-) matlabers, > > Le 16/10/2019 ? 11:46, P M a ?crit?: > > Dear experts, > > trying to convert a matlab code to scilab I come > across following line: > > [~,~,Minstances_hat] = unique(B(:)); > > How to replace the "~" symbol? > > B is the blue channel of a RGB image...hence a m x > n matrix of integers (type(B) = 8 ) > > > This issue is now reported as bug 16250 > . > > Solving this issue would improve the converter. > I may contribute to solve it. However, I do not use to > use Matlab or Octave. So i don't know how the ~ > placeholder set in the list of /inputs/ is processed > inside the called function. This message is a call for > information about this topic. > > Ignoring an output is trivial. As suggested by > St?phane, the ans variable is a good candidate as > replacement for ~, > just as a fake recipient, as in "[~, ia] = > unique(A)"?? =>? "[ans, ia] = unique(A)" > > The meaning of ignoring an input is a priori > completely different, at least from a Scilab point of > view. > > This leads to the fact that, on the "function ..." > line, the converter will have to distinguish the list > of inputs from the list of outputs, and then process > the same ~ character in 2 different ways. > This processing would have to run also when the > "function ..." line is split on several rows with the > "..." continuation marks. > > First, i will need an actual example of function call > with ~ in the input list, runnable in Octave. > Any compact suggestion is welcome. > At least 2 use cases are expected: one calling a > function written in Octave/Matlab language (improperly > called "macros" in Scilab), the other one calling a > hard-coded function. > > Let's consider the first case, with a "macro": > > * What does? the ~ sent placeholder pass to the > function? How is it detected/detectable inside the > macro ? > * How is it processed by the function? Is there a > generic default processing, as replacing it with > the empty matrix [], or whatever else? > > Where is the crowd of matlabers? > > The page describing this > feature:https://fr.mathworks.com/help/matlab/matlab_prog/ignore-function-inputs.html > But i do not clearly understand it. > Apparently, "canceling" an input is done (only?) at the > function definition, not when calling it, unlike for the > outputs. > If so, then /ans/ could also be used as a replacement, > meaning that anyway this input won't be used inside the > function. > > A test of call with Octave yields an error: > > >> function [r, s] = funtest(a,b,c) > end > >> funtest(1,~,3) > parse error: > ? invalid use of empty argument (~) in index expression > >>> funtest(1,~,3) > ???????????????? ^ > >> > > Any further insight is welcome. > 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 > > > > > _______________________________________________ > 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 Tue Nov 26 21:51:18 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 26 Nov 2019 17:51:18 -0300 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> <15592a62-84f9-1e00-dacb-979572d69d65@free.fr> <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> Message-ID: This is only speculation: Could the tilde be used in some cases where some arguments that are not the last ones are optional, and the function definition includes some way to check if the corresponding argument has or has nor been provided? I've noticed in some cases Scilab allows just to omit the argument keeping the commas. Regards, Federico Miyara On 26/11/2019 12:15, Chin Luh Tan wrote: > Hi Samuel, > > In fact I've not been using matlab for more than 10 years, so I try to > understand this as well. > > The input tilde is still abit confusing for me as well, I am trying to > understand its' usage as this page: > https://octave.org/doc/v4.4.1/Ignoring-Arguments.html > > function val = pick2nd (~, arg2) > ? val = arg2; > endfunction > > I can't see the reason why the input need to ignored in this case, is > it defined but not being user due to bad user overlooked it? or is it > neglected and the default value would be used? > > Then I find this : > https://stackoverflow.com/questions/25204074/correct-use-of-tilde-operator-for-input-arguments > > */"The tilde is only for function declaration. Matlab's mlint > recommends to replace unused arguments by ~. The result is a function > declared like this function output = MyFunction(a, b, ~, c). This is a > very bad practice. /**/ > /* > */ > /* > */Since you have a function where the parameters are optional, you > must call the function with empty arguments > output=MyFunction(str1,str2,[],[],...,true)."/* > > It sound to me that the input tilde is suggested by the matlab mlint > to improve the code so that the unused variable need not to pass into > the function, and to improve memory management? > > So there are 2 possibilities for the input tilde : > > 1. used to replace unused variable in the input which defined by user, > but not being used. So the mlint recomment to replace with tilde, it > could be be remove possibly due to the project has been calling the > functions for many time, and changing the 4th to 3rd argument might > need to change a lot of codes. In this case, the %unused would be good. > > 2. Tilde used to tell the function to use default value, then > replacing it with % unused might cause error. > > Think we need some x-matlaber to confirm which case. > > Thanks again. > > rgds, > CL > > > > ---- On Tue, 26 Nov 2019 20:36:01 +0800 *Samuel Gougeon > >* wrote ---- > > Hello Chin Luh, > > Thanks a lot for your input. > > Both cases -- input and output will have to be converted --, since > the converter is also made to convert (sets of) functions > definitions, not only scripts. > > About the input case: Steven's answer is still not really clear to > me. Doing some tests on Octave, we must anyway provide some input > at calling time when? ~ is used as default input in the > definition. AFAIU, this ~ could just be to make sure that no > variable name used inside the function matches the name of the > input argument in the function definition, since "~" alone can't > be actually used as variable's name. In this case, for Scilab, any > input ~ could be replaced with an improbable variable name like > "%unused" or "%kwzxq", and that should do it. > > Please, correct me if someone understands something else. > > Best regards > Samuel > > Le 26/11/2019 ? 03:33, Chin Luh Tan a ?crit?: > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > Hi Samuel, > > I think your assumption likely correct on the input and the > output using ~ > > https://www.mathworks.com/matlabcentral/answers/288016-tilde-doesn-t-work-for-ignoring-my-inputs > > " > You *can*use tilde to ignore input arguments when you > *define*the function. > You *cannot*use tilde to ignore input arguments when you > *call*the function. > You *cannot*use tilde to ignore output arguments when you > *define*the function. > You *can*use tilde to ignore output arguments when you > *call*the function. > If you want to be able to specify only the third argument, > there must be some way for your function to disambiguate the > one-input call from a call that specifies only the third > input. Usually in MathWorks function this is done by > specifying [] for the arguments for which the user doesn't > want to specify. In that case the code would use the default > value if either narginis too small or if narginis large enough > and the specified input argument isempty. > " > From what I could think off, mat2sci conversion to replace ~ > at the output arguments should always be safe. As for the > input, since the tilde could not be used as input when calling > function, I think there should not be any cases that need to > be implemented in conversion? > Thanks. > Regards, > CL > > > ---- On Tue, 26 Nov 2019 04:20:52 +0800 *Samuel Gougeon > * wrote ---- > > Le 23/11/2019 ? 15:35, Samuel Gougeon a ?crit?: > > HelloPhilipp, and to all (former ;-) matlabers, > > Le 16/10/2019 ? 11:46, P M a ?crit?: > > Dear experts, > > trying to convert a matlab code to scilab I come > across following line: > > [~,~,Minstances_hat] = unique(B(:)); > > How to replace the "~" symbol? > > B is the blue channel of a RGB image...hence a m x > n matrix of integers (type(B) = 8 ) > > > This issue is now reported as bug 16250 > . > > Solving this issue would improve the converter. > I may contribute to solve it. However, I do not use to > use Matlab or Octave. So i don't know how the ~ > placeholder set in the list of /inputs/ is processed > inside the called function. This message is a call for > information about this topic. > > Ignoring an output is trivial. As suggested by > St?phane, the ans variable is a good candidate as > replacement for ~, > just as a fake recipient, as in "[~, ia] = > unique(A)"?? =>? "[ans, ia] = unique(A)" > > The meaning of ignoring an input is a priori > completely different, at least from a Scilab point of > view. > > This leads to the fact that, on the "function ..." > line, the converter will have to distinguish the list > of inputs from the list of outputs, and then process > the same ~ character in 2 different ways. > This processing would have to run also when the > "function ..." line is split on several rows with the > "..." continuation marks. > > First, i will need an actual example of function call > with ~ in the input list, runnable in Octave. > Any compact suggestion is welcome. > At least 2 use cases are expected: one calling a > function written in Octave/Matlab language (improperly > called "macros" in Scilab), the other one calling a > hard-coded function. > > Let's consider the first case, with a "macro": > > * What does? the ~ sent placeholder pass to the > function? How is it detected/detectable inside the > macro ? > * How is it processed by the function? Is there a > generic default processing, as replacing it with > the empty matrix [], or whatever else? > > Where is the crowd of matlabers? > > The page describing this > feature:https://fr.mathworks.com/help/matlab/matlab_prog/ignore-function-inputs.html > But i do not clearly understand it. > Apparently, "canceling" an input is done (only?) at the > function definition, not when calling it, unlike for the > outputs. > If so, then /ans/ could also be used as a replacement, > meaning that anyway this input won't be used inside the > function. > > A test of call with Octave yields an error: > > >> function [r, s] = funtest(a,b,c) > end > >> funtest(1,~,3) > parse error: > ? invalid use of empty argument (~) in index expression > >>> funtest(1,~,3) > ???????????????? ^ > >> > > Any further insight is welcome. > 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 > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Wed Nov 27 01:59:57 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Wed, 27 Nov 2019 08:59:57 +0800 Subject: [Scilab-users] How to convert the ~ input placeholder <= Re: convert matlab code to scilab In-Reply-To: References: <19df4652-db1e-f43d-11af-3a64667005cb@free.fr> <5020938b-d648-0d01-70b8-e2f59fde00fb@free.fr> <16ea58e9d4f.bdf2e66798674.3767031791221590619@bytecode-asia.com> <15592a62-84f9-1e00-dacb-979572d69d65@free.fr> <16ea84894df.ec878ea5206082.1419682616925923037@bytecode-asia.com> Message-ID: <16eaa5f37ed.fb214ae4293793.4066537689620894349@bytecode-asia.com> Hi Samuel, "But then, even if such a global default value exists, assigned to and reachable from what, since ~ can't be a variable name? Think we need some x-matlaber to confirm which case. Right, but case #2 looks quite improbable." --> i keep mixing up with built-in functions for this case. With user defined function, you're totally right. Antoine, "Or when you have to write a function following a specific prototype ( graphic events, optim, ode, ...)" --> Right, think this is also the reason why the matlab mlint according to the forum suggesting the user to replace the tilde with the unused variable.? Federico, "This is only speculation:?Could the tilde be used in some cases where some arguments that are not the last ones are optional, and the function definition includes some way to check if the corresponding argument has or has nor been provided? I've noticed in some cases Scilab allows just to omit the argument keeping the commas." I can't be sure on the first one, whether the argument is really used in the user-defined function, but for the second, i assume keep the commas means sth like my_fun(a,'','',b), this actually still pass the empty string to the function, whether it has been used as empty string, or it is used to indicated the use of default value, depending on the function definition.? ?? rgds, CL -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Wed Nov 27 19:21:41 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 27 Nov 2019 19:21:41 +0100 Subject: [Scilab-users] GUI help Message-ID: Hi there I'm trying to build a GUI. For simplicity on the forum, I've built a really simple example of what I'm trying to do. How can I make the "conditional" GUI output work and not have it inside the calc function? ... or, how would you do it? Thanks. Best regards, Claus. // GUI_EXAMPLE.SCE // // Demo of how to build a simple GUI in Scilab. // Real simple, with two input variables and one output. // The example uses the basic mechanical example of a mass and a spring as // input parameters and calculates the resonance frequency of the mechanical // system. // Initialize variables m = 1; // Moving mass 'm'(kilogram) k = 1; // Stiffness, spring constant 'k'(Newton per meter) fres = 1; // Resonance frequency (Hertz) show_result = %f; function calc() m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k fres = sqrt(m * k); // putting GUI updates inside the calculation routine is not pretty code. uicontrol("style","text","string","Result :","position", .. [10 as(2)-110 80 20]); uicontrol("style","text","string",string(fres), .. "position",[100 as(2)-110 80 20]); uicontrol("style","text","string","Hz ","position", .. [200 as(2)-110 30 20]); show_result = %t; // update global variables [m,k,fres,show_result]=return(m,k,fres,show_result); endfunction function goodbye() close(ge); // Close GUI window printf("Resulting fres: %f Hertz\n",fres); abort // Print result in console (e.g. for copy/paste), then kill the app endfunction ge = scf(); // GUI Example, Initialize and 'set current figure' as = ge.axes_size; // read size of window, as = [width height] ge.figure_name = "GUI Example"; // Change window header uicontrol("style","text","string","Moving mass :","position", .. [10 as(2)-35 80 20],"background",[1 1 1]); // white background // position properties has four parameters = x,y,width,height // y-position counts from lower left corner, so we subtract from 'as' ge_m = uicontrol("style","edit","string",string(m), .. "position",[100 as(2)-35 80 20]); uicontrol("style","text","string","kg ","position", .. [200 as(2)-35 30 20],"background",[1 1 1]); uicontrol("style","text","string","Stiffness :","position", .. [10 as(2)-60 80 20],"background",[1 1 1]); ge_k = uicontrol("style","edit","string",string(k), .. "position",[100 as(2)-60 80 20]); uicontrol("style","text","string","N/m ","position", .. [200 as(2)-60 30 20],"background",[1 1 1]); uicontrol("style","pushbutton","string","Calculate", .. "position",[10 as(2)-85 80 20],"callback","calc"); // How do I make this "conditional"output show up in my GUI? if show_result then // If "Calculate"button was pushed at least once ... uicontrol("style","text","string","Result :","position", .. [10 as(2)-110 80 20]); uicontrol("style","text","string",string(fres), .. "position",[100 as(2)-110 80 20]); uicontrol("style","text","string","Hz ","position", .. [200 as(2)-110 30 20]); end uicontrol("style","pushbutton","string","Exit", .. "position",[10 as(2)-135 80 20],"callback","goodbye"); -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Wed Nov 27 22:51:38 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Wed, 27 Nov 2019 18:51:38 -0300 Subject: [Scilab-users] Question on constant variables Message-ID: Dear all, What is the reason why %pi, %e, %i, %f, %t are considered variables (see help percent) when they are really constants? If %pi were a variable with the only detail that it has a preassigned value (while a bit dangerous, it could have been a possibility), then this would be possible: --> %pi = 2 However, one gets the following warning: Redefining permanent variable. This is misleading since one would think that the value has been indeed changed, but entering --> %pi produces ?%pi? = ?? 3.1415927 That's pi, not 2! So it would be better an error message such as Attempt to redefine permanent variable not allowed. Now, a similar attempt such as --> %f = 2 yields a completely different message: Error: syntax error, unexpected =, expecting end of file And, of course, the result of invoking %f keeps being F. Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Thu Nov 28 08:57:18 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 28 Nov 2019 08:57:18 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBHVUkgaGVscA==?= In-Reply-To: Message-ID: <42ca-5ddf7e00-1b-369f1700@131521389> Hello Claus, I've been playing a bit with GUIs for teaching, so maybe I can help. The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. Do not hesitate to rephrase your issue, I'll try a more focused answer. Anywya, here is how I think your code could be improved: (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). I attached a small gui I use to illustrate optical anti-reflection coating. It is far from perfect (I did not implement a proper model-view-controler for example). But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. Hope it helps, Antoine Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: > Hi there > > I'm trying to build a GUI. For simplicity on the forum, I've built a > really simple example of what I'm trying to do. How can I make the > "conditional" GUI output work and not have it inside the calc function? > ... or, how would you do it? Thanks. > > Best regards, Claus. > > // GUI_EXAMPLE.SCE > // > // Demo of how to build a simple GUI in Scilab. > // Real simple, with two input variables and one output. > // The example uses the basic mechanical example of a mass and a spring as > // input parameters and calculates the resonance frequency of the mechanical > // system. > > // Initialize variables > m = 1; // Moving mass 'm'(kilogram) > k = 1; // Stiffness, spring constant 'k'(Newton per meter) > fres = 1; // Resonance frequency (Hertz) > show_result = %f; > > function calc() > m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m > k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k > fres = sqrt(m * k); > // putting GUI updates inside the calculation routine is not pretty code. > uicontrol("style","text","string","Result :","position", .. > [10 as(2)-110 80 20]); > uicontrol("style","text","string",string(fres), .. > "position",[100 as(2)-110 80 20]); > uicontrol("style","text","string","Hz ","position", .. > [200 as(2)-110 30 20]); > show_result = %t; > // update global variables > [m,k,fres,show_result]=return(m,k,fres,show_result); > endfunction > > function goodbye() > close(ge); // Close GUI window > printf("Resulting fres: %f Hertz\n",fres); > abort // Print result in console (e.g. for copy/paste), then kill the app > endfunction > > ge = scf(); // GUI Example, Initialize and 'set current figure' > as = ge.axes_size; // read size of window, as = [width height] > ge.figure_name = "GUI Example"; // Change window header > > uicontrol("style","text","string","Moving mass :","position", .. > [10 as(2)-35 80 20],"background",[1 1 1]); // white background > // position properties has four parameters = x,y,width,height > // y-position counts from lower left corner, so we subtract from 'as' > ge_m = uicontrol("style","edit","string",string(m), .. > "position",[100 as(2)-35 80 20]); > uicontrol("style","text","string","kg ","position", .. > [200 as(2)-35 30 20],"background",[1 1 1]); > > uicontrol("style","text","string","Stiffness :","position", .. > [10 as(2)-60 80 20],"background",[1 1 1]); > ge_k = uicontrol("style","edit","string",string(k), .. > "position",[100 as(2)-60 80 20]); > uicontrol("style","text","string","N/m ","position", .. > [200 as(2)-60 30 20],"background",[1 1 1]); > > uicontrol("style","pushbutton","string","Calculate", .. > "position",[10 as(2)-85 80 20],"callback","calc"); > > // How do I make this "conditional"output show up in my GUI? > if show_result then // If "Calculate"button was pushed at least once ... > uicontrol("style","text","string","Result :","position", .. > [10 as(2)-110 80 20]); > uicontrol("style","text","string",string(fres), .. > "position",[100 as(2)-110 80 20]); > uicontrol("style","text","string","Hz ","position", .. > [200 as(2)-110 30 20]); > end > > uicontrol("style","pushbutton","string","Exit", .. > "position",[10 as(2)-135 80 20],"callback","goodbye"); > -------------- next part -------------- A non-text attachment was scrubbed... Name: ar_gui.sce Type: application/x-scilab-sce Size: 9841 bytes Desc: not available URL: From amonmayr at laas.fr Thu Nov 28 09:06:26 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 28 Nov 2019 09:06:26 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBRdWVzdGlvbiBvbiBjb25z?= =?utf-8?q?tant_variables?= In-Reply-To: Message-ID: <3470-5ddf8000-6b-40f5a280@78587156> Hello Frederico, Le Mercredi, Novembre 27, 2019 22:51 CET, Federico Miyara a ?crit: > > Dear all, > > What is the reason why %pi, %e, %i, %f, %t are considered variables (see > help percent) when they are really constants? Maybe because the actual variables, if they are scalar, are called constants ( see "a=1;typeof(a)" for example )! Confusing, he? :-). > > If %pi were a variable with the only detail that it has a preassigned > value (while a bit dangerous, it could have been a possibility), then > this would be possible: > > --> %pi = 2 > > However, one gets the following warning: > > Redefining permanent variable. > > This is misleading since one would think that the value has been indeed > changed, but entering > > --> %pi > > produces > > ?%pi? = > > ?? 3.1415927 > > That's pi, not 2! > > So it would be better an error message such as > > Attempt to redefine permanent variable not allowed. I agree with you. Could you fill a bug and propose your improved error message? > > Now, a similar attempt such as > > --> %f = 2 > > yields a completely different message: > > Error: syntax error, unexpected =, expecting end of file This one is weird and also misleading. I wonder whether this is due to the fact that the parser is trying to detect cases where someone wrote "if a=1 then" instead of "if a==1 then". I think the "if a=1 then" syntax used to be valid and got deprecated at some point. Antoine > > And, of course, the result of invoking %f keeps being F. > > Regards, > > Federico Miyara > > From sgougeon at free.fr Thu Nov 28 10:02:17 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Nov 2019 10:02:17 +0100 Subject: [Scilab-users] ?==?utf-8?q? Question on constant variables In-Reply-To: <3470-5ddf8000-6b-40f5a280@78587156> References: <3470-5ddf8000-6b-40f5a280@78587156> Message-ID: <5b2eaf68-f99c-f399-ba16-8fc2ba8a600d@free.fr> Le 28/11/2019 ? 09:06, Antoine Monmayrant a ?crit?: > Hello Frederico, > > > Le Mercredi, Novembre 27, 2019 22:51 CET, Federico Miyara a ?crit: > >> Dear all, >> >> What is the reason why %pi, %e, %i, %f, %t are considered variables (see >> help percent) when they are really constants? > Maybe because the actual variables, if they are scalar, are called constants ( see "a=1;typeof(a)" for example )! > Confusing, he? :-). > >> If %pi were a variable with the only detail that it has a preassigned >> value (while a bit dangerous, it could have been a possibility), then >> this would be possible: >> >> --> %pi = 2 >> >> However, one gets the following warning: >> >> Redefining permanent variable. >> >> This is misleading since one would think that the value has been indeed >> changed, but entering >> >> --> %pi >> >> produces >> >> ?%pi? = >> >> ?? 3.1415927 >> >> That's pi, not 2! >> >> So it would be better an error message such as >> >> Attempt to redefine permanent variable not allowed. > I agree with you. So do i. Or "Can't set a protected variable" or something similar could be OK as well (nothing is really permanent ... :-) > Could you fill a bug and propose your improved error message? Excellent suggestion. >> Now, a similar attempt such as >> >> --> %f = 2 >> >> yields a completely different message: >> >> Error: syntax error, unexpected =, expecting end of file This is indeed a very surprising change specific to %T and %F, introduced with Scilab 6.0.0. It is reported as bug 15029 . Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Nov 28 10:29:58 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Nov 2019 10:29:58 +0100 Subject: [Scilab-users] symbolic functions In-Reply-To: <83cbc208-4f97-4f63-1cc6-b1a22fd6ebaf@fceia.unr.edu.ar> References: <83cbc208-4f97-4f63-1cc6-b1a22fd6ebaf@fceia.unr.edu.ar> Message-ID: Hello Federico, Le 19/11/2019 ? 08:01, Federico Miyara a ?crit?: > > Dear all, > > I've found in a tutorial > (http://ryanrossi.com/teaching/search/papers/scilabguide.pdf) > reference to some symbolic functions such as addf or trianfml, and > even official Scilab help pages seemingly for an earlier version > (https://help.scilab.org/docs/5.5.2/en_US/trianfml.html), but they > have been removed from version 6. Any idea why? Good question. I do not remember any public discussion about their removal, just the 6.0.0 release notes announcing it. Probably this small module was considered as too basic, and so useless, compared to features provided by Maxima or other symbolic softwares. I would have agreed about its removal if the jewelish scimax Scilab module would have been packaged for Windows as well, and published on ATOMS for Scilab 6. But it is not currently the case. The former symbolic module presented all its functions at the same level. In my opinion, only solve(), trianfml() and trisolve() were really useful, whereas the other addf(), subf(), mulf(), rdivf(), ldivf() and cmb_lin() were rather internals. This small module could be easily repackaged to highlight solve, trianfml and trisolve, recompiled for Scilab 6, and pushed on ATOMS, at almost no cost. IMO, its interest goes a bit beyond only educational usages. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Thu Nov 28 10:51:01 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 28 Nov 2019 10:51:01 +0100 Subject: [Scilab-users] Run Scilab 6.0.2 on OSX Catalina Message-ID: Hello, I have prepared a small Applescript application? enabling the current JDK to run Scilab on OSX Catalina at the url http://www.utc.fr/?mottelet/java/enableJDK.dmg This application automates the fix we already discussed in this ML. If I summarize the necessary steps to run Scilab under Catalina, you have to: 1-download and install a JDK (not a JRE), e.g. https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html (more recent versions should also work, tests are welcome...) 2-download and run the enableJDK script (you will have to allow its execution in system preferencences) The fix provided by enableJDK is neither specific to Scilab nor specific to OSX Catalina. It will allow any application using Java thru JNI to run with your current JDK, without having to use the Apple legacy/obsolete Java 6 (https://support.apple.com/kb/dl1572). 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 http://www.utc.fr/~mottelet From p.muehlmann at gmail.com Thu Nov 28 10:53:47 2019 From: p.muehlmann at gmail.com (P M) Date: Thu, 28 Nov 2019 10:53:47 +0100 Subject: [Scilab-users] ?==?utf-8?q? GUI help In-Reply-To: <42ca-5ddf7e00-1b-369f1700@131521389> References: <42ca-5ddf7e00-1b-369f1700@131521389> Message-ID: Hallo Claus, from what I understand the question is: How can GUI updated outside of the function "calc" ? In other words: right now "calc" updates the GUI. I guess the aim is that "calc" only returns output values, which will be used to update the GUI . Way 1: Use global variables, which can be used in every function of the GUI. The return value of the function will change this global variable. Way 2 Give the calc() function output variables, such as: function [out_var1, out_var2] = calc(arg1, arg2) out_var1 = arg1 + ... out_var2 = arg2 +.... endfunction With this it should be possible to update the GUI outside of a callback function. Way 3.....similar to way 1...and the way I did in the past use a single global variable, called: handles handles is more a structure, than a single variable. It contains all uicontrols aswell as all variables necessary to update the GUI. e.g.: handles.f1 = figure(....) // that would be the main GUI handles.f2 = figure(....) // that would be a sub GUI handles.pb1 = uicontrol() // that would be a push button of the GUI handles.var1 = .... // that would be a variable, necessary to keep available to all uicontrols handles.var2 = .... // that would be another variable, necessary to keep available to all uicontrols When definig the callback function it would look like this: function calc(handles) locVar1 = handles.var1 locVar2 = handles.var2 //...do the calculations...to change locVar1, locVar2 //...update the handle variable(s) handles.var1 = locVar1 handles.var2 = locVar2 handles = resume(handles) endfunction one would call the function just as: calc(handles) A general note: It helps to put all callback functions into a separate subfolder The main function (that only defines the GUI) will call and load all callback functions from that subfolder. I give callback function scripts the extension: *.sci I give the main GUI script the extension: *.sce This is all not mandatory, but increases the overview. To create the global variable "handles" I define a separate function: function handles = Init(handles) handles.var1 = 0 // init value of var1 handles.var2 = 0 // init value of var2 handles.cmap = graycolormap(255) // init GUI colormap handles.statusSlider = 0 // can be a status variable for a slider..if it has been used or not handles.statusPB = 0 // can be a status variable for a push bitton ..such as: has been pressed or not // etc... handles = resume(handles) endfunction sorry for the long Mail, Best regards, Philipp Am Do., 28. Nov. 2019 um 08:57 Uhr schrieb Antoine Monmayrant < amonmayr at laas.fr>: > Hello Claus, > > I've been playing a bit with GUIs for teaching, so maybe I can help. > The issue is that I don't get what your problem is exactly here, so I my > answer might be a bit off-topic. > Do not hesitate to rephrase your issue, I'll try a more focused answer. > > Anywya, here is how I think your code could be improved: > > (1) You can use 'calc' as the callback for all of the editable text field > so that your result gets shown right away, without having to press a button. > (2) You should populate all the uicontrols of your gui first, then only > update the displayed values, the visibility of the uicontrols, etc inside > your calc function. (ie no more creating a uicontrol inside a callback) > (3) The 'tag' property of any uicontrol together with 'findobj()' are > really nice to get/set the properties of each existing uicontrol. > (4) You can rely on a proper Model-View-Controler approach (or any other > well established method to avoid mixing gui stuff with calculation stuff). > > I attached a small gui I use to illustrate optical anti-reflection coating. > It is far from perfect (I did not implement a proper model-view-controler > for example). > But you can see how I tried to separate the different parts of the code an > how I use findobj/tag/get/set, etc. > > Hope it helps, > > Antoine > > Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup < > cfuttrup at gmail.com> a ?crit: > > > Hi there > > > > I'm trying to build a GUI. For simplicity on the forum, I've built a > > really simple example of what I'm trying to do. How can I make the > > "conditional" GUI output work and not have it inside the calc function? > > ... or, how would you do it? Thanks. > > > > Best regards, Claus. > > > > // GUI_EXAMPLE.SCE > > // > > // Demo of how to build a simple GUI in Scilab. > > // Real simple, with two input variables and one output. > > // The example uses the basic mechanical example of a mass and a spring > as > > // input parameters and calculates the resonance frequency of the > mechanical > > // system. > > > > // Initialize variables > > m = 1; // Moving mass 'm'(kilogram) > > k = 1; // Stiffness, spring constant 'k'(Newton per meter) > > fres = 1; // Resonance frequency (Hertz) > > show_result = %f; > > > > function calc() > > m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m > > k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k > > fres = sqrt(m * k); > > // putting GUI updates inside the calculation routine is not pretty > code. > > uicontrol("style","text","string","Result :","position", .. > > [10 as(2)-110 80 20]); > > uicontrol("style","text","string",string(fres), .. > > "position",[100 as(2)-110 80 20]); > > uicontrol("style","text","string","Hz ","position", .. > > [200 as(2)-110 30 20]); > > show_result = %t; > > // update global variables > > [m,k,fres,show_result]=return(m,k,fres,show_result); > > endfunction > > > > function goodbye() > > close(ge); // Close GUI window > > printf("Resulting fres: %f Hertz\n",fres); > > abort // Print result in console (e.g. for copy/paste), then kill > the app > > endfunction > > > > ge = scf(); // GUI Example, Initialize and 'set current figure' > > as = ge.axes_size; // read size of window, as = [width height] > > ge.figure_name = "GUI Example"; // Change window header > > > > uicontrol("style","text","string","Moving mass :","position", .. > > [10 as(2)-35 80 20],"background",[1 1 1]); // white > background > > // position properties has four parameters = x,y,width,height > > // y-position counts from lower left corner, so we subtract > from 'as' > > ge_m = uicontrol("style","edit","string",string(m), .. > > "position",[100 as(2)-35 80 20]); > > uicontrol("style","text","string","kg ","position", .. > > [200 as(2)-35 30 20],"background",[1 1 1]); > > > > uicontrol("style","text","string","Stiffness :","position", .. > > [10 as(2)-60 80 20],"background",[1 1 1]); > > ge_k = uicontrol("style","edit","string",string(k), .. > > "position",[100 as(2)-60 80 20]); > > uicontrol("style","text","string","N/m ","position", .. > > [200 as(2)-60 30 20],"background",[1 1 1]); > > > > uicontrol("style","pushbutton","string","Calculate", .. > > "position",[10 as(2)-85 80 20],"callback","calc"); > > > > // How do I make this "conditional"output show up in my GUI? > > if show_result then // If "Calculate"button was pushed at least once > ... > > uicontrol("style","text","string","Result :","position", .. > > [10 as(2)-110 80 20]); > > uicontrol("style","text","string",string(fres), .. > > "position",[100 as(2)-110 80 20]); > > uicontrol("style","text","string","Hz ","position", .. > > [200 as(2)-110 30 20]); > > end > > > > uicontrol("style","pushbutton","string","Exit", .. > > "position",[10 as(2)-135 80 20],"callback","goodbye"); > > > _______________________________________________ > 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 Thu Nov 28 16:27:09 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 28 Nov 2019 16:27:09 +0100 Subject: [Scilab-users] Run Scilab 6.0.2 on OSX Catalina In-Reply-To: References: Message-ID: Sorry, there was a typo error (wrong tilda) in the URL, the valid one is https:/www.utc.fr/~mottelet/java/enableJDK.dmg S. Le 28/11/2019 ? 10:51, St?phane Mottelet a ?crit?: > Hello, > > I have prepared a small Applescript application? enabling the current > JDK to run Scilab on OSX Catalina at the url > > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/?mottelet/java/enableJDK.dmg > > > This application automates the fix we already discussed in this ML. If > I summarize the necessary steps to run Scilab under Catalina, you have > to: > > 1-download and install a JDK (not a JRE), e.g. > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html > (more recent versions should also work, tests are welcome...) > > 2-download and run the enableJDK script (you will have to allow its > execution in system preferencences) > > The fix provided by enableJDK is neither specific to Scilab nor > specific to OSX Catalina. It will allow any application using Java > thru JNI to run with your current JDK, without having to use the Apple > legacy/obsolete Java 6 > (https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/support.apple.com/kb/dl1572). > > 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 http://www.utc.fr/~mottelet From cfuttrup at gmail.com Thu Nov 28 17:05:24 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 28 Nov 2019 17:05:24 +0100 Subject: [Scilab-users] ?==?utf-8?q? GUI help In-Reply-To: <42ca-5ddf7e00-1b-369f1700@131521389> References: <42ca-5ddf7e00-1b-369f1700@131521389> Message-ID: Hi Antoine, et al. Your reply is very helpful, so I think you got the right question :-) 1) Good point that I can use callback on every uicontrol. This would be suitable for a simple example (like gui_example.sce) ... but for heavy calculations, it might be more practical with a CALC button. P.S. The correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); 2) I see what you mean, so not having an empty space, but "show" the whole she-bang from the beginning. I didn't want to do that (just deleting the IF-statement), but it could be the best solution in the end (rather than the inline GUI updates), if nothing better shows up. This was somehow the "core" of my question. Maybe I ask for too much. 3) I will look into this. Thanks for the tip. 4) I will also look into this. My problem is the steep learning curve. If you look at the Scilab tutorials you have the good-old Openeering LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial using the Model-Viewer-Controller approach? - Maybe the Model-Viewer-Controller could be presented in a _simple_ tutorial - is it possible? I appreciate gui_example.sce with just about 70 lines of code, two inputs and one output. I think something like it could help a lot of people ... and it's not 250 lines of code to get a GUI up and running, if you know what I mean. The gui_example shows a few differences, like white versus grey background, editable boxes, etc. In the outputs, because of the default grey background, you can see the dimensions of the grid / text-boxes, and gui_example has two buttons. It looks operational and easy to expand for new users. Cheers, Claus On 28.11.2019 08:57, Antoine Monmayrant wrote: > Hello Claus, > > I've been playing a bit with GUIs for teaching, so maybe I can help. > The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. > Do not hesitate to rephrase your issue, I'll try a more focused answer. > > Anywya, here is how I think your code could be improved: > > (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. > (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) > (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. > (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). > > I attached a small gui I use to illustrate optical anti-reflection coating. > It is far from perfect (I did not implement a proper model-view-controler for example). > But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. > > Hope it helps, > > Antoine > > Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: > >> Hi there >> >> I'm trying to build a GUI. For simplicity on the forum, I've built a >> really simple example of what I'm trying to do. How can I make the >> "conditional" GUI output work and not have it inside the calc function? >> ... or, how would you do it? Thanks. >> >> Best regards, Claus. >> >> // GUI_EXAMPLE.SCE >> // >> // Demo of how to build a simple GUI in Scilab. >> // Real simple, with two input variables and one output. >> // The example uses the basic mechanical example of a mass and a spring as >> // input parameters and calculates the resonance frequency of the mechanical >> // system. >> >> // Initialize variables >> m = 1; // Moving mass 'm'(kilogram) >> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >> fres = 1; // Resonance frequency (Hertz) >> show_result = %f; >> >> function calc() >> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >> fres = sqrt(m * k); >> // putting GUI updates inside the calculation routine is not pretty code. >> uicontrol("style","text","string","Result :","position", .. >> [10 as(2)-110 80 20]); >> uicontrol("style","text","string",string(fres), .. >> "position",[100 as(2)-110 80 20]); >> uicontrol("style","text","string","Hz ","position", .. >> [200 as(2)-110 30 20]); >> show_result = %t; >> // update global variables >> [m,k,fres,show_result]=return(m,k,fres,show_result); >> endfunction >> >> function goodbye() >> close(ge); // Close GUI window >> printf("Resulting fres: %f Hertz\n",fres); >> abort // Print result in console (e.g. for copy/paste), then kill the app >> endfunction >> >> ge = scf(); // GUI Example, Initialize and 'set current figure' >> as = ge.axes_size; // read size of window, as = [width height] >> ge.figure_name = "GUI Example"; // Change window header >> >> uicontrol("style","text","string","Moving mass :","position", .. >> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >> // position properties has four parameters = x,y,width,height >> // y-position counts from lower left corner, so we subtract from 'as' >> ge_m = uicontrol("style","edit","string",string(m), .. >> "position",[100 as(2)-35 80 20]); >> uicontrol("style","text","string","kg ","position", .. >> [200 as(2)-35 30 20],"background",[1 1 1]); >> >> uicontrol("style","text","string","Stiffness :","position", .. >> [10 as(2)-60 80 20],"background",[1 1 1]); >> ge_k = uicontrol("style","edit","string",string(k), .. >> "position",[100 as(2)-60 80 20]); >> uicontrol("style","text","string","N/m ","position", .. >> [200 as(2)-60 30 20],"background",[1 1 1]); >> >> uicontrol("style","pushbutton","string","Calculate", .. >> "position",[10 as(2)-85 80 20],"callback","calc"); >> >> // How do I make this "conditional"output show up in my GUI? >> if show_result then // If "Calculate"button was pushed at least once ... >> uicontrol("style","text","string","Result :","position", .. >> [10 as(2)-110 80 20]); >> uicontrol("style","text","string",string(fres), .. >> "position",[100 as(2)-110 80 20]); >> uicontrol("style","text","string","Hz ","position", .. >> [200 as(2)-110 30 20]); >> end >> >> uicontrol("style","pushbutton","string","Exit", .. >> "position",[10 as(2)-135 80 20],"callback","goodbye"); >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Thu Nov 28 17:12:17 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 28 Nov 2019 17:12:17 +0100 Subject: [Scilab-users] ?==?utf-8?q? GUI help In-Reply-To: References: <42ca-5ddf7e00-1b-369f1700@131521389> Message-ID: Hi Philipp, et al. Thanks for the (long) email. I appreciate it. Way 1 - I already do. Way 2 - Yes, the established part of the GUI updates, no problem. The big question was if I could turn certain parts of the GUI on (and maybe off again)? Way 3 - interesting idea, to use a "handles" container for all variables. I'll think about it. Is this "only" an easy way to pass around lots of variables, or is there something more internal with the GUI that is smart with this solution? Best regards, Claus On 28.11.2019 10:53, P M wrote: > Hallo Claus, > > from what I understand the question is: How can GUI updated outside of > the function "calc" ? > > In other words: > right now "calc" updates the GUI. > I guess the aim is that "calc" only returns output values, which will > be used to update the GUI . > > Way 1: > Use global variables, which can be used in every function of the GUI. > The return value of the function will change this global variable. > > Way 2 > Give the calc() function output variables, such as: > function [out_var1, out_var2] = calc(arg1, arg2) > ??? out_var1 = arg1 + ... > ??? out_var2 = arg2 +.... > endfunction > With this it should be possible to update the GUI outside of a > callback function. > > Way 3.....similar to way 1...and the way I did in the past > use a single global variable, called: handles > > handles is more a structure, than a single variable. > It contains all uicontrols aswell as all variables necessary to update > the GUI. > e.g.: > > handles.f1 = figure(....)????? // that would be the main GUI > handles.f2 = figure(....) ? ?? // that would be a sub GUI > handles.pb1 = uicontrol()?? // that would be a push button of the GUI > handles.var1 = ....???????????? // that would be a variable, necessary > to keep available to all uicontrols > handles.var2 = ....???????????? // that would be another variable, > necessary to keep available to all uicontrols > > > When definig the callback function it would look like this: > > function calc(handles) > ? locVar1 = handles.var1 > ? locVar2 = handles.var2 > ? //...do the calculations...to change locVar1, locVar2 > ? //...update the handle variable(s) > ? handles.var1 = locVar1 > ? handles.var2 = locVar2 > ? handles = resume(handles) > endfunction > > one would call the function just as:???? calc(handles) > > > A general note: > It helps to put all callback functions into a separate subfolder > The main function (that only defines the GUI) will call and load all > callback functions from that subfolder. > > I give callback function scripts the extension:? *.sci > I give the main GUI script the extension: *.sce > This is all not mandatory, but increases the overview. > > To create the global variable "handles" I define a separate function: > > function handles = Init(handles) > ? handles.var1 = 0? // init value of var1 > ? handles.var2 = 0? // init value of var2 > ? handles.cmap = graycolormap(255)? // init GUI colormap > ? handles.statusSlider = 0??? // can be a status variable for a > slider..if it has been used or not > ? handles.statusPB = 0?????? // can be a status variable for a push > bitton ..such as: has been pressed or not > ? // etc... > > ? handles = resume(handles) > endfunction > > sorry for the long Mail, > Best regards, > Philipp > > > > > > > > > > Am Do., 28. Nov. 2019 um 08:57?Uhr schrieb Antoine Monmayrant > >: > > Hello Claus, > > I've been playing a bit with GUIs for teaching, so maybe I can help. > The issue is that I don't get what your problem is exactly here, > so I my answer might be a bit off-topic. > Do not hesitate to rephrase your issue, I'll try a more focused > answer. > > Anywya, here is how I think your code could be improved: > > (1) You can use 'calc' as the callback for all of the editable > text field so that your result gets shown right away, without > having to press a button. > (2) You should populate all the uicontrols of your gui first, then > only update the displayed values, the visibility of the > uicontrols, etc inside your calc function. (ie no more creating a > uicontrol inside a callback) > (3) The 'tag' property of any uicontrol together with 'findobj()' > are really nice to get/set the properties of each existing uicontrol. > (4) You can rely on a proper Model-View-Controler approach (or any > other well established method to avoid mixing gui stuff with > calculation stuff). > > I attached a small gui I use to illustrate optical anti-reflection > coating. > It is far from perfect (I did not implement a proper > model-view-controler for example). > But you can see how I tried to separate the different parts of the > code an how I use findobj/tag/get/set,? etc. > > Hope it helps, > > Antoine > > Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup > > a ?crit: > > > Hi there > > > > I'm trying to build a GUI. For simplicity on the forum, I've > built a > > really simple example of what I'm trying to do. How can I make the > > "conditional" GUI output work and not have it inside the calc > function? > > ... or, how would you do it? Thanks. > > > > Best regards, Claus. > > > > // GUI_EXAMPLE.SCE > > // > > // Demo of how to build a simple GUI in Scilab. > > // Real simple, with two input variables and one output. > > // The example uses the basic mechanical example of a mass and a > spring as > > // input parameters and calculates the resonance frequency of > the mechanical > > // system. > > > > // Initialize variables > > m? =? 1;? // Moving mass 'm'(kilogram) > > k? =? 1;? // Stiffness, spring constant 'k'(Newton per meter) > > fres? =? 1;? // Resonance frequency (Hertz) > > show_result? =? %f; > > > > function? calc() > >? ? ? m? =? evstr(get(ge_m,"string"));? // get content in > uicontrol ge_m > >? ? ? k? =? evstr(get(ge_k,"string"));? // get content in > uicontrol ge_k > >? ? ? fres? =? sqrt(m? *? k); > >? ? ? // putting GUI updates inside the calculation routine is > not pretty code. > >? ? ? uicontrol("style","text","string","Result :","position",? .. > >? ? ? ? ? ? ? ? [10? as(2)-110? 80? 20]); > >? ? ? uicontrol("style","text","string",string(fres),? .. > >? ? ? ? ? ? ? ? "position",[100? as(2)-110? 80? 20]); > >? ? ? uicontrol("style","text","string","Hz ","position", .. > >? ? ? ? ? ? ? ? [200? as(2)-110? 30? 20]); > >? ? ? show_result? =? %t; > >? ? ? // update global variables > >? ? ? [m,k,fres,show_result]=return(m,k,fres,show_result); > > endfunction > > > > function? goodbye() > >? ? ? close(ge);? // Close GUI window > >? ? ? printf("Resulting fres: %f Hertz\n",fres); > >? ? ? abort? // Print result in console (e.g. for copy/paste), > then kill the app > > endfunction > > > > ge? =? scf();? // GUI Example, Initialize and 'set current figure' > > as? =? ge.axes_size;? // read size of window, as = [width height] > > ge.figure_name? =? "GUI Example";? // Change window header > > > > uicontrol("style","text","string","Moving mass :","position",? .. > >? ? ? ? ? ? [10? as(2)-35? 80? 20],"background",[1? 1 1]);? // > white background > >? ? ? ? ? ? // position properties has four parameters = > x,y,width,height > >? ? ? ? ? ? // y-position counts from lower left corner, so we > subtract from 'as' > > ge_m? =? uicontrol("style","edit","string",string(m),? .. > >? ? ? ? ? ? "position",[100? as(2)-35? 80? 20]); > > uicontrol("style","text","string","kg ","position",? .. > >? ? ? ? ? ? [200? as(2)-35? 30? 20],"background",[1? 1 1]); > > > > uicontrol("style","text","string","Stiffness :","position",? .. > >? ? ? ? ? ? [10? as(2)-60? 80? 20],"background",[1? 1 1]); > > ge_k? =? uicontrol("style","edit","string",string(k),? .. > >? ? ? ? ? ? "position",[100? as(2)-60? 80? 20]); > > uicontrol("style","text","string","N/m ","position",? .. > >? ? ? ? ? ? [200? as(2)-60? 30? 20],"background",[1? 1 1]); > > > > uicontrol("style","pushbutton","string","Calculate",? .. > >? ? ? ? ? ? "position",[10? as(2)-85? 80 20],"callback","calc"); > > > > // How do I make this "conditional"output show up in my GUI? > > if? show_result? then? // If "Calculate"button was pushed at > least once ... > >? ? ? uicontrol("style","text","string","Result :","position",? .. > >? ? ? ? ? ? ? ? [10? as(2)-110? 80? 20]); > >? ? ? uicontrol("style","text","string",string(fres),? .. > >? ? ? ? ? ? ? ? "position",[100? as(2)-110? 80? 20]); > >? ? ? uicontrol("style","text","string","Hz ","position", .. > >? ? ? ? ? ? ? ? [200? as(2)-110? 30? 20]); > > end > > > > uicontrol("style","pushbutton","string","Exit",? .. > >? ? ? ? ? ? "position",[10? as(2)-135? 80 20],"callback","goodbye"); > > > _______________________________________________ > 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 chinluh.tan at bytecode-asia.com Thu Nov 28 17:15:17 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Fri, 29 Nov 2019 00:15:17 +0800 Subject: [Scilab-users] Run Scilab 6.0.2 on OSX Catalina In-Reply-To: References: Message-ID: <16eb2cb9944.11303947c566541.4807756935658977747@bytecode-asia.com> Hi Stephane,? I tested the latest jdk from the web, with your patch, it works! Thanks. rgds, CL ---- On Thu, 28 Nov 2019 23:27:09 +0800 St?phane Mottelet wrote ---- Sorry, there was a typo error (wrong tilda) in the URL, the valid one is https:/www.utc.fr/~mottelet/java/enableJDK.dmg S. Le 28/11/2019 ? 10:51, St?phane Mottelet a ?crit?: > Hello, > > I have prepared a small Applescript application? enabling the current > JDK to run Scilab on OSX Catalina at the url > > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/?mottelet/java/enableJDK.dmg > > > This application automates the fix we already discussed in this ML. If > I summarize the necessary steps to run Scilab under Catalina, you have > to: > > 1-download and install a JDK (not a JRE), e.g. > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html > (more recent versions should also work, tests are welcome...) > > 2-download and run the enableJDK script (you will have to allow its > execution in system preferencences) > > The fix provided by enableJDK is neither specific to Scilab nor > specific to OSX Catalina. It will allow any application using Java > thru JNI to run with your current JDK, without having to use the Apple > legacy/obsolete Java 6 > (https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/support.apple.com/kb/dl1572). > > 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 http://www.utc.fr/~mottelet _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Thu Nov 28 17:47:21 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 28 Nov 2019 17:47:21 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBH?= =?utf-8?q?UI_hel?= In-Reply-To: Message-ID: <2220-5ddffa00-23-1dedcee0@66322596> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: > Hi Antoine, et al. > > Your reply is very helpful, so I think you got the right question :-) > > 1) Good point that I can use callback on every uicontrol. This would be > suitable for a simple example (like gui_example.sce) ... but for heavy > calculations, it might be more practical with a CALC button. P.S. The > correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); You are right. Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. > > 2) I see what you mean, so not having an empty space, but "show" the > whole she-bang from the beginning. I didn't want to do that (just > deleting the IF-statement), but it could be the best solution in the end > (rather than the inline GUI updates), if nothing better shows up. This > was somehow the "core" of my question. Maybe I ask for too much. I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). > > 3) I will look into this. Thanks for the tip. Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. > > 4) I will also look into this. My problem is the steep learning curve. > If you look at the Scilab tutorials you have the good-old Openeering > LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial > using the Model-Viewer-Controller approach? - Maybe the > Model-Viewer-Controller could be presented in a _simple_ tutorial - is > it possible? Hmm, that would be a good idea. I'll see whether I can put something together. The thing is, MVC approach looks rather silly and overengineered on a small example. > > I appreciate gui_example.sce with just about 70 lines of code, two > inputs and one output. I think something like it could help a lot of > people ... and it's not 250 lines of code to get a GUI up and running, > if you know what I mean. The gui_example shows a few differences, like > white versus grey background, editable boxes, etc. In the outputs, > because of the default grey background, you can see the dimensions of > the grid / text-boxes, and gui_example has two buttons. It looks > operational and easy to expand for new users. > > Cheers, > Claus > > On 28.11.2019 08:57, Antoine Monmayrant wrote: > > Hello Claus, > > > > I've been playing a bit with GUIs for teaching, so maybe I can help. > > The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. > > Do not hesitate to rephrase your issue, I'll try a more focused answer. > > > > Anywya, here is how I think your code could be improved: > > > > (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. > > (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) > > (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. > > (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). > > > > I attached a small gui I use to illustrate optical anti-reflection coating. > > It is far from perfect (I did not implement a proper model-view-controler for example). > > But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. > > > > Hope it helps, > > > > Antoine > > > > Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: > > > >> Hi there > >> > >> I'm trying to build a GUI. For simplicity on the forum, I've built a > >> really simple example of what I'm trying to do. How can I make the > >> "conditional" GUI output work and not have it inside the calc function? > >> ... or, how would you do it? Thanks. > >> > >> Best regards, Claus. > >> > >> // GUI_EXAMPLE.SCE > >> // > >> // Demo of how to build a simple GUI in Scilab. > >> // Real simple, with two input variables and one output. > >> // The example uses the basic mechanical example of a mass and a spring as > >> // input parameters and calculates the resonance frequency of the mechanical > >> // system. > >> > >> // Initialize variables > >> m = 1; // Moving mass 'm'(kilogram) > >> k = 1; // Stiffness, spring constant 'k'(Newton per meter) > >> fres = 1; // Resonance frequency (Hertz) > >> show_result = %f; > >> > >> function calc() > >> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m > >> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k > >> fres = sqrt(m * k); > >> // putting GUI updates inside the calculation routine is not pretty code. > >> uicontrol("style","text","string","Result :","position", .. > >> [10 as(2)-110 80 20]); > >> uicontrol("style","text","string",string(fres), .. > >> "position",[100 as(2)-110 80 20]); > >> uicontrol("style","text","string","Hz ","position", .. > >> [200 as(2)-110 30 20]); > >> show_result = %t; > >> // update global variables > >> [m,k,fres,show_result]=return(m,k,fres,show_result); > >> endfunction > >> > >> function goodbye() > >> close(ge); // Close GUI window > >> printf("Resulting fres: %f Hertz\n",fres); > >> abort // Print result in console (e.g. for copy/paste), then kill the app > >> endfunction > >> > >> ge = scf(); // GUI Example, Initialize and 'set current figure' > >> as = ge.axes_size; // read size of window, as = [width height] > >> ge.figure_name = "GUI Example"; // Change window header > >> > >> uicontrol("style","text","string","Moving mass :","position", .. > >> [10 as(2)-35 80 20],"background",[1 1 1]); // white background > >> // position properties has four parameters = x,y,width,height > >> // y-position counts from lower left corner, so we subtract from 'as' > >> ge_m = uicontrol("style","edit","string",string(m), .. > >> "position",[100 as(2)-35 80 20]); > >> uicontrol("style","text","string","kg ","position", .. > >> [200 as(2)-35 30 20],"background",[1 1 1]); > >> > >> uicontrol("style","text","string","Stiffness :","position", .. > >> [10 as(2)-60 80 20],"background",[1 1 1]); > >> ge_k = uicontrol("style","edit","string",string(k), .. > >> "position",[100 as(2)-60 80 20]); > >> uicontrol("style","text","string","N/m ","position", .. > >> [200 as(2)-60 30 20],"background",[1 1 1]); > >> > >> uicontrol("style","pushbutton","string","Calculate", .. > >> "position",[10 as(2)-85 80 20],"callback","calc"); > >> > >> // How do I make this "conditional"output show up in my GUI? > >> if show_result then // If "Calculate"button was pushed at least once ... > >> uicontrol("style","text","string","Result :","position", .. > >> [10 as(2)-110 80 20]); > >> uicontrol("style","text","string",string(fres), .. > >> "position",[100 as(2)-110 80 20]); > >> uicontrol("style","text","string","Hz ","position", .. > >> [200 as(2)-110 30 20]); > >> end > >> > >> uicontrol("style","pushbutton","string","Exit", .. > >> "position",[10 as(2)-135 80 20],"callback","goodbye"); > >> > >> > >> _______________________________________________ > >> users mailing list > >> users at lists.scilab.org > >> http://lists.scilab.org/mailman/listinfo/users > > From stephane.mottelet at utc.fr Thu Nov 28 17:52:15 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 28 Nov 2019 17:52:15 +0100 Subject: [Scilab-users] Run Scilab 6.0.2 on OSX Catalina In-Reply-To: <16eb2cb9944.11303947c566541.4807756935658977747@bytecode-asia.com> References: <16eb2cb9944.11303947c566541.4807756935658977747@bytecode-asia.com> Message-ID: <72f50fae-3ae1-c312-3884-52c6f5b3b12c@utc.fr> Le 28/11/2019 ? 17:15, Chin Luh Tan a ?crit?: > Hi Stephane, > > I tested the latest jdk what is the version ? > from the web, with your patch, it works! > > Thanks. > > rgds, > CL > > > ---- On Thu, 28 Nov 2019 23:27:09 +0800 *St?phane Mottelet > * wrote ---- > > Sorry, there was a typo error (wrong tilda) in the URL, the valid > one is > > https:/www.utc.fr/~mottelet/java/enableJDK.dmg > > S. > > Le 28/11/2019 ? 10:51, St?phane Mottelet a ?crit?: > > Hello, > > > > I have prepared a small Applescript application enabling the > current > > JDK to run Scilab on OSX Catalina at the url > > > > > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/ > ?mottelet/java/enableJDK.dmg > > > > > > > This application automates the fix we already discussed in this > ML. If > > I summarize the necessary steps to run Scilab under Catalina, > you have > > to: > > > > 1-download and install a JDK (not a JRE), e.g. > > > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html > > > > (more recent versions should also work, tests are welcome...) > > > > 2-download and run the enableJDK script (you will have to allow its > > execution in system preferencences) > > > > The fix provided by enableJDK is neither specific to Scilab nor > > specific to OSX Catalina. It will allow any application using Java > > thru JNI to run with your current JDK, without having to use the > Apple > > legacy/obsolete Java 6 > > > (https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/support.apple.com/kb/dl1572 > ). > > > > 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 > http://www.utc.fr/~mottelet > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > 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 chinluh.tan at bytecode-asia.com Thu Nov 28 17:54:03 2019 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Fri, 29 Nov 2019 00:54:03 +0800 Subject: [Scilab-users] Run Scilab 6.0.2 on OSX Catalina In-Reply-To: <72f50fae-3ae1-c312-3884-52c6f5b3b12c@utc.fr> References: <16eb2cb9944.11303947c566541.4807756935658977747@bytecode-asia.com> <72f50fae-3ae1-c312-3884-52c6f5b3b12c@utc.fr> Message-ID: <16eb2ef1712.b577de6e463425.5736602650988100689@bytecode-asia.com> Hi,? Java SE 13.0.1 Thanks Rgds, CL ---- On Fri, 29 Nov 2019 00:52:15 +0800 stephane.mottelet at utc.fr wrote ---- Le 28/11/2019 ? 17:15, Chin Luh Tan a ?crit?: Hi Stephane,? I tested the latest jdk what is the version ? from the web, with your patch, it works! Thanks. rgds, CL ---- On Thu, 28 Nov 2019 23:27:09 +0800 St?phane Mottelet wrote ---- Sorry, there was a typo error (wrong tilda) in the URL, the valid one is https:/www.utc.fr/~mottelet/java/enableJDK.dmg S. Le 28/11/2019 ? 10:51, St?phane Mottelet a ?crit?: > Hello, > > I have prepared a small Applescript application? enabling the current > JDK to run Scilab on OSX Catalina at the url > > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/?mottelet/java/enableJDK.dmg > > > This application automates the fix we already discussed in this ML. If > I summarize the necessary steps to run Scilab under Catalina, you have > to: > > 1-download and install a JDK (not a JRE), e.g. > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html > (more recent versions should also work, tests are welcome...) > > 2-download and run the enableJDK script (you will have to allow its > execution in system preferencences) > > The fix provided by enableJDK is neither specific to Scilab nor > specific to OSX Catalina. It will allow any application using Java > thru JNI to run with your current JDK, without having to use the Apple > legacy/obsolete Java 6 > (https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/support.apple.com/kb/dl1572). > > 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 http://www.utc.fr/~mottelet _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Thu Nov 28 18:54:06 2019 From: sdr at durietz.se (Stefan Du Rietz) Date: Thu, 28 Nov 2019 18:54:06 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <2220-5ddffa00-23-1dedcee0@66322596> References: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: > Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: > > I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). I do that and it is very convenient. I also save my GUI data in a struct() in the "user_data" of the parent figure of the GUI. Then I don't need global variables or even findobj(). Regards Stefan From cfuttrup at gmail.com Thu Nov 28 19:23:30 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 28 Nov 2019 19:23:30 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: <2729d663-4a86-a60c-1d86-d7eac8aac382@gmail.com> Hi Antoine and Stefan Thanks for the tip using visible='off' ... it looks like a better way. Regards, Claus On 28.11.2019 18:54, Stefan Du Rietz wrote: >> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup >> a ?crit: >> ? I think you can achieve what you want by setting ".visible='off'" >> for all the uicontrols you don't want to show initialy. You can then >> set? ".visible='on'" after the first call to the callback (or at each >> call if you are lazy). > > I do that and it is very convenient. I also save my GUI data in a > struct() in the "user_data" of the parent figure of the GUI. Then I > don't need global variables or even findobj(). > > Regards > Stefan > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From cfuttrup at gmail.com Thu Nov 28 19:39:04 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 28 Nov 2019 19:39:04 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: <5abc9e1b-9b1f-f09b-d417-4246f99467a5@gmail.com> Hi Stefan >save my GUI data in a struct() in the "user_data" I don't understand. Can you show me an example to explain this? Best regards, Claus On 28.11.2019 18:54, Stefan Du Rietz wrote: >> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup >> a ?crit: >> ? I think you can achieve what you want by setting ".visible='off'" >> for all the uicontrols you don't want to show initialy. You can then >> set? ".visible='on'" after the first call to the callback (or at each >> call if you are lazy). > > I do that and it is very convenient. I also save my GUI data in a > struct() in the "user_data" of the parent figure of the GUI. Then I > don't need global variables or even findobj(). > > Regards > Stefan > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From cfuttrup at gmail.com Thu Nov 28 19:40:03 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 28 Nov 2019 19:40:03 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <2220-5ddffa00-23-1dedcee0@66322596> References: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: <41a234ff-4311-dfa2-d528-d990be470f06@gmail.com> Hi Antoine Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. I see what you mean. I just now had trouble turning visibility on/off, but using set(), it works fine. Thanks for the tip. Best regards, Claus On 28.11.2019 17:47, Antoine Monmayrant wrote: > Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: > >> Hi Antoine, et al. >> >> Your reply is very helpful, so I think you got the right question :-) >> >> 1) Good point that I can use callback on every uicontrol. This would be >> suitable for a simple example (like gui_example.sce) ... but for heavy >> calculations, it might be more practical with a CALC button. P.S. The >> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); > You are right. > Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. > >> 2) I see what you mean, so not having an empty space, but "show" the >> whole she-bang from the beginning. I didn't want to do that (just >> deleting the IF-statement), but it could be the best solution in the end >> (rather than the inline GUI updates), if nothing better shows up. This >> was somehow the "core" of my question. Maybe I ask for too much. > I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). > >> 3) I will look into this. Thanks for the tip. > Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. > I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. > >> 4) I will also look into this. My problem is the steep learning curve. >> If you look at the Scilab tutorials you have the good-old Openeering >> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >> using the Model-Viewer-Controller approach? - Maybe the >> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >> it possible? > Hmm, that would be a good idea. > I'll see whether I can put something together. > The thing is, MVC approach looks rather silly and overengineered on a small example. > >> I appreciate gui_example.sce with just about 70 lines of code, two >> inputs and one output. I think something like it could help a lot of >> people ... and it's not 250 lines of code to get a GUI up and running, >> if you know what I mean. The gui_example shows a few differences, like >> white versus grey background, editable boxes, etc. In the outputs, >> because of the default grey background, you can see the dimensions of >> the grid / text-boxes, and gui_example has two buttons. It looks >> operational and easy to expand for new users. >> >> Cheers, >> Claus >> >> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>> Hello Claus, >>> >>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>> >>> Anywya, here is how I think your code could be improved: >>> >>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>> >>> I attached a small gui I use to illustrate optical anti-reflection coating. >>> It is far from perfect (I did not implement a proper model-view-controler for example). >>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>> >>> Hope it helps, >>> >>> Antoine >>> >>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>> >>>> Hi there >>>> >>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>> really simple example of what I'm trying to do. How can I make the >>>> "conditional" GUI output work and not have it inside the calc function? >>>> ... or, how would you do it? Thanks. >>>> >>>> Best regards, Claus. >>>> >>>> // GUI_EXAMPLE.SCE >>>> // >>>> // Demo of how to build a simple GUI in Scilab. >>>> // Real simple, with two input variables and one output. >>>> // The example uses the basic mechanical example of a mass and a spring as >>>> // input parameters and calculates the resonance frequency of the mechanical >>>> // system. >>>> >>>> // Initialize variables >>>> m = 1; // Moving mass 'm'(kilogram) >>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>> fres = 1; // Resonance frequency (Hertz) >>>> show_result = %f; >>>> >>>> function calc() >>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>> fres = sqrt(m * k); >>>> // putting GUI updates inside the calculation routine is not pretty code. >>>> uicontrol("style","text","string","Result :","position", .. >>>> [10 as(2)-110 80 20]); >>>> uicontrol("style","text","string",string(fres), .. >>>> "position",[100 as(2)-110 80 20]); >>>> uicontrol("style","text","string","Hz ","position", .. >>>> [200 as(2)-110 30 20]); >>>> show_result = %t; >>>> // update global variables >>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>> endfunction >>>> >>>> function goodbye() >>>> close(ge); // Close GUI window >>>> printf("Resulting fres: %f Hertz\n",fres); >>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>> endfunction >>>> >>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>> as = ge.axes_size; // read size of window, as = [width height] >>>> ge.figure_name = "GUI Example"; // Change window header >>>> >>>> uicontrol("style","text","string","Moving mass :","position", .. >>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>> // position properties has four parameters = x,y,width,height >>>> // y-position counts from lower left corner, so we subtract from 'as' >>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>> "position",[100 as(2)-35 80 20]); >>>> uicontrol("style","text","string","kg ","position", .. >>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>> >>>> uicontrol("style","text","string","Stiffness :","position", .. >>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>> "position",[100 as(2)-60 80 20]); >>>> uicontrol("style","text","string","N/m ","position", .. >>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>> >>>> uicontrol("style","pushbutton","string","Calculate", .. >>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>> >>>> // How do I make this "conditional"output show up in my GUI? >>>> if show_result then // If "Calculate"button was pushed at least once ... >>>> uicontrol("style","text","string","Result :","position", .. >>>> [10 as(2)-110 80 20]); >>>> uicontrol("style","text","string",string(fres), .. >>>> "position",[100 as(2)-110 80 20]); >>>> uicontrol("style","text","string","Hz ","position", .. >>>> [200 as(2)-110 30 20]); >>>> end >>>> >>>> uicontrol("style","pushbutton","string","Exit", .. >>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>> >>>> >>>> _______________________________________________ >>>> 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 sgougeon at free.fr Thu Nov 28 20:25:04 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Nov 2019 20:25:04 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <41a234ff-4311-dfa2-d528-d990be470f06@gmail.com> References: <2220-5ddffa00-23-1dedcee0@66322596> <41a234ff-4311-dfa2-d528-d990be470f06@gmail.com> Message-ID: <4713f361-e8d8-7492-29bf-5a9424aa4823@free.fr> Le 28/11/2019 ? 19:40, Claus Futtrup a ?crit?: > Hi Antoine > > Also, you should better use get(a, 'propertyName') or set(a, > 'propertyName', value) instead of a.propertyName and > a.propertyName=value in your callbacks. Why? It should be strictly equivalent, doesn't it? From sgougeon at free.fr Thu Nov 28 20:35:55 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Nov 2019 20:35:55 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: <63706982-5b59-9cdd-1e82-5b22c155f20d@free.fr> Le 28/11/2019 ? 18:54, Stefan Du Rietz a ?crit?: > > I do that and it is very convenient. I also save my GUI data in a > struct() in the "user_data" of the parent figure of the GUI. Then I > don't need global variables or even findobj(). If the stored data are not handles, this could be a bit risky or buggy: The graphics may be updated in the meantime, unlike the stored data... that then get outdated. From sgougeon at free.fr Thu Nov 28 20:50:36 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Nov 2019 20:50:36 +0100 Subject: [Scilab-users] ?==?utf-8?q? GUI help In-Reply-To: <42ca-5ddf7e00-1b-369f1700@131521389> References: <42ca-5ddf7e00-1b-369f1700@131521389> Message-ID: <8dec8993-ebd3-f7a4-f7d3-8fc192330fcb@free.fr> Le 28/11/2019 ? 08:57, Antoine Monmayrant a ?crit?: > Hello Claus, > > I've been playing a bit with GUIs for teaching, so maybe I can help. > The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. > Do not hesitate to rephrase your issue, I'll try a more focused answer. > > Anywya, here is how I think your code could be improved: > > (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. > (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) > (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. get() and set() can now use a tagsPath, that might be less ambiguate than using findobj(), that returns the first component with a matching tag (unless only unique tags are defined). The documentation of set() is being overhauled . You may have a look to it there . The same work on the get()'s page is pending . > .../... > I attached a small gui I use to illustrate optical anti-reflection coating. There won't never be too much physics on FileExchange, you know :-) A physicist -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Nov 28 20:55:35 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Nov 2019 20:55:35 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <2220-5ddffa00-23-1dedcee0@66322596> References: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: <82fb6de3-7302-512f-83bd-77caba3eee9d@free.fr> Le 28/11/2019 ? 17:47, Antoine Monmayrant a ?crit?: > .../... > Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. > I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. OK. Now i remember, indeed, that some handle.prop access are badly parsed as reading or defining a structure instead of reading or setting the (expectedly) defined handle... From stephane.mottelet at utc.fr Thu Nov 28 22:16:19 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 28 Nov 2019 22:16:19 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: <687e56ad-cf04-070d-b0f6-a68051b8e263@utc.fr> Hello, Le 28/11/2019 ? 18:54, Stefan Du Rietz a ?crit?: >> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup >> a ?crit: >> ? I think you can achieve what you want by setting ".visible='off'" >> for all the uicontrols you don't want to show initialy. You can then >> set? ".visible='on'" after the first call to the callback (or at each >> call if you are lazy). > > I do that and it is very convenient. I also save my GUI data in a > struct() in the "user_data" of the parent figure of the GUI. So do I. Definitively the most handy way of? doing. > Then I don't need global variables or even findobj(). > > Regards > Stefan > _______________________________________________ > 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 sdr at durietz.se Thu Nov 28 22:20:02 2019 From: sdr at durietz.se (Stefan Du Rietz) Date: Thu, 28 Nov 2019 22:20:02 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <82fb6de3-7302-512f-83bd-77caba3eee9d@free.fr> References: <2220-5ddffa00-23-1dedcee0@66322596> <82fb6de3-7302-512f-83bd-77caba3eee9d@free.fr> Message-ID: <76515d65-8af3-61a1-0616-07c58c761bf0@durietz.se> On 2019-11-28 20:55, Samuel Gougeon wrote: > Le 28/11/2019 ? 17:47, Antoine Monmayrant a ?crit?: >> .../... >> Also, you should better use get(a, 'propertyName') or set(a, >> 'propertyName', value) instead of a.propertyName and >> a.propertyName=value in your callbacks. >> I have found that this latter syntax is causing a lot of bug if your >> callback get called really often. I still don't know why. > > > OK. Now i remember, indeed, that some handle.prop access are badly > parsed as reading or defining a structure instead of reading or setting > the (expectedly) defined handle... > > I have also noticed all that. But at last I managed to get it working. ;-) I had to 1. copy the structure from user_data 2. edit the copied structure 3. set user_data to the edited structure To Samuel 20:35: My GUI data.are handles exept a few things I update simultaneously when I change them.. Stefan From sgougeon at free.fr Thu Nov 28 23:20:14 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Nov 2019 23:20:14 +0100 Subject: [Scilab-users] Zooming the console with the mouse wheel Message-ID: <676c2b3e-c4e1-9329-9ffa-38089ac7b16d@free.fr> Hello, Do you know any shortcut key to zoom the Scilab console with the mouse wheel? CTRL|ALT|... + wheel do not work. The preferences do not show any defined shortcut to do this. But we have recently seen for figures that ALT+wheel exists without (yet) being documented... Thanks Samuel From fmiyara at fceia.unr.edu.ar Fri Nov 29 06:57:20 2019 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 29 Nov 2019 02:57:20 -0300 Subject: [Scilab-users] Confusion about types (typeof vs. Variabe Browser) Message-ID: <1dd34215-f9b7-e0da-8aa3-0ffd53f46ab2@fceia.unr.edu.ar> Dear all, I'm trying to elucidate some details regarding types. The most basic type, corresponding to real or complex decimal numbers (or vectors, matrices and hypermatrices with this kind of components) is called "constant" by the function typeof (and so listed in the documentation). However, the variable browser lists them as "double". This is somewhat confusing. It seems that "double" refers to the way each individual component is encoded while constant may refer to the fact that any array containing doubles is o type constant. In the case of integers, for instance we have int64 as reported by typeof, but in the Variable Browser it is listed a bit more in full as "Integer 64". While this is also slightly inconsistent, it is not to complain very much about. In the case of rationals, typeof returns "rational" while the Variable Browser callsit "r (Tlist)" Cell array type is called "ce" by typeof but "Cell" in the Variabe Browser User-defined types in tlists and mlists are designed by the user-defined type name by typeof, while the variable browser adds "(Tlist)" or "(Mlist)" Functions, libraries and impliit lists such as $ are not listed in the variable bowser but are correctly reported by typeof I wonder whether there is a reason for all this or it is actually an issue that could be fixed in a future versions. Thank you Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Fri Nov 29 10:20:50 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Fri, 29 Nov 2019 10:20:50 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBH?= =?utf-8?q?UI_hel?= In-Reply-To: <41a234ff-4311-dfa2-d528-d990be470f06@gmail.com> Message-ID: <4ec6-5de0e300-f-5a85950@126498237> Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: > Hi Antoine > > Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. > > > I see what you mean. I just now had trouble turning visibility on/off, > but using set(), it works fine. Thanks for the tip. It's something quite weird, maybe a race condition. I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. The initial bug report is here: http://bugzilla.scilab.org/show_bug.cgi?id=15786 Not much progress because I never managed to get a minimal working example (it's an Heisenbug). Antoine > > Best regards, > Claus > > On 28.11.2019 17:47, Antoine Monmayrant wrote: > > Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: > > > >> Hi Antoine, et al. > >> > >> Your reply is very helpful, so I think you got the right question :-) > >> > >> 1) Good point that I can use callback on every uicontrol. This would be > >> suitable for a simple example (like gui_example.sce) ... but for heavy > >> calculations, it might be more practical with a CALC button. P.S. The > >> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); > > You are right. > > Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. > > > >> 2) I see what you mean, so not having an empty space, but "show" the > >> whole she-bang from the beginning. I didn't want to do that (just > >> deleting the IF-statement), but it could be the best solution in the end > >> (rather than the inline GUI updates), if nothing better shows up. This > >> was somehow the "core" of my question. Maybe I ask for too much. > > I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). > > > >> 3) I will look into this. Thanks for the tip. > > Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. > > I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. > > > >> 4) I will also look into this. My problem is the steep learning curve. > >> If you look at the Scilab tutorials you have the good-old Openeering > >> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial > >> using the Model-Viewer-Controller approach? - Maybe the > >> Model-Viewer-Controller could be presented in a _simple_ tutorial - is > >> it possible? > > Hmm, that would be a good idea. > > I'll see whether I can put something together. > > The thing is, MVC approach looks rather silly and overengineered on a small example. > > > >> I appreciate gui_example.sce with just about 70 lines of code, two > >> inputs and one output. I think something like it could help a lot of > >> people ... and it's not 250 lines of code to get a GUI up and running, > >> if you know what I mean. The gui_example shows a few differences, like > >> white versus grey background, editable boxes, etc. In the outputs, > >> because of the default grey background, you can see the dimensions of > >> the grid / text-boxes, and gui_example has two buttons. It looks > >> operational and easy to expand for new users. > >> > >> Cheers, > >> Claus > >> > >> On 28.11.2019 08:57, Antoine Monmayrant wrote: > >>> Hello Claus, > >>> > >>> I've been playing a bit with GUIs for teaching, so maybe I can help. > >>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. > >>> Do not hesitate to rephrase your issue, I'll try a more focused answer. > >>> > >>> Anywya, here is how I think your code could be improved: > >>> > >>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. > >>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) > >>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. > >>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). > >>> > >>> I attached a small gui I use to illustrate optical anti-reflection coating. > >>> It is far from perfect (I did not implement a proper model-view-controler for example). > >>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. > >>> > >>> Hope it helps, > >>> > >>> Antoine > >>> > >>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: > >>> > >>>> Hi there > >>>> > >>>> I'm trying to build a GUI. For simplicity on the forum, I've built a > >>>> really simple example of what I'm trying to do. How can I make the > >>>> "conditional" GUI output work and not have it inside the calc function? > >>>> ... or, how would you do it? Thanks. > >>>> > >>>> Best regards, Claus. > >>>> > >>>> // GUI_EXAMPLE.SCE > >>>> // > >>>> // Demo of how to build a simple GUI in Scilab. > >>>> // Real simple, with two input variables and one output. > >>>> // The example uses the basic mechanical example of a mass and a spring as > >>>> // input parameters and calculates the resonance frequency of the mechanical > >>>> // system. > >>>> > >>>> // Initialize variables > >>>> m = 1; // Moving mass 'm'(kilogram) > >>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) > >>>> fres = 1; // Resonance frequency (Hertz) > >>>> show_result = %f; > >>>> > >>>> function calc() > >>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m > >>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k > >>>> fres = sqrt(m * k); > >>>> // putting GUI updates inside the calculation routine is not pretty code. > >>>> uicontrol("style","text","string","Result :","position", .. > >>>> [10 as(2)-110 80 20]); > >>>> uicontrol("style","text","string",string(fres), .. > >>>> "position",[100 as(2)-110 80 20]); > >>>> uicontrol("style","text","string","Hz ","position", .. > >>>> [200 as(2)-110 30 20]); > >>>> show_result = %t; > >>>> // update global variables > >>>> [m,k,fres,show_result]=return(m,k,fres,show_result); > >>>> endfunction > >>>> > >>>> function goodbye() > >>>> close(ge); // Close GUI window > >>>> printf("Resulting fres: %f Hertz\n",fres); > >>>> abort // Print result in console (e.g. for copy/paste), then kill the app > >>>> endfunction > >>>> > >>>> ge = scf(); // GUI Example, Initialize and 'set current figure' > >>>> as = ge.axes_size; // read size of window, as = [width height] > >>>> ge.figure_name = "GUI Example"; // Change window header > >>>> > >>>> uicontrol("style","text","string","Moving mass :","position", .. > >>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background > >>>> // position properties has four parameters = x,y,width,height > >>>> // y-position counts from lower left corner, so we subtract from 'as' > >>>> ge_m = uicontrol("style","edit","string",string(m), .. > >>>> "position",[100 as(2)-35 80 20]); > >>>> uicontrol("style","text","string","kg ","position", .. > >>>> [200 as(2)-35 30 20],"background",[1 1 1]); > >>>> > >>>> uicontrol("style","text","string","Stiffness :","position", .. > >>>> [10 as(2)-60 80 20],"background",[1 1 1]); > >>>> ge_k = uicontrol("style","edit","string",string(k), .. > >>>> "position",[100 as(2)-60 80 20]); > >>>> uicontrol("style","text","string","N/m ","position", .. > >>>> [200 as(2)-60 30 20],"background",[1 1 1]); > >>>> > >>>> uicontrol("style","pushbutton","string","Calculate", .. > >>>> "position",[10 as(2)-85 80 20],"callback","calc"); > >>>> > >>>> // How do I make this "conditional"output show up in my GUI? > >>>> if show_result then // If "Calculate"button was pushed at least once ... > >>>> uicontrol("style","text","string","Result :","position", .. > >>>> [10 as(2)-110 80 20]); > >>>> uicontrol("style","text","string",string(fres), .. > >>>> "position",[100 as(2)-110 80 20]); > >>>> uicontrol("style","text","string","Hz ","position", .. > >>>> [200 as(2)-110 30 20]); > >>>> end > >>>> > >>>> uicontrol("style","pushbutton","string","Exit", .. > >>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); > >>>> > >>>> > >>>> _______________________________________________ > >>>> 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 amonmayr at laas.fr Fri Nov 29 11:29:24 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Fri, 29 Nov 2019 11:29:24 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBH?= =?utf-8?q?UI_hel?= In-Reply-To: <82fb6de3-7302-512f-83bd-77caba3eee9d@free.fr> Message-ID: <47f3-5de0f300-43-663cf900@86700323> Le Jeudi, Novembre 28, 2019 20:55 CET, Samuel Gougeon a ?crit: > Le 28/11/2019 ? 17:47, Antoine Monmayrant a ?crit?: > > .../... > > Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. > > I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. > > > OK. Now i remember, indeed, that some handle.prop access are badly > parsed as reading or defining a structure instead of reading or setting > the (expectedly) defined handle... Yes, I spent some time to get a minimum working example, but without any success. Even with big gui scripts, I only faced issues 1 out 10 times. I faced the same kind of issues when creating complex plots with a big for loop to scan across "h.children.children" and set attributes. Antoine > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From amonmayr at laas.fr Fri Nov 29 12:28:48 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Fri, 29 Nov 2019 12:28:48 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBH?= =?utf-8?q?UI_hel?= In-Reply-To: <8dec8993-ebd3-f7a4-f7d3-8fc192330fcb@free.fr> Message-ID: <63fc-5de10100-d-68dc398@147029288> > get() and set() can now use a tagsPath, that might be less ambiguate > than using findobj(), that returns the first component with a matching > tag (unless only unique tags are defined). The documentation of set() is > being overhauled . You > may have a look to it there > . The same work on > the get()'s page is pending > . I tried to use your syntax in a callback and it does not work. The values returned are not the same than when using findobj and the old syntax (I always get the initial value for the uicontrol, not the updated ones). I'll try to get a minimal working example... Antoine From amonmayr at laas.fr Fri Nov 29 18:34:57 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Fri, 29 Nov 2019 18:34:57 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBH?= =?utf-8?q?UI_hel?= In-Reply-To: <2220-5ddffa00-23-1dedcee0@66322596> Message-ID: <18f9-5de15700-1f-8a41eb0@88494923> > > 4) I will also look into this. My problem is the steep learning curve. > > If you look at the Scilab tutorials you have the good-old Openeering > > LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial > > using the Model-Viewer-Controller approach? - Maybe the > > Model-Viewer-Controller could be presented in a _simple_ tutorial - is > > it possible? > > Hmm, that would be a good idea. > I'll see whether I can put something together. > The thing is, MVC approach looks rather silly and overengineered on a small example. I have not tried to follow a MWC approach, but here is my attempt at making a really simple GUI to just show the basics (see below). It take numbers from two different types of uicontrols (a slider and an edit) and display the sum in a text uicontrol. To keep things simple, I positioned and sized the uicontrols manually instead of using a gridbag. I also tried to use the fancy syntax for get() and set() that do not require calling findobj(), as suggested by Samuel. Hope it helps, Antoine f=figure(); /* ---------------- First number from slider ---------------- */ //values nmin=-5; nmax=10; nini=7; nsmallstep=1; nsbigstep=2; //slider position and size x=10; y=20; w=100; h=25; //slider uicontrol creation in figure f hslider=uicontrol(f, ... "style", "slider", ... "tag", "slider1", ... "backgroundcolor", [1 1 1], ... "position", [x y w h], ... "value", nini, ... "min", nmin, ... "max", nmax, ... "sliderstep", [nsmallstep, nsbigstep], ... "callback", "update_values"); /* ------------- Second number from an editable text ------------- */ // initial value editini="3.14"; //edit position and size x2=x; y2=y+h+5; w2=w; h2=h; //edit uicontrol creation in figure f hedit=uicontrol(f, ... "style", "edit", ... "tag", "edit2", ... "backgroundcolor", [1 1 1], ... "position", [x2 y2 w2 h2], ... "string", editini, ... "callback", "update_values"); /* ------------- Sum displayed in a text uicontrol ------------- */ // initial value textini="Nothing" //edit position and size x3=x+w+5; y3=y; w3=w; h3=2*h+5; //slider uicontrol creation htext=uicontrol(f, ... "style", "text", ... "tag", "text3", ... "backgroundcolor", [1 1 1], ... "position", [x3 y3 w3 h3], ... "string", textini); /* -------- callback function for slider and edit uicontrols -------- */ //Whenever user interacts with the slider or the edit uicontrols // show the sum of both numbers in the text field function update_values() //temporarily deactivate the callback (don't want callback calls to stack up while processing the current one set(gcbo,"callback_type",-1); /* Using the unique tag chosen at the creation time of the uicontrols to set/get the uicontrol properties */ //get both numbers from the slider and the edit uicontrols number1=get("slider1", "value"); string2=get("edit2", "string"); //do your maths & conversion string3=string(number1+evstr(string2)); //change the string displayed in the text uicontrol set("text3", "string", string3); //reactivate callback set(gcbo,"callback_type",0); endfunction From cfuttrup at gmail.com Fri Nov 29 18:58:11 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 29 Nov 2019 18:58:11 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <4ec6-5de0e300-f-5a85950@126498237> References: <4ec6-5de0e300-f-5a85950@126498237> Message-ID: Hi Antoine >Not much progress because I never managed to get a minimal working example I can repeat my example again and again. It never works. Please see it below. Do you agree. This consistently fails if you run it from Scinotes editor ... but if I copy e.g. ge_r.visible = "on" to the command line (not from within the calc function), then it shows up. /Claus // BAD_GUI_EXAMPLE.SCE // // Demo of how _NOT_ to build a simple GUI in Scilab. // Initialize variables m = 1; // Moving mass 'm'(kilogram) k = 1; // Stiffness, spring constant 'k'(Newton per meter) fres = 1; // Resonance frequency (Hertz) function calc() m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k fres=sqrt(k/m)/(2*%pi); // putting GUI updates inside the calculation routine is not pretty code. ge_r.visible = "on"; ge_fs.visible = "on"; // THIS DOESN'T WORK ge_hz.visible = "on"; // set(ge_r,"Visible","on"); // THIS WORKS // set(ge_fs,"Visible","on"); // set(ge_hz,"Visible","on"); // update global variables [m,k,fres]=return(m,k,fres); endfunction function goodbye() close(ge); // Close GUI window printf("Resulting fres: %f Hertz\n",fres); abort // Print result in console (e.g. for copy/paste), then kill the app endfunction ge = scf(); // GUI Example, Initialize and 'set current figure' as = ge.axes_size; // read size of window, as = [width height] ge.figure_name = "GUI Example"; // Change window header uicontrol("style","text","string","Moving mass :","position", .. [10 as(2)-35 80 20],"background",[1 1 1]); // white background // position properties has four parameters = x,y,width,height // y-position counts from lower left corner, so we subtract from 'as' ge_m = uicontrol("style","edit","string",string(m), .. "position",[100 as(2)-35 80 20]); uicontrol("style","text","string","kg ","position", .. [200 as(2)-35 30 20],"background",[1 1 1]); uicontrol("style","text","string","Stiffness :","position", .. [10 as(2)-60 80 20],"background",[1 1 1]); ge_k = uicontrol("style","edit","string",string(k), .. "position",[100 as(2)-60 80 20]); uicontrol("style","text","string","N/m ","position", .. [200 as(2)-60 30 20],"background",[1 1 1]); uicontrol("style","pushbutton","string","Calculate", .. "position",[10 as(2)-85 80 20],"callback","calc"); ge_r = uicontrol("style","text","string","Result :","position", .. [10 as(2)-110 80 20],"visible","off"); // keep these hidden for a start ge_fs = uicontrol("style","text","string",string(fres), .. "position",[100 as(2)-110 80 20],"visible","off"); ge_hz = uicontrol("style","text","string","Hz ","position", .. [200 as(2)-110 30 20],"visible","off"); uicontrol("style","pushbutton","string","Exit", .. "position",[10 as(2)-135 80 20],"callback","goodbye"); On 29.11.2019 10:20, Antoine Monmayrant wrote: > Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: > >> Hi Antoine >> >> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >> >> >> I see what you mean. I just now had trouble turning visibility on/off, >> but using set(), it works fine. Thanks for the tip. > It's something quite weird, maybe a race condition. > I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. > When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. > The initial bug report is here: http://bugzilla.scilab.org/show_bug.cgi?id=15786 > Not much progress because I never managed to get a minimal working example (it's an Heisenbug). > > Antoine > >> Best regards, >> Claus >> >> On 28.11.2019 17:47, Antoine Monmayrant wrote: >>> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: >>> >>>> Hi Antoine, et al. >>>> >>>> Your reply is very helpful, so I think you got the right question :-) >>>> >>>> 1) Good point that I can use callback on every uicontrol. This would be >>>> suitable for a simple example (like gui_example.sce) ... but for heavy >>>> calculations, it might be more practical with a CALC button. P.S. The >>>> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); >>> You are right. >>> Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. >>> >>>> 2) I see what you mean, so not having an empty space, but "show" the >>>> whole she-bang from the beginning. I didn't want to do that (just >>>> deleting the IF-statement), but it could be the best solution in the end >>>> (rather than the inline GUI updates), if nothing better shows up. This >>>> was somehow the "core" of my question. Maybe I ask for too much. >>> I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). >>> >>>> 3) I will look into this. Thanks for the tip. >>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>> I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. >>> >>>> 4) I will also look into this. My problem is the steep learning curve. >>>> If you look at the Scilab tutorials you have the good-old Openeering >>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>> using the Model-Viewer-Controller approach? - Maybe the >>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>> it possible? >>> Hmm, that would be a good idea. >>> I'll see whether I can put something together. >>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>> >>>> I appreciate gui_example.sce with just about 70 lines of code, two >>>> inputs and one output. I think something like it could help a lot of >>>> people ... and it's not 250 lines of code to get a GUI up and running, >>>> if you know what I mean. The gui_example shows a few differences, like >>>> white versus grey background, editable boxes, etc. In the outputs, >>>> because of the default grey background, you can see the dimensions of >>>> the grid / text-boxes, and gui_example has two buttons. It looks >>>> operational and easy to expand for new users. >>>> >>>> Cheers, >>>> Claus >>>> >>>> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>>>> Hello Claus, >>>>> >>>>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>>>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>>>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>>>> >>>>> Anywya, here is how I think your code could be improved: >>>>> >>>>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>>>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>>>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>>>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>>>> >>>>> I attached a small gui I use to illustrate optical anti-reflection coating. >>>>> It is far from perfect (I did not implement a proper model-view-controler for example). >>>>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>>>> >>>>> Hope it helps, >>>>> >>>>> Antoine >>>>> >>>>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>>>> >>>>>> Hi there >>>>>> >>>>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>>>> really simple example of what I'm trying to do. How can I make the >>>>>> "conditional" GUI output work and not have it inside the calc function? >>>>>> ... or, how would you do it? Thanks. >>>>>> >>>>>> Best regards, Claus. >>>>>> >>>>>> // GUI_EXAMPLE.SCE >>>>>> // >>>>>> // Demo of how to build a simple GUI in Scilab. >>>>>> // Real simple, with two input variables and one output. >>>>>> // The example uses the basic mechanical example of a mass and a spring as >>>>>> // input parameters and calculates the resonance frequency of the mechanical >>>>>> // system. >>>>>> >>>>>> // Initialize variables >>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>> show_result = %f; >>>>>> >>>>>> function calc() >>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>> fres = sqrt(m * k); >>>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>> [10 as(2)-110 80 20]); >>>>>> uicontrol("style","text","string",string(fres), .. >>>>>> "position",[100 as(2)-110 80 20]); >>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>> [200 as(2)-110 30 20]); >>>>>> show_result = %t; >>>>>> // update global variables >>>>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>>>> endfunction >>>>>> >>>>>> function goodbye() >>>>>> close(ge); // Close GUI window >>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>> endfunction >>>>>> >>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>> >>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>> // position properties has four parameters = x,y,width,height >>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>> "position",[100 as(2)-35 80 20]); >>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>> >>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>> "position",[100 as(2)-60 80 20]); >>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>> >>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>> >>>>>> // How do I make this "conditional"output show up in my GUI? >>>>>> if show_result then // If "Calculate"button was pushed at least once ... >>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>> [10 as(2)-110 80 20]); >>>>>> uicontrol("style","text","string",string(fres), .. >>>>>> "position",[100 as(2)-110 80 20]); >>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>> [200 as(2)-110 30 20]); >>>>>> end >>>>>> >>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Nov 29 19:05:14 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 29 Nov 2019 19:05:14 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <4ec6-5de0e300-f-5a85950@126498237> Message-ID: To makeit work, just insert ge_r=ge_r; ge_fs=ge_fs; ge_hz=ge_hz; at the begining of function calc. My two cents... S. Le 29/11/2019 ? 18:58, Claus Futtrup a ?crit?: > Hi Antoine > > >Not much progress because I never managed to get a minimal working example > I can repeat my example again and again. It never works. Please see it > below. > > Do you agree. This consistently fails if you run it from Scinotes > editor ... but if I copy e.g. ge_r.visible = "on" to the command line > (not from within the calc function), then it shows up. > > /Claus > > // BAD_GUI_EXAMPLE.SCE > // > // Demo of how _NOT_ to build a simple GUI in Scilab. > > // Initialize variables > m = 1; // Moving mass 'm'(kilogram) > k = 1; // Stiffness, spring constant 'k'(Newton per meter) > fres = 1; // Resonance frequency (Hertz) > > function calc() > m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m > k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k > fres=sqrt(k/m)/(2*%pi); > // putting GUI updates inside the calculation routine is not pretty code. > ge_r.visible = "on"; > ge_fs.visible = "on"; // THIS DOESN'T WORK > ge_hz.visible = "on"; > // set(ge_r,"Visible","on"); // THIS WORKS > // set(ge_fs,"Visible","on"); > // set(ge_hz,"Visible","on"); > // update global variables > [m,k,fres]=return(m,k,fres); > endfunction > > function goodbye() > close(ge); // Close GUI window > printf("Resulting fres: %f Hertz\n",fres); > abort // Print result in console (e.g. for copy/paste), then kill the app > endfunction > > ge = scf(); // GUI Example, Initialize and 'set current figure' > as = ge.axes_size; // read size of window, as = [width height] > ge.figure_name = "GUI Example"; // Change window header > > uicontrol("style","text","string","Moving mass :","position", .. > [10 as(2)-35 80 20],"background",[1 1 1]); // white background > // position properties has four parameters = x,y,width,height > // y-position counts from lower left corner, so we subtract from 'as' > ge_m = uicontrol("style","edit","string",string(m), .. > "position",[100 as(2)-35 80 20]); > uicontrol("style","text","string","kg ","position", .. > [200 as(2)-35 30 20],"background",[1 1 1]); > > uicontrol("style","text","string","Stiffness :","position", .. > [10 as(2)-60 80 20],"background",[1 1 1]); > ge_k = uicontrol("style","edit","string",string(k), .. > "position",[100 as(2)-60 80 20]); > uicontrol("style","text","string","N/m ","position", .. > [200 as(2)-60 30 20],"background",[1 1 1]); > > uicontrol("style","pushbutton","string","Calculate", .. > "position",[10 as(2)-85 80 20],"callback","calc"); > > ge_r = uicontrol("style","text","string","Result :","position", .. > [10 as(2)-110 80 20],"visible","off"); // keep these hidden for a start > ge_fs = uicontrol("style","text","string",string(fres), .. > "position",[100 as(2)-110 80 20],"visible","off"); > ge_hz = uicontrol("style","text","string","Hz ","position", .. > [200 as(2)-110 30 20],"visible","off"); > > uicontrol("style","pushbutton","string","Exit", .. > "position",[10 as(2)-135 80 20],"callback","goodbye"); > > On 29.11.2019 10:20, Antoine Monmayrant wrote: >> Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: >> >>> Hi Antoine >>> >>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>> >>> >>> I see what you mean. I just now had trouble turning visibility on/off, >>> but using set(), it works fine. Thanks for the tip. >> It's something quite weird, maybe a race condition. >> I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. >> When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. >> The initial bug report is here:http://bugzilla.scilab.org/show_bug.cgi?id=15786 >> Not much progress because I never managed to get a minimal working example (it's an Heisenbug). >> >> Antoine >> >>> Best regards, >>> Claus >>> >>> On 28.11.2019 17:47, Antoine Monmayrant wrote: >>>> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: >>>> >>>>> Hi Antoine, et al. >>>>> >>>>> Your reply is very helpful, so I think you got the right question :-) >>>>> >>>>> 1) Good point that I can use callback on every uicontrol. This would be >>>>> suitable for a simple example (like gui_example.sce) ... but for heavy >>>>> calculations, it might be more practical with a CALC button. P.S. The >>>>> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); >>>> You are right. >>>> Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. >>>> >>>>> 2) I see what you mean, so not having an empty space, but "show" the >>>>> whole she-bang from the beginning. I didn't want to do that (just >>>>> deleting the IF-statement), but it could be the best solution in the end >>>>> (rather than the inline GUI updates), if nothing better shows up. This >>>>> was somehow the "core" of my question. Maybe I ask for too much. >>>> I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). >>>> >>>>> 3) I will look into this. Thanks for the tip. >>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>> I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. >>>> >>>>> 4) I will also look into this. My problem is the steep learning curve. >>>>> If you look at the Scilab tutorials you have the good-old Openeering >>>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>>> using the Model-Viewer-Controller approach? - Maybe the >>>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>>> it possible? >>>> Hmm, that would be a good idea. >>>> I'll see whether I can put something together. >>>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>>> >>>>> I appreciate gui_example.sce with just about 70 lines of code, two >>>>> inputs and one output. I think something like it could help a lot of >>>>> people ... and it's not 250 lines of code to get a GUI up and running, >>>>> if you know what I mean. The gui_example shows a few differences, like >>>>> white versus grey background, editable boxes, etc. In the outputs, >>>>> because of the default grey background, you can see the dimensions of >>>>> the grid / text-boxes, and gui_example has two buttons. It looks >>>>> operational and easy to expand for new users. >>>>> >>>>> Cheers, >>>>> Claus >>>>> >>>>> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>>>>> Hello Claus, >>>>>> >>>>>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>>>>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>>>>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>>>>> >>>>>> Anywya, here is how I think your code could be improved: >>>>>> >>>>>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>>>>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>>>>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>>>>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>>>>> >>>>>> I attached a small gui I use to illustrate optical anti-reflection coating. >>>>>> It is far from perfect (I did not implement a proper model-view-controler for example). >>>>>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>>>>> >>>>>> Hope it helps, >>>>>> >>>>>> Antoine >>>>>> >>>>>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>>>>> >>>>>>> Hi there >>>>>>> >>>>>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>>>>> really simple example of what I'm trying to do. How can I make the >>>>>>> "conditional" GUI output work and not have it inside the calc function? >>>>>>> ... or, how would you do it? Thanks. >>>>>>> >>>>>>> Best regards, Claus. >>>>>>> >>>>>>> // GUI_EXAMPLE.SCE >>>>>>> // >>>>>>> // Demo of how to build a simple GUI in Scilab. >>>>>>> // Real simple, with two input variables and one output. >>>>>>> // The example uses the basic mechanical example of a mass and a spring as >>>>>>> // input parameters and calculates the resonance frequency of the mechanical >>>>>>> // system. >>>>>>> >>>>>>> // Initialize variables >>>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>>> show_result = %f; >>>>>>> >>>>>>> function calc() >>>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>>> fres = sqrt(m * k); >>>>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>> [10 as(2)-110 80 20]); >>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>> [200 as(2)-110 30 20]); >>>>>>> show_result = %t; >>>>>>> // update global variables >>>>>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>>>>> endfunction >>>>>>> >>>>>>> function goodbye() >>>>>>> close(ge); // Close GUI window >>>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>>> endfunction >>>>>>> >>>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>>> >>>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>>> // position properties has four parameters = x,y,width,height >>>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>>> "position",[100 as(2)-35 80 20]); >>>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>>> >>>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>>> "position",[100 as(2)-60 80 20]); >>>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>>> >>>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>>> >>>>>>> // How do I make this "conditional"output show up in my GUI? >>>>>>> if show_result then // If "Calculate"button was pushed at least once ... >>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>> [10 as(2)-110 80 20]); >>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>> [200 as(2)-110 30 20]); >>>>>>> end >>>>>>> >>>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 > 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 cfuttrup at gmail.com Fri Nov 29 19:12:55 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 29 Nov 2019 19:12:55 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <18f9-5de15700-1f-8a41eb0@88494923> References: <18f9-5de15700-1f-8a41eb0@88494923> Message-ID: Hi Antoine Thank you, with just 82 lines (incl. comments) it's within reason and I'm thinking it could be a suitable example for Scilab documentation. I shall study the details and see how it works out in my application (that I'm doing for work). Cheers, Claus On 29.11.2019 18:34, Antoine Monmayrant wrote: >>> 4) I will also look into this. My problem is the steep learning curve. >>> If you look at the Scilab tutorials you have the good-old Openeering >>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>> using the Model-Viewer-Controller approach? - Maybe the >>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>> it possible? >> Hmm, that would be a good idea. >> I'll see whether I can put something together. >> The thing is, MVC approach looks rather silly and overengineered on a small example. > I have not tried to follow a MWC approach, but here is my attempt at making a really simple GUI to just show the basics (see below). > It take numbers from two different types of uicontrols (a slider and an edit) and display the sum in a text uicontrol. > To keep things simple, I positioned and sized the uicontrols manually instead of using a gridbag. > I also tried to use the fancy syntax for get() and set() that do not require calling findobj(), as suggested by Samuel. > > Hope it helps, > > Antoine > > > f=figure(); > > /* ---------------- First number from slider ---------------- */ > //values > nmin=-5; > nmax=10; > nini=7; > nsmallstep=1; > nsbigstep=2; > //slider position and size > x=10; > y=20; > w=100; > h=25; > //slider uicontrol creation in figure f > hslider=uicontrol(f, ... > "style", "slider", ... > "tag", "slider1", ... > "backgroundcolor", [1 1 1], ... > "position", [x y w h], ... > "value", nini, ... > "min", nmin, ... > "max", nmax, ... > "sliderstep", [nsmallstep, nsbigstep], ... > "callback", "update_values"); > > /* ------------- Second number from an editable text ------------- */ > // initial value > editini="3.14"; > //edit position and size > x2=x; > y2=y+h+5; > w2=w; > h2=h; > //edit uicontrol creation in figure f > hedit=uicontrol(f, ... > "style", "edit", ... > "tag", "edit2", ... > "backgroundcolor", [1 1 1], ... > "position", [x2 y2 w2 h2], ... > "string", editini, ... > "callback", "update_values"); > > /* ------------- Sum displayed in a text uicontrol ------------- */ > // initial value > textini="Nothing" > //edit position and size > x3=x+w+5; > y3=y; > w3=w; > h3=2*h+5; > //slider uicontrol creation > htext=uicontrol(f, ... > "style", "text", ... > "tag", "text3", ... > "backgroundcolor", [1 1 1], ... > "position", [x3 y3 w3 h3], ... > "string", textini); > > /* -------- callback function for slider and edit uicontrols -------- */ > //Whenever user interacts with the slider or the edit uicontrols > // show the sum of both numbers in the text field > function update_values() > //temporarily deactivate the callback (don't want callback calls to stack up while processing the current one > set(gcbo,"callback_type",-1); > /* > Using the unique tag chosen at the creation time of the uicontrols > to set/get the uicontrol properties > */ > //get both numbers from the slider and the edit uicontrols > number1=get("slider1", "value"); > string2=get("edit2", "string"); > //do your maths & conversion > string3=string(number1+evstr(string2)); > //change the string displayed in the text uicontrol > set("text3", "string", string3); > //reactivate callback > set(gcbo,"callback_type",0); > endfunction > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From cfuttrup at gmail.com Fri Nov 29 19:17:27 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 29 Nov 2019 19:17:27 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <4ec6-5de0e300-f-5a85950@126498237> Message-ID: <2e1d3532-08a5-9da6-5785-ed1df2403a98@gmail.com> Hi St?phane Hm, you're right. This actually fixes the problem, but I do find it to be a strange "solution" that you write each of them to be equal with itself ... I prefer calling the set() function. Cheers, Claus On 29.11.2019 19:05, St?phane Mottelet wrote: > To makeit work, just insert > > ge_r=ge_r; > ge_fs=ge_fs; > ge_hz=ge_hz; > > at the begining of function calc. > > My two cents... > > S. > > > Le 29/11/2019 ? 18:58, Claus Futtrup a ?crit?: >> Hi Antoine >> >> >Not much progress because I never managed to get a minimal working example >> I can repeat my example again and again. It never works. Please see >> it below. >> >> Do you agree. This consistently fails if you run it from Scinotes >> editor ... but if I copy e.g. ge_r.visible = "on" to the command line >> (not from within the calc function), then it shows up. >> >> /Claus >> >> // BAD_GUI_EXAMPLE.SCE >> // >> // Demo of how _NOT_ to build a simple GUI in Scilab. >> >> // Initialize variables >> m = 1; // Moving mass 'm'(kilogram) >> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >> fres = 1; // Resonance frequency (Hertz) >> >> function calc() >> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >> fres=sqrt(k/m)/(2*%pi); >> // putting GUI updates inside the calculation routine is not pretty code. >> ge_r.visible = "on"; >> ge_fs.visible = "on"; // THIS DOESN'T WORK >> ge_hz.visible = "on"; >> // set(ge_r,"Visible","on"); // THIS WORKS >> // set(ge_fs,"Visible","on"); >> // set(ge_hz,"Visible","on"); >> // update global variables >> [m,k,fres]=return(m,k,fres); >> endfunction >> >> function goodbye() >> close(ge); // Close GUI window >> printf("Resulting fres: %f Hertz\n",fres); >> abort // Print result in console (e.g. for copy/paste), then kill the app >> endfunction >> >> ge = scf(); // GUI Example, Initialize and 'set current figure' >> as = ge.axes_size; // read size of window, as = [width height] >> ge.figure_name = "GUI Example"; // Change window header >> >> uicontrol("style","text","string","Moving mass :","position", .. >> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >> // position properties has four parameters = x,y,width,height >> // y-position counts from lower left corner, so we subtract from 'as' >> ge_m = uicontrol("style","edit","string",string(m), .. >> "position",[100 as(2)-35 80 20]); >> uicontrol("style","text","string","kg ","position", .. >> [200 as(2)-35 30 20],"background",[1 1 1]); >> >> uicontrol("style","text","string","Stiffness :","position", .. >> [10 as(2)-60 80 20],"background",[1 1 1]); >> ge_k = uicontrol("style","edit","string",string(k), .. >> "position",[100 as(2)-60 80 20]); >> uicontrol("style","text","string","N/m ","position", .. >> [200 as(2)-60 30 20],"background",[1 1 1]); >> >> uicontrol("style","pushbutton","string","Calculate", .. >> "position",[10 as(2)-85 80 20],"callback","calc"); >> >> ge_r = uicontrol("style","text","string","Result :","position", .. >> [10 as(2)-110 80 20],"visible","off"); // keep these hidden for a start >> ge_fs = uicontrol("style","text","string",string(fres), .. >> "position",[100 as(2)-110 80 20],"visible","off"); >> ge_hz = uicontrol("style","text","string","Hz ","position", .. >> [200 as(2)-110 30 20],"visible","off"); >> >> uicontrol("style","pushbutton","string","Exit", .. >> "position",[10 as(2)-135 80 20],"callback","goodbye"); >> >> On 29.11.2019 10:20, Antoine Monmayrant wrote: >>> Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: >>> >>>> Hi Antoine >>>> >>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>> >>>> >>>> I see what you mean. I just now had trouble turning visibility on/off, >>>> but using set(), it works fine. Thanks for the tip. >>> It's something quite weird, maybe a race condition. >>> I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. >>> When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. >>> The initial bug report is here:http://bugzilla.scilab.org/show_bug.cgi?id=15786 >>> Not much progress because I never managed to get a minimal working example (it's an Heisenbug). >>> >>> Antoine >>> >>>> Best regards, >>>> Claus >>>> >>>> On 28.11.2019 17:47, Antoine Monmayrant wrote: >>>>> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: >>>>> >>>>>> Hi Antoine, et al. >>>>>> >>>>>> Your reply is very helpful, so I think you got the right question :-) >>>>>> >>>>>> 1) Good point that I can use callback on every uicontrol. This would be >>>>>> suitable for a simple example (like gui_example.sce) ... but for heavy >>>>>> calculations, it might be more practical with a CALC button. P.S. The >>>>>> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); >>>>> You are right. >>>>> Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. >>>>> >>>>>> 2) I see what you mean, so not having an empty space, but "show" the >>>>>> whole she-bang from the beginning. I didn't want to do that (just >>>>>> deleting the IF-statement), but it could be the best solution in the end >>>>>> (rather than the inline GUI updates), if nothing better shows up. This >>>>>> was somehow the "core" of my question. Maybe I ask for too much. >>>>> I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). >>>>> >>>>>> 3) I will look into this. Thanks for the tip. >>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>> I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. >>>>> >>>>>> 4) I will also look into this. My problem is the steep learning curve. >>>>>> If you look at the Scilab tutorials you have the good-old Openeering >>>>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>>>> using the Model-Viewer-Controller approach? - Maybe the >>>>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>>>> it possible? >>>>> Hmm, that would be a good idea. >>>>> I'll see whether I can put something together. >>>>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>>>> >>>>>> I appreciate gui_example.sce with just about 70 lines of code, two >>>>>> inputs and one output. I think something like it could help a lot of >>>>>> people ... and it's not 250 lines of code to get a GUI up and running, >>>>>> if you know what I mean. The gui_example shows a few differences, like >>>>>> white versus grey background, editable boxes, etc. In the outputs, >>>>>> because of the default grey background, you can see the dimensions of >>>>>> the grid / text-boxes, and gui_example has two buttons. It looks >>>>>> operational and easy to expand for new users. >>>>>> >>>>>> Cheers, >>>>>> Claus >>>>>> >>>>>> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>>>>>> Hello Claus, >>>>>>> >>>>>>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>>>>>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>>>>>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>>>>>> >>>>>>> Anywya, here is how I think your code could be improved: >>>>>>> >>>>>>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>>>>>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>>>>>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>>>>>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>>>>>> >>>>>>> I attached a small gui I use to illustrate optical anti-reflection coating. >>>>>>> It is far from perfect (I did not implement a proper model-view-controler for example). >>>>>>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>>>>>> >>>>>>> Hope it helps, >>>>>>> >>>>>>> Antoine >>>>>>> >>>>>>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>>>>>> >>>>>>>> Hi there >>>>>>>> >>>>>>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>>>>>> really simple example of what I'm trying to do. How can I make the >>>>>>>> "conditional" GUI output work and not have it inside the calc function? >>>>>>>> ... or, how would you do it? Thanks. >>>>>>>> >>>>>>>> Best regards, Claus. >>>>>>>> >>>>>>>> // GUI_EXAMPLE.SCE >>>>>>>> // >>>>>>>> // Demo of how to build a simple GUI in Scilab. >>>>>>>> // Real simple, with two input variables and one output. >>>>>>>> // The example uses the basic mechanical example of a mass and a spring as >>>>>>>> // input parameters and calculates the resonance frequency of the mechanical >>>>>>>> // system. >>>>>>>> >>>>>>>> // Initialize variables >>>>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>>>> show_result = %f; >>>>>>>> >>>>>>>> function calc() >>>>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>>>> fres = sqrt(m * k); >>>>>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>> [10 as(2)-110 80 20]); >>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>> [200 as(2)-110 30 20]); >>>>>>>> show_result = %t; >>>>>>>> // update global variables >>>>>>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>>>>>> endfunction >>>>>>>> >>>>>>>> function goodbye() >>>>>>>> close(ge); // Close GUI window >>>>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>>>> endfunction >>>>>>>> >>>>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>>>> >>>>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>>>> // position properties has four parameters = x,y,width,height >>>>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>>>> "position",[100 as(2)-35 80 20]); >>>>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>>>> >>>>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>>>> "position",[100 as(2)-60 80 20]); >>>>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>>>> >>>>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>>>> >>>>>>>> // How do I make this "conditional"output show up in my GUI? >>>>>>>> if show_result then // If "Calculate"button was pushed at least once ... >>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>> [10 as(2)-110 80 20]); >>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>> [200 as(2)-110 30 20]); >>>>>>>> end >>>>>>>> >>>>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Nov 29 19:21:14 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 29 Nov 2019 19:21:14 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <2e1d3532-08a5-9da6-5785-ed1df2403a98@gmail.com> References: <4ec6-5de0e300-f-5a85950@126498237> <2e1d3532-08a5-9da6-5785-ed1df2403a98@gmail.com> Message-ID: Le 29/11/2019 ? 19:17, Claus Futtrup a ?crit?: > Hi St?phane > > Hm, you're right. This actually fixes the problem, but I do find it to > be a strange "solution" that you write each of them to be equal with > itself ... I prefer calling the set() function. In "ge_fs=ge_fs" the lhs is a local copy and the rhs the variable in the calling context. > > Cheers, > Claus > > On 29.11.2019 19:05, St?phane Mottelet wrote: >> To makeit work, just insert >> >> ge_r=ge_r; >> ge_fs=ge_fs; >> ge_hz=ge_hz; >> >> at the begining of function calc. >> >> My two cents... >> >> S. >> >> >> Le 29/11/2019 ? 18:58, Claus Futtrup a ?crit?: >>> Hi Antoine >>> >>> >Not much progress because I never managed to get a minimal working example >>> I can repeat my example again and again. It never works. Please see >>> it below. >>> >>> Do you agree. This consistently fails if you run it from Scinotes >>> editor ... but if I copy e.g. ge_r.visible = "on" to the command >>> line (not from within the calc function), then it shows up. >>> >>> /Claus >>> >>> // BAD_GUI_EXAMPLE.SCE >>> // >>> // Demo of how _NOT_ to build a simple GUI in Scilab. >>> >>> // Initialize variables >>> m = 1; // Moving mass 'm'(kilogram) >>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>> fres = 1; // Resonance frequency (Hertz) >>> >>> function calc() >>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>> fres=sqrt(k/m)/(2*%pi); >>> // putting GUI updates inside the calculation routine is not pretty >>> code. >>> ge_r.visible = "on"; >>> ge_fs.visible = "on"; // THIS DOESN'T WORK >>> ge_hz.visible = "on"; >>> // set(ge_r,"Visible","on"); // THIS WORKS >>> // set(ge_fs,"Visible","on"); >>> // set(ge_hz,"Visible","on"); >>> // update global variables >>> [m,k,fres]=return(m,k,fres); >>> endfunction >>> >>> function goodbye() >>> close(ge); // Close GUI window >>> printf("Resulting fres: %f Hertz\n",fres); >>> abort // Print result in console (e.g. for copy/paste), then kill the app >>> endfunction >>> >>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>> as = ge.axes_size; // read size of window, as = [width height] >>> ge.figure_name = "GUI Example"; // Change window header >>> >>> uicontrol("style","text","string","Moving mass :","position", .. >>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>> // position properties has four parameters = x,y,width,height >>> // y-position counts from lower left corner, so we subtract from 'as' >>> ge_m = uicontrol("style","edit","string",string(m), .. >>> "position",[100 as(2)-35 80 20]); >>> uicontrol("style","text","string","kg ","position", .. >>> [200 as(2)-35 30 20],"background",[1 1 1]); >>> >>> uicontrol("style","text","string","Stiffness :","position", .. >>> [10 as(2)-60 80 20],"background",[1 1 1]); >>> ge_k = uicontrol("style","edit","string",string(k), .. >>> "position",[100 as(2)-60 80 20]); >>> uicontrol("style","text","string","N/m ","position", .. >>> [200 as(2)-60 30 20],"background",[1 1 1]); >>> >>> uicontrol("style","pushbutton","string","Calculate", .. >>> "position",[10 as(2)-85 80 20],"callback","calc"); >>> >>> ge_r = uicontrol("style","text","string","Result :","position", .. >>> [10 as(2)-110 80 20],"visible","off"); // keep these hidden for a start >>> ge_fs = uicontrol("style","text","string",string(fres), .. >>> "position",[100 as(2)-110 80 20],"visible","off"); >>> ge_hz = uicontrol("style","text","string","Hz ","position", .. >>> [200 as(2)-110 30 20],"visible","off"); >>> >>> uicontrol("style","pushbutton","string","Exit", .. >>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>> >>> On 29.11.2019 10:20, Antoine Monmayrant wrote: >>>> Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: >>>> >>>>> Hi Antoine >>>>> >>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>> >>>>> >>>>> I see what you mean. I just now had trouble turning visibility on/off, >>>>> but using set(), it works fine. Thanks for the tip. >>>> It's something quite weird, maybe a race condition. >>>> I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. >>>> When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. >>>> The initial bug report is here:http://bugzilla.scilab.org/show_bug.cgi?id=15786 >>>> Not much progress because I never managed to get a minimal working example (it's an Heisenbug). >>>> >>>> Antoine >>>> >>>>> Best regards, >>>>> Claus >>>>> >>>>> On 28.11.2019 17:47, Antoine Monmayrant wrote: >>>>>> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: >>>>>> >>>>>>> Hi Antoine, et al. >>>>>>> >>>>>>> Your reply is very helpful, so I think you got the right question :-) >>>>>>> >>>>>>> 1) Good point that I can use callback on every uicontrol. This would be >>>>>>> suitable for a simple example (like gui_example.sce) ... but for heavy >>>>>>> calculations, it might be more practical with a CALC button. P.S. The >>>>>>> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); >>>>>> You are right. >>>>>> Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. >>>>>> >>>>>>> 2) I see what you mean, so not having an empty space, but "show" the >>>>>>> whole she-bang from the beginning. I didn't want to do that (just >>>>>>> deleting the IF-statement), but it could be the best solution in the end >>>>>>> (rather than the inline GUI updates), if nothing better shows up. This >>>>>>> was somehow the "core" of my question. Maybe I ask for too much. >>>>>> I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). >>>>>> >>>>>>> 3) I will look into this. Thanks for the tip. >>>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>>> I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. >>>>>> >>>>>>> 4) I will also look into this. My problem is the steep learning curve. >>>>>>> If you look at the Scilab tutorials you have the good-old Openeering >>>>>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>>>>> using the Model-Viewer-Controller approach? - Maybe the >>>>>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>>>>> it possible? >>>>>> Hmm, that would be a good idea. >>>>>> I'll see whether I can put something together. >>>>>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>>>>> >>>>>>> I appreciate gui_example.sce with just about 70 lines of code, two >>>>>>> inputs and one output. I think something like it could help a lot of >>>>>>> people ... and it's not 250 lines of code to get a GUI up and running, >>>>>>> if you know what I mean. The gui_example shows a few differences, like >>>>>>> white versus grey background, editable boxes, etc. In the outputs, >>>>>>> because of the default grey background, you can see the dimensions of >>>>>>> the grid / text-boxes, and gui_example has two buttons. It looks >>>>>>> operational and easy to expand for new users. >>>>>>> >>>>>>> Cheers, >>>>>>> Claus >>>>>>> >>>>>>> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>>>>>>> Hello Claus, >>>>>>>> >>>>>>>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>>>>>>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>>>>>>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>>>>>>> >>>>>>>> Anywya, here is how I think your code could be improved: >>>>>>>> >>>>>>>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>>>>>>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>>>>>>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>>>>>>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>>>>>>> >>>>>>>> I attached a small gui I use to illustrate optical anti-reflection coating. >>>>>>>> It is far from perfect (I did not implement a proper model-view-controler for example). >>>>>>>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>>>>>>> >>>>>>>> Hope it helps, >>>>>>>> >>>>>>>> Antoine >>>>>>>> >>>>>>>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>>>>>>> >>>>>>>>> Hi there >>>>>>>>> >>>>>>>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>>>>>>> really simple example of what I'm trying to do. How can I make the >>>>>>>>> "conditional" GUI output work and not have it inside the calc function? >>>>>>>>> ... or, how would you do it? Thanks. >>>>>>>>> >>>>>>>>> Best regards, Claus. >>>>>>>>> >>>>>>>>> // GUI_EXAMPLE.SCE >>>>>>>>> // >>>>>>>>> // Demo of how to build a simple GUI in Scilab. >>>>>>>>> // Real simple, with two input variables and one output. >>>>>>>>> // The example uses the basic mechanical example of a mass and a spring as >>>>>>>>> // input parameters and calculates the resonance frequency of the mechanical >>>>>>>>> // system. >>>>>>>>> >>>>>>>>> // Initialize variables >>>>>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>>>>> show_result = %f; >>>>>>>>> >>>>>>>>> function calc() >>>>>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>>>>> fres = sqrt(m * k); >>>>>>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>> show_result = %t; >>>>>>>>> // update global variables >>>>>>>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>>>>>>> endfunction >>>>>>>>> >>>>>>>>> function goodbye() >>>>>>>>> close(ge); // Close GUI window >>>>>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>>>>> endfunction >>>>>>>>> >>>>>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>>>>> >>>>>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>>>>> // position properties has four parameters = x,y,width,height >>>>>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>>>>> "position",[100 as(2)-35 80 20]); >>>>>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>>>>> >>>>>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>>>>> "position",[100 as(2)-60 80 20]); >>>>>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>>>>> >>>>>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>>>>> >>>>>>>>> // How do I make this "conditional"output show up in my GUI? >>>>>>>>> if show_result then // If "Calculate"button was pushed at least once ... >>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>> end >>>>>>>>> >>>>>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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 >>> 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 > > > > _______________________________________________ > 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 cfuttrup at gmail.com Fri Nov 29 19:27:11 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 29 Nov 2019 19:27:11 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <18f9-5de15700-1f-8a41eb0@88494923> References: <18f9-5de15700-1f-8a41eb0@88494923> Message-ID: Hi Antoine, et al - anybody feel free to chime in. I see the below example uses f=figure() ... instead of f=scf(). What's the reason for this preference? From my side, the only difference I can see, is that figure() generates a place for a GUI with a grey background (background = 33) ... whereas when I call scf() the background is white (background =? -2). I see the same list of handles, and all other are also initialized to the same values. Is there a difference, maybe an invisible one? Best regards, Claus On 29.11.2019 18:34, Antoine Monmayrant wrote: >>> 4) I will also look into this. My problem is the steep learning curve. >>> If you look at the Scilab tutorials you have the good-old Openeering >>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>> using the Model-Viewer-Controller approach? - Maybe the >>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>> it possible? >> Hmm, that would be a good idea. >> I'll see whether I can put something together. >> The thing is, MVC approach looks rather silly and overengineered on a small example. > I have not tried to follow a MWC approach, but here is my attempt at making a really simple GUI to just show the basics (see below). > It take numbers from two different types of uicontrols (a slider and an edit) and display the sum in a text uicontrol. > To keep things simple, I positioned and sized the uicontrols manually instead of using a gridbag. > I also tried to use the fancy syntax for get() and set() that do not require calling findobj(), as suggested by Samuel. > > Hope it helps, > > Antoine > > > f=figure(); > > /* ---------------- First number from slider ---------------- */ > //values > nmin=-5; > nmax=10; > nini=7; > nsmallstep=1; > nsbigstep=2; > //slider position and size > x=10; > y=20; > w=100; > h=25; > //slider uicontrol creation in figure f > hslider=uicontrol(f, ... > "style", "slider", ... > "tag", "slider1", ... > "backgroundcolor", [1 1 1], ... > "position", [x y w h], ... > "value", nini, ... > "min", nmin, ... > "max", nmax, ... > "sliderstep", [nsmallstep, nsbigstep], ... > "callback", "update_values"); > > /* ------------- Second number from an editable text ------------- */ > // initial value > editini="3.14"; > //edit position and size > x2=x; > y2=y+h+5; > w2=w; > h2=h; > //edit uicontrol creation in figure f > hedit=uicontrol(f, ... > "style", "edit", ... > "tag", "edit2", ... > "backgroundcolor", [1 1 1], ... > "position", [x2 y2 w2 h2], ... > "string", editini, ... > "callback", "update_values"); > > /* ------------- Sum displayed in a text uicontrol ------------- */ > // initial value > textini="Nothing" > //edit position and size > x3=x+w+5; > y3=y; > w3=w; > h3=2*h+5; > //slider uicontrol creation > htext=uicontrol(f, ... > "style", "text", ... > "tag", "text3", ... > "backgroundcolor", [1 1 1], ... > "position", [x3 y3 w3 h3], ... > "string", textini); > > /* -------- callback function for slider and edit uicontrols -------- */ > //Whenever user interacts with the slider or the edit uicontrols > // show the sum of both numbers in the text field > function update_values() > //temporarily deactivate the callback (don't want callback calls to stack up while processing the current one > set(gcbo,"callback_type",-1); > /* > Using the unique tag chosen at the creation time of the uicontrols > to set/get the uicontrol properties > */ > //get both numbers from the slider and the edit uicontrols > number1=get("slider1", "value"); > string2=get("edit2", "string"); > //do your maths & conversion > string3=string(number1+evstr(string2)); > //change the string displayed in the text uicontrol > set("text3", "string", string3); > //reactivate callback > set(gcbo,"callback_type",0); > endfunction > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From amonmayr at laas.fr Fri Nov 29 19:35:25 2019 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Fri, 29 Nov 2019 19:35:25 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBH?= =?utf-8?q?UI_hel?= In-Reply-To: Message-ID: Le Vendredi, Novembre 29, 2019 19:27 CET, Claus Futtrup a ?crit: > Hi Antoine, et al - anybody feel free to chime in. > > I see the below example uses f=figure() ... instead of f=scf(). > > What's the reason for this preference? No particular reason, I just use either scf() or figure(). I think figure() was introduced to ease the transition for Matlab users. I think they call the same macro with different default values. Antoine > > From my side, the only difference I can see, is that figure() generates > a place for a GUI with a grey background (background = 33) ... whereas > when I call scf() the background is white (background =? -2). I see the > same list of handles, and all other are also initialized to the same values. > > Is there a difference, maybe an invisible one? > > Best regards, > Claus > > On 29.11.2019 18:34, Antoine Monmayrant wrote: > >>> 4) I will also look into this. My problem is the steep learning curve. > >>> If you look at the Scilab tutorials you have the good-old Openeering > >>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial > >>> using the Model-Viewer-Controller approach? - Maybe the > >>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is > >>> it possible? > >> Hmm, that would be a good idea. > >> I'll see whether I can put something together. > >> The thing is, MVC approach looks rather silly and overengineered on a small example. > > I have not tried to follow a MWC approach, but here is my attempt at making a really simple GUI to just show the basics (see below). > > It take numbers from two different types of uicontrols (a slider and an edit) and display the sum in a text uicontrol. > > To keep things simple, I positioned and sized the uicontrols manually instead of using a gridbag. > > I also tried to use the fancy syntax for get() and set() that do not require calling findobj(), as suggested by Samuel. > > > > Hope it helps, > > > > Antoine > > > > > > f=figure(); > > > > /* ---------------- First number from slider ---------------- */ > > //values > > nmin=-5; > > nmax=10; > > nini=7; > > nsmallstep=1; > > nsbigstep=2; > > //slider position and size > > x=10; > > y=20; > > w=100; > > h=25; > > //slider uicontrol creation in figure f > > hslider=uicontrol(f, ... > > "style", "slider", ... > > "tag", "slider1", ... > > "backgroundcolor", [1 1 1], ... > > "position", [x y w h], ... > > "value", nini, ... > > "min", nmin, ... > > "max", nmax, ... > > "sliderstep", [nsmallstep, nsbigstep], ... > > "callback", "update_values"); > > > > /* ------------- Second number from an editable text ------------- */ > > // initial value > > editini="3.14"; > > //edit position and size > > x2=x; > > y2=y+h+5; > > w2=w; > > h2=h; > > //edit uicontrol creation in figure f > > hedit=uicontrol(f, ... > > "style", "edit", ... > > "tag", "edit2", ... > > "backgroundcolor", [1 1 1], ... > > "position", [x2 y2 w2 h2], ... > > "string", editini, ... > > "callback", "update_values"); > > > > /* ------------- Sum displayed in a text uicontrol ------------- */ > > // initial value > > textini="Nothing" > > //edit position and size > > x3=x+w+5; > > y3=y; > > w3=w; > > h3=2*h+5; > > //slider uicontrol creation > > htext=uicontrol(f, ... > > "style", "text", ... > > "tag", "text3", ... > > "backgroundcolor", [1 1 1], ... > > "position", [x3 y3 w3 h3], ... > > "string", textini); > > > > /* -------- callback function for slider and edit uicontrols -------- */ > > //Whenever user interacts with the slider or the edit uicontrols > > // show the sum of both numbers in the text field > > function update_values() > > //temporarily deactivate the callback (don't want callback calls to stack up while processing the current one > > set(gcbo,"callback_type",-1); > > /* > > Using the unique tag chosen at the creation time of the uicontrols > > to set/get the uicontrol properties > > */ > > //get both numbers from the slider and the edit uicontrols > > number1=get("slider1", "value"); > > string2=get("edit2", "string"); > > //do your maths & conversion > > string3=string(number1+evstr(string2)); > > //change the string displayed in the text uicontrol > > set("text3", "string", string3); > > //reactivate callback > > set(gcbo,"callback_type",0); > > endfunction > > > > _______________________________________________ > > 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 cfuttrup at gmail.com Fri Nov 29 19:54:05 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 29 Nov 2019 19:54:05 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <4ec6-5de0e300-f-5a85950@126498237> <2e1d3532-08a5-9da6-5785-ed1df2403a98@gmail.com> Message-ID: <67529b3e-821f-35ba-6456-d2ef770dba4b@gmail.com> Hi St?phane >In "ge_fs=ge_fs" the lhs is a local copy and the rhs the variable in the calling context. I figured something like this was going on, but I don't find it logical. I read this as follows: The ge_r is a global handle, for which the function doesn't have write access. When you assign it to a local variable (it can be the same name, or a new name, I suppose), then suddenly this opens up for writing to it (so you can set the properties). Strange. I don't think even a hardcore programmer can find this to be "pretty code" ... it looks like a hack / a workaround to me. I read your response just as - this is another way to do it - but which way do you personally prefer? ... and why? (maybe execution speed? ... or is there a benefit in flexibility that I cannot see?). Best regards, Claus On 29.11.2019 19:21, St?phane Mottelet wrote: > > > Le 29/11/2019 ? 19:17, Claus Futtrup a ?crit?: >> Hi St?phane >> >> Hm, you're right. This actually fixes the problem, but I do find it >> to be a strange "solution" that you write each of them to be equal >> with itself ... I prefer calling the set() function. > > In "ge_fs=ge_fs" the lhs is a local copy and the rhs the variable in > the calling context. > >> >> Cheers, >> Claus >> >> On 29.11.2019 19:05, St?phane Mottelet wrote: >>> To makeit work, just insert >>> >>> ge_r=ge_r; >>> ge_fs=ge_fs; >>> ge_hz=ge_hz; >>> >>> at the begining of function calc. >>> >>> My two cents... >>> >>> S. >>> >>> >>> Le 29/11/2019 ? 18:58, Claus Futtrup a ?crit?: >>>> Hi Antoine >>>> >>>> >Not much progress because I never managed to get a minimal working example >>>> I can repeat my example again and again. It never works. Please see >>>> it below. >>>> >>>> Do you agree. This consistently fails if you run it from Scinotes >>>> editor ... but if I copy e.g. ge_r.visible = "on" to the command >>>> line (not from within the calc function), then it shows up. >>>> >>>> /Claus >>>> >>>> // BAD_GUI_EXAMPLE.SCE >>>> // >>>> // Demo of how _NOT_ to build a simple GUI in Scilab. >>>> >>>> // Initialize variables >>>> m = 1; // Moving mass 'm'(kilogram) >>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>> fres = 1; // Resonance frequency (Hertz) >>>> >>>> function calc() >>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>> fres=sqrt(k/m)/(2*%pi); >>>> // putting GUI updates inside the calculation routine is not pretty >>>> code. >>>> ge_r.visible = "on"; >>>> ge_fs.visible = "on"; // THIS DOESN'T WORK >>>> ge_hz.visible = "on"; >>>> // set(ge_r,"Visible","on"); // THIS WORKS >>>> // set(ge_fs,"Visible","on"); >>>> // set(ge_hz,"Visible","on"); >>>> // update global variables >>>> [m,k,fres]=return(m,k,fres); >>>> endfunction >>>> >>>> function goodbye() >>>> close(ge); // Close GUI window >>>> printf("Resulting fres: %f Hertz\n",fres); >>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>> endfunction >>>> >>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>> as = ge.axes_size; // read size of window, as = [width height] >>>> ge.figure_name = "GUI Example"; // Change window header >>>> >>>> uicontrol("style","text","string","Moving mass :","position", .. >>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>> // position properties has four parameters = x,y,width,height >>>> // y-position counts from lower left corner, so we subtract from 'as' >>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>> "position",[100 as(2)-35 80 20]); >>>> uicontrol("style","text","string","kg ","position", .. >>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>> >>>> uicontrol("style","text","string","Stiffness :","position", .. >>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>> "position",[100 as(2)-60 80 20]); >>>> uicontrol("style","text","string","N/m ","position", .. >>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>> >>>> uicontrol("style","pushbutton","string","Calculate", .. >>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>> >>>> ge_r = uicontrol("style","text","string","Result :","position", .. >>>> [10 as(2)-110 80 20],"visible","off"); // keep these hidden for a start >>>> ge_fs = uicontrol("style","text","string",string(fres), .. >>>> "position",[100 as(2)-110 80 20],"visible","off"); >>>> ge_hz = uicontrol("style","text","string","Hz ","position", .. >>>> [200 as(2)-110 30 20],"visible","off"); >>>> >>>> uicontrol("style","pushbutton","string","Exit", .. >>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>> >>>> On 29.11.2019 10:20, Antoine Monmayrant wrote: >>>>> Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: >>>>> >>>>>> Hi Antoine >>>>>> >>>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>>> >>>>>> >>>>>> I see what you mean. I just now had trouble turning visibility on/off, >>>>>> but using set(), it works fine. Thanks for the tip. >>>>> It's something quite weird, maybe a race condition. >>>>> I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. >>>>> When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. >>>>> The initial bug report is here:http://bugzilla.scilab.org/show_bug.cgi?id=15786 >>>>> Not much progress because I never managed to get a minimal working example (it's an Heisenbug). >>>>> >>>>> Antoine >>>>> >>>>>> Best regards, >>>>>> Claus >>>>>> >>>>>> On 28.11.2019 17:47, Antoine Monmayrant wrote: >>>>>>> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: >>>>>>> >>>>>>>> Hi Antoine, et al. >>>>>>>> >>>>>>>> Your reply is very helpful, so I think you got the right question :-) >>>>>>>> >>>>>>>> 1) Good point that I can use callback on every uicontrol. This would be >>>>>>>> suitable for a simple example (like gui_example.sce) ... but for heavy >>>>>>>> calculations, it might be more practical with a CALC button. P.S. The >>>>>>>> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); >>>>>>> You are right. >>>>>>> Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. >>>>>>> >>>>>>>> 2) I see what you mean, so not having an empty space, but "show" the >>>>>>>> whole she-bang from the beginning. I didn't want to do that (just >>>>>>>> deleting the IF-statement), but it could be the best solution in the end >>>>>>>> (rather than the inline GUI updates), if nothing better shows up. This >>>>>>>> was somehow the "core" of my question. Maybe I ask for too much. >>>>>>> I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). >>>>>>> >>>>>>>> 3) I will look into this. Thanks for the tip. >>>>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>>>> I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. >>>>>>> >>>>>>>> 4) I will also look into this. My problem is the steep learning curve. >>>>>>>> If you look at the Scilab tutorials you have the good-old Openeering >>>>>>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>>>>>> using the Model-Viewer-Controller approach? - Maybe the >>>>>>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>>>>>> it possible? >>>>>>> Hmm, that would be a good idea. >>>>>>> I'll see whether I can put something together. >>>>>>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>>>>>> >>>>>>>> I appreciate gui_example.sce with just about 70 lines of code, two >>>>>>>> inputs and one output. I think something like it could help a lot of >>>>>>>> people ... and it's not 250 lines of code to get a GUI up and running, >>>>>>>> if you know what I mean. The gui_example shows a few differences, like >>>>>>>> white versus grey background, editable boxes, etc. In the outputs, >>>>>>>> because of the default grey background, you can see the dimensions of >>>>>>>> the grid / text-boxes, and gui_example has two buttons. It looks >>>>>>>> operational and easy to expand for new users. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> Claus >>>>>>>> >>>>>>>> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>>>>>>>> Hello Claus, >>>>>>>>> >>>>>>>>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>>>>>>>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>>>>>>>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>>>>>>>> >>>>>>>>> Anywya, here is how I think your code could be improved: >>>>>>>>> >>>>>>>>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>>>>>>>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>>>>>>>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>>>>>>>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>>>>>>>> >>>>>>>>> I attached a small gui I use to illustrate optical anti-reflection coating. >>>>>>>>> It is far from perfect (I did not implement a proper model-view-controler for example). >>>>>>>>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>>>>>>>> >>>>>>>>> Hope it helps, >>>>>>>>> >>>>>>>>> Antoine >>>>>>>>> >>>>>>>>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>>>>>>>> >>>>>>>>>> Hi there >>>>>>>>>> >>>>>>>>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>>>>>>>> really simple example of what I'm trying to do. How can I make the >>>>>>>>>> "conditional" GUI output work and not have it inside the calc function? >>>>>>>>>> ... or, how would you do it? Thanks. >>>>>>>>>> >>>>>>>>>> Best regards, Claus. >>>>>>>>>> >>>>>>>>>> // GUI_EXAMPLE.SCE >>>>>>>>>> // >>>>>>>>>> // Demo of how to build a simple GUI in Scilab. >>>>>>>>>> // Real simple, with two input variables and one output. >>>>>>>>>> // The example uses the basic mechanical example of a mass and a spring as >>>>>>>>>> // input parameters and calculates the resonance frequency of the mechanical >>>>>>>>>> // system. >>>>>>>>>> >>>>>>>>>> // Initialize variables >>>>>>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>>>>>> show_result = %f; >>>>>>>>>> >>>>>>>>>> function calc() >>>>>>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>>>>>> fres = sqrt(m * k); >>>>>>>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>>> show_result = %t; >>>>>>>>>> // update global variables >>>>>>>>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>>>>>>>> endfunction >>>>>>>>>> >>>>>>>>>> function goodbye() >>>>>>>>>> close(ge); // Close GUI window >>>>>>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>>>>>> endfunction >>>>>>>>>> >>>>>>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>>>>>> >>>>>>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>>>>>> // position properties has four parameters = x,y,width,height >>>>>>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>>>>>> "position",[100 as(2)-35 80 20]); >>>>>>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>>>>>> >>>>>>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>>>>>> "position",[100 as(2)-60 80 20]); >>>>>>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>>>>>> >>>>>>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>>>>>> >>>>>>>>>> // How do I make this "conditional"output show up in my GUI? >>>>>>>>>> if show_result then // If "Calculate"button was pushed at least once ... >>>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>>> end >>>>>>>>>> >>>>>>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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 >>>> 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 >> >> >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Fri Nov 29 20:04:19 2019 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 29 Nov 2019 20:04:19 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: Message-ID: figure() is a much more versatile function for the creation of a figure; you can set all(?) properties at once. scf() is useful when you want to change an existing figure. Regards Stefan On 2019-11-29 19:35, Antoine Monmayrant wrote: > Le Vendredi, Novembre 29, 2019 19:27 CET, Claus Futtrup a ?crit: > >> Hi Antoine, et al - anybody feel free to chime in. >> >> I see the below example uses f=figure() ... instead of f=scf(). >> >> What's the reason for this preference? > > No particular reason, I just use either scf() or figure(). > I think figure() was introduced to ease the transition for Matlab users. > I think they call the same macro with different default values. > > Antoine > >> >> From my side, the only difference I can see, is that figure() generates >> a place for a GUI with a grey background (background = 33) ... whereas >> when I call scf() the background is white (background =? -2). I see the >> same list of handles, and all other are also initialized to the same values. >> >> Is there a difference, maybe an invisible one? >> >> Best regards, >> Claus >> >> On 29.11.2019 18:34, Antoine Monmayrant wrote: >>>>> 4) I will also look into this. My problem is the steep learning curve. >>>>> If you look at the Scilab tutorials you have the good-old Openeering >>>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>>> using the Model-Viewer-Controller approach? - Maybe the >>>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>>> it possible? >>>> Hmm, that would be a good idea. >>>> I'll see whether I can put something together. >>>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>> I have not tried to follow a MWC approach, but here is my attempt at making a really simple GUI to just show the basics (see below). >>> It take numbers from two different types of uicontrols (a slider and an edit) and display the sum in a text uicontrol. >>> To keep things simple, I positioned and sized the uicontrols manually instead of using a gridbag. >>> I also tried to use the fancy syntax for get() and set() that do not require calling findobj(), as suggested by Samuel. >>> >>> Hope it helps, >>> >>> Antoine >>> >>> >>> f=figure(); >>> >>> /* ---------------- First number from slider ---------------- */ >>> //values >>> nmin=-5; >>> nmax=10; >>> nini=7; >>> nsmallstep=1; >>> nsbigstep=2; >>> //slider position and size >>> x=10; >>> y=20; >>> w=100; >>> h=25; >>> //slider uicontrol creation in figure f >>> hslider=uicontrol(f, ... >>> "style", "slider", ... >>> "tag", "slider1", ... >>> "backgroundcolor", [1 1 1], ... >>> "position", [x y w h], ... >>> "value", nini, ... >>> "min", nmin, ... >>> "max", nmax, ... >>> "sliderstep", [nsmallstep, nsbigstep], ... >>> "callback", "update_values"); >>> >>> /* ------------- Second number from an editable text ------------- */ >>> // initial value >>> editini="3.14"; >>> //edit position and size >>> x2=x; >>> y2=y+h+5; >>> w2=w; >>> h2=h; >>> //edit uicontrol creation in figure f >>> hedit=uicontrol(f, ... >>> "style", "edit", ... >>> "tag", "edit2", ... >>> "backgroundcolor", [1 1 1], ... >>> "position", [x2 y2 w2 h2], ... >>> "string", editini, ... >>> "callback", "update_values"); >>> >>> /* ------------- Sum displayed in a text uicontrol ------------- */ >>> // initial value >>> textini="Nothing" >>> //edit position and size >>> x3=x+w+5; >>> y3=y; >>> w3=w; >>> h3=2*h+5; >>> //slider uicontrol creation >>> htext=uicontrol(f, ... >>> "style", "text", ... >>> "tag", "text3", ... >>> "backgroundcolor", [1 1 1], ... >>> "position", [x3 y3 w3 h3], ... >>> "string", textini); >>> >>> /* -------- callback function for slider and edit uicontrols -------- */ >>> //Whenever user interacts with the slider or the edit uicontrols >>> // show the sum of both numbers in the text field >>> function update_values() >>> //temporarily deactivate the callback (don't want callback calls to stack up while processing the current one >>> set(gcbo,"callback_type",-1); >>> /* >>> Using the unique tag chosen at the creation time of the uicontrols >>> to set/get the uicontrol properties >>> */ >>> //get both numbers from the slider and the edit uicontrols >>> number1=get("slider1", "value"); >>> string2=get("edit2", "string"); >>> //do your maths & conversion >>> string3=string(number1+evstr(string2)); >>> //change the string displayed in the text uicontrol >>> set("text3", "string", string3); >>> //reactivate callback >>> set(gcbo,"callback_type",0); >>> endfunction >>> >>> _______________________________________________ >>> 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 Fri Nov 29 21:13:27 2019 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Fri, 29 Nov 2019 21:13:27 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <67529b3e-821f-35ba-6456-d2ef770dba4b@gmail.com> References: <67529b3e-821f-35ba-6456-d2ef770dba4b@gmail.com> Message-ID: Hello again, > Le 29 nov. 2019 ? 19:55, Claus Futtrup a ?crit : > > ? > Hi St?phane > > >In "ge_fs=ge_fs" the lhs is a local copy and the rhs the variable in the calling context. > > I figured something like this was going on, but I don't find it logical. I read this as follows: The ge_r is a global handle, for which the function doesn't have write access. When you assign it to a local variable (it can be the same name, or a new name, I suppose), then suddenly this opens up for writing to it (so you can set the properties). Strange. I don't think even a hardcore programmer can find this to be "pretty code" ... it looks like a hack / a workaround to me. > No hack here. Please see https://wiki.scilab.org/howto/global%20and%20local%20variables Even the very orthodoxic Julia uses in some similar context lazy global variables. S. > I read your response just as - this is another way to do it - but which way do you personally prefer? ... and why? (maybe execution speed? ... or is there a benefit in flexibility that I cannot see?). > > Best regards, > Claus > > On 29.11.2019 19:21, St?phane Mottelet wrote: >> >> Le 29/11/2019 ? 19:17, Claus Futtrup a ?crit : >>> Hi St?phane >>> >>> Hm, you're right. This actually fixes the problem, but I do find it to be a strange "solution" that you write each of them to be equal with itself ... I prefer calling the set() function. >> In "ge_fs=ge_fs" the lhs is a local copy and the rhs the variable in the calling context. >> >>> >>> Cheers, >>> Claus >>> >>> On 29.11.2019 19:05, St?phane Mottelet wrote: >>>> To makeit work, just insert >>>> >>>> ge_r=ge_r; >>>> ge_fs=ge_fs; >>>> ge_hz=ge_hz; >>>> at the begining of function calc. >>>> >>>> My two cents... >>>> S. >>>> >>>> >>>> >>>> Le 29/11/2019 ? 18:58, Claus Futtrup a ?crit : >>>>> Hi Antoine >>>>> >>>>> >Not much progress because I never managed to get a minimal working example >>>>> I can repeat my example again and again. It never works. Please see it below. >>>>> >>>>> Do you agree. This consistently fails if you run it from Scinotes editor ... but if I copy e.g. ge_r.visible = "on" to the command line (not from within the calc function), then it shows up. >>>>> >>>>> /Claus >>>>> >>>>> // BAD_GUI_EXAMPLE.SCE >>>>> // >>>>> // Demo of how _NOT_ to build a simple GUI in Scilab. >>>>> >>>>> // Initialize variables >>>>> m = 1; // Moving mass 'm' (kilogram) >>>>> k = 1; // Stiffness, spring constant 'k' (Newton per meter) >>>>> fres = 1; // Resonance frequency (Hertz) >>>>> >>>>> function calc() >>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>> fres=sqrt(k/m)/(2*%pi); >>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>> ge_r.visible = "on"; >>>>> ge_fs.visible = "on"; // THIS DOESN'T WORK >>>>> ge_hz.visible = "on"; >>>>> // set(ge_r,"Visible","on"); // THIS WORKS >>>>> // set(ge_fs,"Visible","on"); >>>>> // set(ge_hz,"Visible","on"); >>>>> // update global variables >>>>> [m,k,fres]=return(m,k,fres); >>>>> endfunction >>>>> >>>>> function goodbye() >>>>> close(ge); // Close GUI window >>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>> endfunction >>>>> >>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>> ge.figure_name = "GUI Example"; // Change window header >>>>> >>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>> // position properties has four parameters = x,y,width,height >>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>> "position",[100 as(2)-35 80 20]); >>>>> uicontrol("style","text","string"," kg ","position", .. >>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>> >>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>> "position",[100 as(2)-60 80 20]); >>>>> uicontrol("style","text","string"," N/m ","position", .. >>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>> >>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>> >>>>> ge_r = uicontrol("style","text","string","Result :","position", .. >>>>> [10 as(2)-110 80 20],"visible","off"); // keep these hidden for a start >>>>> ge_fs = uicontrol("style","text","string",string(fres), .. >>>>> "position",[100 as(2)-110 80 20],"visible","off"); >>>>> ge_hz = uicontrol("style","text","string"," Hz ","position", .. >>>>> [200 as(2)-110 30 20],"visible","off"); >>>>> >>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>> >>>>> On 29.11.2019 10:20, Antoine Monmayrant wrote: >>>>>> Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: >>>>>> >>>>>>> Hi Antoine >>>>>>> >>>>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>>>> >>>>>>> >>>>>>> I see what you mean. I just now had trouble turning visibility on/off, >>>>>>> but using set(), it works fine. Thanks for the tip. >>>>>> It's something quite weird, maybe a race condition. >>>>>> I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. >>>>>> When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. >>>>>> The initial bug report is here: http://bugzilla.scilab.org/show_bug.cgi?id=15786 >>>>>> Not much progress because I never managed to get a minimal working example (it's an Heisenbug). >>>>>> >>>>>> Antoine >>>>>> >>>>>>> Best regards, >>>>>>> Claus >>>>>>> >>>>>>> On 28.11.2019 17:47, Antoine Monmayrant wrote: >>>>>>>> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: >>>>>>>> >>>>>>>>> Hi Antoine, et al. >>>>>>>>> >>>>>>>>> Your reply is very helpful, so I think you got the right question :-) >>>>>>>>> >>>>>>>>> 1) Good point that I can use callback on every uicontrol. This would be >>>>>>>>> suitable for a simple example (like gui_example.sce) ... but for heavy >>>>>>>>> calculations, it might be more practical with a CALC button. P.S. The >>>>>>>>> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); >>>>>>>> You are right. >>>>>>>> Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. >>>>>>>> >>>>>>>>> 2) I see what you mean, so not having an empty space, but "show" the >>>>>>>>> whole she-bang from the beginning. I didn't want to do that (just >>>>>>>>> deleting the IF-statement), but it could be the best solution in the end >>>>>>>>> (rather than the inline GUI updates), if nothing better shows up. This >>>>>>>>> was somehow the "core" of my question. Maybe I ask for too much. >>>>>>>> I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). >>>>>>>> >>>>>>>>> 3) I will look into this. Thanks for the tip. >>>>>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>>>>> I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. >>>>>>>> >>>>>>>>> 4) I will also look into this. My problem is the steep learning curve. >>>>>>>>> If you look at the Scilab tutorials you have the good-old Openeering >>>>>>>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>>>>>>> using the Model-Viewer-Controller approach? - Maybe the >>>>>>>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>>>>>>> it possible? >>>>>>>> Hmm, that would be a good idea. >>>>>>>> I'll see whether I can put something together. >>>>>>>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>>>>>>> >>>>>>>>> I appreciate gui_example.sce with just about 70 lines of code, two >>>>>>>>> inputs and one output. I think something like it could help a lot of >>>>>>>>> people ... and it's not 250 lines of code to get a GUI up and running, >>>>>>>>> if you know what I mean. The gui_example shows a few differences, like >>>>>>>>> white versus grey background, editable boxes, etc. In the outputs, >>>>>>>>> because of the default grey background, you can see the dimensions of >>>>>>>>> the grid / text-boxes, and gui_example has two buttons. It looks >>>>>>>>> operational and easy to expand for new users. >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> Claus >>>>>>>>> >>>>>>>>> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>>>>>>>>> Hello Claus, >>>>>>>>>> >>>>>>>>>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>>>>>>>>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>>>>>>>>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>>>>>>>>> >>>>>>>>>> Anywya, here is how I think your code could be improved: >>>>>>>>>> >>>>>>>>>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>>>>>>>>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>>>>>>>>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>>>>>>>>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>>>>>>>>> >>>>>>>>>> I attached a small gui I use to illustrate optical anti-reflection coating. >>>>>>>>>> It is far from perfect (I did not implement a proper model-view-controler for example). >>>>>>>>>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>>>>>>>>> >>>>>>>>>> Hope it helps, >>>>>>>>>> >>>>>>>>>> Antoine >>>>>>>>>> >>>>>>>>>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>>>>>>>>> >>>>>>>>>>> Hi there >>>>>>>>>>> >>>>>>>>>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>>>>>>>>> really simple example of what I'm trying to do. How can I make the >>>>>>>>>>> "conditional" GUI output work and not have it inside the calc function? >>>>>>>>>>> ... or, how would you do it? Thanks. >>>>>>>>>>> >>>>>>>>>>> Best regards, Claus. >>>>>>>>>>> >>>>>>>>>>> // GUI_EXAMPLE.SCE >>>>>>>>>>> // >>>>>>>>>>> // Demo of how to build a simple GUI in Scilab. >>>>>>>>>>> // Real simple, with two input variables and one output. >>>>>>>>>>> // The example uses the basic mechanical example of a mass and a spring as >>>>>>>>>>> // input parameters and calculates the resonance frequency of the mechanical >>>>>>>>>>> // system. >>>>>>>>>>> >>>>>>>>>>> // Initialize variables >>>>>>>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>>>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>>>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>>>>>>> show_result = %f; >>>>>>>>>>> >>>>>>>>>>> function calc() >>>>>>>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>>>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>>>>>>> fres = sqrt(m * k); >>>>>>>>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>>>> show_result = %t; >>>>>>>>>>> // update global variables >>>>>>>>>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>>>>>>>>> endfunction >>>>>>>>>>> >>>>>>>>>>> function goodbye() >>>>>>>>>>> close(ge); // Close GUI window >>>>>>>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>>>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>>>>>>> endfunction >>>>>>>>>>> >>>>>>>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>>>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>>>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>>>>>>> >>>>>>>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>>>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>>>>>>> // position properties has four parameters = x,y,width,height >>>>>>>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>>>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>>>>>>> "position",[100 as(2)-35 80 20]); >>>>>>>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>>>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>>>>>>> >>>>>>>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>>>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>>>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>>>>>>> "position",[100 as(2)-60 80 20]); >>>>>>>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>>>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>>>>>>> >>>>>>>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>>>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>>>>>>> >>>>>>>>>>> // How do I make this "conditional"output show up in my GUI? >>>>>>>>>>> if show_result then // If "Calculate"button was pushed at least once ... >>>>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>>>> end >>>>>>>>>>> >>>>>>>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>>>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> 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 >>>>> 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 >>> >>> >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Fri Nov 29 21:21:05 2019 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 29 Nov 2019 21:21:05 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <67529b3e-821f-35ba-6456-d2ef770dba4b@gmail.com> Message-ID: Hi St?phane Lazy = not pretty. ... but you didn't answer my question. Which way do you personally prefer? ... and why? Cheers, Claus On 29.11.2019 21:13, St?phane Mottelet wrote: > Hello again, > >> Le 29 nov. 2019 ? 19:55, Claus Futtrup a ?crit?: >> >> ? >> Hi St?phane >> >> >In "ge_fs=ge_fs" the lhs is a local copy and the rhs the variable in >> the calling context. >> >> I figured something like this was going on, but I don't find it >> logical. I read this as follows: The ge_r is a global handle, for >> which the function doesn't have write access. When you assign it to a >> local variable (it can be the same name, or a new name, I suppose), >> then suddenly this opens up for writing to it (so you can set the >> properties). Strange. I don't think even a hardcore programmer can >> find this to be "pretty code" ... it looks like a hack / a workaround >> to me. >> > > No hack here. Please > see?https://wiki.scilab.org/howto/global%20and%20local%20variables > > > Even the very orthodoxic Julia uses in some similar context ?lazy > global variables. > > S. > > >> I read your response just as - this is another way to do it - but >> which way do you personally prefer? ... and why? (maybe execution >> speed? ... or is there a benefit in flexibility that I cannot see?). >> >> Best regards, >> Claus >> >> On 29.11.2019 19:21, St?phane Mottelet wrote: >>> >>> >>> Le 29/11/2019 ? 19:17, Claus Futtrup a ?crit?: >>>> Hi St?phane >>>> >>>> Hm, you're right. This actually fixes the problem, but I do find it >>>> to be a strange "solution" that you write each of them to be equal >>>> with itself ... I prefer calling the set() function. >>> >>> In "ge_fs=ge_fs" the lhs is a local copy and the rhs the variable in >>> the calling context. >>> >>>> >>>> Cheers, >>>> Claus >>>> >>>> On 29.11.2019 19:05, St?phane Mottelet wrote: >>>>> To makeit work, just insert >>>>> >>>>> ge_r=ge_r; >>>>> ge_fs=ge_fs; >>>>> ge_hz=ge_hz; >>>>> >>>>> at the begining of function calc. >>>>> >>>>> My two cents... >>>>> >>>>> S. >>>>> >>>>> >>>>> Le 29/11/2019 ? 18:58, Claus Futtrup a ?crit?: >>>>>> Hi Antoine >>>>>> >>>>>> >Not much progress because I never managed to get a minimal working example >>>>>> I can repeat my example again and again. It never works. Please >>>>>> see it below. >>>>>> >>>>>> Do you agree. This consistently fails if you run it from Scinotes >>>>>> editor ... but if I copy e.g. ge_r.visible = "on" to the command >>>>>> line (not from within the calc function), then it shows up. >>>>>> >>>>>> /Claus >>>>>> >>>>>> // BAD_GUI_EXAMPLE.SCE >>>>>> // >>>>>> // Demo of how _NOT_ to build a simple GUI in Scilab. >>>>>> >>>>>> // Initialize variables >>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>> >>>>>> function calc() >>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>> fres=sqrt(k/m)/(2*%pi); >>>>>> // putting GUI updates inside the calculation routine is not >>>>>> pretty code. >>>>>> ge_r.visible = "on"; >>>>>> ge_fs.visible = "on"; // THIS DOESN'T WORK >>>>>> ge_hz.visible = "on"; >>>>>> // set(ge_r,"Visible","on"); // THIS WORKS >>>>>> // set(ge_fs,"Visible","on"); >>>>>> // set(ge_hz,"Visible","on"); >>>>>> // update global variables >>>>>> [m,k,fres]=return(m,k,fres); >>>>>> endfunction >>>>>> >>>>>> function goodbye() >>>>>> close(ge); // Close GUI window >>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>> endfunction >>>>>> >>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>> >>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>> // position properties has four parameters = x,y,width,height >>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>> "position",[100 as(2)-35 80 20]); >>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>> >>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>> "position",[100 as(2)-60 80 20]); >>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>> >>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>> >>>>>> ge_r = uicontrol("style","text","string","Result :","position", .. >>>>>> [10 as(2)-110 80 20],"visible","off"); // keep these hidden for a start >>>>>> ge_fs = uicontrol("style","text","string",string(fres), .. >>>>>> "position",[100 as(2)-110 80 20],"visible","off"); >>>>>> ge_hz = uicontrol("style","text","string","Hz ","position", .. >>>>>> [200 as(2)-110 30 20],"visible","off"); >>>>>> >>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>> >>>>>> On 29.11.2019 10:20, Antoine Monmayrant wrote: >>>>>>> Le Jeudi, Novembre 28, 2019 19:40 CET, Claus Futtrup a ?crit: >>>>>>> >>>>>>>> Hi Antoine >>>>>>>> >>>>>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>>>>> >>>>>>>> >>>>>>>> I see what you mean. I just now had trouble turning visibility on/off, >>>>>>>> but using set(), it works fine. Thanks for the tip. >>>>>>> It's something quite weird, maybe a race condition. >>>>>>> I've seen it when using 'a.prop' or 'a.prop=value' syntax in either a callback function or in a for loop. >>>>>>> When you repeatedly use this syntax, scilab tends to forget that 'a' exists and that it's a handle with different properties. >>>>>>> The initial bug report is here:http://bugzilla.scilab.org/show_bug.cgi?id=15786 >>>>>>> Not much progress because I never managed to get a minimal working example (it's an Heisenbug). >>>>>>> >>>>>>> Antoine >>>>>>> >>>>>>>> Best regards, >>>>>>>> Claus >>>>>>>> >>>>>>>> On 28.11.2019 17:47, Antoine Monmayrant wrote: >>>>>>>>> Le Jeudi, Novembre 28, 2019 17:05 CET, Claus Futtrup a ?crit: >>>>>>>>> >>>>>>>>>> Hi Antoine, et al. >>>>>>>>>> >>>>>>>>>> Your reply is very helpful, so I think you got the right question :-) >>>>>>>>>> >>>>>>>>>> 1) Good point that I can use callback on every uicontrol. This would be >>>>>>>>>> suitable for a simple example (like gui_example.sce) ... but for heavy >>>>>>>>>> calculations, it might be more practical with a CALC button. P.S. The >>>>>>>>>> correct equation for the resonance frequency is fres=sqrt(k/m)/(2*%pi); >>>>>>>>> You are right. >>>>>>>>> Also, the trick to disable the callback function/ reenable it is key for sliders that tend to generate an avalanche of call to the function when one moves the cursor. >>>>>>>>> >>>>>>>>>> 2) I see what you mean, so not having an empty space, but "show" the >>>>>>>>>> whole she-bang from the beginning. I didn't want to do that (just >>>>>>>>>> deleting the IF-statement), but it could be the best solution in the end >>>>>>>>>> (rather than the inline GUI updates), if nothing better shows up. This >>>>>>>>>> was somehow the "core" of my question. Maybe I ask for too much. >>>>>>>>> I think you can achieve what you want by setting ".visible='off'" for all the uicontrols you don't want to show initialy. You can then set ".visible='on'" after the first call to the callback (or at each call if you are lazy). >>>>>>>>> >>>>>>>>>> 3) I will look into this. Thanks for the tip. >>>>>>>>> Also, you should better use get(a, 'propertyName') or set(a, 'propertyName', value) instead of a.propertyName and a.propertyName=value in your callbacks. >>>>>>>>> I have found that this latter syntax is causing a lot of bug if your callback get called really often. I still don't know why. >>>>>>>>> >>>>>>>>>> 4) I will also look into this. My problem is the steep learning curve. >>>>>>>>>> If you look at the Scilab tutorials you have the good-old Openeering >>>>>>>>>> LHY_Tutorial - it's incredibly complicated and long. Is LHY_Tutorial >>>>>>>>>> using the Model-Viewer-Controller approach? - Maybe the >>>>>>>>>> Model-Viewer-Controller could be presented in a _simple_ tutorial - is >>>>>>>>>> it possible? >>>>>>>>> Hmm, that would be a good idea. >>>>>>>>> I'll see whether I can put something together. >>>>>>>>> The thing is, MVC approach looks rather silly and overengineered on a small example. >>>>>>>>> >>>>>>>>>> I appreciate gui_example.sce with just about 70 lines of code, two >>>>>>>>>> inputs and one output. I think something like it could help a lot of >>>>>>>>>> people ... and it's not 250 lines of code to get a GUI up and running, >>>>>>>>>> if you know what I mean. The gui_example shows a few differences, like >>>>>>>>>> white versus grey background, editable boxes, etc. In the outputs, >>>>>>>>>> because of the default grey background, you can see the dimensions of >>>>>>>>>> the grid / text-boxes, and gui_example has two buttons. It looks >>>>>>>>>> operational and easy to expand for new users. >>>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> Claus >>>>>>>>>> >>>>>>>>>> On 28.11.2019 08:57, Antoine Monmayrant wrote: >>>>>>>>>>> Hello Claus, >>>>>>>>>>> >>>>>>>>>>> I've been playing a bit with GUIs for teaching, so maybe I can help. >>>>>>>>>>> The issue is that I don't get what your problem is exactly here, so I my answer might be a bit off-topic. >>>>>>>>>>> Do not hesitate to rephrase your issue, I'll try a more focused answer. >>>>>>>>>>> >>>>>>>>>>> Anywya, here is how I think your code could be improved: >>>>>>>>>>> >>>>>>>>>>> (1) You can use 'calc' as the callback for all of the editable text field so that your result gets shown right away, without having to press a button. >>>>>>>>>>> (2) You should populate all the uicontrols of your gui first, then only update the displayed values, the visibility of the uicontrols, etc inside your calc function. (ie no more creating a uicontrol inside a callback) >>>>>>>>>>> (3) The 'tag' property of any uicontrol together with 'findobj()' are really nice to get/set the properties of each existing uicontrol. >>>>>>>>>>> (4) You can rely on a proper Model-View-Controler approach (or any other well established method to avoid mixing gui stuff with calculation stuff). >>>>>>>>>>> >>>>>>>>>>> I attached a small gui I use to illustrate optical anti-reflection coating. >>>>>>>>>>> It is far from perfect (I did not implement a proper model-view-controler for example). >>>>>>>>>>> But you can see how I tried to separate the different parts of the code an how I use findobj/tag/get/set, etc. >>>>>>>>>>> >>>>>>>>>>> Hope it helps, >>>>>>>>>>> >>>>>>>>>>> Antoine >>>>>>>>>>> >>>>>>>>>>> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup a ?crit: >>>>>>>>>>> >>>>>>>>>>>> Hi there >>>>>>>>>>>> >>>>>>>>>>>> I'm trying to build a GUI. For simplicity on the forum, I've built a >>>>>>>>>>>> really simple example of what I'm trying to do. How can I make the >>>>>>>>>>>> "conditional" GUI output work and not have it inside the calc function? >>>>>>>>>>>> ... or, how would you do it? Thanks. >>>>>>>>>>>> >>>>>>>>>>>> Best regards, Claus. >>>>>>>>>>>> >>>>>>>>>>>> // GUI_EXAMPLE.SCE >>>>>>>>>>>> // >>>>>>>>>>>> // Demo of how to build a simple GUI in Scilab. >>>>>>>>>>>> // Real simple, with two input variables and one output. >>>>>>>>>>>> // The example uses the basic mechanical example of a mass and a spring as >>>>>>>>>>>> // input parameters and calculates the resonance frequency of the mechanical >>>>>>>>>>>> // system. >>>>>>>>>>>> >>>>>>>>>>>> // Initialize variables >>>>>>>>>>>> m = 1; // Moving mass 'm'(kilogram) >>>>>>>>>>>> k = 1; // Stiffness, spring constant 'k'(Newton per meter) >>>>>>>>>>>> fres = 1; // Resonance frequency (Hertz) >>>>>>>>>>>> show_result = %f; >>>>>>>>>>>> >>>>>>>>>>>> function calc() >>>>>>>>>>>> m = evstr(get(ge_m,"string")); // get content in uicontrol ge_m >>>>>>>>>>>> k = evstr(get(ge_k,"string")); // get content in uicontrol ge_k >>>>>>>>>>>> fres = sqrt(m * k); >>>>>>>>>>>> // putting GUI updates inside the calculation routine is not pretty code. >>>>>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>>>>> show_result = %t; >>>>>>>>>>>> // update global variables >>>>>>>>>>>> [m,k,fres,show_result]=return(m,k,fres,show_result); >>>>>>>>>>>> endfunction >>>>>>>>>>>> >>>>>>>>>>>> function goodbye() >>>>>>>>>>>> close(ge); // Close GUI window >>>>>>>>>>>> printf("Resulting fres: %f Hertz\n",fres); >>>>>>>>>>>> abort // Print result in console (e.g. for copy/paste), then kill the app >>>>>>>>>>>> endfunction >>>>>>>>>>>> >>>>>>>>>>>> ge = scf(); // GUI Example, Initialize and 'set current figure' >>>>>>>>>>>> as = ge.axes_size; // read size of window, as = [width height] >>>>>>>>>>>> ge.figure_name = "GUI Example"; // Change window header >>>>>>>>>>>> >>>>>>>>>>>> uicontrol("style","text","string","Moving mass :","position", .. >>>>>>>>>>>> [10 as(2)-35 80 20],"background",[1 1 1]); // white background >>>>>>>>>>>> // position properties has four parameters = x,y,width,height >>>>>>>>>>>> // y-position counts from lower left corner, so we subtract from 'as' >>>>>>>>>>>> ge_m = uicontrol("style","edit","string",string(m), .. >>>>>>>>>>>> "position",[100 as(2)-35 80 20]); >>>>>>>>>>>> uicontrol("style","text","string","kg ","position", .. >>>>>>>>>>>> [200 as(2)-35 30 20],"background",[1 1 1]); >>>>>>>>>>>> >>>>>>>>>>>> uicontrol("style","text","string","Stiffness :","position", .. >>>>>>>>>>>> [10 as(2)-60 80 20],"background",[1 1 1]); >>>>>>>>>>>> ge_k = uicontrol("style","edit","string",string(k), .. >>>>>>>>>>>> "position",[100 as(2)-60 80 20]); >>>>>>>>>>>> uicontrol("style","text","string","N/m ","position", .. >>>>>>>>>>>> [200 as(2)-60 30 20],"background",[1 1 1]); >>>>>>>>>>>> >>>>>>>>>>>> uicontrol("style","pushbutton","string","Calculate", .. >>>>>>>>>>>> "position",[10 as(2)-85 80 20],"callback","calc"); >>>>>>>>>>>> >>>>>>>>>>>> // How do I make this "conditional"output show up in my GUI? >>>>>>>>>>>> if show_result then // If "Calculate"button was pushed at least once ... >>>>>>>>>>>> uicontrol("style","text","string","Result :","position", .. >>>>>>>>>>>> [10 as(2)-110 80 20]); >>>>>>>>>>>> uicontrol("style","text","string",string(fres), .. >>>>>>>>>>>> "position",[100 as(2)-110 80 20]); >>>>>>>>>>>> uicontrol("style","text","string","Hz ","position", .. >>>>>>>>>>>> [200 as(2)-110 30 20]); >>>>>>>>>>>> end >>>>>>>>>>>> >>>>>>>>>>>> uicontrol("style","pushbutton","string","Exit", .. >>>>>>>>>>>> "position",[10 as(2)-135 80 20],"callback","goodbye"); >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> 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 >>>>>> 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 >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Nov 29 21:53:59 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 29 Nov 2019 21:53:59 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: References: <67529b3e-821f-35ba-6456-d2ef770dba4b@gmail.com> Message-ID: <12333f6b-d618-28f4-587f-e3d628379de3@utc.fr> Le 29/11/2019 ? 21:21, Claus Futtrup a ?crit?: > Hi St?phane > > Lazy = not pretty. Matlab users do not have this possibility, and as a result, programs do not suffer from eventual border effects. But I know many Matlab users using a bunch of "global" statements. This is WORSE than lazy globals... However, you don't need to use this mechanism in your GUI. You have gcbo + proper backtracking on the parents, or (better) you can use? tags and findobj. S. > > ... but you didn't answer my question. Which way do you personally > prefer? ... and why? > > Cheers, > Claus > > (...) -- 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 sgougeon at free.fr Sat Nov 30 11:30:06 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 30 Nov 2019 11:30:06 +0100 Subject: [Scilab-users] ?= GUI hel In-Reply-To: <12333f6b-d618-28f4-587f-e3d628379de3@utc.fr> References: <67529b3e-821f-35ba-6456-d2ef770dba4b@gmail.com> <12333f6b-d618-28f4-587f-e3d628379de3@utc.fr> Message-ID: Le 29/11/2019 ? 21:53, St?phane Mottelet a ?crit?: > Le 29/11/2019 ? 21:21, Claus Futtrup a ?crit?: > >> Hi St?phane >> >> Lazy = not pretty. > > Matlab users do not have this possibility, and as a result, programs > do not suffer from eventual border effects. So why do they use "clear" at the beginning of every script? This is like a Matlab signature. In Scilab, i never use clear (all), and it works. > But I know many Matlab users using a bunch of "global" statements. > This is WORSE than lazy globals... Agreed, and IMO less handy. Samuel