From j.s.strom at hslmg.de Sun Jul 1 15:55:33 2018 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 01 Jul 2018 15:55:33 +0200 Subject: [Scilab-users] Scilab Cloud App In-Reply-To: References: <5B2E892A.5020104@hslmg.de> <140fde28fdeb056eec34c6598b9e0c0b516115cf.camel@esi-group.com> Message-ID: <5B38DD55.3070800@hslmg.de> Hallo, https://cloud.scilab.in/ is a gratifying page. It is clear, straightforward and functions at the first approach. Ich will use it in communication with potential Scilab users who hesitate to install Scilab on their computer. They will see at once how Scilab looks like and possibly develop some appetite for the real thing. Cheers Jens --------------------------------------------------------------------- Am 29.06.2018 14:19, schrieb Sandeep Nagar: > Sorry the link given in previous mail is for main project. The link to > cloud app is here . > > Regards > --------- > My books > My Amazon Author Profile > > Training profile: http://sandeepnagar4.wix.com/compuski > Research profile: Google Scholar > , > Linkedin , Researchgate > > --------- > *Dr. Sandeep Nagar* > > > > > > On Fri, Jun 29, 2018 at 5:48 PM Sandeep Nagar > wrote: > > Hi, > > Here is an option from Indian Institute of Technology, Bombay > (link ) > > Regards > --------- > My books > My Amazon Author Profile > > Training profile: http://sandeepnagar4.wix.com/compuski > Research profile: Google Scholar > , > Linkedin , Researchgate > > --------- > *Dr. Sandeep Nagar* > > > > > > On Fri, Jun 29, 2018 at 5:33 PM Cl?ment David > > > wrote: > > Hallo Jens, > > Well, first the Scilab Cloud App service is not free, if you > wish to test it please contact > team at scilab.io ! > > A demonstation video is available as > https://youtu.be/MaPKnUIEwoY ; as you might notice, the user > interaction is limited to uicontrol and plot management. There > is no way to get the code out of the > web service if the application/toolbox/script does not allow that. > > Technically speaking, this is not a web applet technology > (Scilab running within the browser) but rather a > web service technology (Scilab running within the cloud/servers). > > Thanks, > > -- > Cl?ment > > Le samedi 23 juin 2018 ? 19:53 +0200, Jens Simon Strom a ?crit : > > Hallo, > > I happended to see the page Scilab Cloud App, and was > attracted by the slogan "Don't waste your > > time in learning HTML/JS". > > > > I know web applets being availabe to the public via an URL > and allowing some mathematical > > calculations after some inputs. > > > > Given a functional Scilab script including a couple of > functions, does the associated Scilab Cloud > > App allow public acces to this script, when I publish the > appropriate URL on my webpage? > > Is there a Scilab Cloud App (any content is welcome) which I > coud run as an example? > > > > Trying this one on Firefox lead to nothing. > > > > > > Kind regards > > Jens > > _______________________________________________ > > 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 skiba.g at gmail.com Mon Jul 2 15:24:42 2018 From: skiba.g at gmail.com (Grzegorz Skiba) Date: Mon, 2 Jul 2018 15:24:42 +0200 Subject: [Scilab-users] Passing function argument by reference Message-ID: Dear Scilabers, Is it possible to pass object (tlist) to a function by a reference ? Example code : function ref_test(obj) obj.a = 10; endfunction o = tlist(["tlisttype", "a", "b"], 0, 0); ref_test(o) if o.a == 10 then disp("works");else disp("do not works");end Regards Grzegorz -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Jul 2 19:52:20 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 2 Jul 2018 17:52:20 +0000 Subject: [Scilab-users] Passing function argument by reference In-Reply-To: References: Message-ID: Hi, This seems to be a question of global and local scope of variables. You can try: function o2=ref_test(obj) o2 = obj; o2.a = 10; endfunction o = tlist(["tlisttype", "a", "b"], 0, 0); o2 = ref_test(o); if o2.a == 10 then disp("It works"); else disp("It does not work"); end Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Jul 2 21:20:40 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 2 Jul 2018 19:20:40 +0000 Subject: [Scilab-users] Passing function argument by reference In-Reply-To: References: Message-ID: Using global variables instead: global obj; obj = tlist(["tlisttype", "a", "b"], 0, 0); function ref_test(obj) global obj; obj.a = 10; endfunction ref_test(obj); if obj.a == 10 then disp("It works"); else disp("It does not work"); end -------------- next part -------------- An HTML attachment was scrubbed... URL: From qzhong.sjtu at gmail.com Tue Jul 3 00:58:21 2018 From: qzhong.sjtu at gmail.com (qzhong) Date: Mon, 2 Jul 2018 15:58:21 -0700 (MST) Subject: [Scilab-users] From Xcos model to DLL Message-ID: <1530572301716-0.post@n3.nabble.com> Dear all, I am working on a controller model in Xcos which takes inputs from sensors and generates control decisions. The Xcos model has been built and compiled with no error. The issue I have is that I need to generate a .dll file from the Xcos model and use it in another simulation tool, similar to the process done in Simulink by the Real Time Workshop module. I am not quite sure whether similar packages exist for Scilab/Xcos. Does anyone have a similar experience when using Scilab/Xcos? Any comments would be much appreciated. Qian -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From oleksiy.bond at gmail.com Tue Jul 3 03:12:56 2018 From: oleksiy.bond at gmail.com (ol.bond) Date: Mon, 2 Jul 2018 18:12:56 -0700 (MST) Subject: [Scilab-users] From Xcos model to DLL In-Reply-To: <1530572301716-0.post@n3.nabble.com> References: <1530572301716-0.post@n3.nabble.com> Message-ID: <1530580376836-0.post@n3.nabble.com> Hi, You can check for RTAI-Lab: https://www.rtai.org/?About_RTAI-Lab, which is similar to the Simulink RTW. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Tue Jul 3 11:19:35 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 3 Jul 2018 09:19:35 +0000 Subject: [Scilab-users] Passing function argument by reference In-Reply-To: References: Message-ID: Prosz? -------------- next part -------------- An HTML attachment was scrubbed... URL: From skiba.g at gmail.com Tue Jul 3 11:22:44 2018 From: skiba.g at gmail.com (Grzegorz Skiba) Date: Tue, 3 Jul 2018 11:22:44 +0200 Subject: [Scilab-users] Passing function argument by reference In-Reply-To: References: Message-ID: Thank you Rafael, I was looking for solution which allow object (tlist) modification by function call but it seems that it is not possible to implement the following without globals or using function return argument. function addChannelToSession(obj, arg) obj.channel = arg;endfunction function obj=createSession() obj = tlist(["tlisttype", "channel"], []);endfunction s = createSession(); // s.channel is []addChannelToSession(s, 1); // s.channel is 1 Regards Grzegorz 2018-07-03 11:19 GMT+02:00 Rafael Guerra : > *Prosz?* > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Jul 3 13:42:49 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 3 Jul 2018 11:42:49 +0000 Subject: [Scilab-users] Passing function argument by reference In-Reply-To: References: Message-ID: Hi Grzegorz, You could also use same input object as output: function obj=ref_test(obj) obj.a = 10; endfunction o = tlist(["tlisttype", "a", "b"], 0, 0); o = ref_test(o); if o.a == 10 then disp("It works"); else disp("It does not work"); end Not much difference in this simple example between: ?o = ref_test(o)? and ?ref_test(o)? ? Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at icloud.com Sat Jul 7 01:30:19 2018 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Sat, 07 Jul 2018 01:30:19 +0200 Subject: [Scilab-users] 3d pair correlation function PCF In-Reply-To: References: Message-ID: <11B0CAD7-10F6-400A-877F-BFCE617FA457@icloud.com> Colleagues: is there Scilab [or other] code for the computation of the 3d pair correlation function PCF of particles in a spherical volume? Heinz From jrafaelbguerra at hotmail.com Sat Jul 7 13:25:37 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 7 Jul 2018 11:25:37 +0000 Subject: [Scilab-users] 3d pair correlation function PCF In-Reply-To: <11B0CAD7-10F6-400A-877F-BFCE617FA457@icloud.com> References: <11B0CAD7-10F6-400A-877F-BFCE617FA457@icloud.com> Message-ID: Hi Heinz, Have you checked following codes (both 2D and 3D cases provided) for particles inside a cubic volume: https://github.com/cfinch/Shocksolution_Examples/blob/master/PairCorrelation/paircorrelation.py It might be possible to adapt that code from a cubic volume to a spherical one. For instance, it comes to mind evaluating if: rMax + d < R, where 'rMax' is as per code definition and 'd' is the distance of the particles from the center of the sphere with radius R Regards, Rafael From heinznabielek at me.com Sun Jul 8 02:21:31 2018 From: heinznabielek at me.com (Heinz Nabielek) Date: Sun, 08 Jul 2018 02:21:31 +0200 Subject: [Scilab-users] 3d pair correlation function PCF In-Reply-To: References: <11B0CAD7-10F6-400A-877F-BFCE617FA457@icloud.com> Message-ID: <0ECD2A9E-BA52-453E-B98F-EEA4E2E85B8E@me.com> On 07.07.2018, at 13:25, Rafael Guerra wrote: > > Hi Heinz, > > Have you checked following codes (both 2D and 3D cases provided) for particles inside a cubic volume: > https://github.com/cfinch/Shocksolution_Examples/blob/master/PairCorrelation/paircorrelation.py > > It might be possible to adapt that code from a cubic volume to a spherical one. > For instance, it comes to mind evaluating if: rMax + d < R, > where 'rMax' is as per code definition and 'd' is the distance of the particles from the center of the sphere with radius R Great many thanks. As a complete python novice, I just got it running as is (with difficulties). I keep working on it. Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure_2.png Type: image/png Size: 20947 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure_1.png Type: image/png Size: 22739 bytes Desc: not available URL: From qzhong.sjtu at gmail.com Wed Jul 11 20:04:05 2018 From: qzhong.sjtu at gmail.com (Q Z) Date: Wed, 11 Jul 2018 11:04:05 -0700 Subject: [Scilab-users] From Xcos model to DLL In-Reply-To: <1530580376836-0.post@n3.nabble.com> References: <1530572301716-0.post@n3.nabble.com> <1530580376836-0.post@n3.nabble.com> Message-ID: Thank you! On Mon, Jul 2, 2018 at 6:12 PM, ol.bond wrote: > Hi, > You can check for RTAI-Lab: https://www.rtai.org/?About_RTAI-Lab, which is > similar to the Simulink RTW. > > > > -- > 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 > -- Qian Zhong Graduate Department of Mechanical Engineering University of California, Berkeley -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Jul 12 11:59:45 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 12 Jul 2018 11:59:45 +0200 Subject: [Scilab-users] Sockets in scilab 6.0 In-Reply-To: <1530084924830-0.post@n3.nabble.com> References: <1527169243922-0.post@n3.nabble.com> <1529611007140-0.post@n3.nabble.com> <1529612596040-0.post@n3.nabble.com> <1530037202590-0.post@n3.nabble.com> <41d87fdeeaa44ce99f6b3174542e96fd@hidglobal.com> <1530084924830-0.post@n3.nabble.com> Message-ID: <813c1697-4242-1148-d002-b961a825631e@free.fr> Hello James, A new release of the socket_toolbox is now available on ATOMS (version 2.0.2): https://atoms.scilab.org/toolboxes/socket_toolbox It is recompiled for Scilab 6.0 and is now visible and installable in a straightforward way with Scilab 6. Some of the issues that you have met and described are fixed (or attenuated): Please see the CHANGES 2.0.1 => 2.0.2 section in the description. As indicated in the WARNING section, socket_toolbox for Scilab 6.0 may be affected by the bug http://bugzilla.scilab.org/15607 that is specific to Scilab 6. However, when trying some simple requests, even the former socket_toolbox release made Scilab 5.5.2 crashed. The "sync" option is now used in SOCKET_read() to improve synchronization issues yielding the "mat" error. But there are still some issues: for a same given request, sometimes SOCKET_read() returns successfully, sometimes it does not return at all. Despite i think 2.0.2 is better as well for Scilab 5.5, i did not push any binaries for Scilab 5.5 for it. May be some parts of SOCKET_read() would deserve being rewritten. As well, SOCKET_pause() used in SOCKET_query() looks a bit strange to me, instead of simply using sleep(). It looks also that when the returned content has some single quotes ', it makes troubles with SOCKET_read(). This was clearly a part of the issue with the demo pointing to www.google.fr. I have tried to protect ' as " already are, but it does not work. More work is needed on this side. I hope this release will improve the situation for your usage cases. Please do not hesitate to report your trials results on the ATOMS page. Best regards Samuel Le 27/06/2018 ? 09:35, James Holland a ?crit : > Hello Adrian > I have inmode outmode working now, I didn't initially realise that the curly > brackets are supposed to be included, I suspect there is a bug there because > binary and lf behave the same, the LF is always appended. > The flush I need because I'm not (or shouldn't be) sending a LF. > I was wondering if the problem is that the scilab script and the TCL are > executing simultaneously and I need to somehow wait for the TCL to finish. > I've downloaded TCL now, I will try running the same code directly. > > > > -- > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j_holland at msn.com Thu Jul 12 12:33:39 2018 From: j_holland at msn.com (James Holland) Date: Thu, 12 Jul 2018 03:33:39 -0700 (MST) Subject: [Scilab-users] Sockets in scilab 6.0 In-Reply-To: <813c1697-4242-1148-d002-b961a825631e@free.fr> References: <1527169243922-0.post@n3.nabble.com> <1529611007140-0.post@n3.nabble.com> <1529612596040-0.post@n3.nabble.com> <1530037202590-0.post@n3.nabble.com> <41d87fdeeaa44ce99f6b3174542e96fd@hidglobal.com> <1530084924830-0.post@n3.nabble.com> <813c1697-4242-1148-d002-b961a825631e@free.fr> Message-ID: <1531391619358-0.post@n3.nabble.com> I was able to compile for Scilab 6.0 by making a couple of small changes to the builder script I haven't had any time to look at this recently but I did try running a simple Tcl/Tk script directly and was having issues getting the data back so I am sure its not a Scilab issue. I have some concerns regarding the use of 'gets' when using binary mode, I am planning on trying 'read' instead. I wonder if the script only returns data when the buffer is full and therefore gets is not looking for an EOL terminator. The single quote issue I was able to resolve using an example I found on-line, I will look for those details. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Thu Jul 12 12:51:05 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 12 Jul 2018 12:51:05 +0200 Subject: [Scilab-users] Sockets in scilab 6.0 In-Reply-To: <1529612596040-0.post@n3.nabble.com> References: <1527169243922-0.post@n3.nabble.com> <1529611007140-0.post@n3.nabble.com> <1529612596040-0.post@n3.nabble.com> Message-ID: Le 21/06/2018 ? 22:23, James Holland a ?crit : > .../... > > I've modified the write routine from this: > > > function SOCKET_write(id,commande) > TCL_EvalStr([ "puts $tclsocket"+string(id)+" """+commande+ascii(10)+""""; > "flush $tclsocket"+string(id)]); > endfunction > > to this: > > function SOCKET_write(id,commande) > TCL_EvalStr([ "puts $tclsocket"+string(id)+"" ""+commande+""; > "flush $tclsocket"+string(id)]); > > endfunction > > That has already removed some spurious LF/CRs. > Putty also works OK and doesn't add the CR/LF at the end. Agreed. I will push this proposal in the next release. From sgougeon at free.fr Thu Jul 12 12:58:50 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 12 Jul 2018 12:58:50 +0200 Subject: [Scilab-users] Sockets in scilab 6.0 In-Reply-To: <1530037202590-0.post@n3.nabble.com> References: <1527169243922-0.post@n3.nabble.com> <1529611007140-0.post@n3.nabble.com> <1529612596040-0.post@n3.nabble.com> <1530037202590-0.post@n3.nabble.com> Message-ID: <3af671e5-793f-7d99-8003-82fd66c7c884@free.fr> Le 26/06/2018 ? 20:20, James Holland a ?crit : SOCKET_read(): > .../... > // bug en cas de "" > > "ScilabEval ""mat=\[\""[string map {\"" \""\"" \'' \''\''} $tclsocketligne]\"";mat\];"""; ^^^^^^^^^ This is what i have tried to tackle the single quote issue. But it did not work. So..: Le 12/07/2018 ? 12:33, James Holland a ?crit : > .../... > The single quote issue I was able to resolve using an example I found on-line Hope reading you soon about your solution, to push it in the next socket_toolbox release. From Clement.David at esi-group.com Thu Jul 12 17:50:43 2018 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Thu, 12 Jul 2018 15:50:43 +0000 Subject: [Scilab-users] From Xcos model to DLL In-Reply-To: <1530572301716-0.post@n3.nabble.com> References: <1530572301716-0.post@n3.nabble.com> Message-ID: <50beb290237e3d50b8fcc394caaaf9e4f08cc520.camel@esi-group.com> Hello Qian, The most obvious solution is to use the Tools->Code generator that will generate C code for the schema (the calls to the simulation functions) and using the simulation functions shipped with Scilab (and freely available within Scilab source code). If you want to target a specific hardware, the STM32 toolbox [1] (based on the same code generator) will let you generate similar C code but optimized and with some blocks for hardware support ! [1]: https://atoms.scilab.org/toolboxes/xcos_stm32_toolbox -- Cl?ment Le lundi 02 juillet 2018 ? 15:58 -0700, qzhong a ?crit : > Dear all, > > I am working on a controller model in Xcos which takes inputs from sensors > and generates control decisions. The Xcos model has been built and compiled > with no error. The issue I have is that I need to generate a .dll file from > the Xcos model and use it in another simulation tool, similar to the process > done in Simulink by the Real Time Workshop module. I am not quite sure > whether similar packages exist for Scilab/Xcos. > > Does anyone have a similar experience when using Scilab/Xcos? Any comments > would be much appreciated. > > Qian > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From qzhong.sjtu at gmail.com Thu Jul 12 18:47:02 2018 From: qzhong.sjtu at gmail.com (Q Z) Date: Thu, 12 Jul 2018 09:47:02 -0700 Subject: [Scilab-users] From Xcos model to DLL In-Reply-To: <50beb290237e3d50b8fcc394caaaf9e4f08cc520.camel@esi-group.com> References: <1530572301716-0.post@n3.nabble.com> <50beb290237e3d50b8fcc394caaaf9e4f08cc520.camel@esi-group.com> Message-ID: Hi Cl?ment, Thanks for the suggestions! I have tried the code generator in Xcos. However, it seems the C code was generated to substitute the blocks, but the code generator cannot handle the I/O blocks and deliver a standalone executable for real-time control. Also, when I put everything in my model to a single superblock and tried generating C code for it, the process kept running for hours without giving any output. I think it may be that my controller model has too many inputs and layers. I am trying the RTAI and see if I can move forward with it. Kind regards, Qian On Thu, Jul 12, 2018 at 8:50 AM, Cl?ment David wrote: > Hello Qian, > > The most obvious solution is to use the Tools->Code generator that will > generate C code for the > schema (the calls to the simulation functions) and using the simulation > functions shipped with > Scilab (and freely available within Scilab source code). > > If you want to target a specific hardware, the STM32 toolbox [1] (based on > the same code generator) > will let you generate similar C code but optimized and with some blocks > for hardware support ! > > [1]: https://atoms.scilab.org/toolboxes/xcos_stm32_toolbox > > -- > Cl?ment > > Le lundi 02 juillet 2018 ? 15:58 -0700, qzhong a ?crit : > > Dear all, > > > > I am working on a controller model in Xcos which takes inputs from > sensors > > and generates control decisions. The Xcos model has been built and > compiled > > with no error. The issue I have is that I need to generate a .dll file > from > > the Xcos model and use it in another simulation tool, similar to the > process > > done in Simulink by the Real Time Workshop module. I am not quite sure > > whether similar packages exist for Scilab/Xcos. > > > > Does anyone have a similar experience when using Scilab/Xcos? Any > comments > > would be much appreciated. > > > > Qian > > > > > > > > -- > > 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 > http://lists.scilab.org/mailman/listinfo/users > -- Qian Zhong Graduate Department of Mechanical Engineering University of California, Berkeley -------------- next part -------------- An HTML attachment was scrubbed... URL: From skiba.g at gmail.com Thu Jul 12 20:19:53 2018 From: skiba.g at gmail.com (Grzegorz Skiba) Date: Thu, 12 Jul 2018 20:19:53 +0200 Subject: [Scilab-users] From Xcos model to DLL In-Reply-To: References: <1530572301716-0.post@n3.nabble.com> <50beb290237e3d50b8fcc394caaaf9e4f08cc520.camel@esi-group.com> Message-ID: Dear Qian, If you need out of the box solution for rapid control prototyping and data acquisition you can check MicroDAQ toolbox [1]. It features automatic code generation for MicroDAQ DSP processor, Xcos blocks for ADC, DAC, Encoder, PWM, DIO,... real-time data access with standard Xcos sink block, legacy/custom C code integration, target execution profiling, standalone DSP application generation, data acquisition functionality. [1]: https://atoms.scilab.org/toolboxes/microdaq/1.2.1 Grzegorz 2018-07-12 18:47 GMT+02:00 Q Z : > Hi Cl?ment, > > Thanks for the suggestions! I have tried the code generator in Xcos. > However, it seems the C code was generated to substitute the blocks, but > the code generator cannot handle the I/O blocks and deliver a standalone > executable for real-time control. Also, when I put everything in my model > to a single superblock and tried generating C code for it, the process kept > running for hours without giving any output. I think it may be that my > controller model has too many inputs and layers. > > I am trying the RTAI and see if I can move forward with it. > > Kind regards, > Qian > > On Thu, Jul 12, 2018 at 8:50 AM, Cl?ment David < > Clement.David at esi-group.com> wrote: > >> Hello Qian, >> >> The most obvious solution is to use the Tools->Code generator that will >> generate C code for the >> schema (the calls to the simulation functions) and using the simulation >> functions shipped with >> Scilab (and freely available within Scilab source code). >> >> If you want to target a specific hardware, the STM32 toolbox [1] (based >> on the same code generator) >> will let you generate similar C code but optimized and with some blocks >> for hardware support ! >> >> [1]: https://atoms.scilab.org/toolboxes/xcos_stm32_toolbox >> >> -- >> Cl?ment >> >> Le lundi 02 juillet 2018 ? 15:58 -0700, qzhong a ?crit : >> > Dear all, >> > >> > I am working on a controller model in Xcos which takes inputs from >> sensors >> > and generates control decisions. The Xcos model has been built and >> compiled >> > with no error. The issue I have is that I need to generate a .dll file >> from >> > the Xcos model and use it in another simulation tool, similar to the >> process >> > done in Simulink by the Real Time Workshop module. I am not quite sure >> > whether similar packages exist for Scilab/Xcos. >> > >> > Does anyone have a similar experience when using Scilab/Xcos? Any >> comments >> > would be much appreciated. >> > >> > Qian >> > >> > >> > >> > -- >> > 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 >> http://lists.scilab.org/mailman/listinfo/users >> > > > > -- > Qian Zhong > Graduate > Department of Mechanical Engineering > University of California, Berkeley > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j_holland at msn.com Thu Jul 12 21:33:26 2018 From: j_holland at msn.com (James Holland) Date: Thu, 12 Jul 2018 12:33:26 -0700 (MST) Subject: [Scilab-users] Sockets in scilab 6.0 In-Reply-To: <3af671e5-793f-7d99-8003-82fd66c7c884@free.fr> References: <1527169243922-0.post@n3.nabble.com> <1529611007140-0.post@n3.nabble.com> <1529612596040-0.post@n3.nabble.com> <1530037202590-0.post@n3.nabble.com> <3af671e5-793f-7d99-8003-82fd66c7c884@free.fr> Message-ID: <1531424006417-0.post@n3.nabble.com> The tcl script that I'm running is below. It always returns datareadyflag = -1 even though it should stay in the loop until there is data to collect. #declare variables set outStr "*IDN?" set dataReadyFlag 1 set tclDataReceived "noData" #/---------------------------------------------------- #open a connection set tclsocket1 [socket "192.168.1.72" 3000] fconfigure $tclsocket1 -blocking 0 -translation binary #/---------------------------------------------------- #send a command puts $tclsocket1 $outStr flush $tclsocket1 after 100 #/---------------------------------------------------- #get a response while {dataReadyFlag>=0} { set $dataReadyFlag [gets $tclsocket1 tclDataReceived] puts "tclDataReceived $tclDataReceived" } #output to console puts "dataReadyFlag $dataReadyFlag" puts "done" -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From j_holland at msn.com Fri Jul 13 09:03:17 2018 From: j_holland at msn.com (James Holland) Date: Fri, 13 Jul 2018 00:03:17 -0700 (MST) Subject: [Scilab-users] Sockets in scilab 6.0 In-Reply-To: <1531424006417-0.post@n3.nabble.com> References: <1527169243922-0.post@n3.nabble.com> <1529611007140-0.post@n3.nabble.com> <1529612596040-0.post@n3.nabble.com> <1530037202590-0.post@n3.nabble.com> <3af671e5-793f-7d99-8003-82fd66c7c884@free.fr> <1531424006417-0.post@n3.nabble.com> Message-ID: <1531465397539-0.post@n3.nabble.com> I just realized the error in the while loop, I will try that again at the weekend, I think it may have been correct at one time but the routine never finished. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From buchydifference at yahoo.com Fri Jul 13 12:09:07 2018 From: buchydifference at yahoo.com (onyebuchy benard) Date: Fri, 13 Jul 2018 10:09:07 +0000 (UTC) Subject: [Scilab-users] Need solution References: <539809268.3371915.1531476547695.ref@mail.yahoo.com> Message-ID: <539809268.3371915.1531476547695@mail.yahoo.com> I having difficulty solving this orthogonal cutting problem. I need help. See the attachment.Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Machining.png Type: image/png Size: 47047 bytes Desc: not available URL: From ludovic.wagner67 at gmail.com Sat Jul 14 09:38:11 2018 From: ludovic.wagner67 at gmail.com (ludovic.wagner67 at gmail.com) Date: Sat, 14 Jul 2018 00:38:11 -0700 (MST) Subject: [Scilab-users] Matrix of strings and grid Message-ID: <1531553891591-0.post@n3.nabble.com> Hello, I'm looking for a way to display spreadsheets on a graphic window (the idea is to embed some features of spreadsheet programs). I need to superpose matrix of strings over grids using xrects(rects, fill). PS I have several thousands rows to display, so I can't loop through and draw all elements individually. Of course, I will add a slider to scroll the spreadsheet, but that's not an issue.. Is it possible to adjust and constraint the height of each row when drawing matrix of strings? Many thanks, -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sat Jul 14 11:04:05 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 14 Jul 2018 09:04:05 +0000 Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: <1531553891591-0.post@n3.nabble.com> References: <1531553891591-0.post@n3.nabble.com> Message-ID: Hi, Have you looked at the table example in "uicontrol" help file? It displays a nice Excel-style table inside a graphic window, with scroll bars. Regards, Rafael From ludovic.wagner67 at gmail.com Sat Jul 14 11:45:04 2018 From: ludovic.wagner67 at gmail.com (ludovic.wagner67 at gmail.com) Date: Sat, 14 Jul 2018 02:45:04 -0700 (MST) Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: References: <1531553891591-0.post@n3.nabble.com> Message-ID: <1531561504564-0.post@n3.nabble.com> Thanks for your reply. No I didn't really try, but I don't think that editable table can have advanced formatting option (background colour, etc.) It seems that above 100 rows approximately, xstringl lacks of precision. It also seems that above 2000 rows it displays nothing.. I think I will limit the display to a hundred rows and update data (values, background colours, etc.) instead of scrolling the entire spreadsheet. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sat Jul 14 15:19:34 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 14 Jul 2018 15:19:34 +0200 Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: <1531553891591-0.post@n3.nabble.com> References: <1531553891591-0.post@n3.nabble.com> Message-ID: <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> Hello Ludovic, Le 14/07/2018 ? 09:38, ludovic.wagner67 at gmail.com a ?crit : > Hello, > > I'm looking for a way to display spreadsheets on a graphic window (the idea > is to embed some features of spreadsheet programs). I need to superpose > matrix of strings over grids using xrects(rects, fill). > > PS I have several thousands rows to display, so I can't loop through and > draw all elements individually. Of course, I will add a slider to scroll the > spreadsheet, but that's not an issue.. > > Is it possible to adjust and constraint the height of each row when drawing > matrix of strings? A uicontrol - listbox component may be used to get a scrollable stylable area. Styling is done by using some (implicit or explicit) HTML tags. HTML 4.0 is supported. Please see for instance: --> demo_gui() // => GUI => Listboxes and Popupmenus --> edit SCI/modules/gui/demos/uicontrol_listbox_popupmenu.dem.sce https://help.scilab.org/docs/6.0.1/en_US/uicontrol_properties.html => String => listbox --> edit("SCI/modules/atoms/macros/atoms_internals/atomsSetInstalledList.sci",64) To cancel elements interactivity, just keep their .callback field empty. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Jul 14 21:24:29 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 14 Jul 2018 19:24:29 +0000 Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> References: <1531553891591-0.post@n3.nabble.com> <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> Message-ID: Hi Samuel, Thanks for this key example, which greatly improves the readability of long output lists. If Scilab provided the same background color functionality for the uicontrol in Table mode (rows, columns or cells), it would be awesome. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Saturday, July 14, 2018 3:20 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Matrix of strings and grid Hello Ludovic, Le 14/07/2018 ? 09:38, ludovic.wagner67 at gmail.com a ?crit : Hello, I'm looking for a way to display spreadsheets on a graphic window (the idea is to embed some features of spreadsheet programs). I need to superpose matrix of strings over grids using xrects(rects, fill). PS I have several thousands rows to display, so I can't loop through and draw all elements individually. Of course, I will add a slider to scroll the spreadsheet, but that's not an issue.. Is it possible to adjust and constraint the height of each row when drawing matrix of strings? A uicontrol - listbox component may be used to get a scrollable stylable area. Styling is done by using some (implicit or explicit) HTML tags. HTML 4.0 is supported. Please see for instance: --> demo_gui() // => GUI => Listboxes and Popupmenus --> edit SCI/modules/gui/demos/uicontrol_listbox_popupmenu.dem.sce https://help.scilab.org/docs/6.0.1/en_US/uicontrol_properties.html => String => listbox --> edit("SCI/modules/atoms/macros/atoms_internals/atomsSetInstalledList.sci",64) To cancel elements interactivity, just keep their .callback field empty. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludovic.wagner67 at gmail.com Sun Jul 15 09:49:17 2018 From: ludovic.wagner67 at gmail.com (ludovic.wagner67 at gmail.com) Date: Sun, 15 Jul 2018 00:49:17 -0700 (MST) Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: References: <1531553891591-0.post@n3.nabble.com> <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> Message-ID: <1531640957347-0.post@n3.nabble.com> Hello, Thanks for your replies. Sure, listboxes give great results where there is only one column even if I believe it would be possible to link several listboxes with callback. Is it possible to colour entire background (differently for each lines) instead of having the small square? I've just checked and found out that height of matrix of strings is steadily decreasing with the function stringl divided by number of strings. Is there any explanations? Thanks again! -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sun Jul 15 11:59:30 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 15 Jul 2018 09:59:30 +0000 Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: <1531640957347-0.post@n3.nabble.com> References: <1531553891591-0.post@n3.nabble.com> <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> <1531640957347-0.post@n3.nabble.com> Message-ID: The demo_gui() > GUI > Listboxes, show examples with entire lines with grey or black backgrounds. For other colors just use appropriate html code: https://htmlcolorcodes.com/ Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of ludovic.wagner67 at gmail.com Sent: Sunday, July 15, 2018 9:49 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] Matrix of strings and grid Hello, Thanks for your replies. Sure, listboxes give great results where there is only one column even if I believe it would be possible to link several listboxes with callback. Is it possible to colour entire background (differently for each lines) instead of having the small square? I've just checked and found out that height of matrix of strings is steadily decreasing with the function stringl divided by number of strings. Is there any explanations? Thanks again! -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From jrafaelbguerra at hotmail.com Sun Jul 15 13:06:23 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 15 Jul 2018 11:06:23 +0000 Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: References: <1531553891591-0.post@n3.nabble.com> <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> <1531640957347-0.post@n3.nabble.com> Message-ID: French colors codes (#0050A4, #FFFFFF , #EF4135) at: https://en.wikipedia.org/wiki/Flag_of_France#Design And Croacia's ones at: https://en.wikipedia.org/wiki/Flag_of_Croatia#Colours PS : Allez les Bleus! Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jul 15 16:18:03 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 15 Jul 2018 16:18:03 +0200 Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: <1531640957347-0.post@n3.nabble.com> References: <1531553891591-0.post@n3.nabble.com> <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> <1531640957347-0.post@n3.nabble.com> Message-ID: <530d6a7c-b8b5-88cc-5819-aed9441f7876@free.fr> Le 15/07/2018 ? 09:49, ludovic.wagner67 at gmail.com a ?crit : > Hello, > > Thanks for your replies. Sure, listboxes give great results where there is > only one column even if I believe it would be possible to link several > listboxes with callback. Is it possible to colour entire background > (differently for each lines) instead of having the small square? Here is an example of scrollable table displayed in a figure: nl = 500; t = [(1:nl)' grand(nl,10,"uin", -1e4, 1e4)]; t = strsubst(justify(string(t),"r"),""," "); t = "" + t + ""; t = [emptystr(t(:,1))+""]; t(1:2:$,1) = t(1:2:$,1) + "bgcolor=''#FFF6D6''>"; t(2:2:$,1) = t(2:2:$,1) + ">"; t = "" + .. "" + .. strcat(t,"","c") + .. "
"; clf p = [10 10 550 300]; Listbox = uicontrol(gcf(), "style","listbox", "string",t, "position",p); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jakojngddeghkblf.png Type: image/png Size: 52484 bytes Desc: not available URL: From ludovic.wagner67 at gmail.com Mon Jul 16 21:37:48 2018 From: ludovic.wagner67 at gmail.com (ludovic.wagner67 at gmail.com) Date: Mon, 16 Jul 2018 12:37:48 -0700 (MST) Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: <530d6a7c-b8b5-88cc-5819-aed9441f7876@free.fr> References: <1531553891591-0.post@n3.nabble.com> <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> <1531640957347-0.post@n3.nabble.com> <530d6a7c-b8b5-88cc-5819-aed9441f7876@free.fr> Message-ID: <1531769868090-0.post@n3.nabble.com> Thanks again Samuel, but I have the following error on my computer (Linux Mint 18.3): An error has been detected while loading /opt/scilab-6.0.1/share/scilab/modules/randlib/.libs/libscirandlib.so: /opt/scilab-6.0.1/share/scilab/modules/randlib/.libs/libsci randlib.so: cannot open shared object file: No such file or directory I finally decided to draw the grid thanks to a mesh and color the interior of the grids with xrects. I thought about colouring the grid directly from the mesh function, but I also want to hide the characters of the strings which exceed the column widths. It works quite well, but I still need to optimise the code enhance some features (different window sizes, etc.) -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Mon Jul 16 21:48:47 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 16 Jul 2018 21:48:47 +0200 Subject: [Scilab-users] Matrix of strings and grid In-Reply-To: <1531769868090-0.post@n3.nabble.com> References: <1531553891591-0.post@n3.nabble.com> <75aeaffc-e17b-76af-004c-11c66918376a@free.fr> <1531640957347-0.post@n3.nabble.com> <530d6a7c-b8b5-88cc-5819-aed9441f7876@free.fr> <1531769868090-0.post@n3.nabble.com> Message-ID: Le 16/07/2018 ? 21:37, ludovic.wagner67 at gmail.com a ?crit : > Thanks again Samuel, but I have the following error on my computer (Linux > Mint 18.3): > > An error has been detected while loading > /opt/scilab-6.0.1/share/scilab/modules/randlib/.libs/libscirandlib.so: > /opt/scilab-6.0.1/share/scilab/modules/randlib/.libs/libsci randlib.so: > cannot open shared object file: No such file or directory It comes from grand(..) that is used in the example just to create some sample data. You may use int((rand(nl,10)-0.5)*2e4) instead, or your own actual data. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Jul 16 22:09:16 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 16 Jul 2018 22:09:16 +0200 Subject: [Scilab-users] Why is MPI undocumented? Message-ID: Hello, The new MPI module is undocumented on Windows and on Linux (and likely on MacOS). It has some help pages on the 6.0 branch, but they are not published. Is it on purpose? There is a bug report about the MPI pages , but it is a minor non-blocking one. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Tue Jul 17 11:53:09 2018 From: arctica1963 at gmail.com (Lester Anderson) Date: Tue, 17 Jul 2018 10:53:09 +0100 Subject: [Scilab-users] Matlab to Scilab code query Message-ID: Hello all, I have a query regarding some code I tweaked to run under Scilab from the original Matlab version (attached both here). Both give the same result for subplot 1 (upper view), but the lower subplot has different results and I cannot see where the difference is occurring. It is just the one variable 'tecsub' that is different: Output of Matlab code run under Octave 4.2.1 Time to run: ~75 seconds (Windows 8, 4 Gb RAM) # name: tecsub # type: matrix # rows: 1 # columns: 10 -139.3527934186596 842.87653145532 1025.945665042103 1146.425533894219 1203.652906805529 1059.430317329787 1537.631029751693 1733.651048106937 1764.494015134895 1550.652338116411 Output of Scilab version of code - 6.0.1 Time run(same system): barely 2 seconds (-296.995965224827 1048.6694829971702 1170.395004249152 1144.5753136299015 1041.8907922680846 1221.1924318672322 1539.48125001601 1589.201708899888 1558.7010635930444 1708.2955099225785) Also note how fast the code runs under Scilab compared to Octave running broadly the same code. Didn't get to tweak the second subplot axis back to 0 depth at top, but here I'm interested in the values. If someone can see where the variance is great. Cheers Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Holt_Backstrip.m Type: application/octet-stream Size: 6482 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Backstrip1 Type: application/octet-stream Size: 5619 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Holt_Backstrip.sce Type: application/octet-stream Size: 7037 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Tue Jul 17 16:07:30 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 17 Jul 2018 14:07:30 +0000 Subject: [Scilab-users] Matlab to Scilab code query In-Reply-To: References: Message-ID: Hi Lester, Your problem seems to be fixed by defining in Scilab: //sl = fliplr(sl); sl = sl($:-1:1); // Scilab reverse //Wd = fliplr(Wd); Wd = Wd($:-1:1); // Scilab reverse For vectors, the L-R flip should be instead reverse order. Regarding the massive time savings of Scilab 6 vs Octave, I see it on the first time the code is run but not afterwards. Did not test enough. Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Jul 17 21:01:13 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 17 Jul 2018 19:01:13 +0000 Subject: [Scilab-users] Matlab to Scilab code query In-Reply-To: References: Message-ID: Actually, the root problem is not in Matlab fliplr(A) being replaced by A(:,$:-1:1), as per Scilab help file. According to Matlab help: ?If A is a row vector, then fliplr(A) returns a vector of the same length with the order of its elements reversed. If A is a column vector, then fliplr(A) returns A. unchanged.? The root problem was that the two vectors below in your script were considered row vectors by Octave and column vectors by Scilab. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Rafael Guerra Sent: Tuesday, July 17, 2018 4:08 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Matlab to Scilab code query Hi Lester, Your problem seems to be fixed by defining in Scilab: //sl = fliplr(sl); sl = sl($:-1:1); // Scilab reverse //Wd = fliplr(Wd); Wd = Wd($:-1:1); // Scilab reverse For vectors, the L-R flip should be instead reverse order. Regarding the massive time savings of Scilab 6 vs Octave, I see it on the first time the code is run but not afterwards. Did not test enough. Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Tue Jul 17 23:06:48 2018 From: arctica1963 at gmail.com (Lester Anderson) Date: Tue, 17 Jul 2018 22:06:48 +0100 Subject: [Scilab-users] Matlab to Scilab code query In-Reply-To: References: Message-ID: Thanks for the clarification, good to know the subtle details. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iwoj at il.pw.edu.pl Wed Jul 18 15:19:31 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Wed, 18 Jul 2018 15:19:31 +0200 Subject: [Scilab-users] Changing polyline properties in param3d1 Message-ID: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> Hello, I am looking for an elegant and simple way to manage with changing properties of polylines in a param3d1 plot. The problem is that sometimes (in case of specific data) there is only one polyline to draw but in most cases there are many polylines. By now I solved this problem by using "if" statement like below: param3d1(X,Y,Z); if size(X,'c')==1 then gce().polyline_style=4; gce().thickness=2; gce().foreground=32; else gce().children.polyline_style=4; gce().children.thickness=2; gce().children.foreground=32; end Maybe there is a simpler way to write it regarding that the number of columns in X, Y and Z matrices (number of polylines) will be different depending on data given in the program. Regards, Iza From jrafaelbguerra at hotmail.com Wed Jul 18 19:00:48 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 18 Jul 2018 17:00:48 +0000 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> Message-ID: Hello, I do not know the answer. On the other hand, as usually one wants to differentiate the different curves, could you predefine a number of curve properties (ps, th, fr, arrays below) and loop thru each curve? N = size(X,2); for i = 1:N param3d1(X(:,i),Y(:,i),Z(:,i)); gce().polyline_style= ps(i); gce().thickness= th(i); gce().foreground= fr(i); end Regards, Rafael From mouezapeter at gmail.com Thu Jul 19 06:46:49 2018 From: mouezapeter at gmail.com (moueza) Date: Wed, 18 Jul 2018 21:46:49 -0700 (MST) Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <1353658458018-4025307.post@n3.nabble.com> References: <1353658458018-4025307.post@n3.nabble.com> Message-ID: <1531975609863-0.post@n3.nabble.com> You can see at http://benice-equation.blogspot.com/2011/08/scilab-example-plotting-implicit-curves.html -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From mouezapeter at gmail.com Thu Jul 19 06:55:32 2018 From: mouezapeter at gmail.com (moueza) Date: Wed, 18 Jul 2018 21:55:32 -0700 (MST) Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <1353658458018-4025307.post@n3.nabble.com> References: <1353658458018-4025307.post@n3.nabble.com> Message-ID: <1531976132098-0.post@n3.nabble.com> Nowadays clue : https://help.scilab.org/docs/6.0.1/en_US/contour.html -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From iwoj at il.pw.edu.pl Thu Jul 19 11:59:37 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Thu, 19 Jul 2018 11:59:37 +0200 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> Message-ID: Thank you for your answer, but here all the polylines have the same properties. The problem is when there is only one polyline because the levels structure of figure properties are different then in the case of multiple polylines. But, as there is no other idea, I will stick with my "if" clause :-) Iza W dniu 18.07.2018 19:00, Rafael Guerra napisa?(a): > Hello, > > I do not know the answer. > > On the other hand, as usually one wants to differentiate the different > curves, could you predefine a number of curve properties (ps, th, fr, > arrays below) and loop thru each curve? > > N = size(X,2); > for i = 1:N > param3d1(X(:,i),Y(:,i),Z(:,i)); > gce().polyline_style= ps(i); > gce().thickness= th(i); > gce().foreground= fr(i); > end > > Regards, > Rafael > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From jrafaelbguerra at hotmail.com Thu Jul 19 12:49:31 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 19 Jul 2018 10:49:31 +0000 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> Message-ID: Then the following 'if' clause might be preferable, especially if you have many properties to change: if size(X,2)==1 then X = [X X]; Y = [Y Y]; Z = [Z Z]; end param3d1(X,Y,Z); gce().children.polyline_style=4; gce().children.thickness=2; gce().children.foreground=32; etc... Regards, Rafael -----Original Message----- From: users On Behalf Of Izabela W?jcik-Grzaba Sent: Thursday, July 19, 2018 12:00 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Changing polyline properties in param3d1 Thank you for your answer, but here all the polylines have the same properties. The problem is when there is only one polyline because the levels structure of figure properties are different then in the case of multiple polylines. But, as there is no other idea, I will stick with my "if" clause :-) Iza From iwoj at il.pw.edu.pl Thu Jul 19 13:59:42 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Thu, 19 Jul 2018 13:59:42 +0200 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> Message-ID: Thank you. It's quite a good idea. Shorter than mine, for sure. Iza W dniu 19.07.2018 12:49, Rafael Guerra napisa?(a): > Then the following 'if' clause might be preferable, especially if you > have many properties to change: > > if size(X,2)==1 then > X = [X X]; > Y = [Y Y]; > Z = [Z Z]; > end > param3d1(X,Y,Z); > gce().children.polyline_style=4; > gce().children.thickness=2; > gce().children.foreground=32; > etc... > > Regards, > Rafael > > -----Original Message----- > From: users On Behalf Of Izabela > W?jcik-Grzaba > Sent: Thursday, July 19, 2018 12:00 PM > To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Changing polyline properties in param3d1 > > Thank you for your answer, but here all the polylines have the same > properties. The problem is when there is only one polyline because the > levels structure of figure properties are different then in the case > of multiple polylines. > But, as there is no other idea, I will stick with my "if" clause :-) > > Iza > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From iwoj at il.pw.edu.pl Thu Jul 19 14:13:28 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Thu, 19 Jul 2018 14:13:28 +0200 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? Message-ID: Hi all, I have another problem. In my program I create an initial plot which is a basis for the input implemented by x_mdialog command. The problem is that when the x_mdialog window pops up the figure window bocomes inactive. It means that I can't zoom or rotate the plot which is necessary to correctly enter the data to x_mdialog matrix. Is there any solution to this? Is it possible to keep the figure active when other windows occur? Thanks in advance, Iza From iwoj at il.pw.edu.pl Thu Jul 19 18:47:52 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Thu, 19 Jul 2018 18:47:52 +0200 Subject: [Scilab-users] Function "locate" for 3d graphs In-Reply-To: References: <276c4e975701c0c4b7c3d330e7f8518b@il.pw.edu.pl>, Message-ID: <6009b581162e8197547e4e0eb90872d3@il.pw.edu.pl> Hi Rafael, Thank you very much. This code is great, but I don't know how to use datatipManagerMode when my param3d plot is in the frame inside the graphic window. It seems that it's not working in such situation. Regards, Iza From sgougeon at free.fr Thu Jul 19 20:43:18 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 19 Jul 2018 20:43:18 +0200 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: Message-ID: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> Hello Izabela, What you wish to do is not possible with x_mdialog(), that is a modal dialog: it pauses everything else until the dialog is quit. To do what you want, it's possible to create your own dialog box based on uicontrol("style", "edit") or other interactive components. Basically, you may have a look at the demos demo_gui(): GUI => Uicontrosl1 or Uicontrols2. Both have a "View-code" link in their menu bar. Best regards Samuel Le 19/07/2018 ? 14:13, Izabela W?jcik-Grz?ba a ?crit : > Hi all, > > I have another problem. In my program I create an initial plot which > is a basis for the input implemented by x_mdialog command. The problem > is that when the x_mdialog window pops up the figure window bocomes > inactive. It means that I can't zoom or rotate the plot which is > necessary to correctly enter the data to x_mdialog matrix. Is there > any solution to this? Is it possible to keep the figure active when > other windows occur? > > Thanks in advance, > Iza > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Thu Jul 19 21:30:22 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 19 Jul 2018 21:30:22 +0200 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> Message-ID: <95937912-7e6e-fc7d-245e-267a38ddad27@free.fr> Le 18/07/2018 ? 15:19, Izabela W?jcik-Grz?ba a ?crit : > Hello, > > I am looking for an elegant and simple way to manage with changing > properties of polylines in a param3d1 plot. The problem is that > sometimes (in case of specific data) there is only one polyline to > draw but in most cases there are many polylines. By now I solved this > problem by using "if" statement like below: > > param3d1(X,Y,Z); > > if size(X,'c')==1 then > gce().polyline_style=4; > gce().thickness=2; > gce().foreground=32; > else > gce().children.polyline_style=4; > gce().children.thickness=2; > gce().children.foreground=32; > end You are right: it would be preferable to get always the same graphical structure, whatever is the number of plotted curves, as it is the case with plot2d(): --> plot2d(1:10) --> gce() ans = Handle of type "Compound" with properties: ========================================== parent: Axes children: "Polyline" visible = "on" user_data = [] tag = "" --> clf, plot2d([1:10 ; 1:10]') --> gce() ans = Handle of type "Compound" with properties: ========================================== parent: Axes children: ["Polyline";"Polyline"] visible = "on" user_data = [] tag = "" So, the same stable architecture shall be reached for param3d1(). Such a change won't be back-compatible, but searching for "param3d1" in all existing programs and updating them will be easy. This change can be proposed for Scilab 6.1. For the time being, i am afraid that using an "if" as you do can't be avoided, as in: param3d1(X,Y,Z); c = gce(); if size(X,"c")>1, c = c.children; end c.polyline_style = 4; c.thickness = 2; c.foreground = 32; The last 3 lines should be replaceable with simply set(c, "polyline_style", 4, "thickness", 2, "foreground", 32); but there is a bug => being fixed Regards Samuel From sgougeon at free.fr Thu Jul 19 23:07:39 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 19 Jul 2018 23:07:39 +0200 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: <95937912-7e6e-fc7d-245e-267a38ddad27@free.fr> References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> <95937912-7e6e-fc7d-245e-267a38ddad27@free.fr> Message-ID: <70cc63c6-077c-723a-213f-81682f04d9fc@free.fr> Le 19/07/2018 ? 21:30, Samuel Gougeon a ?crit : > .../... > > param3d1(X,Y,Z); > c = gce(); > if size(X,"c")>1, c = c.children; end > c.polyline_style = 4; > c.thickness = 2; > c.foreground = 32; > > The last 3 lines should be replaceable with simply > set(c, "polyline_style", 4, "thickness", 2, "foreground", 32); > but there is a bug => being fixed reported here and fixed there . -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Jul 19 23:57:00 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 19 Jul 2018 23:57:00 +0200 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: <95937912-7e6e-fc7d-245e-267a38ddad27@free.fr> References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> <95937912-7e6e-fc7d-245e-267a38ddad27@free.fr> Message-ID: Le 19/07/2018 ? 21:30, Samuel Gougeon a ?crit : > Le 18/07/2018 ? 15:19, Izabela W?jcik-Grz?ba a ?crit : >> Hello, >> >> I am looking for an elegant and simple way to manage with changing >> properties of polylines in a param3d1 plot. The problem is that >> sometimes (in case of specific data) there is only one polyline to >> draw but in most cases there are many polylines. By now I solved this >> problem by using "if" statement like below: >> >> param3d1(X,Y,Z); >> >> if size(X,'c')==1 then >> gce().polyline_style=4; >> gce().thickness=2; >> gce().foreground=32; >> else >> gce().children.polyline_style=4; >> gce().children.thickness=2; >> gce().children.foreground=32; >> end > > You are right: it would be preferable to get always the same graphical > structure, whatever is the number of plotted curves, as it is the case > with plot2d(): > > --> plot2d(1:10) > --> gce() > ans = > > Handle of type "Compound" with properties: > ========================================== > parent: Axes > children: "Polyline" > visible = "on" > user_data = [] > tag = "" > > --> clf, plot2d([1:10 ; 1:10]') > --> gce() > ans = > Handle of type "Compound" with properties: > ========================================== > parent: Axes > children: ["Polyline";"Polyline"] > visible = "on" > user_data = [] > tag = "" > > So, the same stable architecture shall be reached for param3d1(). > Such a change won't be back-compatible, but searching for "param3d1" > in all existing programs and updating them will be easy. > This change can be proposed for Scilab 6.1. This bug about param3d1() unstable hierarchy is now reported there . -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas.wischounig at aon.at Fri Jul 20 10:26:28 2018 From: lukas.wischounig at aon.at (lupo) Date: Fri, 20 Jul 2018 01:26:28 -0700 (MST) Subject: [Scilab-users] Settings for page scrolling with mouse wheel Message-ID: <1532075188201-0.post@n3.nabble.com> Hello dear Scilab team! Since Scilab 6 one single scroll with the mouse wheel pages up/down a complete page in the scilab help and in scinotes. I am asking myself if one can change this behaviour and change it to the number of lines that should be scrolled (like in the windows mouse settings). Kind regards Lukas -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From iwoj at il.pw.edu.pl Fri Jul 20 11:27:31 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Fri, 20 Jul 2018 11:27:31 +0200 Subject: [Scilab-users] Changing polyline properties in param3d1 In-Reply-To: References: <900aace906455b1bd0cfbb24ec2a7492@il.pw.edu.pl> <95937912-7e6e-fc7d-245e-267a38ddad27@free.fr> Message-ID: <0f68fab40f8de7b51aff8268fb872c8c@il.pw.edu.pl> I'm glad that my problem can help to improve Scilab and looking forward to use the new version :-) Iza W dniu 19.07.2018 23:57, Samuel Gougeon napisa?(a): > Le 19/07/2018 ? 21:30, Samuel Gougeon a ?crit : > >> Le 18/07/2018 ? 15:19, Izabela W?jcik-Grz?ba a ?crit : >> >>> Hello, >>> >>> I am looking for an elegant and simple way to manage with changing >>> properties of polylines in a param3d1 plot. The problem is that >>> sometimes (in case of specific data) there is only one polyline to >>> draw but in most cases there are many polylines. By now I solved >>> this problem by using "if" statement like below: >>> >>> param3d1(X,Y,Z); >>> >>> if size(X,'c')==1 then >>> gce().polyline_style=4; >>> gce().thickness=2; >>> gce().foreground=32; >>> else >>> gce().children.polyline_style=4; >>> gce().children.thickness=2; >>> gce().children.foreground=32; >>> end >> >> You are right: it would be preferable to get always the same >> graphical structure, whatever is the number of plotted curves, as it >> is the case with plot2d(): >> >> --> plot2d(1:10) >> --> gce() >> ans = >> >> Handle of type "Compound" with properties: >> ========================================== >> parent: Axes >> children: "Polyline" >> visible = "on" >> user_data = [] >> tag = "" >> >> --> clf, plot2d([1:10 ; 1:10]') >> --> gce() >> ans = >> Handle of type "Compound" with properties: >> ========================================== >> parent: Axes >> children: ["Polyline";"Polyline"] >> visible = "on" >> user_data = [] >> tag = "" >> >> So, the same stable architecture shall be reached for param3d1(). >> Such a change won't be back-compatible, but searching for "param3d1" >> in all existing programs and updating them will be easy. >> This change can be proposed for Scilab 6.1. > > This bug about param3d1() unstable hierarchy is now reported there > [1]. > > > > Links: > ------ > [1] http://bugzilla.scilab.org/show_bug.cgi?id=15671 > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From david.cheze at cea.fr Fri Jul 20 12:20:36 2018 From: david.cheze at cea.fr (=?UTF-8?Q?David_Ch=C3=A8ze?=) Date: Fri, 20 Jul 2018 03:20:36 -0700 (MST) Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> Message-ID: <1532082036266-0.post@n3.nabble.com> Hi Pat and all, I was looking for similar simple feature for plotting time series with readable date time format and I can share an intermediate approach to update the x-ticks with a call to function labxdtv(), cf linked file labxdtv.sci There's no callback function, the function is called after the plot action and after every changes in windows size or zoom level : initial plot is like plot2(dtnm,Donnees), with dtnm a vector of datenum values and Donnees a matrix of related data to plot. After the figure is plot at first time or after every changes in windows size or level of zoom, call again labxdtv, it regraduates automatically the x-axis according to the datanum span and convert the datenum in readable date time vector format (auto_ticks are set to on in the function). Would be great to have in scilab a more powerful/flexible builtin function... :) David -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From iwoj at il.pw.edu.pl Fri Jul 20 12:20:58 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Fri, 20 Jul 2018 12:20:58 +0200 Subject: [Scilab-users] Function "locate" for 3d graphs In-Reply-To: <6009b581162e8197547e4e0eb90872d3@il.pw.edu.pl> References: <276c4e975701c0c4b7c3d330e7f8518b@il.pw.edu.pl>, <6009b581162e8197547e4e0eb90872d3@il.pw.edu.pl> Message-ID: <9099c359a86fb90d3206d69f56526eeb@il.pw.edu.pl> As Samuel GOUGEON suggested I reported a wish to upgrede function locate for 3d graphs on Bugzilla: https://bugzilla.scilab.org/show_bug.cgi?id=15674 Iza From iwoj at il.pw.edu.pl Fri Jul 20 12:47:16 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Fri, 20 Jul 2018 12:47:16 +0200 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> Message-ID: <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> Thank you for the explanation and suggestions. I will have to put my x_mdialog into another graphic window. Iza W dniu 19.07.2018 20:43, Samuel Gougeon napisa?(a): > Hello Izabela, > > What you wish to do is not possible with x_mdialog(), that is a modal > dialog: it pauses everything else until the dialog is quit. > > To do what you want, it's possible to create your own dialog box based > on uicontrol("style", "edit") or other interactive components. > Basically, you may have a look at the demos demo_gui(): GUI => > Uicontrosl1 or Uicontrols2. Both have a "View-code" link in their menu > bar. > > Best regards > Samuel > > Le 19/07/2018 ? 14:13, Izabela W?jcik-Grz?ba a ?crit : >> Hi all, >> >> I have another problem. In my program I create an initial plot which >> is a basis for the input implemented by x_mdialog command. The problem >> is that when the x_mdialog window pops up the figure window bocomes >> inactive. It means that I can't zoom or rotate the plot which is >> necessary to correctly enter the data to x_mdialog matrix. Is there >> any solution to this? Is it possible to keep the figure active when >> other windows occur? >> >> Thanks in advance, >> Iza >> _______________________________________________ >> 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 Fri Jul 20 14:40:49 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 20 Jul 2018 14:40:49 +0200 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: <1532082036266-0.post@n3.nabble.com> References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> <1532082036266-0.post@n3.nabble.com> Message-ID: <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> Le 20/07/2018 ? 12:20, David Ch?ze a ?crit : > Hi Pat and all, > > I was looking for similar simple feature for plotting time series with > readable date time format and I can share an intermediate approach to update > the x-ticks with a call to function labxdtv(), cf linked file labxdtv.sci > > There's no callback function, the function is called after the plot action > and after every changes in windows size or zoom level : initial plot is like > plot2(dtnm,Donnees), with dtnm a vector of datenum values and Donnees a > matrix of related data to plot. After the figure is plot at first time or > after every changes in windows size or level of zoom, call again labxdtv, it > regraduates automatically the x-axis according to the datanum span and > convert the datenum in readable date time vector format (auto_ticks are set > to on in the function). > > Would be great to have in scilab a more powerful/flexible builtin > function... :) Sure, but it's a rather complex function. The need was reported 10 years ago @ http://bugzilla.scilab.org/6228 labxdtv() gives a rather raw idea of the task. On it's showcase example, ticks are every 3 months over one year: But they are not nice: * At this scale, major ticks should rather be on the 1st of months. * there should not be any shift 17 => 18 => 19. This means that subticking must be completely customized, with a polyline superimposed to the axis, since it is irregular. * here there is only one subtick instead of rather two (for an automatic handling) * etc.. So yes, a powerful function formating dates would be nice. But implementing a really nice and useful one is definitely not trivial. Cheers Samuel PS : there is presently no event triggered by zooming or panning an axes. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kfppldgkikokegmi.png Type: image/png Size: 1708 bytes Desc: not available URL: From sgougeon at free.fr Fri Jul 20 14:52:22 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 20 Jul 2018 14:52:22 +0200 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> <1532082036266-0.post@n3.nabble.com> <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> Message-ID: Le 20/07/2018 ? 14:40, Samuel Gougeon a ?crit : > Le 20/07/2018 ? 12:20, David Ch?ze a ?crit : >> Hi Pat and all, >> >> I was looking for similar simple feature for plotting time series with >> readable date time format and I can share an intermediate approach to update >> the x-ticks with a call to function labxdtv(), cf linked file labxdtv.sci >> >> There's no callback function, the function is called after the plot action >> and after every changes in windows size or zoom level : initial plot is like >> plot2(dtnm,Donnees), with dtnm a vector of datenum values and Donnees a >> matrix of related data to plot. After the figure is plot at first time or >> after every changes in windows size or level of zoom, call again labxdtv, it >> regraduates automatically the x-axis according to the datanum span and >> convert the datenum in readable date time vector format (auto_ticks are set >> to on in the function). >> >> Would be great to have in scilab a more powerful/flexible builtin >> function... :) > > Sure, but it's a rather complex function. The need was reported 10 > years ago @ http://bugzilla.scilab.org/6228 > labxdtv() gives a rather raw idea of the task. On it's showcase > example, ticks are every 3 months over one year: > > But they are not nice: > > * At this scale, major ticks should rather be on the 1st of months. > * there should not be any shift 17 => 18 => 19. This means that > subticking must be completely customized, with a polyline > superimposed to the axis, since it is irregular. > * here there is only one subtick instead of rather two (for an > automatic handling) > Even better, subticks could match weeks, for instance on each monday 00:00:00 (as the default, or as a subticking option). This means that the first subtick after a major on the 1st at 00:00:00 will be shifted wrt its leading major, with a shift not equal from a major to the next. Here, having 11-12 weekly subticks between 2 major ticks would be the right subticking scale. If we use some subticks every 10 days instead of weekly ones, there will be also some irregularities for 28|29|31-days-long months for setting the last subtick. All these details -- and others -- must be properly processed to really have a workable function. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1708 bytes Desc: not available URL: From sgougeon at free.fr Fri Jul 20 15:12:47 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 20 Jul 2018 15:12:47 +0200 Subject: [Scilab-users] Function "locate" for 3d graphs In-Reply-To: <9099c359a86fb90d3206d69f56526eeb@il.pw.edu.pl> References: <276c4e975701c0c4b7c3d330e7f8518b@il.pw.edu.pl> <6009b581162e8197547e4e0eb90872d3@il.pw.edu.pl> <9099c359a86fb90d3206d69f56526eeb@il.pw.edu.pl> Message-ID: <5b350056-88c6-4fd7-0e68-f26bb5cd4d4c@free.fr> Le 20/07/2018 ? 12:20, Izabela W?jcik-Grz?ba a ?crit : > As Samuel GOUGEON suggested I reported a wish to upgrede function > locate for 3d graphs on Bugzilla: > > https://bugzilla.scilab.org/show_bug.cgi?id=15674 This could be implemented for Scilab 6.1 after the commit fixing locate() in 2D, pending for 80 days still without review is validated, integrated in Scilab 6.0.2, and transfered to Scilab 6.1. From david.cheze at cea.fr Fri Jul 20 15:27:53 2018 From: david.cheze at cea.fr (CHEZE David 227480) Date: Fri, 20 Jul 2018 13:27:53 +0000 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> <1532082036266-0.post@n3.nabble.com> <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> Message-ID: Hi samuel, Thank you for your prompt comments, I fully agree that it's not trivial to have a really nice function with the features you pointed out. I would find hardly acceptable, from common excel coming users point of view, that Scilab can't offer at least a raw feature to manage this very common task when processing data with timestamps over weeks, months, years therefore I proposed this raw approach. An extra comments about the function labxdtv: labxdtv uses the automatic x-ticks locations caluclated from datenum values and convert into datevec-Like formats eg YY/MM/DD , MM/DD.hh, DD.hh:mm, hh:mm:ss according to the max span of the level of zoom in the current display. If the axis is zoomed or the window size changed, call again labxdtv so that it re-graduates this x-axis (according to datenum values) and convert the new x-ticks into appropriate datevec and automatic choice of the format YY/MM/DD , MM/DD.hh, DD.hh:mm, hh:mm:ss according to the max span of the x-axis. In your first comment, I 'm not sure to get your point about : [cid:image001.png at 01D4203B.B4E40A30] * there should not be any shift 17 => 18 => 19. This means that subticking must be completely customized, with a polyline superimposed to the axis, since it is irregular. In the above example 17, 18 and 19 are years , not days so it's rather normal display. At this level of zoom we have YY/MM/DD but if you manually zoom and change the window size and call again labxdtv() afterwards, you may obtain the following, which allow to see when you : [cid:image002.png at 01D4203E.390F6B40] And zoom-in further around 2017 October, then labxdtv() called you may quickly obtain the figure below, so you can read directly that the format is automatically adapted to "MM/DD.HH" It's not so common format but acceptable to analyze the data on the fly. [cid:image004.png at 01D4203E.390F6B40] I find quite important that the graduation on the figure is still relying on datenum, as it is the right underlying numerical format to show date time information. Cheers, David -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 1708 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 13922 bytes Desc: image002.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15296 bytes Desc: image004.png URL: From sgougeon at free.fr Fri Jul 20 18:33:06 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 20 Jul 2018 18:33:06 +0200 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> <1532082036266-0.post@n3.nabble.com> <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> Message-ID: <557b71a0-8beb-6d18-7b9b-3d3607456219@free.fr> Le 20/07/2018 ? 15:27, CHEZE David 227480 a ?crit : > > Hi samuel, > > Thank you for your prompt comments, I fully agree that it?s not > trivial to have a really nice function with the features you pointed out. > > I would find hardly acceptable, from common excel coming users point > of view, that Scilab can?t offer at least a raw feature to manage this > very common task when processing data with timestamps over weeks, > months, years therefore I proposed this raw approach. > The problem with proposing an official function in a only raw version is that it becomes a commitment. Then changing it is more difficult because backcompatibility issues must be avoided or/and handled. This is why, to me, it is better to propose such a version on the fileexchange, that is more informal. > > An extra comments about the function labxdtv:labxdtv uses the > automatic x-ticks locations caluclated from datenum values and convert > into datevec-Like formats eg YY/MM/DD , MM/DD.hh, DD.hh:mm, hh:mm:ss > according to the max span of the level of zoom in the current display. > > If the axis is zoomed or the window size changed, call again labxdtv > so that it re-graduates this x-axis (according to datenum values) and > convert the new x-ticks into appropriate datevec and automatic choice > of the format YY/MM/DD , MM/DD.hh, DD.hh:mm, hh:mm:ss according to the > max span of the x-axis. > My PS meant that there is no equivalence of gcf().resizefcn for zooming. So, recalling labxdtv() must be done /intentionnally, by hand,/ after zooming or spanning an axes. > > In your first comment, I ?m not sure to get your point about : > > mailbox:///C:/Users/Samuel/AppData/Roaming/Thunderbird/Profiles/dm9cexq8.default/Mail/Local%20Folders/_Scilab.sbd/users@?number=97209056&header=quotebody&part=1.1.2&filename=image001.png > > * there should not be any shift 17 => 18 => 19. This means that > subticking must be completely customized, with a polyline > superimposed to the axis, since it is irregular. > > In the above example 17, 18 and 19 are years , not days so it?s rather > normal display. > My fault! As aa/bb/cc is in french the common format for dd/mm/yy, I paid attention only to the first aa/bb, taking them for days/months. Beside this misunderstanding, the discussion and remarks remain the same: then we could rather expect majors ticks always on 1st of some months, and smart subticks accordingly. > At this level of zoom we have YY/MM/DD but if you manually zoom and > change the window size and call again labxdtv() afterwards, you may > obtain the following, which allow to see when you : > > And zoom-in further around 2017 October, then labxdtv() called you may > quickly obtain the figure below, so you can read directly that the > format is automatically adapted to ?MM/DD.HH? It?s not so common > format but acceptable to analyze the data on the fly. > Usual commonly spread formats are quite known and shared. AFAIK, the most standard one is YYYY-MM-DD HH:MN:SS.ssss, with possible truncation. > .../... > > I find quite important that the graduation on the figure is still > relying on datenum, as it is the right underlying numerical format to > show date time information. > IMO, the input format should be customizable though an input option : * absolute formats : unix time, julian days, excel time, ... + linear (s, days, s..) vs vectorized (datenum, etc) * relative formats (without origin) : in s, mn, h, days Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1708 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 13922 bytes Desc: not available URL: From sgougeon at free.fr Fri Jul 20 18:40:05 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 20 Jul 2018 18:40:05 +0200 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: <557b71a0-8beb-6d18-7b9b-3d3607456219@free.fr> References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> <1532082036266-0.post@n3.nabble.com> <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> <557b71a0-8beb-6d18-7b9b-3d3607456219@free.fr> Message-ID: <64ecbb8e-ffde-507d-e762-ab6a6e584722@free.fr> Le 20/07/2018 ? 18:33, Samuel Gougeon a ?crit : > > My PS meant that there is no equivalence of gcf().resizefcn for > zooming. So, recalling labxdtv() must be done /intentionnally, by > hand,/ after zooming or spanning an axes. Please read "zooming and *p*anning" > >> .../... >> >> I find quite important that the graduation on the figure is still >> relying on datenum, as it is the right underlying numerical format to >> show date time information. >> > IMO, the input format should be customizable though an input option : > > * absolute formats : unix time, julian days, excel time, ... + > linear (s, days, s..) vs vectorized (datenum, etc) > * relative formats (without origin) : in s, mn, h, days > May be speaking about absolute/relative *scales*, in a linearized or vectorized *format* would be clearer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 20 19:35:06 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 20 Jul 2018 19:35:06 +0200 Subject: [Scilab-users] Fix of bug #4953 (behavior of clean() with %inf) In-Reply-To: <097f1d1d-0047-ab98-11cb-307672848fad@utc.fr> References: <097f1d1d-0047-ab98-11cb-307672848fad@utc.fr> Message-ID: <73d59bcf-18c5-d0f1-9da2-86e7371e55b5@free.fr> Hello, Le 28/06/2018 ? 17:41, St?phane Mottelet a ?crit : > Hello all, > > A fix proposal is under review @ > https://codereview.scilab.org/#/c/20204/2, in order to consider the > actual behavior of clean() when the argument has some infinite values: > > In Scilab 6.0.1: > > > --> clean([%inf 1]) > ans = > > 0. 0. > > By a argument of continuity, since > > --> clean([1.79e308 1]) > ans = > > 1.79D+308 0. > > the fixed behavior would be > > --> clean([%inf 1]) > ans = > > Inf 0. > > Please give your opinion if you feel concerned. IMO, setting to zero all finite values of an array as soon as one of them is %inf is abusive and counter-productive. Let --> A = 10.^grand(4,4,"unf",-10,5); A(2,2) = %inf; A = 4.3699094 0.0000014 0.67061 6.095D-09 6503.1214 Inf 4.5767598 0.0006926 20.907407 1.5687011 2.749D-08 0.0029886 129.70759 1.102D-10 0.4564722 40.621591 The proposed implementation would lead to --> clean(A) // A(abs(A)~=%inf & A==A)=0 ans = 0. 0. 0. 0. 0. Inf 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. With that, no more processing or linear algebra can be done, just getting exclusively some zeros, %inf, and Nan. The same can be done with A(abs(A)~=%inf) = 0. This is a poor and stopping result. Instead, cleaning values *with respect to the max |finite| one* will yield --> clean(A) // B = A; A(abs(A) From arctica1963 at gmail.com Sat Jul 21 11:50:20 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sat, 21 Jul 2018 02:50:20 -0700 (MST) Subject: [Scilab-users] ATOMS error (Scilab 6.0.1) Message-ID: <1532166620279-0.post@n3.nabble.com> Hello all, Just recently been getting this error when running the ATOMS module manager: "No ATOMS module is available. Please, check your Internet connection or make sure that your OS is compatible with ATOMS." I am using version 6.0.1 and know that it was working a while back, so not sure what has changed. It can clearly get to the repository to update the database, but then generates an error. Console shows: "Scanning repository http://atoms.scilab.org/6.0 ... Done" I also verified this on a separate machine that I only recently updated with 6.0.1, and that gave the same response. Not a big deal as I tend to write functions as I need them, but seems odd. Tried deleting the user folder at: C:\Users\xxxx\AppData\Roaming\Scilab\scilab-6.0.1 but did not help. Any ideas? It works fine under 5.5.2. Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From antoine.elias at scilab-enterprises.com Sat Jul 21 14:03:51 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Sat, 21 Jul 2018 14:03:51 +0200 Subject: [Scilab-users] ATOMS error (Scilab 6.0.1) In-Reply-To: <1532166620279-0.post@n3.nabble.com> References: <1532166620279-0.post@n3.nabble.com> Message-ID: <3120e400-3301-06f0-8479-8f70576cfb87@scilab-enterprises.com> Hello, Trouble comes from a bug in mgetl function. (Windows only) Patch was validated this morning. From tomorrow you can use nightly build version to avoid this. http://www.scilab.org/en/development/nightly_builds/branch60 Sorry for inconvenience. Antoine Le 21/07/2018 ? 11:50, arctica1963 a ?crit?: > Hello all, > > Just recently been getting this error when running the ATOMS module manager: > > "No ATOMS module is available. Please, check your Internet connection or > make sure that your OS is compatible with ATOMS." > > I am using version 6.0.1 and know that it was working a while back, so not > sure what has changed. It can clearly get to the repository to update the > database, but then generates an error. Console shows: "Scanning repository > http://atoms.scilab.org/6.0 ... Done" > > I also verified this on a separate machine that I only recently updated with > 6.0.1, and that gave the same response. Not a big deal as I tend to write > functions as I need them, but seems odd. > > Tried deleting the user folder at: > C:\Users\xxxx\AppData\Roaming\Scilab\scilab-6.0.1 but did not help. > > Any ideas? It works fine under 5.5.2. > > Lester > > > > -- > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From buchydifference at yahoo.com Sun Jul 22 07:20:24 2018 From: buchydifference at yahoo.com (onyebuchy benard) Date: Sun, 22 Jul 2018 05:20:24 +0000 (UTC) Subject: [Scilab-users] Stability chart References: <815395296.415000.1532236824780.ref@mail.yahoo.com> Message-ID: <815395296.415000.1532236824780@mail.yahoo.com> Hello users,How do I plot stability chart in SciLab.ExampleGenerate a stability chart of ten lobes for a turning process with (without processdamping) the parameters; natural frequency of 7000 rad/s, damping ratio = 0.025, modalmass = 0.0931kg, cutting coefficient Kx= Kf = 6 ? 10Nm ,Y= 0.8 and feed speed = 0.0025m/s. Thanks all Onyebuchy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Jul 22 10:08:50 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 22 Jul 2018 08:08:50 +0000 Subject: [Scilab-users] Stability chart In-Reply-To: <815395296.415000.1532236824780@mail.yahoo.com> References: <815395296.415000.1532236824780.ref@mail.yahoo.com> <815395296.415000.1532236824780@mail.yahoo.com> Message-ID: Hi, This reference may help: http://ijme.us/cd_06/PDF/IT%20301-050.pdf Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Jul 22 10:24:30 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 22 Jul 2018 01:24:30 -0700 (MST) Subject: [Scilab-users] Settings for page scrolling with mouse wheel In-Reply-To: <1532075188201-0.post@n3.nabble.com> References: <1532075188201-0.post@n3.nabble.com> Message-ID: <1532247870867-0.post@n3.nabble.com> Hi Lukas, In my Scilab 6.0.1 SciNotes, if setting in Win7 > Mouse Properties > Wheel > Vertical Scrolling = 1 line, I get scrolling steps of about 4 lines. Increasing the Vertical Scrolling to 5 lines, I get jumps of about 20 lines. There might be a unit jump of 4 lines set somewhere in SciNotes, do not know. Regards, Rafael -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From arctica1963 at gmail.com Sun Jul 22 10:49:17 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sun, 22 Jul 2018 01:49:17 -0700 (MST) Subject: [Scilab-users] ATOMS error (Scilab 6.0.1) In-Reply-To: <3120e400-3301-06f0-8479-8f70576cfb87@scilab-enterprises.com> References: <1532166620279-0.post@n3.nabble.com> <3120e400-3301-06f0-8479-8f70576cfb87@scilab-enterprises.com> Message-ID: <1532249357640-0.post@n3.nabble.com> Thanks for the update. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From arctica1963 at gmail.com Sun Jul 22 11:11:45 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sun, 22 Jul 2018 02:11:45 -0700 (MST) Subject: [Scilab-users] Getting netCDF files into Scilab 6.0.1 Message-ID: <1532250705858-0.post@n3.nabble.com> Hello, I am looking to use netCDF files generated from the GMT software in Scilab 6.0.1, but there is no easy way to work the problem other than exporting the data out from the binary grids to either XYZ or ESRI Ascii raster. The latter is a more compact form with the basic structure of a header describing the data limits and structure: ncols 1200 nrows 1200 xllcorner -10 Lower-left X (Long-Lat limits -10/10/-10/10 yllcorner -10 Lower-Left Y cellsize 0.0166666666667 - increment = 1 arc minute nodata_value -9999 451.343170166 436.005554199 443.061035156 443.665924072 465.607574463 492.191741943 476.50994873 452.265014648 451.439880371 461.659393311 ...... ... ... all of the Z-values ... -4323.2890625 -4315.12451172 -4307.19384766 -4305.27490234 -4311.49902344 -4317.90771484 -4324.23046875 -4320.47070313 -4308.60107422 -4292.62011719 -4280.39697266 This is a moderately large file ~20 mB or so. Is there a way to reliably read this structure and vectorise X, Y, and Z? The data I am looking at is a grid so want to work on the whole grid as eith DEM data or gravity etc. As a test, I converted the grid to xyz, and tried csvRead, having replaced the spaces (which were not a constant number of spaces between values) with commas. The file was in excess of 50 mb, so not that huge really, but csvRead always failed to read all the file and drop out at one specific line (~7608) with a message of inconsistent column numbers, i.e. it though there were only 2 columns when in reality the whole thing was 3 (checked in the program Surfer). When one looks at the line specified, it is clearly 3 columns. Does csvRead have a limit to what it can load, if so what is a workaround? I suppose one could chop it down into chunks and concatanate the arrays, but that is a lot more work. Any suggestions? Thanks Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From arctica1963 at gmail.com Sun Jul 22 11:12:23 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sun, 22 Jul 2018 02:12:23 -0700 (MST) Subject: [Scilab-users] Getting netCDF files into Scilab 6.0.1 Message-ID: <1532250743803-0.post@n3.nabble.com> Hello, I am looking to use netCDF files generated from the GMT software in Scilab 6.0.1, but there is no easy way to work the problem other than exporting the data out from the binary grids to either XYZ or ESRI Ascii raster. The latter is a more compact form with the basic structure of a header describing the data limits and structure: ncols 1200 nrows 1200 xllcorner -10 Lower-left X (Long-Lat limits -10/10/-10/10 yllcorner -10 Lower-Left Y cellsize 0.0166666666667 - increment = 1 arc minute nodata_value -9999 451.343170166 436.005554199 443.061035156 443.665924072 465.607574463 492.191741943 476.50994873 452.265014648 451.439880371 461.659393311 ...... ... ... all of the Z-values ... -4323.2890625 -4315.12451172 -4307.19384766 -4305.27490234 -4311.49902344 -4317.90771484 -4324.23046875 -4320.47070313 -4308.60107422 -4292.62011719 -4280.39697266 This is a moderately large file ~20 mB or so. Is there a way to reliably read this structure and vectorise X, Y, and Z? The data I am looking at is a grid so want to work on the whole grid as eith DEM data or gravity etc. As a test, I converted the grid to xyz, and tried csvRead, having replaced the spaces (which were not a constant number of spaces between values) with commas. The file was in excess of 50 mb, so not that huge really, but csvRead always failed to read all the file and drop out at one specific line (~7608) with a message of inconsistent column numbers, i.e. it though there were only 2 columns when in reality the whole thing was 3 (checked in the program Surfer). When one looks at the line specified, it is clearly 3 columns. Does csvRead have a limit to what it can load, if so what is a workaround? I suppose one could chop it down into chunks and concatanate the arrays, but that is a lot more work. Any suggestions? Thanks Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sun Jul 22 11:28:59 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 22 Jul 2018 09:28:59 +0000 Subject: [Scilab-users] Getting netCDF files into Scilab 6.0.1 In-Reply-To: <1532250743803-0.post@n3.nabble.com> References: <1532250743803-0.post@n3.nabble.com> Message-ID: Hi, You can strip the header rows and save a newfile. Then use mfscanf as follows: fid = mopen(newfile); M = zeros(nrows, ncols); for k=1:nrows M(k,:) = mfscanf(ncols,fid,"%f"); end Regards, Rafael From sgougeon at free.fr Sun Jul 22 11:45:57 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 22 Jul 2018 11:45:57 +0200 Subject: [Scilab-users] Getting netCDF files into Scilab 6.0.1 In-Reply-To: <1532250743803-0.post@n3.nabble.com> References: <1532250743803-0.post@n3.nabble.com> Message-ID: <93adba6d-c626-4bf3-c201-f604b481cb29@free.fr> Hello Lester, Le 22/07/2018 ? 11:12, arctica1963 a ?crit : > Hello, > > I am looking to use netCDF files generated from the GMT software in Scilab > 6.0.1, but there is no easy way to work the problem other than exporting the > data out from the binary grids to either XYZ or ESRI Ascii raster. The > latter is a more compact form with the basic structure of a header > describing the data limits and structure: > > ncols 1200 > nrows 1200 > xllcorner -10 Lower-left X (Long-Lat limits -10/10/-10/10 > yllcorner -10 Lower-Left Y > cellsize 0.0166666666667 - increment = 1 arc minute > nodata_value -9999 > 451.343170166 436.005554199 443.061035156 443.665924072 465.607574463 > 492.191741943 476.50994873 452.265014648 451.439880371 461.659393311 ...... > ... > ... all of the Z-values > ... > > -4323.2890625 -4315.12451172 -4307.19384766 -4305.27490234 -4311.49902344 > -4317.90771484 -4324.23046875 -4320.47070313 -4308.60107422 -4292.62011719 > -4280.39697266 > > This is a moderately large file ~20 mB or so. Is there a way to reliably > read this structure and vectorise X, Y, and Z? The data I am looking at is a > grid so want to work on the whole grid as eith DEM data or gravity etc. > > As a test, I converted the grid to xyz, and tried csvRead, having replaced > the spaces (which were not a constant number of spaces between values) with > commas. The file was in excess of 50 mb, so not that huge really, but > csvRead always failed to read all the file and drop out at one specific line > (~7608) with a message of inconsistent column numbers, i.e. it though there > were only 2 columns when in reality the whole thing was 3 (checked in the > program Surfer). When one looks at the line specified, it is clearly 3 > columns. Do you really get this error with the new nightly built Scilab release http://www.scilab.org/en/development/nightly_builds/branch60 indicated by Antoine E. yesterday? It is due to the same mgetl() bug (for Windows), that spreads all over Scilab 6.0.1. The continuous build https://build.scilab.org/view/Scilab%206.0/job/scilab-6.0-windows-64/ can also be used without waiting for any publication delay. Samuel From sgougeon at free.fr Sun Jul 22 11:57:08 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 22 Jul 2018 11:57:08 +0200 Subject: [Scilab-users] Getting netCDF files into Scilab 6.0.1 In-Reply-To: <93adba6d-c626-4bf3-c201-f604b481cb29@free.fr> References: <1532250743803-0.post@n3.nabble.com> <93adba6d-c626-4bf3-c201-f604b481cb29@free.fr> Message-ID: <729b9891-8916-d28e-69df-cee006e07583@free.fr> Le 22/07/2018 ? 11:45, Samuel Gougeon a ?crit : > Hello Lester, > > Le 22/07/2018 ? 11:12, arctica1963 a ?crit : >> Hello, >> >> I am looking to use netCDF files generated from the GMT software in >> Scilab >> 6.0.1, but there is no easy way to work the problem other than >> exporting the >> data out from the binary grids to either XYZ or ESRI Ascii raster. The >> latter is a more compact form with the basic structure of a header >> describing the data limits and structure: >> >> ncols 1200 >> nrows 1200 >> xllcorner -10 Lower-left X (Long-Lat limits -10/10/-10/10 >> yllcorner -10 Lower-Left Y >> cellsize 0.0166666666667 - increment = 1 arc minute >> nodata_value -9999 >> 451.343170166 436.005554199 443.061035156 443.665924072 >> 465.607574463 >> 492.191741943 476.50994873 452.265014648 451.439880371 >> 461.659393311 ...... >> ... >> ... all of the Z-values >> ... >> >> -4323.2890625 -4315.12451172 -4307.19384766 -4305.27490234 >> -4311.49902344 >> -4317.90771484 -4324.23046875 -4320.47070313 -4308.60107422 >> -4292.62011719 >> -4280.39697266 >> >> This is a moderately large file ~20 mB or so. Is there a way to reliably >> read this structure and vectorise X, Y, and Z? The data I am looking >> at is a >> grid so want to work on the whole grid as eith DEM data or gravity etc. >> >> As a test, I converted the grid to xyz, and tried csvRead, having >> replaced >> the spaces (which were not a constant number of spaces between >> values) with >> commas. The file was in excess of 50 mb, so not that huge really, but >> csvRead always failed to read all the file and drop out at one >> specific line >> (~7608) with a message of inconsistent column numbers, i.e. it though >> there >> were only 2 columns when in reality the whole thing was 3 (checked in >> the >> program Surfer). When one looks at the line specified, it is clearly 3 >> columns. > > Do you really get this error with the new nightly built Scilab release > http://www.scilab.org/en/development/nightly_builds/branch60 > indicated by Antoine E. yesterday? > It is due to the same mgetl() bug (for Windows), that spreads all over > Scilab 6.0.1. > > The continuous build > https://build.scilab.org/view/Scilab%206.0/job/scilab-6.0-windows-64/ > can also be used without waiting for any publication delay. To me, the major advantage of the continuous built vs the nightly built is that, beside there is no delay, its SCIHOME directory and configuration files are stable: the version can be updated as often as required. Each time you get back the config, history, Scinotes config, etc as you left them from the previous version. From arctica1963 at gmail.com Sun Jul 22 12:15:23 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sun, 22 Jul 2018 03:15:23 -0700 (MST) Subject: [Scilab-users] Getting netCDF files into Scilab 6.0.1 In-Reply-To: <729b9891-8916-d28e-69df-cee006e07583@free.fr> References: <1532250743803-0.post@n3.nabble.com> <93adba6d-c626-4bf3-c201-f604b481cb29@free.fr> <729b9891-8916-d28e-69df-cee006e07583@free.fr> Message-ID: <1532254523815-0.post@n3.nabble.com> Thanks for the ideas, I will check the new builds and see what happens. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From buchydifference at yahoo.com Mon Jul 23 10:40:54 2018 From: buchydifference at yahoo.com (onyebuchy benard) Date: Mon, 23 Jul 2018 08:40:54 +0000 (UTC) Subject: [Scilab-users] Stability chart References: <759415476.773294.1532335254471.ref@mail.yahoo.com> Message-ID: <759415476.773294.1532335254471@mail.yahoo.com> Thanks alot -------------------------------------------- On Sun, 7/22/18, Rafael Guerra wrote: Subject: Re: [Scilab-users] Stability chart To: "Users mailing list for Scilab" Date: Sunday, July 22, 2018, _filtered #yiv9059201999 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv9059201999 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv9059201999 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} #yiv9059201999 #yiv9059201999 p.yiv9059201999MsoNormal, #yiv9059201999 li.yiv9059201999MsoNormal, #yiv9059201999 div.yiv9059201999MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;} #yiv9059201999 a:link, #yiv9059201999 span.yiv9059201999MsoHyperlink {color:#0563C1;text-decoration:underline;} #yiv9059201999 a:visited, #yiv9059201999 span.yiv9059201999MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;} #yiv9059201999 p.yiv9059201999msonormal0, #yiv9059201999 li.yiv9059201999msonormal0, #yiv9059201999 div.yiv9059201999msonormal0 {margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;} #yiv9059201999 span.yiv9059201999EmailStyle18 {font-family:sans-serif;color:black;font-weight:normal;font-style:normal;text-decoration:none;text-decoration:none;} #yiv9059201999 span.yiv9059201999SpellE {} #yiv9059201999 .yiv9059201999MsoChpDefault {font-size:10.0pt;} _filtered #yiv9059201999 {margin:1.0in 1.0in 1.0in 1.0in;} #yiv9059201999 div.yiv9059201999WordSection1 {} #yiv9059201999 Hi, ? This reference may help: http://ijme.us/cd_06/PDF/IT%20301-050.pdf ? Regards, Rafael ? _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -----Inline Attachment Follows----- From david.cheze at cea.fr Mon Jul 23 11:35:46 2018 From: david.cheze at cea.fr (CHEZE David 227480) Date: Mon, 23 Jul 2018 09:35:46 +0000 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: <64ecbb8e-ffde-507d-e762-ab6a6e584722@free.fr> References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> <1532082036266-0.post@n3.nabble.com> <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> <557b71a0-8beb-6d18-7b9b-3d3607456219@free.fr> <64ecbb8e-ffde-507d-e762-ab6a6e584722@free.fr> Message-ID: Hi Samuel, Thank you for the comments and the discussion, I find it achieves some progress in the definition of the specifications of such a future feature. Do you assume it could be relevant to put it in the list of topics for SEP / GSOC / ... ? Regards, David De : users De la part de Samuel Gougeon Envoy? : vendredi 20 juillet 2018 18:40 ? : Users mailing list for Scilab Objet : Re: [Scilab-users] Simple Date & Time Plotting Le 20/07/2018 ? 18:33, Samuel Gougeon a ?crit : My PS meant that there is no equivalence of gcf().resizefcn for zooming. So, recalling labxdtv() must be done intentionnally, by hand, after zooming or spanning an axes. Please read "zooming and panning" .../... I find quite important that the graduation on the figure is still relying on datenum, as it is the right underlying numerical format to show date time information. IMO, the input format should be customizable though an input option : * absolute formats : unix time, julian days, excel time, ... + linear (s, days, s..) vs vectorized (datenum, etc) * relative formats (without origin) : in s, mn, h, days May be speaking about absolute/relative scales, in a linearized or vectorized format would be clearer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Clement.David at esi-group.com Mon Jul 23 12:00:59 2018 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Mon, 23 Jul 2018 10:00:59 +0000 Subject: [Scilab-users] ATOMS error (Scilab 6.0.1) In-Reply-To: <1532249357640-0.post@n3.nabble.com> References: <1532166620279-0.post@n3.nabble.com> <3120e400-3301-06f0-8479-8f70576cfb87@scilab-enterprises.com> <1532249357640-0.post@n3.nabble.com> Message-ID: <9ffccd3a5e5d157255dd2a9d17e920e1085735f3.camel@esi-group.com> Hello, A server-side workaround have been implemented by using CRLF for the TOOLBOXES.gz windows files, avoiding the mgetl() buggy behavior in 6.0.1 -- Cl?ment Le dimanche 22 juillet 2018 ? 01:49 -0700, arctica1963 a ?crit : > Thanks for the update. > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Mon Jul 23 13:04:22 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 23 Jul 2018 13:04:22 +0200 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> <1532082036266-0.post@n3.nabble.com> <492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr> <557b71a0-8beb-6d18-7b9b-3d3607456219@free.fr> <64ecbb8e-ffde-507d-e762-ab6a6e584722@free.fr> Message-ID: <30980854-9d8d-d3b4-33e0-2655dbfc03be@free.fr> Hello David, Le 23/07/2018 ? 11:35, CHEZE David 227480 a ?crit : > > Hi Samuel, > > Thank you for the comments and the discussion, I find it achieves some > progress in the definition of the specifications of such a future > feature. Do you assume it could be relevant to put it in the list of > topics for SEP / GSOC / ? ? > Yes, indeed, IMO adding a strdate(), and maybe some ticksperiod(), functions to Scilab would be useful. Designing them will require a SEP and further discussion. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From iwoj at il.pw.edu.pl Mon Jul 23 17:43:34 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Mon, 23 Jul 2018 17:43:34 +0200 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> Message-ID: I am trying to substitute my x_mdialog() by 3 listboxes put in a graphic window. My code is a slightly remodelled version of a Demo "Listboxes and popupmenus": f = figure("dockable", "off" ,"infobar_visible", "off", "toolbar_visible", "off", "menubar_visible", "off", "default_axes", "off", "visible", "off", "layout", "gridbag"); set(f, "figure_id", 1); set(f, "figure_name", "Listboxes and Popupmenus"); set(f, "axes_size", [850 120]); kier_x = [ "W 1 x", "#000000", "#FFFFFF"; "W 2 x", "#FFFFFF", "#000000"; "W 3 x", "#000000", "#FFFFFF"; "W 4 x", "#FFFFFF", "#000000"; "W 5 x", "#000000", "#FFFFFF"; "W 6 x", "#FFFFFF", "#000000"]; c = createConstraints("gridbag", [1, 1, 1, 1], [1 1], "both"); list1=uicontrol(f, "style", "listbox", "constraints", c, "margins", [5 5 5 5],.. "max",20,"min",0, "string", kier_x); kier_y = [ "W 1 y", "#000000", "#FFFFFF"; "W 2 y", "#FFFFFF", "#000000"; "W 3 y", "#000000", "#FFFFFF"; "W 4 y", "#FFFFFF", "#000000"; "W 5 y", "#000000", "#FFFFFF"; "W 6 y", "#FFFFFF", "#000000"]; c = createConstraints("gridbag", [2, 1, 1, 1], [1 1], "both"); list2=uicontrol(f, "style", "listbox", "constraints", c, "margins", [5 5 5 5],.. "max",20,"min",0, "string", kier_y); kier_z = [ "W 1 z", "#000000", "#FFFFFF"; "W 2 z", "#FFFFFF", "#000000"; "W 3 z", "#000000", "#FFFFFF"; "W 4 z", "#FFFFFF", "#000000"; "W 5 z", "#000000", "#FFFFFF"; "W 6 z", "#FFFFFF", "#000000"]; c = createConstraints("gridbag", [3, 1, 1, 1], [1 1], "both"); list3=uicontrol(f, "style", "listbox", "constraints", c, "margins", [5 5 5 5],.. "max",20,"min",0, "string", kier_z); set(f, "visible", "on"); I have two questions: 1. How to make the lists to be multiselect (now it seems that this option doesn't work despite the max and min values)? 2. How to write the selected values into the vectors and then close the window? I know that these are simple questions but I am rather a beginner in Scilab and I get more and more confused with every new problem. Regards, Iza W dniu 20.07.2018 12:47, Izabela W?jcik-Grz?ba napisa?(a): > Thank you for the explanation and suggestions. I will have to put my > x_mdialog into another graphic window. > > Iza > > > > > W dniu 19.07.2018 20:43, Samuel Gougeon napisa?(a): >> Hello Izabela, >> >> What you wish to do is not possible with x_mdialog(), that is a modal >> dialog: it pauses everything else until the dialog is quit. >> >> To do what you want, it's possible to create your own dialog box based >> on uicontrol("style", "edit") or other interactive components. >> Basically, you may have a look at the demos demo_gui(): GUI => >> Uicontrosl1 or Uicontrols2. Both have a "View-code" link in their menu >> bar. >> >> Best regards >> Samuel >> >> Le 19/07/2018 ? 14:13, Izabela W?jcik-Grz?ba a ?crit : >>> Hi all, >>> >>> I have another problem. In my program I create an initial plot which >>> is a basis for the input implemented by x_mdialog command. The >>> problem is that when the x_mdialog window pops up the figure window >>> bocomes inactive. It means that I can't zoom or rotate the plot which >>> is necessary to correctly enter the data to x_mdialog matrix. Is >>> there any solution to this? Is it possible to keep the figure active >>> when other windows occur? >>> >>> Thanks in advance, >>> Iza >>> _______________________________________________ >>> 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 jrafaelbguerra at hotmail.com Mon Jul 23 17:57:24 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 23 Jul 2018 15:57:24 +0000 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> Message-ID: Hi Izabela, Following your post and Samuel?s feedback, I have tried the code below to do what you are after. Script seems to work fine if run as standalone. After hitting the pushbutton, the output vector ?nn? contains the integers of multiple rows selected. However, when I insert this code in a bigger program/loop, it does not work. I have asked Samuel for help and he provided some additional tips which I did not try yet. Let me know what is your experience. // START OF CODE stringmat = ["ITEM1";"ITEM2";"ITEM3";"ITEM4"]; // Callback function function nn=save_exit(h_list) nn = get(h_list,"value"); delete(get("SELECT MULTIPLE ITEMS")); endfunction w = 300; // width and height in pixels h = 900; max0 = max(size(stringmat)); stringmat = string((1:max0)') + repmat(" - ",max0,1) + stringmat; // Create a figure f = figure("figure_name", gettext("SELECT MULTIPLE ITEMS"),... "infobar_visible", "off",... "toolbar_visible", "off",... "dockable", "off",... "menubar", "none",... "default_axes", "off", ... "Position",[100 100 w h],... "resize", "off",... "BackgroundColor", [0.9 0.9 0.9],... "Tag", "SELECT MULTIPLE ITEMS"); // display list h_list = uicontrol(f, "Position", [15 45 w-20 h-50],.. // -20 to allow space for scroll bar "Style", "listbox",... "FontSize", 11,... "String", stringmat,... "BackgroundColor", [1 1 1],... "Max", max0,... //if Max>1 then allowed multiple selection "Tag", "colors_listbox"); // Exit application h = uicontrol(f, "Position", [15 15 160 25],... "Style", "pushbutton",... "String", gettext("SAVE & EXIT"),... "FontSize", 11,... "Callback", "nn=save_exit(h_list);"); // END OF CODE Regards, Rafael From jrafaelbguerra at hotmail.com Mon Jul 23 22:41:47 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 23 Jul 2018 20:41:47 +0000 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> Message-ID: Hi Izabela and Samuel, I have followed Samuel's awesome offline advice to try using the gcbo() function to retrieve the lost callback handle. The improved code below now seems to work like a charm, regardless of where I place it within a larger Scilab program/loop. // START OF CODE stringmat = ["ITEM1";"ITEM2";"ITEM3";"ITEM4"]; function nn=save_exit() nn = gcbo().Userdata.hlist.value; delete(get("SELECT MULTIPLE ITEMS")); endfunction w = 300; // width and height in pixels h = 900; max0 = max(size(stringmat)); stringmat = string((1:max0)') + repmat(" - ",max0,1) + stringmat; // Create a figure f = figure("figure_name", gettext("SELECT MULTIPLE ITEMS"),... "infobar_visible", "off",... "toolbar_visible", "off",... "dockable", "off",... "menubar", "none",... "default_axes", "off", ... "Position",[100 100 w h],... "resize", "off",... "BackgroundColor", [0.9 0.9 0.9],... "Tag", "SELECT MULTIPLE ITEMS"); // display list h_list = uicontrol(f, "Position", [15 45 w-20 h-50],.. // -20 to allow space for scroll bar "Style", "listbox",... "FontSize", 11,... "String", stringmat,... "BackgroundColor", [1 1 1],... "Max", max0,... //if Max>1 then allowed multiple selection "Tag", "colors_listbox"); // Exit application h0=uicontrol(f, "Position", [15 15 160 25],... "Style", "pushbutton",... "String", gettext("SAVE & EXIT"),... "FontSize", 11,... "Callback", "h0.Userdata.hlist=h_list; nn=save_exit();"); // END OF CODE Thanks a lot Samuel, this is a really useful functionality. Kind regards, Rafael From jrafaelbguerra at hotmail.com Mon Jul 23 23:32:28 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 23 Jul 2018 21:32:28 +0000 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> Message-ID: My apologies, after further testing the last callback code does still not seem to be satisfactory. Banging the head on this Scilab topic... From jrafaelbguerra at hotmail.com Tue Jul 24 09:12:54 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 24 Jul 2018 07:12:54 +0000 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> Message-ID: After studying some past threads by Serge Steer on this callback topic, the following approach seems more appropriate. One may discard the too-simple function save_exit() in code snippet at the bottom and rewrite the section: // Exit application h0=uicontrol(f0, "Position", [15 15 160 25],... "Style", "pushbutton",... "String", gettext("SAVE & EXIT"),... "FontSize", 11,... "Callback", "gcbo.userdata.hlist= h_list;"); Within my major Scilab script loop, I have put this command: input("Select items and then ENTER to continue","string"); nh0 = h0.userdata.hlist.value; Which again works fine for standalone and in major loop issues error: "Attempt to reference field of non-structure array." However both typeof(h0.userdata.hlist.value) and typeof(nh0) are constant ... And I see some hope in this as now, h0.userdata.hlist.value has the correct array of integer values Any clues please? Regards, Rafael -----Original Message----- From: users On Behalf Of Rafael Guerra Sent: Monday, July 23, 2018 10:42 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] How to keep figure active with x_mdialog window open? Hi Izabela and Samuel, I have followed Samuel's awesome offline advice to try using the gcbo() function to retrieve the lost callback handle. The improved code below now seems to work like a charm, regardless of where I place it within a larger Scilab program/loop. // START OF CODE stringmat = ["ITEM1";"ITEM2";"ITEM3";"ITEM4"]; function nn=save_exit() nn = gcbo().Userdata.hlist.value; delete(get("SELECT MULTIPLE ITEMS")); endfunction w = 300; // width and height in pixels h = 900; max0 = max(size(stringmat)); stringmat = string((1:max0)') + repmat(" - ",max0,1) + stringmat; // Create a figure f = figure("figure_name", gettext("SELECT MULTIPLE ITEMS"),... "infobar_visible", "off",... "toolbar_visible", "off",... "dockable", "off",... "menubar", "none",... "default_axes", "off", ... "Position",[100 100 w h],... "resize", "off",... "BackgroundColor", [0.9 0.9 0.9],... "Tag", "SELECT MULTIPLE ITEMS"); // display list h_list = uicontrol(f, "Position", [15 45 w-20 h-50],.. // -20 to allow space for scroll bar "Style", "listbox",... "FontSize", 11,... "String", stringmat,... "BackgroundColor", [1 1 1],... "Max", max0,... //if Max>1 then allowed multiple selection "Tag", "colors_listbox"); // Exit application h0=uicontrol(f, "Position", [15 15 160 25],... "Style", "pushbutton",... "String", gettext("SAVE & EXIT"),... "FontSize", 11,... "Callback", "h0.Userdata.hlist=h_list; nn=save_exit();"); // END OF CODE Thanks a lot Samuel, this is a really useful functionality. Kind regards, Rafael From iwoj at il.pw.edu.pl Tue Jul 24 13:40:23 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Tue, 24 Jul 2018 13:40:23 +0200 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> Message-ID: <25af4225d2ac5024e54b4472d33d2754@il.pw.edu.pl> Rafael, Thank you for your attempts. I thought it would be a rather simple task because in the help text "value" for "listbox" uicontrol is described as: "value is a vector of indexes corresponding to the indexes of the selected entries in the list. 1 is the first item of the list." But when I type: h_list.value in the console I get only the last index of my selection from the list. Iza From jrafaelbguerra at hotmail.com Tue Jul 24 14:09:33 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 24 Jul 2018 12:09:33 +0000 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: <25af4225d2ac5024e54b4472d33d2754@il.pw.edu.pl> References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> <25af4225d2ac5024e54b4472d33d2754@il.pw.edu.pl> Message-ID: Iza, We are close to the solution but not there yet. My head is now flattened of so much banging it against the desk, like the Columbus' egg... Hopefully some experts may return from vacation and post the solution. Regards, Rafael -----Original Message----- From: users On Behalf Of Izabela W?jcik-Grzaba Sent: Tuesday, July 24, 2018 1:40 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] How to keep figure active with x_mdialog window open? Rafael, Thank you for your attempts. I thought it would be a rather simple task because in the help text "value" for "listbox" uicontrol is described as: "value is a vector of indexes corresponding to the indexes of the selected entries in the list. 1 is the first item of the list." But when I type: h_list.value in the console I get only the last index of my selection from the list. Iza From iwoj at il.pw.edu.pl Tue Jul 24 14:41:29 2018 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Tue, 24 Jul 2018 14:41:29 +0200 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> <25af4225d2ac5024e54b4472d33d2754@il.pw.edu.pl> Message-ID: I think I've got something that works fine for me. I slightly changed and added something new to Rafael's code: // START OF CODE stringmat = ["ITEM1";"ITEM2";"ITEM3";"ITEM4"]; w = 300; // width and height in pixels h = 900; max0 = max(size(stringmat)); stringmat = string((1:max0)') + repmat(" - ",max0,1) + stringmat; // Create a figure f = figure("figure_name", gettext("SELECT MULTIPLE ITEMS"),... "infobar_visible", "off",... "toolbar_visible", "off",... "dockable", "off",... "menubar", "none",... "default_axes", "off", ... "Position",[100 100 w h],... "resize", "off",... "BackgroundColor", [0.9 0.9 0.9],... "Tag", "SELECT MULTIPLE ITEMS"); // Display list h_list = uicontrol(f, "Position", [15 45 w-20 h-50],.. // -20 to allow space for scroll bar "Style", "listbox",... "FontSize", 11,... "String", stringmat,... "BackgroundColor", [1 1 1],... "Max", max0,... //if Max>1 then allowed multiple selection "Callback","list_values",.. "Tag", "example_listbox"); // Exit application h0=uicontrol(f, "Position", [15 15 160 25],... "Style", "pushbutton",... "String", gettext("EXIT"),... "FontSize", 11,... "Callback", "closing"); // Callback functions global a; a=[]; function list_values() global a a=[a;gcbo().value] endfunction function closing() ch=gcbo(); close(ch.parent); endfunction // END OF CODE In the vector "a" there are the numbers of items chosen from the list. Iza From jrafaelbguerra at hotmail.com Tue Jul 24 15:39:24 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 24 Jul 2018 13:39:24 +0000 Subject: [Scilab-users] How to keep figure active with x_mdialog window open? In-Reply-To: References: <6e7c2204-72e2-a348-7811-10273877d45f@free.fr> <3d8a0914c0b710f72c9efeee4a400349@il.pw.edu.pl> <25af4225d2ac5024e54b4472d33d2754@il.pw.edu.pl> Message-ID: Iza, Glad that you solved your problem. In my case, your example works in standalone only (as previous attempts). However, when I place the code in my larger script with loops and a few graphical windows open, it does not work. The output vector 'a' remains empty and a warning is issued: " 'Value' property does not exist for this handle. " Regards, Rafael -----Original Message----- From: users On Behalf Of Izabela W?jcik-Grzaba Sent: Tuesday, July 24, 2018 2:41 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] How to keep figure active with x_mdialog window open? I think I've got something that works fine for me. I slightly changed and added something new to Rafael's code: // START OF CODE stringmat = ["ITEM1";"ITEM2";"ITEM3";"ITEM4"]; w = 300; // width and height in pixels h = 900; max0 = max(size(stringmat)); stringmat = string((1:max0)') + repmat(" - ",max0,1) + stringmat; // Create a figure f = figure("figure_name", gettext("SELECT MULTIPLE ITEMS"),... "infobar_visible", "off",... "toolbar_visible", "off",... "dockable", "off",... "menubar", "none",... "default_axes", "off", ... "Position",[100 100 w h],... "resize", "off",... "BackgroundColor", [0.9 0.9 0.9],... "Tag", "SELECT MULTIPLE ITEMS"); // Display list h_list = uicontrol(f, "Position", [15 45 w-20 h-50],.. // -20 to allow space for scroll bar "Style", "listbox",... "FontSize", 11,... "String", stringmat,... "BackgroundColor", [1 1 1],... "Max", max0,... //if Max>1 then allowed multiple selection "Callback","list_values",.. "Tag", "example_listbox"); // Exit application h0=uicontrol(f, "Position", [15 15 160 25],... "Style", "pushbutton",... "String", gettext("EXIT"),... "FontSize", 11,... "Callback", "closing"); // Callback functions global a; a=[]; function list_values() global a a=[a;gcbo().value] endfunction function closing() ch=gcbo(); close(ch.parent); endfunction // END OF CODE In the vector "a" there are the numbers of items chosen from the list. Iza _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From cfuttrup at gmail.com Wed Jul 25 14:44:44 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 25 Jul 2018 14:44:44 +0200 Subject: [Scilab-users] Installing Scilab under Linux (Mint / aka Ubuntu) Message-ID: <5fa68711-7164-3123-45ad-f3f968330f36@gmail.com> Hi there I've installed Linux Mint 19 (MATE) and installing Scilab using the Software Manager doesn't work. I cannot get the GUI to show up (CLI works fine). There are several bug reports out there, but AFAIK no remedy. P.S. Upon first installation I did check and see that the GUI worked, but it never worked since and uninstalling + installing (incl. the CLI, and BTW also including reboots) doesn't work. Therefore I decided to download the Linux 64-bit package from scilab.org ... when unpacked, I see there's not an installer ... but as the README says, launching ./bin/scilab gives me the GUI (yaayh!) The question is - from unpacking the software, how am I supposed to install this already compiled scilab in my Linux? ... Am I supposed to leave it in my /home directory? ... Sorry for my lack of knowledge here. I hope for some kind help. Best regards, Claus --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From amonmayr at laas.fr Wed Jul 25 15:13:43 2018 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Wed, 25 Jul 2018 15:13:43 +0200 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBJbnN0YWxsaW5nIFNjaWxh?= =?utf-8?b?YiB1bmRlciBMaW51eCAoTWludD89PT91dGYtOD9xPyAvIGFrYSBVYnVudHUp?= In-Reply-To: <5fa68711-7164-3123-45ad-f3f968330f36@gmail.com> Message-ID: Hello Claus, I usually untar the scilab archive in a local folder in my home directory ("~/bin" for example) and I had the path to this folder in my $PATH variable. To launch scilab, I open a terminal and just type "scilab" (or scilab-cli, or whatever version you want to use). I don't have fancy integration with the desktop environment, but it works well that way... Whenever I want to upgrade to a new version, I remove the folder and untar the new scilab version... Hope it helps, Antoine Le Mercredi, Juillet 25, 2018 14:44 CEST, Claus Futtrup a ?crit: > Hi there > > I've installed Linux Mint 19 (MATE) and installing Scilab using the > Software Manager doesn't work. I cannot get the GUI to show up (CLI > works fine). There are several bug reports out there, but AFAIK no > remedy. P.S. Upon first installation I did check and see that the GUI > worked, but it never worked since and uninstalling + installing (incl. > the CLI, and BTW also including reboots) doesn't work. > > Therefore I decided to download the Linux 64-bit package from scilab.org > ... when unpacked, I see there's not an installer ... but as the README > says, launching ./bin/scilab gives me the GUI (yaayh!) > > The question is - from unpacking the software, how am I supposed to > install this already compiled scilab in my Linux? ... Am I supposed to > leave it in my /home directory? ... Sorry for my lack of knowledge here. > I hope for some kind help. > > Best regards, > > Claus > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From n.strelkov at gmail.com Wed Jul 25 15:40:09 2018 From: n.strelkov at gmail.com (Nikolay Strelkov) Date: Wed, 25 Jul 2018 16:40:09 +0300 Subject: [Scilab-users] Installing Scilab under Linux (Mint / aka Ubuntu) In-Reply-To: <5fa68711-7164-3123-45ad-f3f968330f36@gmail.com> References: <5fa68711-7164-3123-45ad-f3f968330f36@gmail.com> Message-ID: Dear Claus! As a temporarily fix you can read this solution on AskUbuntu - https://askubuntu.com/a/1029164/66509 . I have tested it. Unpacking to home folder works as expected (and as before). Dear Scilab developers! As long-time Scilab user I can't completely understand how this may happen. Please take a look to the mentioned bugs in the linked answer above and make real actions to fix these problems. Scilab is completely broken in Ubuntu 18.04 LTS (so without real actions it will be broken until 2023) and does not work on development version 18.10 too. Also it does not work on Debian 10. Please contact Debian and/or Ubuntu maintainers directly. Scilab is very often used in educational purposes. For example we use it on Ubuntu 16.04 LTS in our university to teach students. It will be very bad if we lose such a convenient and useful software-tool. --- *With best regards,Ph.D., * *associate professor at MPEI ,IEEE member,maintainer of Mathieu functions toolbox for Scilab ,Nikolay Strelkov.* 2018-07-25 15:44 GMT+03:00 Claus Futtrup : > Hi there > > I've installed Linux Mint 19 (MATE) and installing Scilab using the > Software Manager doesn't work. I cannot get the GUI to show up (CLI works > fine). There are several bug reports out there, but AFAIK no remedy. P.S. > Upon first installation I did check and see that the GUI worked, but it > never worked since and uninstalling + installing (incl. the CLI, and BTW > also including reboots) doesn't work. > > Therefore I decided to download the Linux 64-bit package from scilab.org > ... when unpacked, I see there's not an installer ... but as the README > says, launching ./bin/scilab gives me the GUI (yaayh!) > > The question is - from unpacking the software, how am I supposed to > install this already compiled scilab in my Linux? ... Am I supposed to > leave it in my /home directory? ... Sorry for my lack of knowledge here. I > hope for some kind help. > > Best regards, > > Claus > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > _______________________________________________ > 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 Wed Jul 25 20:01:57 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 25 Jul 2018 20:01:57 +0200 Subject: [Scilab-users] Installing Scilab under Linux (Mint / aka Ubuntu) In-Reply-To: References: <5fa68711-7164-3123-45ad-f3f968330f36@gmail.com> Message-ID: <883d898e-31f9-93ef-279b-a8960a88d9c1@gmail.com> Hi Antoine and Nikolay Thank you for your help. I see that the easiest way is, as Antoine wrote, to execute a shell and execute scilab from the shell (and for sure, keep the shell open). I tried to create a desktop "launcher" in Linux Mint, executing a scilab.sh script and containing 'nohup scilab.sh & disown' ... to release scilab from the terminal, but at no luck. I also tried to follow advice from askubuntu (below), including creating desktop files, etc. (see near the bottom), but still no luck. Best regards, Claus On 25.07.2018 15:40, Nikolay Strelkov wrote: > Dear Claus! > > As a temporarily fix you can read this solution on AskUbuntu - > https://askubuntu.com/a/1029164/66509 > . I have tested it. Unpacking > to home folder works as expected (and as before). > > Dear Scilab developers! > > As long-time Scilab user I can't completely understand how this may > happen. Please take a look to the mentioned bugs in the linked answer > above and make real actions to fix these problems. Scilab is > completely broken in Ubuntu 18.04 LTS (so without real actions it will > be broken until 2023) and does not work on development version 18.10 > too. Also it does not work on Debian 10. Please contact Debian and/or > Ubuntu maintainers directly. > > Scilab is very often used in educational purposes. For example we use > it on Ubuntu 16.04 LTS in our university to teach students. > It will be very bad if we lose such a convenient and useful > software-tool. > > --- > /With best regards, > Ph.D., //associate professor at MPEI > , > IEEE member, > maintainer of Mathieu functions toolbox for Scilab > , > Nikolay Strelkov./ > > 2018-07-25 15:44 GMT+03:00 Claus Futtrup >: > > Hi there > > I've installed Linux Mint 19 (MATE) and installing Scilab using > the Software Manager doesn't work. I cannot get the GUI to show up > (CLI works fine). There are several bug reports out there, but > AFAIK no remedy. P.S. Upon first installation I did check and see > that the GUI worked, but it never worked since and uninstalling + > installing (incl. the CLI, and BTW also including reboots) doesn't > work. > > Therefore I decided to download the Linux 64-bit package from > scilab.org ... when unpacked, I see there's > not an installer ... but as the README says, launching > ./bin/scilab gives me the GUI (yaayh!) > > The question is - from unpacking the software, how am I supposed > to install this already compiled scilab in my Linux? ... Am I > supposed to leave it in my /home directory? ... Sorry for my lack > of knowledge here. I hope for some kind help. > > Best regards, > > Claus > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > _______________________________________________ > users mailing list > 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 Jul 26 08:39:33 2018 From: amonmayr at laas.fr (amonmayr at laas.fr) Date: Thu, 26 Jul 2018 08:39:33 +0200 Subject: [Scilab-users] Installing Scilab under Linux (Mint / aka Ubuntu) In-Reply-To: <883d898e-31f9-93ef-279b-a8960a88d9c1@gmail.com> References: <5fa68711-7164-3123-45ad-f3f968330f36@gmail.com> <883d898e-31f9-93ef-279b-a8960a88d9c1@gmail.com> Message-ID: Hello Claus, Le 25/07/2018 ? 20:01, Claus Futtrup a ?crit?: > Hi Antoine and Nikolay > > Thank you for your help. I see that the easiest way is, as Antoine > wrote, to execute a shell and execute scilab from the shell (and for > sure, keep the shell open). Well, the best solution I found is to use a dropdown terminal (like yakuake for example): pressing F12 the terminal appears/disappears. This way, I never have to close it and it stays open with a bunch tabs with the most common command line applications I use. > > I tried to create a desktop "launcher" in Linux Mint, executing a > scilab.sh script and containing 'nohup scilab.sh & disown' ... to > release scilab from the terminal, but at no luck. Well, I think the .desktop approach is the best one here. You can also try to use a command launcher: with the Ubuntu I use (16.04), I have Alt+F2 that opens a proper command launcher and I can run any command line app. Note that it differs from pressing the Windows key that will only launch applications that have a corresponding *.desktop file. > > I also tried to follow advice from askubuntu (below), including > creating desktop files, etc. (see near the bottom), but still no luck. I don't see your attempt here. If you installed scilab from the repos, you should have a *.desktop file to tinker with in order to call your up-to-date scilab instead of the repo one. On my system the desktop files of the repos applications are here: ??? /usr/share/app-install/desktop/scilab:scilab.desktop ??? /usr/share/applications/scilab.desktop while I put the one of the applications I installed by hand? here: ??? ~/.local/share/applications/ Hope it helps, Antoine > > Best regards, > Claus > > On 25.07.2018 15:40, Nikolay Strelkov wrote: >> Dear Claus! >> >> As a temporarily fix you can read this solution on AskUbuntu - >> https://askubuntu.com/a/1029164/66509 >> . I have tested it. Unpacking >> to home folder works as expected (and as before). >> >> Dear Scilab developers! >> >> As long-time Scilab user I can't completely understand how this may >> happen. Please take a look to the mentioned bugs in the linked answer >> above and make real actions to fix these problems. Scilab is >> completely broken in Ubuntu 18.04 LTS (so without real actions it >> will be broken until 2023) and does not work on development version >> 18.10 too. Also it does not work on Debian 10. Please contact Debian >> and/or Ubuntu maintainers directly. >> >> Scilab is very often used in educational purposes. For example we use >> it on Ubuntu 16.04 LTS in our university to teach students. >> It will be very bad if we lose such a convenient and useful >> software-tool. >> >> --- >> /With best regards, >> Ph.D., //associate professor at MPEI >> , >> IEEE member, >> maintainer of Mathieu functions toolbox for Scilab >> , >> Nikolay Strelkov./ >> >> 2018-07-25 15:44 GMT+03:00 Claus Futtrup > >: >> >> Hi there >> >> I've installed Linux Mint 19 (MATE) and installing Scilab using >> the Software Manager doesn't work. I cannot get the GUI to show >> up (CLI works fine). There are several bug reports out there, but >> AFAIK no remedy. P.S. Upon first installation I did check and see >> that the GUI worked, but it never worked since and uninstalling + >> installing (incl. the CLI, and BTW also including reboots) >> doesn't work. >> >> Therefore I decided to download the Linux 64-bit package from >> scilab.org ... when unpacked, I see there's >> not an installer ... but as the README says, launching >> ./bin/scilab gives me the GUI (yaayh!) >> >> The question is - from unpacking the software, how am I supposed >> to install this already compiled scilab in my Linux? ... Am I >> supposed to leave it in my /home directory? ... Sorry for my lack >> of knowledge here. I hope for some kind help. >> >> Best regards, >> >> Claus >> >> >> --- >> This email has been checked for viruses by Avast antivirus software. >> https://www.avast.com/antivirus >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> >> >> > > > > ------------------------------------------------------------------------ > Avast logo > > This email has been checked for viruses by Avast antivirus software. > www.avast.com > > > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Antoine Monmayrant LAAS - CNRS 7 avenue du Colonel Roche BP 54200 31031 TOULOUSE Cedex 4 FRANCE Tel:+33 5 61 33 64 59 email : antoine.monmayrant at laas.fr permanent email : antoine.monmayrant at polytechnique.org +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Thu Jul 26 15:39:32 2018 From: arctica1963 at gmail.com (arctica1963) Date: Thu, 26 Jul 2018 06:39:32 -0700 (MST) Subject: [Scilab-users] Getting netCDF files into Scilab 6.0.1 In-Reply-To: <1532254523815-0.post@n3.nabble.com> References: <1532250743803-0.post@n3.nabble.com> <93adba6d-c626-4bf3-c201-f604b481cb29@free.fr> <729b9891-8916-d28e-69df-cee006e07583@free.fr> <1532254523815-0.post@n3.nabble.com> Message-ID: <1532612372935-0.post@n3.nabble.com> Hi all, Just a quick update. Used a function to import an ESRI ascii raster seems to work ok: function [X,Y,Z]=asc_2_xyz(filename) fd=mopen(filename,'r'); // open ascii raster for read only k=mfscanf(fd,'%s\t%d'); nc=k(2); // number of columns k=mfscanf(fd,'%s\t%d'); nr=k(2); // number of rows k=mfscanf(fd,'%s\t%f'); x1=k(2); // X coordinate = lower left k=mfscanf(fd,'%s\t%f'); y1=k(2); // Y coordinate = lower left k=mfscanf(fd,'%s\t%f'); dxy=k(2); // X and Y increment k=mfscanf(fd,'%s\t%f'); nodata=k(2); // No data value (e.g. -9999) mclose(fd) // x1 and y1 = minimum X and Y x2 = x1+dxy*nc; // Define maximum X coordinate y2 = y1+dxy*nr; // Define maximum Y coordinate Z=fscanfMat(filename); // Z matrix Z(Z==nodata)=%nan; // if any 'nodata' values in grid set to internal NaN value Z=flipdim(Z,1); // for some reason the data are flipped on Y on import so needed flipping xx=linspace(x1,x2,nc); // same number of columns but increment different from dxy yy=linspace(y1,y2,nr); [X,Y]=meshgrid(xx,yy); // Coordinate matrices endfunction All looks fine, but the increment from linspace cannot match dxy unless one has nc+1. Not a big issue as this can be corrected in GMT. But also reversed the thing to output .asc and that gets all the dimensions and increment fine: function xyz_2_asc(filename,X,Y,Z,nodata,n) // n = precision (e.g. 6) // nodata should be appropriate for the Z data range //e.g. xyz_2_asc(test.asc,x,y,z,-9999,6) // Define matrix dimensions dimx=size(X); // 2-D dimy=size(Y); dimz=size(Z); // Grid properties minx=min(X); //initial X coordinate (Lower left) maxx=max(X); miny=min(Y); //initial Y coordinate (Lower left) maxy=max(Y); dxy=abs(maxx-minx)/dimx(1) // correct for increment precision issues // Z matrix Z(isnan(Z))=nodata; // add nan values (where present)) to output file Z=flipdim(Z,1); // invert matrix rows in Y // Output file fd=mopen(filename,'w'); // open file for write // Create ESRI Ascii raster header // // ncols 120 // nrows 120 // xllcorner -5 // yllcorner -5 // cellsize 0.0166666666667 - must be square pixels for ESRI ascii raster // nodata_value -9999 (select value appropriate for dataset) // mfprintf(fd,'ncols\t'); mfprintf(fd,'%d\n',dimz(2)); mfprintf(fd,'nrows\t'); mfprintf(fd,'%d\n',dimz(1)); mfprintf(fd,'xllcorner\t'); mfprintf(fd,'%f\n',minx); mfprintf(fd,'yllcorner\t'); mfprintf(fd,'%f\n',miny); mfprintf(fd,'cellsize\t'); mfprintf(fd,'%.10f\n',dxy); // rounding errors > %.10f but not critical to output mfprintf(fd,'NODATA_value\t'); mfprintf(fd,%f\n',nodata); // write Z values to file for i=1:dimz(1) for j=1:dimz(2) if j==dimz(2) mfprintf(fd,'%f\n',Z(i,j)); else mfprintf(fd,'%f\t',Z(i,j)); end end end mclose(fd); endfunction Ideally, it would be good to work out a way of reading the binary netCDF grids, much smaller size, but at least it seems to work albeit a bit quirky with the increments and flipping! Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From arctica1963 at gmail.com Thu Jul 26 15:54:15 2018 From: arctica1963 at gmail.com (arctica1963) Date: Thu, 26 Jul 2018 06:54:15 -0700 (MST) Subject: [Scilab-users] FFT - upward continuation of a 2D grid Message-ID: <1532613255211-0.post@n3.nabble.com> Hello all, A quick query regarding fft and wavenumber calculations. I am looking to do an upward contuation of a gravity data grid using fft and the basic equation: fft_Grav_up = fft2(gravity_input) * e^(-kz) // think it also needs fftshif to centre Zero? ... Upward_continued_gravity=ifft(fft_out_Grav_up) Where z = upward continuation distance and k = wavenumber k =sqrt(kx^2 + ky^2) Is there an easy way to get the wavenumber from the input? Before doing the fft, the grid would need padding on all edges, so I think this works unless there is a better method: dimx=size(xt) dimy=size(yt) // For FFT pad X,Y to 2*ncols, 2*nrows (large enough to avoid boundary effects) addedRows = dimy(1); addedCols = dimx(1); tmp = [Boug_corr; Boug_corr($, :).*.ones(addedRows, 1)]; tmp = [tmp tmp(:, $).*.ones(1,addedCols)]; tmp = [repmat(tmp(1, :), addedRows, 1) ; tmp]; Boug_corr_padded = [repmat(tmp(:,1), 1, addedCols) tmp] After running fft, the grid would then be clipped back to the correct size. If there is a simple code for doing this great! Thanks Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Thu Jul 26 17:53:18 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 26 Jul 2018 15:53:18 +0000 Subject: [Scilab-users] FFT - upward continuation of a 2D grid In-Reply-To: <1532613255211-0.post@n3.nabble.com> References: <1532613255211-0.post@n3.nabble.com> Message-ID: Hi Lester, If I understood properly, for an even number of spatial input grid points along Nx and Ny, with regular spacing dx and dy, I think k should be computed from: kx = dkx*(-Nx/2+1:Nx/2); ky = dky*(-Ny/2+1:Ny/2); with: dkx = 1/Nx/dx; dky = 1/Ny/dy; Regards, Rafael -----Original Message----- From: users On Behalf Of arctica1963 Sent: Thursday, July 26, 2018 3:54 PM To: users at lists.scilab.org Subject: [Scilab-users] FFT - upward continuation of a 2D grid Hello all, A quick query regarding fft and wavenumber calculations. I am looking to do an upward contuation of a gravity data grid using fft and the basic equation: fft_Grav_up = fft2(gravity_input) * e^(-kz) // think it also needs fftshif to centre Zero? ... Upward_continued_gravity=ifft(fft_out_Grav_up) Where z = upward continuation distance and k = wavenumber k =sqrt(kx^2 + ky^2) Is there an easy way to get the wavenumber from the input? Before doing the fft, the grid would need padding on all edges, so I think this works unless there is a better method: dimx=size(xt) dimy=size(yt) // For FFT pad X,Y to 2*ncols, 2*nrows (large enough to avoid boundary effects) addedRows = dimy(1); addedCols = dimx(1); tmp = [Boug_corr; Boug_corr($, :).*.ones(addedRows, 1)]; tmp = [tmp tmp(:, $).*.ones(1,addedCols)]; tmp = [repmat(tmp(1, :), addedRows, 1) ; tmp]; Boug_corr_padded = [repmat(tmp(:,1), 1, addedCols) tmp] After running fft, the grid would then be clipped back to the correct size. If there is a simple code for doing this great! Thanks Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Fri Jul 27 03:27:49 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 27 Jul 2018 03:27:49 +0200 Subject: [Scilab-users] ATOMS error (Scilab 6.0.1) In-Reply-To: <9ffccd3a5e5d157255dd2a9d17e920e1085735f3.camel@esi-group.com> References: <1532166620279-0.post@n3.nabble.com> <3120e400-3301-06f0-8479-8f70576cfb87@scilab-enterprises.com> <1532249357640-0.post@n3.nabble.com> <9ffccd3a5e5d157255dd2a9d17e920e1085735f3.camel@esi-group.com> Message-ID: Hello Cl?ment, Thanks for this work-around. It works like a charm for the Scilab 6.0 repository. However, the 5.5 one now looks out of work: From Scilab 5.5.2, atomsSystemUpdate() now yields -->atomsSystemUpdate Scanning repository http://atoms.scilab.org/5.5 ... Done !--error 10000 atomsDESCRIPTIONread: The file "TMPDIR\ATOMS~1\1_TOOLBOXES" is empty. at line 56 of function atomsDESCRIPTIONread called by : at line 227 of function atomsDESCRIPTIONget called by : at line 16 of function atomsSystemUpdate called by : atomsSystemUpdate Regards Samuel Le 23/07/2018 ? 12:00, Cl?ment David a ?crit : > Hello, > > A server-side workaround have been implemented by using CRLF for the TOOLBOXES.gz windows files, > avoiding the mgetl() buggy behavior in 6.0.1 > > -- > Cl?ment -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Jul 28 13:42:12 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 28 Jul 2018 11:42:12 +0000 Subject: [Scilab-users] FFT - upward continuation of a 2D grid In-Reply-To: References: <1532613255211-0.post@n3.nabble.com> Message-ID: You are welcome From sgougeon at free.fr Sat Jul 28 13:41:39 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 28 Jul 2018 13:41:39 +0200 Subject: [Scilab-users] Anticipating Scilab 6.1 Message-ID: <9d6956f7-cad5-220e-2ea3-e2b2da457092@free.fr> Hello Cl?ment, hello Antoine, I have two similar requests about anticipating the first Scilab 6.1 release (likely in feb. 2019?): Would it be possible * on the ATOMS website, administration page of modules, binaries management section: to add a "6.1" flag in order to become able to upload and manage packages for Scilab 6.1 from now? Releasing a Scilab version with an empty ATOMS list is indeed almost useless. About this topic: in the 6.1 release, adding the 6.0 repository in the default repositories list would be highly welcome. This could even become a rule: for any 6.x version, having the 6.x and the 6.(x-1) as default reachable repositories would avoid breaking most of users habits, what's rather the situation with Scilab 6.0. * on the bugzilla website: add a "6.1.0 (master)" item in the versions list (it could be renamed "6.1.0" when releasing it)? Many bugs fixes for stability are being included in Scilab master, and to me it becomes worthwhile working with the master , 6.0 being so unstable. Thanks Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sat Jul 28 14:22:30 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sat, 28 Jul 2018 05:22:30 -0700 (MST) Subject: [Scilab-users] FFT - upward continuation of a 2D grid In-Reply-To: References: <1532613255211-0.post@n3.nabble.com> Message-ID: <1532780550396-0.post@n3.nabble.com> Hi Rafael, Thanks for the pointers. Still having some issues getting it to work on real data. Upward continuation, should act like a low-pass and give a smoother view of the data. dimx=size(xt); dimy=size(yt); nx=dimx(1); ny=dimy(1); dxy = 0.016666666; dkx=1/(nx*dxy); dky=1/(ny*dxy); kx=dkx*(-(nx/2)+1:nx/2); ky=dky*(-(ny/2)+1:ny/2); [KX,KY]=meshgrid(kx,ky); k=sqrt(KX.^2 + KY.^2); uc=4000; // continue up 4000m //fft_Boug_corr=fft2(Boug_corr); //shift_f=fftshift(fft_Boug_corr); //fft_clean=clean(shift_f); fft_clean=clean(fftshift(fft2(Boug_corr))); // merge commands Fup=fft_clean.*exp(-k*uc); F_real=real(ifft(Fup)); It does generate output, but certainly not as expected for upward continuation of data. Not sure what I'm missing, assuming I have done the wavenumber thing correct. Normally I would do this via GMT, but want to get it going under Scilab for convenience. Clearly, before doing a proper fft, we need to pad the data to expand the dimensions over which the fft is done to avoid edge effects. Just running it with the grid dimensions should still produce a recognisable result. Matbe testing with a synthetic grid would help. Cheers Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sat Jul 28 14:43:50 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 28 Jul 2018 12:43:50 +0000 Subject: [Scilab-users] FFT - upward continuation of a 2D grid In-Reply-To: <1532780550396-0.post@n3.nabble.com> References: <1532613255211-0.post@n3.nabble.com> <1532780550396-0.post@n3.nabble.com> Message-ID: Hi Lester, The spatial resolution of 0.016 m seems unrealistically too-finely sampled... Could you confirm the units? Also, it is possible that your upward continuation requires an angular wavenumber: exp(-2*%pi*k*uc) ? Regards, Rafael -----Original Message----- From: users On Behalf Of arctica1963 Sent: Saturday, July 28, 2018 2:23 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] FFT - upward continuation of a 2D grid Hi Rafael, Thanks for the pointers. Still having some issues getting it to work on real data. Upward continuation, should act like a low-pass and give a smoother view of the data. dimx=size(xt); dimy=size(yt); nx=dimx(1); ny=dimy(1); dxy = 0.016666666; dkx=1/(nx*dxy); dky=1/(ny*dxy); kx=dkx*(-(nx/2)+1:nx/2); ky=dky*(-(ny/2)+1:ny/2); [KX,KY]=meshgrid(kx,ky); k=sqrt(KX.^2 + KY.^2); uc=4000; // continue up 4000m //fft_Boug_corr=fft2(Boug_corr); //shift_f=fftshift(fft_Boug_corr); //fft_clean=clean(shift_f); fft_clean=clean(fftshift(fft2(Boug_corr))); // merge commands Fup=fft_clean.*exp(-k*uc); F_real=real(ifft(Fup)); It does generate output, but certainly not as expected for upward continuation of data. Not sure what I'm missing, assuming I have done the wavenumber thing correct. Normally I would do this via GMT, but want to get it going under Scilab for convenience. Clearly, before doing a proper fft, we need to pad the data to expand the dimensions over which the fft is done to avoid edge effects. Just running it with the grid dimensions should still produce a recognisable result. Matbe testing with a synthetic grid would help. Cheers Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From jrafaelbguerra at hotmail.com Sat Jul 28 14:53:23 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 28 Jul 2018 12:53:23 +0000 Subject: [Scilab-users] FFT - upward continuation of a 2D grid In-Reply-To: References: <1532613255211-0.post@n3.nabble.com> <1532780550396-0.post@n3.nabble.com> Message-ID: One additional remark. Fftshift might have been misused. Try instead: fft_clean=clean(fft2(Boug_corr)); // merge commands k= fftshift(k); Fup=fft_clean.*exp(-k*uc); Regards, Rafael -----Original Message----- From: users On Behalf Of Rafael Guerra Sent: Saturday, July 28, 2018 2:44 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] FFT - upward continuation of a 2D grid Hi Lester, The spatial resolution of 0.016 m seems unrealistically too-finely sampled... Could you confirm the units? Also, it is possible that your upward continuation requires an angular wavenumber: exp(-2*%pi*k*uc) ? Regards, Rafael From sgougeon at free.fr Sat Jul 28 16:20:51 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 28 Jul 2018 16:20:51 +0200 Subject: [Scilab-users] Counter of pointers to an XML object, and clear destructor Message-ID: <33674333-6211-e3ef-4a3f-94410691f7ac@free.fr> Hello, I am doing some tests about the save() function, in order to document its behavior when saving pointers to some objects. There is the case of XML objects: Contrarily to graphic handles, that are pointers whose reloading restores the pointed graphics, saving XML pointers is possible, but then their reloading does NOT restore the XML document. Then, when digging in Bugzilla in order to search for features about this and the clear() function applied to XML pointers, i've found back the following comment from Calixte , referring to an expected change of Scilab 6 with respect to Scilab 5: /With Scilab 6, things will be easier since each data will have a reference counter [of pointers to it] which will allow to call a kind of destructor when the reference count will be zero.// / In practical, this new feature looks still not to be implemented. Here is an illustration: // Let's create an XML document and a pointer "doc" to it: --> doc = xmlReadStr("Hello") doc = XML Document url: Undefined root: XML Element // Now, let's make a copy of the pointer: -->doc2=doc doc2 = XML Document url: Undefined root: XML Element --> doc2==doc ans = T T <<< this double True is strange, but it's not the matter here // Then let's clear both pointers: If a counter actually exists, // it shall be set to 0 afterwards. // And if the automatic destructor is implemented, then this should // automatically delete the XML document. What's the reality?: --> clear doc doc2 // OK --> xmlGetOpenDocs() ans = ans(1) XML Document url: Undefined root: XML Element The document still exists. So, the automatic destructor is not yet implemented, at least for XML objects. Is it a pity? To me, the reverse approach would be more relevant: Deleting an object should clear all its pointers. For instance, with the XML example hereabove, deleting the document should clear doc and doc2. It's unfortunately not the case: --> xmlDelete(xmlGetOpenDocs()(:)) // cleaning the area --> doc = xmlReadStr("Hello"); --> doc2 = doc; --> xmlDelete(doc) --> isdef(["doc" "doc2"],"l") ans = T T --> doc doc = --> This is the same issue with graphic handles when the figure they point to has been closed: We then get some still existing /but invalid/ handles, instead of properly clearing them. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sat Jul 28 16:42:20 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sat, 28 Jul 2018 07:42:20 -0700 (MST) Subject: [Scilab-users] FFT - upward continuation of a 2D grid In-Reply-To: References: <1532613255211-0.post@n3.nabble.com> <1532780550396-0.post@n3.nabble.com> Message-ID: <1532788940620-0.post@n3.nabble.com> Hi Rafael, Problem solved with your guidance! The cellsize was in decimal degrees, so converted to linear units 0.016666 degrees = 1850m approx. //dxy = 0.016666666; decimal degrees - 1 arc minute dxy = 1850; dkx=1/(nx*dxy); dky=1/(ny*dxy); ... fft_clean=clean(fft2(Boug_corr)); k=fftshift(k); Fup=fft_clean.*exp(-2*%pi*k*uc); // needed to be angular k F_real=real(ifft(Fup)); fftshift was applied wrong, so thanks for spotting that! All I need to do to finish this is pad the grid, run the fft, and clip it back to the original size. A rough check of the output compared to that from GMT is minor Thanks again! -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sat Jul 28 22:21:35 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 28 Jul 2018 20:21:35 +0000 Subject: [Scilab-users] Counter of pointers to an XML object, and clear destructor In-Reply-To: <33674333-6211-e3ef-4a3f-94410691f7ac@free.fr> References: <33674333-6211-e3ef-4a3f-94410691f7ac@free.fr> Message-ID: Regarding the save() function, the output *.sod file fails to be consumed by load() for some graphical handles. Example of error message in Scilab 6.0.1: load: Unable to load 'h'. --> typeof(h) ans = handle --> h h = Handle of type "uicontrol" with properties: =========================================== Parent: Figure Children: [] Style = "listbox" BackgroundColor = [-1,-1,-1] Callback = "" Callback_Type = -1 Constraints = "NoLayoutConstraint" Enable = "on" FontAngle = "normal" FontName = "Tahoma" FontSize = 12 FontUnits = "points" FontWeight = "bold" ForegroundColor = [-1,-1,-1] ListboxTop = 0 Margins = [0,0,0,0] Max = 1 Min = 0 Position = [0,0,500,850] Relief = "default" String = string 14x3 Tag = "" TooltipString = "" Units = "pixels" Userdata = [] Value = [] Visible = "on" Any tips/workaround to save/load Scilab sessions in a clean way (even if compromising graphical entities)? Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jul 29 12:34:05 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 12:34:05 +0200 Subject: [Scilab-users] Counter of pointers to an XML object, and clear destructor In-Reply-To: References: <33674333-6211-e3ef-4a3f-94410691f7ac@free.fr> Message-ID: <11059aa3-3606-983e-e66f-6a780f6f1eba@free.fr> Le 28/07/2018 ? 22:21, Rafael Guerra a ?crit : > > Regarding the save() function, the output *.sod file fails to be > consumed by load() for some graphical handles. > > Example of error message in Scilab 6.0.1: > > load: Unable to load 'h'. > Yes, it was reported this week as http://bugzilla.scilab.org/15667 By the way, even when we load a whole figure (the bug 15667 does not occur) but with uicontrols, there are still some issue with their positions (however the situation is much better than with Sciab 5.5.2). > > .../... > > Any tips/workaround to save/load Scilab sessions in a clean way (even > if compromising graphical entities)? > None that i know. There are still a bunch of bugs about save(), load() and listvarinfile(), noticeably recently found and reported when making tests in order to update, improve, and finally rewrite load() and save() help pages. To me, the most disturbing one is that listvarinfile() sometimes leaves the file locked... Then we have to close and restart Scilab to unlock the file and being able to go on... Really blocking! The new proposed save() page can be found here . The current one is there . Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sun Jul 29 13:18:18 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sun, 29 Jul 2018 04:18:18 -0700 (MST) Subject: [Scilab-users] Padding and clipping a grid Message-ID: <1532863098914-0.post@n3.nabble.com> Hello all, I need to increase the dimensions over which the FFT is calculated to avoid edge effects, and following the suggestion of Samuel Gougeon back in 2016, this was recommended: Scilab: 6.0.1 data = [1 2 3; 4 5 6; 7 8 9] addedRows = 3; addedCols = 3; tmp = [data ; data($, :) .*. ones(addedRows, 1)]; // add rows to bottom tmp = [tmp tmp(:, $) .*. ones(1,addedCols)]; // add columns to right tmp = [repmat(tmp(1, : ), addedRows, 1) ; tmp]; // add rows to top paddedMat = [repmat(tmp(:,1) , 1, addedCols) tmp] // add columns to left Now, it is important to adjust the input spatial limits (e.g. degrees) for the new grid: e.g. x1 = -1, x2 = 1, y1 = -1, y2 = 1 original spatial limits pad = 1 // add 1 unit to all edges x1a = x1 - pad x2a = x2 + pad y1a = y1 - pad y2a = y2 + pad xx1a = linspace(x1a,x2a,new_xdim) yy1a = linspace(y1a,y2a,new_ydim) [X,Y] = meshgrid(xx1a,yy1a) etc. What I would like to do is then run the FFT on the expanded grid and then clip it back to the original dimensions (before padding) and spatial limits after processing. Is there a simple solution to this? I was thinking resize_matrix(data,dimx,dimy), but not sure how to get the original grid clipped out. So in the example above, go from the padded limits (-2,2,-2,2) back to (-1,1,-1,1). Sorry if this is a really simple solution, still learning! Thanks Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sun Jul 29 13:56:15 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 13:56:15 +0200 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: <1532863098914-0.post@n3.nabble.com> References: <1532863098914-0.post@n3.nabble.com> Message-ID: <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> Hello Lester, Le 29/07/2018 ? 13:18, arctica1963 a ?crit : > Hello all, > > I need to increase the dimensions over which the FFT is calculated to avoid > edge effects, AFAIK, padding the initial signal does not avoid edge effects (i guess one deal with edges discontinuity). It can even be the source of discontinuity, and so yield fake high fft amplitudes at high frequencies. It will be the case if the original signal S has no edge discontinuity ( S(1)~S($)) but you padd it with zeros while its edge does not fall to zeros (=> |S($)|>>0, S($+1)==0). Even worse, in this case, windowing the signal will no longer be effective, since the padding will move the discontinuity in the body of the padded signal instead of on signal's edge. Padding a signal increases the lowest frequency of its numerical FT, that is the sampling frequency of its FFT. AFAIUnderstand, there is no edge matter there. But this is more a signal processing topic than a Scilab one. Regards Samuel From sgougeon at free.fr Sun Jul 29 14:04:07 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 14:04:07 +0200 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: <1532863098914-0.post@n3.nabble.com> References: <1532863098914-0.post@n3.nabble.com> Message-ID: Le 29/07/2018 ? 13:56, Samuel Gougeon a ?crit : > Hello Lester, > > Le 29/07/2018 ? 13:18, arctica1963 a ?crit : >> Hello all, >> >> I need to increase the dimensions over which the FFT is calculated to >> avoid >> edge effects, > > AFAIK, padding the initial signal does not avoid edge effects (i guess > one deal with edges discontinuity). > It can even be the source of discontinuity, and so yield fake high fft > amplitudes at high frequencies. > It will be the case if the original signal S has no edge > discontinuity ( S(1)~S($)) but you padd > it with zeros while its edge does not fall to zeros (=> |S($)|>>0, > S($+1)==0). Even worse, > in this case, windowing the signal will no longer be effective, since > the padding will move > the discontinuity in the body of the padded signal instead of on > signal's edge. > > Padding a signal increases the lowest frequency of its numerical FT, > that is the sampling frequency > of its FFT. AFAIUnderstand, there is no edge matter there. > > But this is more a signal processing topic than a Scilab one. Le 29/07/2018 ? 13:18, arctica1963 a ?crit : > Hello all, > > I need to increase the dimensions over which the FFT is calculated to avoid > edge effects, and following the suggestion of Samuel Gougeon back in 2016, > this was recommended: > > Scilab: 6.0.1 > > data = [1 2 3; 4 5 6; 7 8 9] > addedRows = 3; addedCols = 3; > > tmp = [data ; data($, :) .*. ones(addedRows, 1)]; // add rows to bottom > tmp = [tmp tmp(:, $) .*. ones(1,addedCols)]; // add columns to right > tmp = [repmat(tmp(1, : ), addedRows, 1) ; tmp]; // add rows to top > paddedMat = [repmat(tmp(:,1) , 1, addedCols) tmp] // add columns to left --> paddedMat = [repmat(tmp(:,1) , 1, addedCols) tmp] // add columns to left paddedMat = 1. 1. 1. 1. 2. 3. 3. 3. 3. 1. 1. 1. 1. 2. 3. 3. 3. 3. 1. 1. 1. 1. 2. 3. 3. 3. 3. 1. 1. 1. 1. 2. 3. 3. 3. 3. 4. 4. 4. 4. 5. 6. 6. 6. 6. 7. 7. 7. 7. 8. 9. 9. 9. 9. 7. 7. 7. 7. 8. 9. 9. 9. 9. 7. 7. 7. 7. 8. 9. 9. 9. 9. 7. 7. 7. 7. 8. 9. 9. 9. 9. OK: here the padding is not done with zeros. Sorry for my misunderstanding. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Jul 29 14:07:17 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 29 Jul 2018 12:07:17 +0000 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> Message-ID: Hi, A standard practice is to apply tapering then padding (with zeros). Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jul 29 14:25:16 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 14:25:16 +0200 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> Message-ID: <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> Le 29/07/2018 ? 14:07, Rafael Guerra a ?crit : > > Hi, > > A standard practice is to apply tapering then padding (with zeros). > AKA windowing. In Scilab: https://help.scilab.org/docs/6.0.1/en_US/window.html 2D windows can be built from these 1D profiles. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jul 29 14:48:03 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 14:48:03 +0200 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> Message-ID: <94e49b7e-7d10-3398-f9d3-6b40a3348511@free.fr> Le 29/07/2018 ? 14:25, Samuel Gougeon a ?crit : > Le 29/07/2018 ? 14:07, Rafael Guerra a ?crit : >> >> Hi, >> >> A standard practice is to apply tapering then padding (with zeros). >> > > AKA windowing. In Scilab: > https://help.scilab.org/docs/6.0.1/en_US/window.html > 2D windows can be built from these 1D profiles. By the way, it could be useful to upgrade window() in order to become able to generate such 2D or N-D windows without external postprocessing. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sun Jul 29 14:53:03 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sun, 29 Jul 2018 05:53:03 -0700 (MST) Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> Message-ID: <1532868783760-0.post@n3.nabble.com> Hi all, I will have to look further into this. I can check the results against GMT (grdfft), I think they may use tapering but will have to look at the code (C++). Can I confirm that clipping is done via resize_matrix? Cheers Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sun Jul 29 15:06:49 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 15:06:49 +0200 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: <1532868783760-0.post@n3.nabble.com> References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> <1532868783760-0.post@n3.nabble.com> Message-ID: Le 29/07/2018 ? 14:53, arctica1963 a ?crit : > Hi all, > > I will have to look further into this. I can check the results against GMT > (grdfft), I think they may use tapering but will have to look at the code > (C++). > > Can I confirm that clipping is done via resize_matrix? Not if it is symetric. The f = fft() result put high frequencies (to be removed) at the center of the spectrum. So, if you don't use fftshift() to put it on the spectrum's edges, you will have to do someting like: pw = [pwr, pwc]; // predefined padding widths s = size(f); tf = f([1:s(1)/2-pwr s(1)/2+pwr:s(1)], [1:s(2)/2-pwc s(2)/2+pwc:s(2)]; But this expression is approximative, depending on the oddness of s components, etc. It is easier to trimmed the shifted spectrum: sf = fftshift(f); tsf = sf(pwr+1:$-pwr, pwc+1:$-pwc); and then backshift the trimmed spectrum: sf = fftshift(tsf); This is the idea. Samuel From sgougeon at free.fr Sun Jul 29 15:19:09 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 15:19:09 +0200 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> <1532868783760-0.post@n3.nabble.com> Message-ID: <385362a4-8f98-3a37-4280-4977ea6a4243@free.fr> Le 29/07/2018 ? 15:06, Samuel Gougeon a ?crit : > > But this expression is approximative, depending on the _/oddness/_ of > s components, etc. Sorry for my bad (and too fast) english. I meant: the parity: if each size is even or odd. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jul 29 15:53:21 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 29 Jul 2018 15:53:21 +0200 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: <94e49b7e-7d10-3398-f9d3-6b40a3348511@free.fr> References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> <94e49b7e-7d10-3398-f9d3-6b40a3348511@free.fr> Message-ID: Le 29/07/2018 ? 14:48, Samuel Gougeon a ?crit : > Le 29/07/2018 ? 14:25, Samuel Gougeon a ?crit : >> Le 29/07/2018 ? 14:07, Rafael Guerra a ?crit : >>> >>> Hi, >>> >>> A standard practice is to apply tapering then padding (with zeros). >>> >> >> AKA windowing. In Scilab: >> https://help.scilab.org/docs/6.0.1/en_US/window.html >> 2D windows can be built from these 1D profiles. > > By the way, it could be useful to upgrade window() in order to become > able to generate > such 2D or N-D windows without external postprocessing. Wish now reported as bug 15694 . See also https://en.wikipedia.org/wiki/Window_function#Two-dimensional_windows -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sun Jul 29 16:01:50 2018 From: arctica1963 at gmail.com (arctica1963) Date: Sun, 29 Jul 2018 07:01:50 -0700 (MST) Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> <94e49b7e-7d10-3398-f9d3-6b40a3348511@free.fr> Message-ID: <1532872910730-0.post@n3.nabble.com> Thanks for the suggestions and clarification. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sun Jul 29 17:32:33 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 29 Jul 2018 15:32:33 +0000 Subject: [Scilab-users] Padding and clipping a grid In-Reply-To: References: <1532863098914-0.post@n3.nabble.com> <348f4809-20ea-e83e-a804-37f66409f65f@free.fr> <398bdaf3-5fe2-02db-ba81-82f9c4ec47c0@free.fr> <94e49b7e-7d10-3398-f9d3-6b40a3348511@free.fr> Message-ID: Hi, A more detailed reference is: https://en.wikipedia.org/wiki/Two_dimensional_window_design In the simplest approach, the 2D window is the outer product of two 1D windows: Wxy = wx'*wy For example: nx=100; ny=200; wx = window('hm',nx); wy = window('hm',ny); ix = linspace(0,1,length(wx)); iy = linspace(0,1,length(wy)); Wxy = wx'*wy; clf() gcf().color_map = hotcolormap(64); Sgrayplot(ix,iy,Wxy) Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Jul 29 19:53:21 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 29 Jul 2018 17:53:21 +0000 Subject: [Scilab-users] Counter of pointers to an XML object, and clear destructor In-Reply-To: <11059aa3-3606-983e-e66f-6a780f6f1eba@free.fr> References: <33674333-6211-e3ef-4a3f-94410691f7ac@free.fr> <11059aa3-3606-983e-e66f-6a780f6f1eba@free.fr> Message-ID: Samuel, Thanks for confirming & bug reports. Regards, Rafael From: users On Behalf Of Samuel Gougeon Sent: Sunday, July 29, 2018 12:34 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Counter of pointers to an XML object, and clear destructor Le 28/07/2018 ? 22:21, Rafael Guerra a ?crit : Regarding the save() function, the output *.sod file fails to be consumed by load() for some graphical handles. Example of error message in Scilab 6.0.1: load: Unable to load 'h'. Yes, it was reported this week as http://bugzilla.scilab.org/15667 By the way, even when we load a whole figure (the bug 15667 does not occur) but with uicontrols, there are still some issue with their positions (however the situation is much better than with Sciab 5.5.2). .../... Any tips/workaround to save/load Scilab sessions in a clean way (even if compromising graphical entities)? None that i know. There are still a bunch of bugs about save(), load() and listvarinfile(), noticeably recently found and reported when making tests in order to update, improve, and finally rewrite load() and save() help pages. To me, the most disturbing one is that listvarinfile() sometimes leaves the file locked... Then we have to close and restart Scilab to unlock the file and being able to go on... Really blocking! The new proposed save() page can be found here. The current one is there. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.elias at scilab-enterprises.com Mon Jul 30 00:55:28 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Mon, 30 Jul 2018 00:55:28 +0200 Subject: [Scilab-users] Counter of pointers to an XML object, and clear destructor In-Reply-To: <33674333-6211-e3ef-4a3f-94410691f7ac@free.fr> References: <33674333-6211-e3ef-4a3f-94410691f7ac@free.fr> Message-ID: <8923c98b-444f-e9ca-79c0-a9c347e07932@scilab-enterprises.com> Hello Samuel, In XMLObject there is two levels of reference, ?- one on MList (managed by reference counter) ?- one on internal XMLObject (internally manager like handle, an integer that link to a C++ object) xmlDelete destroy internal XMLObject clear destroy (unreference and destroy if ref <= 1 ) MList object. So in your case, after a xmlDelete, the internal XMLObject was destroyed but not the MList. And after a clear doc, the MList was destroyed but the internal XMLObject not. Current XMLObject is based on simple MList with the id of the doc ( store as double ). If we want to correctly destroy the internal XMLObject with the clear command. We must change the implementation to use types::UserType instead of types::Double and uses destructor of UserType to free XMLObject. > Deleting an object should clear all its pointers. For instance, with the XML example > hereabove, deleting the document should clear doc and doc2. I am not agree with that, I cannot delete an user variable indirectly. ( xmlDelete(doc) that will delete doc ) Only clear command can do that. For me it will be a bad practice. Antoine Le 28/07/2018 ? 16:20, Samuel Gougeon a ?crit?: > Hello, > > I am doing some tests about the save() function, in order to document > its behavior when saving pointers to some objects. > > There is the case of XML objects: > Contrarily to graphic handles, that are pointers whose reloading > restores the pointed graphics, saving XML pointers is possible, but > then their reloading does NOT restore the XML document. > Then, when digging in Bugzilla in order to search for features about > this and the clear() function applied to XML pointers, i've found back > the following comment from Calixte > , referring to an > expected change of Scilab 6 with respect to Scilab 5: > > /With Scilab 6, things will be easier since each data will have a > reference counter [of pointers to it] which will allow to call a kind > of destructor when the reference count will be zero.// > / > In practical, this new feature looks still not to be implemented. Here > is an illustration: > > // Let's create an XML document and a pointer "doc" to it: > --> doc = xmlReadStr(" rib=""bar"">Hello") > ?doc? = > XML Document > url: Undefined > root: XML Element > > // Now, let's make a copy of the pointer: > -->doc2=doc > ?doc2? = > XML Document > url: Undefined > root: XML Element > > --> doc2==doc > ?ans? = > ? T T??? <<< this double True is strange, but it's not the matter here > > // Then let's clear both pointers: If a counter actually exists, > // it shall be set to 0 afterwards. > // And if the automatic destructor is implemented, then this should > // automatically delete the XML document. What's the reality?: > --> clear doc doc2?? // OK > -->? xmlGetOpenDocs() > ?ans? = > ?????? ans(1) > XML Document > url: Undefined > root: XML Element > > The document still exists. So, the automatic destructor is not yet > implemented, > at least for XML objects. > > Is it a pity? To me, the reverse approach would be more relevant: > Deleting an object should clear all its pointers. For instance, with > the XML example > hereabove, deleting the document should clear doc and doc2. > It's unfortunately not the case: > --> xmlDelete(xmlGetOpenDocs()(:))? // cleaning the area > --> doc = xmlReadStr(" rib=""bar"">Hello"); > --> doc2 = doc; > --> xmlDelete(doc) > --> isdef(["doc" "doc2"],"l") > ?ans? = > ? T T > --> doc > ?doc? = > --> > > This is the same issue with graphic handles when the figure they point > to has been closed: > We then get some still existing /but invalid/ handles, instead of > properly clearing them. > > Regards > 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 skiba.g at gmail.com Mon Jul 30 19:21:05 2018 From: skiba.g at gmail.com (Grzegorz Skiba) Date: Mon, 30 Jul 2018 19:21:05 +0200 Subject: [Scilab-users] ATOMS error (Scilab 6.0.1) In-Reply-To: References: <1532166620279-0.post@n3.nabble.com> <3120e400-3301-06f0-8479-8f70576cfb87@scilab-enterprises.com> <1532249357640-0.post@n3.nabble.com> <9ffccd3a5e5d157255dd2a9d17e920e1085735f3.camel@esi-group.com> Message-ID: Dear Cl?ment, Is there any work in progress to fix this issue on Scilab 5.5.2? Is there any workaround for this issue for Scilab 5.5.2 users? I was trying to install toolbox without internet but without success. The atomsInstall function works only with internet connection ? Regards Grzegorz 2018-07-27 3:27 GMT+02:00 Samuel Gougeon : > Hello Cl?ment, > > Thanks for this work-around. It works like a charm for the Scilab 6.0 > repository. > > However, the 5.5 one now looks out of work: From Scilab 5.5.2, > atomsSystemUpdate() now yields > > -->atomsSystemUpdate > Scanning repository http://atoms.scilab.org/5.5 ... Done > > !--error 10000 > atomsDESCRIPTIONread: The file "TMPDIR\ATOMS~1\1_TOOLBOXES" is empty. > at line 56 of function atomsDESCRIPTIONread called by : > at line 227 of function atomsDESCRIPTIONget called by : > at line 16 of function atomsSystemUpdate called by : > atomsSystemUpdate > > Regards > Samuel > > Le 23/07/2018 ? 12:00, Cl?ment David a ?crit : > > Hello, > > A server-side workaround have been implemented by using CRLF for the TOOLBOXES.gz windows files, > avoiding the mgetl() buggy behavior in 6.0.1 > > -- > Cl?ment > > > > _______________________________________________ > 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 Jul 31 21:51:34 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 31 Jul 2018 21:51:34 +0200 Subject: [Scilab-users] == and : relative priorities, as in 0==-1:1 Message-ID: <73815ac4-d76c-0cbf-fd44-2a2a2beac6f9@free.fr> Hello, Here is a strange -- rather unexpected -- trivial behavior: --> p = 0; p==-1:1 Undefined operation for the given operands. check or define function %b_b_s for overloading. I would have expected[%f %t %f], but "==" 's priority is higher than ":"'s one, and the expression is parsed (p==-1):1. It's the same with other comparisons, like p>-1:1. It was the same behavior in Scilab 5.5.2. Since by default ":" is defined and meaningful for a very limited set of operands types: numbers and text (, and that ":" does not accept a vector as operands), what about inverting the comparisons and ":" relative priorities, in order to parse p==(-1:1) ? "~" and comparisons relative priorities are inverted in Scilab 6. That's more handy. IMO here is another opportunity get a more relevant and handy behavior, by inverting ":" and comparisons ones. Don't you think so? Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Jul 31 22:03:32 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 31 Jul 2018 22:03:32 +0200 Subject: [Scilab-users] == and : relative priorities, as in 0==-1:1 In-Reply-To: <73815ac4-d76c-0cbf-fd44-2a2a2beac6f9@free.fr> References: <73815ac4-d76c-0cbf-fd44-2a2a2beac6f9@free.fr> Message-ID: <01373c47-682d-4727-a33b-f6ca720e19bc@free.fr> Le 31/07/2018 ? 21:51, Samuel Gougeon a ?crit : > Hello, > > Here is a strange -- rather unexpected -- trivial behavior: > > --> p = 0; p==-1:1 > Undefined operation for the given operands. > check or define function %b_b_s for overloading. > > I would have expected[%f %t %f], but "==" 's priority is higher than > ":"'s one, > and the expression is parsed (p==-1):1. > It's the same with other comparisons, like p>-1:1. > > It was the same behavior in Scilab 5.5.2. > > Since by default ":" is defined and meaningful for a very limited > set of operands types: numbers and text (, and that ":" does not > accept a vector as operands), what about inverting the comparisons > and ":" relative priorities, in order to parse p==(-1:1) ? > > "~" and comparisons relative priorities are inverted in Scilab 6. > That's more handy. IMO here is another opportunity get a more > relevant and handy behavior, by inverting ":" and comparisons ones. It is somewhat reported here (in 2011..), but i don't understand the conclusion of the report... -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Jul 31 22:04:08 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 31 Jul 2018 20:04:08 +0000 Subject: [Scilab-users] == and : relative priorities, as in 0==-1:1 In-Reply-To: <73815ac4-d76c-0cbf-fd44-2a2a2beac6f9@free.fr> References: <73815ac4-d76c-0cbf-fd44-2a2a2beac6f9@free.fr> Message-ID: Hi Samuel, Parsing p==-1:1 as p==(-1:1) would make Scilab output: ans = F T F consistent with Matlab: ans = 1x3 logical array 0 1 0 And with Octave: ans = 0 1 0 Regards, Rafael From: users On Behalf Of Samuel Gougeon Sent: Tuesday, July 31, 2018 9:52 PM To: International users mailing list for Scilab. Subject: [Scilab-users] == and : relative priorities, as in 0==-1:1 Hello, Here is a strange -- rather unexpected -- trivial behavior: --> p = 0; p==-1:1 Undefined operation for the given operands. check or define function %b_b_s for overloading. I would have expected [%f %t %f], but "==" 's priority is higher than ":"'s one, and the expression is parsed (p==-1):1. It's the same with other comparisons, like p>-1:1. It was the same behavior in Scilab 5.5.2. Since by default ":" is defined and meaningful for a very limited set of operands types: numbers and text (, and that ":" does not accept a vector as operands), what about inverting the comparisons and ":" relative priorities, in order to parse p==(-1:1) ? "~" and comparisons relative priorities are inverted in Scilab 6. That's more handy. IMO here is another opportunity get a more relevant and handy behavior, by inverting ":" and comparisons ones. Don't you think so? Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Jul 31 22:20:24 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 31 Jul 2018 20:20:24 +0000 Subject: [Scilab-users] == and : relative priorities, as in 0==-1:1 In-Reply-To: <01373c47-682d-4727-a33b-f6ca720e19bc@free.fr> References: <73815ac4-d76c-0cbf-fd44-2a2a2beac6f9@free.fr> <01373c47-682d-4727-a33b-f6ca720e19bc@free.fr> Message-ID: Le 31/07/2018 ? 21:51, Samuel Gougeon a ?crit : It is somewhat reported here (in 2011..), but i don't understand the conclusion of the report... : "It seems that "he who must not be named" has different priorities on operators." Is Voldemort working in the Scilab team? -------------- next part -------------- An HTML attachment was scrubbed... URL: