From pgsmntry at gmail.com Tue Sep 1 08:15:17 2015 From: pgsmntry at gmail.com (Parthageet Samantaray) Date: Tue, 1 Sep 2015 11:45:17 +0530 Subject: [Scilab-users] Regarding a error message "List element number 13 is Undefined." In-Reply-To: <1441039435.9213.165.camel@Servo> References: <1441039435.9213.165.camel@Servo> Message-ID: Hello Tim, Thanks for suggestion. I will not be able to send the whole xcos file because of proprietary reasons. I am trying to trim the blocks up and see if the problem is with any particular block. To give you a big picture, I am actually mathematically modelling a PLL. In this when I am trying to connect the feedback path from the VCO to the PFD, the error message is coming. Thanks again for replying. I will reply soon once I find something on this. With Regards. Parthageet Samantaray On Mon, Aug 31, 2015 at 10:13 PM, Tim Wescott wrote: > On Mon, 2015-08-31 at 17:49 +0530, Parthageet Samantaray wrote: > > Hello all, > > > > > > I am having problem while running the simulation in Xcos. Actually I > > am trying to simulate a closed loop system. The model was working till > > it was open loop, with considered inputs. But as I connect a feedback > > path it is showing a message on the Scilab console - "List element > > number 13 is Undefined." > > > > > > I attempted to make the feedback path in many ways but nothing worked > > out. I am unable to understand why this error is displaying. > > > > > > If anyone has any suggestions kindly post me. > > Post your xcos file. This won't help me help you, but someone who knows > more than I do about xcos will probably need it. > > If you can't because it's huge or proprietary, try trimming bits out -- > if the problem persists when it's small and simple, that'll make an even > better thing to post. If the problem goes away when you excise some > specific block, then you can consider that a huge blinking arrow to the > problem. > > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: 503.349.8432 > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Tue Sep 1 16:20:15 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Tue, 1 Sep 2015 07:20:15 -0700 (MST) Subject: [Scilab-users] find function failure in scilab6 Message-ID: <1441117215316-4032767.post@n3.nabble.com> Dear all. Save the attached file in current diorectry and run the following script. ****** load('test.dat'); disp(x);//x contains 0.1 as the 3rd elemnt. disp(y);//y is 0.1 z=find(x==y); disp(z)//failure because z returns [] instead 3. **** Since x contains y as the 3rd element , find(x==y) should return 3. But it returns []. Is there any error in my script or is this just a bug of scilab6? Best regards. filure_of_find_function.sce -- View this message in context: http://mailinglists.scilab.org/find-function-failure-in-scilab6-tp4032767.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Tue Sep 1 17:18:33 2015 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 01 Sep 2015 17:18:33 +0200 Subject: [Scilab-users] find function failure in scilab6 In-Reply-To: <1441117215316-4032767.post@n3.nabble.com> References: <1441117215316-4032767.post@n3.nabble.com> Message-ID: <55E5C1C9.9000909@inria.fr> Hello, You forgot to attach the test.dat file. But take care that two different values can give the same display. To check it you can compute x(3)-y Serge Steer Le 01/09/2015 16:20, fujimoto2005 a ?crit : > Dear all. > Save the attached file in current diorectry and run the following script. > ****** > load('test.dat'); > disp(x);//x contains 0.1 as the 3rd elemnt. > disp(y);//y is 0.1 > z=find(x==y); > disp(z)//failure because z returns [] instead 3. > > **** > Since x contains y as the 3rd element , > find(x==y) should return 3. > But it returns []. > Is there any error in my script or is this just a bug of scilab6? > > Best regards. > > filure_of_find_function.sce > > > > > -- > View this message in context: http://mailinglists.scilab.org/find-function-failure-in-scilab6-tp4032767.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From fujimoto2005 at gmail.com Tue Sep 1 17:43:58 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Tue, 1 Sep 2015 08:43:58 -0700 (MST) Subject: [Scilab-users] find function failure in scilab6 In-Reply-To: <55E5C1C9.9000909@inria.fr> References: <1441117215316-4032767.post@n3.nabble.com> <55E5C1C9.9000909@inria.fr> Message-ID: <1441122238199-4032769.post@n3.nabble.com> Hello Serge Steer As you suggested, x(3)-y = - 1.388D-17. I must improve to genarate values of x. Thanks a lot. Best regards. -- View this message in context: http://mailinglists.scilab.org/find-function-failure-in-scilab6-tp4032767p4032769.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From amonmayr at laas.fr Wed Sep 2 14:03:15 2015 From: amonmayr at laas.fr (amonmayr at laas.fr) Date: Wed, 02 Sep 2015 14:03:15 +0200 Subject: [Scilab-users] HDF5 file : how to access HDF5 compound elements Message-ID: <55E6E583.2090908@laas.fr> Hi all, Almost everything is in the title: I am trying to load in scilab the content of an HDF5 file and some of the datasets are of type compound of array of variable length: h5dump(xyg) DATASET "XY Graph" { DATATYPE H5T_COMPOUND { H5T_VLEN { H5T_IEEE_F64LE } "elem1"; H5T_VLEN { H5T_IEEE_F64LE } "elem2"; } DATASPACE SCALAR STORAGE_LAYOUT { CONTIGUOUS SIZE 0 OFFSET 18446744073709551615 } DATA { (0): { (), () } } } How can I access elem1 and elem2? I tried things like: xyg.data xyg.elem1 xyg.data.elem1 xyg.compound.whatever without success... Any clue? Cheers, Antoine PS: I can give you an example hdf5 file if needed, but it's quite big! From calixte.denizet at scilab-enterprises.com Wed Sep 2 16:20:36 2015 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Wed, 02 Sep 2015 16:20:36 +0200 Subject: [Scilab-users] HDF5 file : how to access HDF5 compound elements In-Reply-To: <55E6E583.2090908@laas.fr> References: <55E6E583.2090908@laas.fr> Message-ID: <55E705B4.5070205@scilab-enterprises.com> Hi Antoine, Probably something like: d=xyg.data(0); d.elem1 d.elem2 Please provide me a file (you can send it to me privately), it could have some bugs. Best regards Calixte On 02/09/2015 14:03, amonmayr at laas.fr wrote: > Hi all, > > Almost everything is in the title: I am trying to load in scilab the > content of an HDF5 file and some of the datasets are of type compound > of array of variable length: > > h5dump(xyg) > DATASET "XY Graph" { > DATATYPE H5T_COMPOUND { > H5T_VLEN { H5T_IEEE_F64LE } "elem1"; > H5T_VLEN { H5T_IEEE_F64LE } "elem2"; > } > DATASPACE SCALAR > STORAGE_LAYOUT { > CONTIGUOUS > SIZE 0 > OFFSET 18446744073709551615 > } > DATA { > (0): { > (), > () > } > } > } > > > How can I access elem1 and elem2? > I tried things like: > xyg.data > xyg.elem1 > xyg.data.elem1 > xyg.compound.whatever > without success... > > Any clue? > > Cheers, > > Antoine > > PS: I can give you an example hdf5 file if needed, but it's quite big! > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com From pgsmntry at gmail.com Thu Sep 3 07:16:58 2015 From: pgsmntry at gmail.com (Parthageet Samantaray) Date: Thu, 3 Sep 2015 10:46:58 +0530 Subject: [Scilab-users] Regarding a error message "List element number 13 is Undefined." In-Reply-To: References: <1441039435.9213.165.camel@Servo> Message-ID: Hello, I am posting the xcos file which shows the error. Thanks Tim, your trick worked out in identifying the the exact block in which the error existed. But the problem is still persists. Please find the block and suggest something regarding. With regards, Parthageet Samantaray On Tue, Sep 1, 2015 at 11:45 AM, Parthageet Samantaray wrote: > Hello Tim, > > Thanks for suggestion. I will not be able to send the whole xcos > file because of proprietary reasons. I am trying to trim the blocks up and > see if the problem is with any particular block. > > To give you a big picture, I am actually mathematically modelling > a PLL. In this when I am trying to connect the feedback path from the VCO > to the PFD, the error message is coming. > > Thanks again for replying. I will reply soon once I find something > on this. > > With Regards. > Parthageet Samantaray > > On Mon, Aug 31, 2015 at 10:13 PM, Tim Wescott > wrote: > >> On Mon, 2015-08-31 at 17:49 +0530, Parthageet Samantaray wrote: >> > Hello all, >> > >> > >> > I am having problem while running the simulation in Xcos. Actually I >> > am trying to simulate a closed loop system. The model was working till >> > it was open loop, with considered inputs. But as I connect a feedback >> > path it is showing a message on the Scilab console - "List element >> > number 13 is Undefined." >> > >> > >> > I attempted to make the feedback path in many ways but nothing worked >> > out. I am unable to understand why this error is displaying. >> > >> > >> > If anyone has any suggestions kindly post me. >> >> Post your xcos file. This won't help me help you, but someone who knows >> more than I do about xcos will probably need it. >> >> If you can't because it's huge or proprietary, try trimming bits out -- >> if the problem persists when it's small and simple, that'll make an even >> better thing to post. If the problem goes away when you excise some >> specific block, then you can consider that a huge blinking arrow to the >> problem. >> >> -- >> >> Tim Wescott >> www.wescottdesign.com >> Control & Communications systems, circuit & software design. >> Phone: 503.631.7815 >> Cell: 503.349.8432 >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Debug_Error.zcos Type: application/octet-stream Size: 12447 bytes Desc: not available URL: From antoine.monmayrant at laas.fr Thu Sep 3 10:14:27 2015 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 03 Sep 2015 10:14:27 +0200 Subject: [Scilab-users] HDF5 file : how to access HDF5 compound elements In-Reply-To: <55E705B4.5070205@scilab-enterprises.com> References: <55E6E583.2090908@laas.fr> <55E705B4.5070205@scilab-enterprises.com> Message-ID: <55E80163.4020200@laas.fr> Le 09/02/2015 04:20 PM, Calixte Denizet a ?crit : > Hi Antoine, > > Probably something like: > d=xyg.data(0); > d.elem1 > d.elem2 > Thanks Calixte, it's almost what I was looking for ( data(0) -> data(1) ). I think that my hdf5 file is not containing what I was looking for and it might even be corrupted! It seems to efficiently crash scilab 6.0. I'll fill a bug. Antoine > Please provide me a file (you can send it to me privately), it could > have some bugs. > > Best regards > > Calixte > > On 02/09/2015 14:03, amonmayr at laas.fr wrote: >> Hi all, >> >> Almost everything is in the title: I am trying to load in scilab the >> content of an HDF5 file and some of the datasets are of type compound >> of array of variable length: >> >> h5dump(xyg) >> DATASET "XY Graph" { >> DATATYPE H5T_COMPOUND { >> H5T_VLEN { H5T_IEEE_F64LE } "elem1"; >> H5T_VLEN { H5T_IEEE_F64LE } "elem2"; >> } >> DATASPACE SCALAR >> STORAGE_LAYOUT { >> CONTIGUOUS >> SIZE 0 >> OFFSET 18446744073709551615 >> } >> DATA { >> (0): { >> (), >> () >> } >> } >> } >> >> >> How can I access elem1 and elem2? >> I tried things like: >> xyg.data >> xyg.elem1 >> xyg.data.elem1 >> xyg.compound.whatever >> without success... >> >> Any clue? >> >> Cheers, >> >> Antoine >> >> PS: I can give you an example hdf5 file if needed, but it's quite big! >> >> _______________________________________________ >> 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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ From jasper at amsterchem.com Thu Sep 3 16:51:03 2015 From: jasper at amsterchem.com (jasper van baten) Date: Thu, 3 Sep 2015 16:51:03 +0200 Subject: [Scilab-users] threading model in Scilab 6 (alpha) In-Reply-To: <55C1CD01.8070304@amsterchem.com> References: <55BBA3E6.4080903@amsterchem.com> <55C067F3.6010009@amsterchem.com> <4A7E6280-FEB2-4795-99F9-3ACC8DC4B6A6@scilab-enterprises.com> <55C1CD01.8070304@amsterchem.com> Message-ID: <55E85E57.6070301@amsterchem.com> Hi Fran?ois, Is there a decision on the threading model yet? Many thanks, best wishes, Jasper. On 8/5/2015 10:44, jasper van baten wrote: > Hi Fran?ois, > > Many thanks for your reply. As soon as you know more, I would be very > pleased to test again in a new alpha. I would like to have my software > back up-and-running before the actual release of Scilab 6. Before > doing so I will have to decide how to handle the threading issue. > > If the solution will be that all is single threaded but in different > threads, I suppose my best work-around would still be to synchronize > access to the underlying objects over a private thread. I hope you > will decide to keep the core thread alive and recycle it between > calls, so that all calls are made on the same thread. > > If on the other hand your solution will be full multi-threaded > execution, I would welcome that too. Also in this case I hope you will > create a fixed number of threads and recycle them, for the same > reason. In this case I can simply create a corresponding number of COM > objects under the hood. > > I am not sure why events from outside the thread would have to make > that you stop the thread and start another one (unless you forcefully > terminate the thread, but I suppose you do not as this will surely > lead to memory leaks and other trouble). You can simply set up your > calculation thread to do something like > > void core_threadproc() { > > for (;;) { > //wait until next command > synchronizationObject.wait(); > //pick up next (set of) command(s) and execute > if (nextCommand==CommandTerminate()) break; > ... > > } > > } > > For interrupting calculations you could poll between individual > commands and during length commands. > > On another note: removal of the intersci exe forced me to switch to > the api-scilab (short of keeping previous builds of scilab around). I > am pleased with this interface, it is a lot nicer than intersci. The > C++ interface is nicer than the C interface, I think, but does not > seem to have support for strings and some other data types (unless I > missed something). So I am now mixing my approach: "csci" interfaces > for all routines that take string matrices as in- our output, and > "cppsci" interfaces for all routines that only deal with numeric > matrices. Support for string (and other) data types from the cppsci > interface would be welcome in the future. > > Best wishes, > > Jasper > > > > On 8/5/2015 10:21, Fran?ois Granade wrote: >> Hi Jasper, >> >> Looks like you have found an interesting question here... >> >> First - there are no multiple concurrent threads in the core. So we >> are safe (and so is the API, without being thread-safe). >> >> However, what you saw is right: each command executes in a new >> thread. We designed it on purpose, with one of the reason being that >> this thread can be what we call the "storeCommand" which manages >> events from outside the main thread (UI, interruption). Another idea >> was that - later - to allow multithreaded execution (under some >> serious constraints). >> >> Now, your point about COM loading, and thread-local storage, is very >> valid, and may very well mean that we should change this. >> >> We will study if/how we could modify that... we'll keep you posted. >> >> Thanks *a lot* for reporting this; it's exactly what we released the >> alpha for, and even though we were hoping we would not have such >> questions, it's better to have them now than later... >> >> for the Scilab team, >> Fran?ois Granade >> >> >> >> On Aug 4, 2015, at 9:21 AM, jasper van baten >> wrote: >> >>> Does anybody know what threading model is used in Scilab 6 alpha? I >>> am referring to the default mode of operation, and not while >>> executing parallel_for, or MPI as described here >>> (http://wiki.scilab.org/Documentation/ParallelComputingInScilab). >>> >>> If there are multiple core threads that execute concurrently, then >>> all api-scilab code needs to be written in a thread-safe re-entrant >>> safe manner. I doubt this is the case. >>> >>> If there is one core thread alive at any point, it would make sense >>> for this to remain the same thread, which does not appear to be the >>> case. If not the same thread, any application that depends on >>> apartment threaded COM objects or thread local storage will no >>> longer function as it did in Scilab 5. The solution may be to >>> synchronize such applications over a private thread, but that surely >>> will come at a performance cost. >>> >>> Having some idea about the threading model that is intended and used >>> would be helpful. >>> >>> Best wishes, >>> >>> Jasper. >>> >>> On 7/31/2015 18:35, jasper van baten wrote: >>>> All, >>>> >>>> What's the story with threading in Scilab 6? Whereas previous >>>> versions appeared to be single threaded from an external DLL point >>>> of view, I see that the DLLmain function gets called by a one >>>> thread, whereas interface routines get called from another thread. >>>> Worse, looks like each interface routine call is made from a new >>>> thread. What is the threading model?? Is there a limited number of >>>> threads, or are threads created on the fly? >>>> >>>> Thanks, best wishes, >>>> >>>> Jasper >>>> >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sat Sep 5 08:35:17 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Fri, 4 Sep 2015 23:35:17 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> Message-ID: <1441434917662-4032777.post@n3.nabble.com> Hi, Fran?ois Thanks for your reply. I tried to install the latest one according to the following instruction of the readme file incleded in the package. scipver = "X.YY"; atomsSetConfig("offLine","True"); atomsInstall(+"/scipad-"+scipver+"-Scilab5.zip"); if ~exists("atomsinternalslib") then load("SCI/modules/atoms/macros/atoms_internals/lib"); end execstr("exec("""+atomsGetInstalledPath(["scipad" scipver])+"/builder.sce"",-1)"); atomsLoad("scipad"); But the installation failed with the following message. -->exec(MYDIR+'\installScript.sce', -1) !--error 10000 atomsExtract: The file MYDIR+"\scipad-5.5.2-Scilab5.zip" does not exist or is not read accessible. How can I fix this problem? Best regards -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032777.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fvogelnew1 at free.fr Sat Sep 5 08:52:17 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 5 Sep 2015 08:52:17 +0200 Subject: [Scilab-users] scipad In-Reply-To: <1441434917662-4032777.post@n3.nabble.com> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> Message-ID: <55EA9121.3020509@free.fr> fujimoto2005 a ?crit le 05/09/2015 08:35 : > -->exec(MYDIR+'\installScript.sce', -1) > !--error 10000 > atomsExtract: The file MYDIR+"\scipad-5.5.2-Scilab5.zip" does not exist or > is not read accessible. The installation instructions are both in the package itself and here: http://sourceforge.net/p/scipad/wiki/Installation/ Did you follow them carefully? Specifically, in the commands to type (or paste) in Scilab you have to replace the string by the folder name where you saved the downloaded package, and X.YY by the Scipad version number. Regards, Francois From fvogelnew1 at free.fr Sat Sep 5 09:16:08 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 5 Sep 2015 09:16:08 +0200 Subject: [Scilab-users] scipad In-Reply-To: References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> <55EA9121.3020509@free.fr> Message-ID: <55EA96B8.4080801@free.fr> Masahiro Fujimoto a ?crit le 05/09/2015 09:10 : > The actual installataion script I used is the following one > Thanks. Please provide a complete copy/paste of the Scilab console when executing it. > ******* > MYDIR='C:\Users\g-fujimoto\Dropbox\DownLoadProgram\_scilab\scipad' > scipver = "8.73"; > atomsSetConfig("offLine","True"); > atomsInstall(MYDIR+"/scipad-"+scipver+"-Scicoslab.zip"); > if ~exists("atomsinternalslib") then > load("SCI/modules/atoms/macros/atoms_internals/lib"); > end > execstr("exec("""+atomsGetInstalledPath(["scipad" > scipver])+"/builder.sce"",-1)"); > atomsLoad("scipad"); > ************ > The downloaded package exists in the MYDIR folder. > I modified the 4th line from 'Scicoslab.zip' to 'Scicoslab.zip' > because actula package name downloaded is different the original > instruction message. What package did you download? You seem to confuse the package for Scicoslab with the package for Scilab. For Scilab, you should have downloaded scipad-8.73-Scilab5.zip and not scipad-8.73-Scicoslab.zip Francois From fujimoto2005 at gmail.com Sat Sep 5 09:44:58 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 00:44:58 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <55EA96B8.4080801@free.fr> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> <55EA9121.3020509@free.fr> <55EA96B8.4080801@free.fr> Message-ID: <1441439098470-4032780.post@n3.nabble.com> A downloaded from the download button in the page you suggested in the first reply. Actulally it was the package for Scicoslab as you said. I downloaded the right one from the 'files tag' and I succeeded to install it. Thanks a lot. But I have another problem. The corruption of text happens as the attached image. I use the Japanese language and of course choose options-locale- 'japan'. Is there any way to fix it? Best regards -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032780.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Sat Sep 5 09:50:43 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 00:50:43 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <1441439098470-4032780.post@n3.nabble.com> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> <55EA9121.3020509@free.fr> <55EA96B8.4080801@free.fr> <1441439098470-4032780.post@n3.nabble.com> Message-ID: <1441439443568-4032781.post@n3.nabble.com> -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032781.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Sat Sep 5 09:55:51 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 00:55:51 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <1441439098470-4032780.post@n3.nabble.com> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> <55EA9121.3020509@free.fr> <55EA96B8.4080801@free.fr> <1441439098470-4032780.post@n3.nabble.com> Message-ID: <1441439751259-4032782.post@n3.nabble.com> -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032782.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fvogelnew1 at free.fr Sat Sep 5 09:58:59 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 05 Sep 2015 09:58:59 +0200 Subject: [Scilab-users] scipad Message-ID: <65qwa99iolpl2tf3u3drsk44.1441439939468@email.android.com> Sorry I didn't receive the attachment. -------- Message d'origine -------- De : fujimoto2005 Date : 05/09/2015 09:44 (GMT+01:00) ? : users at lists.scilab.org Objet : Re: [Scilab-users] scipad A downloaded from the download button in the page you suggested in the first reply. Actulally it was the package for Scicoslab as you said. I downloaded the right one from the 'files tag' and I succeeded to install it. Thanks a lot. But I have another problem. The corruption of text happens as the attached image. I use the Japanese language and of course choose options-locale- 'japan'. Is there any way to fix it? Best regards -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032780.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sat Sep 5 10:04:55 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 01:04:55 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <65qwa99iolpl2tf3u3drsk44.1441439939468@email.android.com> References: <1440994906931-4032759.post@n3.nabble.com> <65qwa99iolpl2tf3u3drsk44.1441439939468@email.android.com> Message-ID: <1441440295708-4032784.post@n3.nabble.com> Sorry I failed to attach. I posted the screen shot in the next posting. Best regards -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032784.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fvogelnew1 at free.fr Sat Sep 5 10:12:57 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 05 Sep 2015 10:12:57 +0200 Subject: [Scilab-users] scipad Message-ID: When I could only find a link and for me there is nothing at the destination of this link. -------- Message d'origine -------- De : fujimoto2005 Date : 05/09/2015 10:04 (GMT+01:00) ? : users at lists.scilab.org Objet : Re: [Scilab-users] scipad Sorry I failed to attach. I posted the screen shot in the next posting. Best regards -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032784.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sat Sep 5 10:17:04 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 01:17:04 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: References: <1440994906931-4032759.post@n3.nabble.com> Message-ID: <1441441024039-4032786.post@n3.nabble.com> Which do you refer to the posting with time stamp 'Sep 05, 2015; 4:55pm' or '4:44'? Fujimoto -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032786.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fvogelnew1 at free.fr Sat Sep 5 10:27:52 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 5 Sep 2015 10:27:52 +0200 Subject: [Scilab-users] scipad In-Reply-To: <1441441024039-4032786.post@n3.nabble.com> References: <1440994906931-4032759.post@n3.nabble.com> <1441441024039-4032786.post@n3.nabble.com> Message-ID: <55EAA788.4090201@free.fr> I'm referring to the message from '4:44' (your time). This message contains only: Clicking on this message I saw: Scilab / Xcos - Mailing Lists Archives File not found Please contact Nabble Support if you need help. But now I have just tried again and I can see your picture. fujimoto2005 a ?crit le 05/09/2015 10:17 : > Which do you refer to the posting with time stamp 'Sep 05, 2015; 4:55pm' or > '4:44'? > > Fujimoto > > > > -- > View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032786.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From fvogelnew1 at free.fr Sat Sep 5 10:33:06 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 5 Sep 2015 10:33:06 +0200 Subject: [Scilab-users] scipad In-Reply-To: <1441439098470-4032780.post@n3.nabble.com> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> <55EA9121.3020509@free.fr> <55EA96B8.4080801@free.fr> <1441439098470-4032780.post@n3.nabble.com> Message-ID: <55EAA8C2.4060809@free.fr> fujimoto2005 a ?crit le 05/09/2015 09:44 : > The corruption of text happens as the attached image. > I use the Japanese language and of course choose options-locale- 'japan'. I have learned a bit of Japanese but not enough to understand what is wrong with your snapshot? Are you about the menu items, which are still in English? For me that is working (see attached snapshot). Regards, Francois -------------- next part -------------- A non-text attachment was scrubbed... Name: ja_jp locale.png Type: image/png Size: 53343 bytes Desc: not available URL: From fujimoto2005 at gmail.com Sat Sep 5 10:45:20 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 01:45:20 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <55EAA8C2.4060809@free.fr> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> <55EA9121.3020509@free.fr> <55EA96B8.4080801@free.fr> <1441439098470-4032780.post@n3.nabble.com> <55EAA8C2.4060809@free.fr> Message-ID: <1441442720171-4032789.post@n3.nabble.com> -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032789.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Sat Sep 5 10:55:08 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 01:55:08 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <1441442720171-4032789.post@n3.nabble.com> References: <1440994906931-4032759.post@n3.nabble.com> <6tq0orxbmgg1uvsrnmsa5vib.1441002799753@email.android.com> <1441434917662-4032777.post@n3.nabble.com> <55EA9121.3020509@free.fr> <55EA96B8.4080801@free.fr> <1441439098470-4032780.post@n3.nabble.com> <55EAA8C2.4060809@free.fr> <1441442720171-4032789.post@n3.nabble.com> Message-ID: <1441443308142-4032790.post@n3.nabble.com> The left one of the above image is the display of same script with Scinote and the ridht one is that with Scipad. I am not sure non-Japanse can see the difference. Left one display Japanese rightly but Right one doesn't. Menu items are Japanese. Maybe the cause of error is due to bad choice of an encoding type. Scinote has the menu item 'option-file encoding' which choose unicode utf-8. Is there a corresponding item in Scipad? Best regards Fujimoto -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032790.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fvogelnew1 at free.fr Sat Sep 5 11:02:41 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 05 Sep 2015 11:02:41 +0200 Subject: [Scilab-users] scipad Message-ID: <51aschquxntmne44r0dv2jy9.1441443592422@email.android.com> Yes of course, Scipad supports text encodings, and especially utf-8. You can find this setting in the options -> file open/close settings -> encoding menu (sorry, this may not be completely accurate, I'm not in front of a computer and I'm quoting from memory only). Regards, Fran?ois -------- Message d'origine -------- De : fujimoto2005 Date : 05/09/2015 10:55 (GMT+01:00) ? : users at lists.scilab.org Objet : Re: [Scilab-users] scipad The left one of the above image is the display of same script with Scinote and the ridht one is that with Scipad. I am not sure non-Japanse can see the difference. Left one display Japanese rightly but Right one doesn't. Menu items are Japanese. Maybe the cause of error is due to bad choice of an encoding type. Scinote has the menu item 'option-file encoding' which choose unicode utf-8. Is there a corresponding item in Scipad? Best regards Fujimoto -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032790.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sat Sep 5 11:16:10 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 5 Sep 2015 02:16:10 -0700 (MST) Subject: [Scilab-users] scipad In-Reply-To: <51aschquxntmne44r0dv2jy9.1441443592422@email.android.com> References: <1440994906931-4032759.post@n3.nabble.com> <51aschquxntmne44r0dv2jy9.1441443592422@email.android.com> Message-ID: <1441444570465-4032792.post@n3.nabble.com> Hi,Fran?ois The problem is fixed. The file encoding 'cp932' was chosen and after utf-8 is chosen it display rightly. Thanks a lot for your help. Best regards Fujimoto -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032792.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fvogelnew1 at free.fr Sat Sep 5 12:34:59 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sat, 05 Sep 2015 12:34:59 +0200 Subject: [Scilab-users] scipad Message-ID: Great! Enjoy now! Let me know if you have further questions or experience any issues. Regards, Fran?ois -------- Message d'origine -------- De : fujimoto2005 Date : 05/09/2015 11:16 (GMT+01:00) ? : users at lists.scilab.org Objet : Re: [Scilab-users] scipad Hi,Fran?ois The problem is fixed. The file encoding 'cp932' was chosen and after utf-8 is chosen it display rightly. Thanks a lot for your help. Best regards Fujimoto -- View this message in context: http://mailinglists.scilab.org/scipad-tp4032759p4032792.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sun Sep 6 09:16:23 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 6 Sep 2015 00:16:23 -0700 (MST) Subject: [Scilab-users] linearly spaced vector Message-ID: <1441523783494-4032794.post@n3.nabble.com> I expected the following script to generate?linearly spaced vectors x1,x2 and x3 with step 0.01. But x1(3),x2(2) and x3(15) are slightly different values from expected values. This phenomena happens with both Scila5.5.2 and Scilab 6.0.0 alpha. Is there any ways to get exactly expected values? ******************** min=0.04; low=0.098; high=0.2; x1=[ceil(low*100)/100:0.01:floor(high*100)/100] disp(x1(3)-0.12); x2=[floor(low*100)/100:0.01:high] disp(x2(2)-0.1); x3=[floor(min*100)/100:0.01:high] disp(x3(15)-0.18); ****************** Best regards -- View this message in context: http://mailinglists.scilab.org/linearly-spaced-vector-tp4032794.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Sun Sep 6 13:24:50 2015 From: jrafaelbguerra at hotmail.com (Rafael Guera) Date: Sun, 6 Sep 2015 12:24:50 +0100 Subject: [Scilab-users] linearly spaced vector In-Reply-To: <1441523783494-4032794.post@n3.nabble.com> References: <1441523783494-4032794.post@n3.nabble.com> Message-ID: Hello, The error magnitude seems to smaller than the default machine precision for Scilab double floating numbers (%eps = 2.220D-16) . There are some Scilab packages for arbitrary precision (MPScilab, MPAT, Xnum,...), you may want to check them out. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of fujimoto2005 Sent: Sunday, September 06, 2015 8:16 AM To: users at lists.scilab.org Subject: [Scilab-users] linearly spaced vector I expected the following script to generate?linearly spaced vectors x1,x2 and x3 with step 0.01. But x1(3),x2(2) and x3(15) are slightly different values from expected values. This phenomena happens with both Scila5.5.2 and Scilab 6.0.0 alpha. Is there any ways to get exactly expected values? ******************** min=0.04; low=0.098; high=0.2; x1=[ceil(low*100)/100:0.01:floor(high*100)/100] disp(x1(3)-0.12); x2=[floor(low*100)/100:0.01:high] disp(x2(2)-0.1); x3=[floor(min*100)/100:0.01:high] disp(x3(15)-0.18); ****************** Best regards -- View this message in context: http://mailinglists.scilab.org/linearly-spaced-vector-tp4032794.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From fujimoto2005 at gmail.com Sun Sep 6 14:57:14 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 6 Sep 2015 05:57:14 -0700 (MST) Subject: [Scilab-users] linearly spaced vector In-Reply-To: References: <1441523783494-4032794.post@n3.nabble.com> Message-ID: <1441544234081-4032796.post@n3.nabble.com> Hello, Let me explain why I want to get exact values. There is the following line in my script. x_i=find(x1==0.12) I suppose it returns 3 but actually it fails to return 3 due to the error. So I modified that line into x_i=find(abs(x1-0.12)<10^-10) This work well only when x1 contains a single value near 0.12. But sometimes x1 contains 0.15 and 0.15000000002 depending on the way of generation of x1. (The example of the topic is a simple version of the more complex actual script.) In this situation 'find(abs(x1-0.12)<10^-10)' returns two values and my script doesn't work. This is why I want to exact values. Can I get exact value by using (MPScilab, MPAT, Xnum,...)? Best regards fails to return 3. -- View this message in context: http://mailinglists.scilab.org/linearly-spaced-vector-tp4032794p4032796.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sun Sep 6 15:34:01 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 6 Sep 2015 15:34:01 +0200 Subject: [Scilab-users] linearly spaced vector In-Reply-To: <1441544234081-4032796.post@n3.nabble.com> References: <1441523783494-4032794.post@n3.nabble.com> <1441544234081-4032796.post@n3.nabble.com> Message-ID: <55EC40C9.2060004@free.fr> Hello, you may use either: x1 = (10:20)/100; disp(x1(3)-0.12) or x_i = find(clean(x1-0.12)==0) Samuel Le 06/09/2015 14:57, fujimoto2005 a ?crit : > Hello, > > Let me explain why I want to get exact values. > There is the following line in my script. > x_i=find(x1==0.12) > I suppose it returns 3 but actually it fails to return 3 due to the error. > So I modified that line into > x_i=find(abs(x1-0.12)<10^-10) > This work well only when x1 contains a single value near 0.12. > But sometimes x1 contains 0.15 and 0.15000000002 depending on the way of > generation of x1. > (The example of the topic is a simple version of the more complex actual > script.) > In this situation 'find(abs(x1-0.12)<10^-10)' returns two values and my > script doesn't work. > > This is why I want to exact values. > > Can I get exact value by using (MPScilab, MPAT, Xnum,...)? > > Best regards > From j.s.strom at hslmg.de Sun Sep 6 16:28:31 2015 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 06 Sep 2015 16:28:31 +0200 Subject: [Scilab-users] Plot command line specification compressed to a variable Message-ID: <55EC4D8F.7020600@hslmg.de> I would like to replace the line specification in a plot command by a variable that can be used as an function input argument. E. g. the line plot([1:4],[1:4], 'LineStyle','none','Marker','+','MarkForeground',[255;215;0]/256) should be replaced by plot([1:4],[1:4],LS) How should LS be constructed? Kind regards Jens p.s. To avoid hints to work arounds: I'm aware of gca(), gce(), parents and children. This is not what I aim at. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Sep 6 17:25:17 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 6 Sep 2015 17:25:17 +0200 Subject: [Scilab-users] Plot command line specification compressed to a variable In-Reply-To: <55EC4D8F.7020600@hslmg.de> References: <55EC4D8F.7020600@hslmg.de> Message-ID: <55EC5ADD.4000809@free.fr> Le 06/09/2015 16:28, Jens Simon Strom a ?crit : > > I would like to replace the line specification in a plot command by a > variable that can be used as an function input argument. E. g. the line > > plot([1:4],[1:4], > 'LineStyle','none','Marker','+','MarkForeground',[255;215;0]/256) > > should be replaced by > > plot([1:4],[1:4],LS) > > How should LS be constructed? > As a list: LS = list(LineStyle','none','Marker','+','MarkForeground',[255;215;0]/256); used with the call: plot([1:4],[1:4], LS(:)) // do not remove ":" Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fvogelnew1 at free.fr Sun Sep 6 17:33:59 2015 From: fvogelnew1 at free.fr (Francois Vogel) Date: Sun, 6 Sep 2015 17:33:59 +0200 Subject: [Scilab-users] [ANN] Scipad-8.74 Message-ID: <55EC5CE7.6050509@free.fr> ANNOUNCE: Scipad version 8.74 ============================= A new version of the Scipad text editor for Scilab and Scicoslab is available. CHANGES SINCE PREVIOUS VERSION ============================== NEW OR IMPROVED FEATURES: * Re-ordered the Help menu items * Added a "System encoding" entry in the Encoding sub-menu * Clamped the width of the reformat lines window to a maximum to avoid huge temporary widths, especially during width changes - Added an horizontal scrollbar to the preview area * Display of margin showing modified lines is a saved preference * Small speed up of Scipad startup * Better performance with typing and clicking by distinguishing buffer switches and running just what is needed to keep the display up-to-date * Added console show/hide toggling in the system menu (on Windows only) * Allowed some default bindings for the text widget to be used in the find in files results dialog and text box, such as up/down, page up/down * Added tooltips showing the contents of the find/replace comboboxes when they are truncated by the available display space * Incremental find saves history of what was searched previously * Added some known file extensions to the file dialogs * Added splitting handles on top and on the left of scrollbars, to split the display into tiles (mouse button 1) or to split a file into several views (mouse button 2) FIXED BUGS: * Fixed Tcl error poping up after closing Scipad running in Scicoslab * Fixed bug: After using find/replace, clicking close to the end of a long line did not move the cursor to the desired place but closer to the beginning of this line * Fixed missing re-use of the find in files results window when several such windows were opened and one of them got closed * Fixed error when moving the y scrollbar in the reformat lines window * Fixed cursor seen inside the selection when clicking on it, moving the mouse, and releasing the button while still hovering above the selection * Fixed error when launching "Join selected lines" command with no selection * Fixed bug with reformat lines producing wrong result when the first line has leading spaces * Fixed incorrect behavior when cancelling a request for replace all * Fixed unexpected scrolling of the text area when using the mouse wheel in an opened combobox of the find/replace dialog * Fixed bug: wrong focus restore after closure of comboboxes * Fixed unexpected encoding switching of the current file when opening an xml file for which encoding detection was successful WHAT IS SCIPAD ? ================ Scipad is a powerful editor and graphical debugger for programs written in Scilab language. It is a mature and highly configurable programmer's editor, including features like syntax colorization, regexp search/replace, parentheses matching, logical/physical line numbering, peer windows, line and block text editing, and much more. Scipad can be used along with Scicoslab or Scilab, but even as a standalone text editor. Used as internal Sci(cos)lab editor, it interacts tightly with the interpreter, allowing: - Scilab code execution control - conditional breakpointing - variable retrieval and tooltip display - Scilab help lookup - access to source code of Scilab library function - control of Scilab facilities for Matlab code and creation of help documents - and much more Scipad also includes basic Modelica and XML syntax colorization; it is currently localized in 13 languages and further localizations can easily be added. Scipad is entirely written in Tcl/Tk and Scilab language. It has been tested and developed under various versions of Windows and Linux. WHERE CAN SCIPAD BE FOUND? ========================== Project page @ SourceForge.net: http://sourceforge.net/p/scipad/ Direct download: - for Scilab: http://sourceforge.net/projects/scipad/files/scipad-8.74/scipad-8.74-Scilab5.zip/download - for Scicoslab: http://sourceforge.net/projects/scipad/files/scipad-8.74/scipad-8.74-Scicoslab.zip/download Installation instructions: http://sourceforge.net/p/scipad/wiki/Installation/ Details regarding the tested platforms: http://sourceforge.net/p/scipad/wiki/Tested%20on/ LICENSE ======= Scipad is a free software distributed under the terms of the GPL (V2) license. From j.s.strom at hslmg.de Sun Sep 6 20:33:21 2015 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 06 Sep 2015 20:33:21 +0200 Subject: [Scilab-users] Plot command line specification compressed to a variable In-Reply-To: <55EC5ADD.4000809@free.fr> References: <55EC4D8F.7020600@hslmg.de> <55EC5ADD.4000809@free.fr> Message-ID: <55EC86F1.9070004@hslmg.de> Perfect solution! Thanks a lot! Jens -------------------------------------------------------------------------------------- Am 06.09.2015 17:25, schrieb Samuel Gougeon: > Le 06/09/2015 16:28, Jens Simon Strom a ?crit : >> >> I would like to replace the line specification in a plot command by a >> variable that can be used as an function input argument. E. g. the line >> >> plot([1:4],[1:4], >> 'LineStyle','none','Marker','+','MarkForeground',[255;215;0]/256) >> >> should be replaced by >> >> plot([1:4],[1:4],LS) >> >> How should LS be constructed? >> > As a list: > LS = > list(LineStyle','none','Marker','+','MarkForeground',[255;215;0]/256); > used with the call: > plot([1:4],[1:4], LS(:)) // do not remove ":" > > 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 pablo_f_7 at hotmail.com Mon Sep 7 00:03:01 2015 From: pablo_f_7 at hotmail.com (Pablo Fonovich) Date: Sun, 6 Sep 2015 19:03:01 -0300 Subject: [Scilab-users] Reading an xcos diagram with scs_m Message-ID: Hi: I was wondering how does scilab to generate a cos diagram from scs_m... For example, i have a diagram whose scs_m is: scs_m = wpar = [600,450,0,0,600,450] title = "Controller" tol = [0.000001;0.000001;1.000D-10;100001;0;1;0] tf = 30 context = ["A=[-.3,3,1;0,0,2;0,0,0];B=[1;2;3];C=[1,1,2;0,2,3];D=0;x0=[-2;1;2]";"K=ppol(A'',C'',-.7*ones(x0))'';";"L=-ppol(A,B,-.7*ones(x0));";""] void1 = [] options = tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]) void2 = [] void3 = [] doc = list() 1 CLOCK_f 2 RAND_f 3 SUMMATION 4 SPLIT_f 5 CLKSPLIT_f 6 DEMUX 7 GAIN_f 8 SUM_f 9 SPLIT_f 10 SUPER_f 11 SUPER_f 12 SUM_f 13 CSCOPE i would like to be able to generate the same diagram with that information by myself, to open it with a custom application... is the scs_m enough? is there any documentation from where to start? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Mon Sep 7 14:26:36 2015 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Mon, 07 Sep 2015 14:26:36 +0200 Subject: [Scilab-users] Identifying parameters of a multy frequency damped oscillation Message-ID: <55ED827C.1070008@hslmg.de> Hi Scilab users, I want to analyse a microphone recording of the sound of a bell or gong.Given ia the equidistantly sampled sound pressure y(t) after a stroke for 10 s. The ansatz y=sum( A_i*exp(-d_i*t))*cos(2*%pi*f_i+alpha_i) ) for i=1,2,...5 or more is assumed to approximate the signal where A_i, d_i, f_i, and alpha_i are the unknown amplitudes, danping factors, frequencies, and phase angles of y. The analysis may be restricted to the lowest 5 frequencies fi. Does Scilab offer a method for this? FFT seems not to be adequate because the signal is aperiodic (silence after 10 s). Is nonlinear regression (with whichI'm fmiliar) a promising way. The lowest frequencies can probably be concluded from a short time DFT where damping is negligible. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From roger.cormier at ncf.ca Mon Sep 7 16:18:27 2015 From: roger.cormier at ncf.ca (roger.cormier at ncf.ca) Date: Mon, 7 Sep 2015 10:18:27 -0400 Subject: [Scilab-users] Identifying parameters of a multy frequency damped oscillation In-Reply-To: <55ED827C.1070008@hslmg.de> References: <55ED827C.1070008@hslmg.de> Message-ID: <84997CE8-0A2E-4F70-A691-7C3A1B30172F@ncf.ca> Would you consider an ARMA model of the signal? You need to chose the order of the system so a bit of experimenting is needed. Just an idea. Regards, Roger. ___________________________ Dr. Roger Cormier, P.Eng. Home Tel. & Fax: 613-823-7299 Le lun. 7 sept. 2015 ? 08:26, Jens Simon Strom a ?crit : > Hi Scilab users, > > I want to analyse a microphone recording of the sound of a bell or gong. Given ia the equidistantly sampled sound pressure y(t) after a stroke for 10 s > . > > > The ansatz > > > > y=sum( A_i*exp(-d_i*t))*cos(2*%pi*f_i+alpha_i) ) > for i=1,2,...5 or more > > > is assumed to approximate the signal where A_i, d_i, f_i, and alpha_i are the unknown amplitudes, danping factors, frequencies, and phase angles of y. The analysis may be restricted to the lowest 5 frequencies fi. > Does Scilab offer a method for this? FFT seems not to be adequate because the signal is aperiodic (silence after 10 s). > Is nonlinear regression (with which I'm fmiliar) a promising way. The lowest frequencies can probably be concluded from a short time DFT where damping is > negligible. > Kind regards > Jens > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From j.s.strom at hslmg.de Mon Sep 7 17:11:48 2015 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Mon, 07 Sep 2015 17:11:48 +0200 Subject: [Scilab-users] Identifying parameters of a multy frequency damped oscillation In-Reply-To: <84997CE8-0A2E-4F70-A691-7C3A1B30172F@ncf.ca> References: <55ED827C.1070008@hslmg.de> <84997CE8-0A2E-4F70-A691-7C3A1B30172F@ncf.ca> Message-ID: <55EDA934.2010204@hslmg.de> ARMA is very much based on stochastics. I don't see this relevant here. Regards Jens ----------------------------------------------------------------------------- Am 07.09.2015 16:18, schrieb roger.cormier at ncf.ca: > Would you consider an ARMA model of the signal? You need to chose the order of the system so a bit of experimenting is needed. Just an idea. > > Regards, > > Roger. > > > ___________________________ > Dr. Roger Cormier, P.Eng. > Home Tel. & Fax: 613-823-7299 > > > Le lun. 7 sept. 2015 ? 08:26, Jens Simon Strom a ?crit : > >> Hi Scilab users, >> >> I want to analyse a microphone recording of the sound of a bell or gong. Given ia the equidistantly sampled sound pressure y(t) after a stroke for 10 s >> . >> >> >> The ansatz >> >> >> >> y=sum( A_i*exp(-d_i*t))*cos(2*%pi*f_i+alpha_i) ) >> for i=1,2,...5 or more >> >> >> is assumed to approximate the signal where A_i, d_i, f_i, and alpha_i are the unknown amplitudes, danping factors, frequencies, and phase angles of y. The analysis may be restricted to the lowest 5 frequencies fi. >> Does Scilab offer a method for this? FFT seems not to be adequate because the signal is aperiodic (silence after 10 s). >> Is nonlinear regression (with which I'm fmiliar) a promising way. The lowest frequencies can probably be concluded from a short time DFT where damping is >> negligible. >> 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 > From sgougeon at free.fr Mon Sep 7 22:50:58 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 7 Sep 2015 22:50:58 +0200 Subject: [Scilab-users] Identifying parameters of a multy frequency damped oscillation In-Reply-To: <55ED827C.1070008@hslmg.de> References: <55ED827C.1070008@hslmg.de> Message-ID: <55EDF8B2.7010406@free.fr> Hi, Le 07/09/2015 14:26, Jens Simon Strom a ?crit : > Hi Scilab users, > I want to analyse a microphone recording of the sound of a bell or gong. Given ia the equidistantly sampled sound pressure y(t) after a stroke for 10 s. > > The ansatz > > y=sum( A_i*exp(-d_i*t))*cos(2*%pi*f_i+alpha_i) ) for i=1,2,...5 or more > > is assumed to approximate the signal where A_i, d_i, f_i, and alpha_i are the unknown amplitudes, danping factors, frequencies, and phase angles of y. The analysis may be restricted to the lowest 5 frequencies fi. > Does Scilab offer a method for this? FFT seems not to be adequate because the signal is aperiodic (silence after 10 s). > Is nonlinear regression (with which I'm fmiliar) a promising way. The lowest frequencies can probably be concluded from a short time DFT where damping is negligible. Numerical computing necessarily deals with sampled signals, yielding sampled spectra. Now, there is a duality between sampling and periodicity: Applying FFT to a sampled signal leads to a spectrum that is periodic AND sampled. The fact that the spectrum is sampled means that implicitly the signal you have processed has been assumed also periodic. This is why boundaries of the sampled signal are of importance : If due to a "bad cut" S($) is very different from S(1), then the processing will see this cut as a discontinuity, and the FFT will yield a non-negligible parasitic power in high frequencies. On this point of view, your signal is fine : you start at a power 0 before hitting the gong, and you record the sound down to a very low amplitude ~0 => it's OK. The problem with a simple FFT here is the exp() envelop. The spectrum of the "undamped signal" is convolved with the spectrum of exp(), which is an exp(). You can write each d_i = D_i*f_i where D_i has no dimension. Analysing this kind of signal has led sismologists to invent wavelet analysis :) If you don't want to use wavelet analysis instead, yes, you may try with a non-linear regression, with 4*N parameters where N is the number of frequencies you wish. You will likely need a first guess: * for d_i: just get the envelop of the total acoustic power fitted with a single exp(-D*t), and set d_i_0 = D * for f_i, alpha_i, A_i: get the FFT of your signal / exp(-D*t), and get f_i_0, alpha_i_0 and A_i_0 from the most powerful harmonics. Hope this help Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Tue Sep 8 19:02:59 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Tue, 08 Sep 2015 10:02:59 -0700 Subject: [Scilab-users] Identifying parameters of a multy frequency damped oscillation In-Reply-To: <55ED827C.1070008@hslmg.de> References: <55ED827C.1070008@hslmg.de> Message-ID: <1441731779.32316.92.camel@Servo> On Mon, 2015-09-07 at 14:26 +0200, Jens Simon Strom wrote: > Hi Scilab users, I want to analyse a microphone recording of the sound > of a bell or gong. Given ia the equidistantly sampled sound pressure > y(t) after a stroke for 10 s. > > The ansatz > > y=sum( A_i*exp(-d_i*t))*cos(2*%pi*f_i+alpha_i) ) for i=1,2,...5 or more > > is assumed to approximate the signal where A_i, d_i, f_i, and alpha_i > are the unknown amplitudes, danping factors, frequencies, and phase > angles of y. The analysis may be restricted to the lowest 5 frequencies > fi. > Does Scilab offer a method for this? FFT seems not to be adequate > because the signal is aperiodic (silence after 10 s). > Is nonlinear regression (with which I'm fmiliar) a promising way. The > lowest frequencies can probably be concluded from a short time DFT > where damping is negligible. Hey Jens: I'm not sure that a gong or a bell that's not "tuneful" (e.g. a cowbell, as opposed to a church bell) would have components that are well-enough separated to be easily picked out by any numerical analysis -- but I'm ready to be proven wrong. Certainly it should be possible to pick out the components of a bell that might be used for making music. I would start with an FFT to get rough values for the f_i and alpha_i. Then I would use those as starting points for nonlinear regression. Alternately, if the components are well-enough separated in the FFT of the captured audio you could identify each component, then for each component you could zero out the FFT outside of that component's contribution (remember to retain both positive and negative frequency components symmetrically around 0Hz), then do an IFFT to get the waveform for just that component. This _might_ recover each individual component well enough that you can eyeball it for A_i and d_i -- at which point you could either call it good enough, or you could make an even better starting point for your regression analysis. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From francois.granade at scilab-enterprises.com Tue Sep 8 19:49:27 2015 From: francois.granade at scilab-enterprises.com (=?iso-8859-1?Q?Fran=E7ois_Granade?=) Date: Tue, 8 Sep 2015 19:49:27 +0200 Subject: [Scilab-users] threading model in Scilab 6 (alpha) In-Reply-To: <55E85E57.6070301@amsterchem.com> References: <55BBA3E6.4080903@amsterchem.com> <55C067F3.6010009@amsterchem.com> <4A7E6280-FEB2-4795-99F9-3ACC8DC4B6A6@scilab-enterprises.com> <55C1CD01.8070304@amsterchem.com> <55E85E57.6070301@amsterchem.com> Message-ID: <5B6E037D-7B43-4684-BEB1-32A3D18A66C3@scilab-enterprises.com> hi Jasper, Yes, we made a decision - and in fact we implemented it already: and we changed it to be simply always use the same thread. That should work for you, right ? Regarding your other question (api scilab): I believe that there is string support for cpp (we implemented it), however this is still in development, and may still change before the release... Fran?ois Granade On Sep 3, 2015, at 4:51 PM, jasper van baten wrote: > Hi Fran?ois, > > Is there a decision on the threading model yet? > > Many thanks, best wishes, > > Jasper. > > On 8/5/2015 10:44, jasper van baten wrote: >> Hi Fran?ois, >> >> Many thanks for your reply. As soon as you know more, I would be very pleased to test again in a new alpha. I would like to have my software back up-and-running before the actual release of Scilab 6. Before doing so I will have to decide how to handle the threading issue. >> >> If the solution will be that all is single threaded but in different threads, I suppose my best work-around would still be to synchronize access to the underlying objects over a private thread. I hope you will decide to keep the core thread alive and recycle it between calls, so that all calls are made on the same thread. >> >> If on the other hand your solution will be full multi-threaded execution, I would welcome that too. Also in this case I hope you will create a fixed number of threads and recycle them, for the same reason. In this case I can simply create a corresponding number of COM objects under the hood. >> >> I am not sure why events from outside the thread would have to make that you stop the thread and start another one (unless you forcefully terminate the thread, but I suppose you do not as this will surely lead to memory leaks and other trouble). You can simply set up your calculation thread to do something like >> >> void core_threadproc() { >> >> for (;;) { >> //wait until next command >> synchronizationObject.wait(); >> //pick up next (set of) command(s) and execute >> if (nextCommand==CommandTerminate()) break; >> ... >> >> } >> >> } >> >> For interrupting calculations you could poll between individual commands and during length commands. >> >> On another note: removal of the intersci exe forced me to switch to the api-scilab (short of keeping previous builds of scilab around). I am pleased with this interface, it is a lot nicer than intersci. The C++ interface is nicer than the C interface, I think, but does not seem to have support for strings and some other data types (unless I missed something). So I am now mixing my approach: "csci" interfaces for all routines that take string matrices as in- our output, and "cppsci" interfaces for all routines that only deal with numeric matrices. Support for string (and other) data types from the cppsci interface would be welcome in the future. >> >> Best wishes, >> >> Jasper >> >> >> >> On 8/5/2015 10:21, Fran?ois Granade wrote: >>> Hi Jasper, >>> >>> Looks like you have found an interesting question here... >>> >>> First - there are no multiple concurrent threads in the core. So we are safe (and so is the API, without being thread-safe). >>> >>> However, what you saw is right: each command executes in a new thread. We designed it on purpose, with one of the reason being that this thread can be what we call the "storeCommand" which manages events from outside the main thread (UI, interruption). Another idea was that - later - to allow multithreaded execution (under some serious constraints). >>> >>> Now, your point about COM loading, and thread-local storage, is very valid, and may very well mean that we should change this. >>> >>> We will study if/how we could modify that... we'll keep you posted. >>> >>> Thanks *a lot* for reporting this; it's exactly what we released the alpha for, and even though we were hoping we would not have such questions, it's better to have them now than later... >>> >>> for the Scilab team, >>> Fran?ois Granade >>> >>> >>> >>> On Aug 4, 2015, at 9:21 AM, jasper van baten wrote: >>> >>>> Does anybody know what threading model is used in Scilab 6 alpha? I am referring to the default mode of operation, and not while executing parallel_for, or MPI as described here (http://wiki.scilab.org/Documentation/ParallelComputingInScilab). >>>> >>>> If there are multiple core threads that execute concurrently, then all api-scilab code needs to be written in a thread-safe re-entrant safe manner. I doubt this is the case. >>>> >>>> If there is one core thread alive at any point, it would make sense for this to remain the same thread, which does not appear to be the case. If not the same thread, any application that depends on apartment threaded COM objects or thread local storage will no longer function as it did in Scilab 5. The solution may be to synchronize such applications over a private thread, but that surely will come at a performance cost. >>>> >>>> Having some idea about the threading model that is intended and used would be helpful. >>>> >>>> Best wishes, >>>> >>>> Jasper. >>>> >>>> On 7/31/2015 18:35, jasper van baten wrote: >>>>> All, >>>>> >>>>> What's the story with threading in Scilab 6? Whereas previous versions appeared to be single threaded from an external DLL point of view, I see that the DLLmain function gets called by a one thread, whereas interface routines get called from another thread. Worse, looks like each interface routine call is made from a new thread. What is the threading model?? Is there a limited number of threads, or are threads created on the fly? >>>>> >>>>> Thanks, best wishes, >>>>> >>>>> Jasper >>>>> >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>> >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Tue Sep 8 22:34:10 2015 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Tue, 08 Sep 2015 22:34:10 +0200 Subject: [Scilab-users] Identifying parameters of a multy frequency damped oscillation In-Reply-To: <1441731779.32316.92.camel@Servo> References: <55ED827C.1070008@hslmg.de> <1441731779.32316.92.camel@Servo> Message-ID: <55EF4642.5030407@hslmg.de> Hey Tim, valuable advice from your side! I haven't the files yet. And I fear that fiddling with the data will take more than a few days. In any case I will give feedback when there is something to say. ------------------------------------------------------------------------------------------------------------------------------------ Am 08.09.2015 19:02, schrieb Tim Wescott: > On Mon, 2015-09-07 at 14:26 +0200, Jens Simon Strom wrote: >> Hi Scilab users, I want to analyse a microphone recording of the sound >> of a bell or gong. Given ia the equidistantly sampled sound pressure >> y(t) after a stroke for 10 s. >> >> The ansatz >> >> y=sum( A_i*exp(-d_i*t))*cos(2*%pi*f_i+alpha_i) ) for i=1,2,...5 or more >> >> is assumed to approximate the signal where A_i, d_i, f_i, and alpha_i >> are the unknown amplitudes, danping factors, frequencies, and phase >> angles of y. The analysis may be restricted to the lowest 5 frequencies >> fi. >> Does Scilab offer a method for this? FFT seems not to be adequate >> because the signal is aperiodic (silence after 10 s). >> Is nonlinear regression (with which I'm fmiliar) a promising way. The >> lowest frequencies can probably be concluded from a short time DFT >> where damping is negligible. > Hey Jens: > > I'm not sure that a gong or a bell that's not "tuneful" (e.g. a cowbell, > as opposed to a church bell) would have components that are well-enough > separated to be easily picked out by any numerical analysis -- but I'm > ready to be proven wrong. Certainly it should be possible to pick out > the components of a bell that might be used for making music. > > I would start with an FFT to get rough values for the f_i and alpha_i. > Then I would use those as starting points for nonlinear regression. > > Alternately, if the components are well-enough separated in the FFT of > the captured audio you could identify each component, then for each > component you could zero out the FFT outside of that component's > contribution (remember to retain both positive and negative frequency > components symmetrically around 0Hz), then do an IFFT to get the > waveform for just that component. This _might_ recover each individual > component well enough that you can eyeball it for A_i and d_i -- at > which point you could either call it good enough, or you could make an > even better starting point for your regression analysis. > From clement.david at scilab-enterprises.com Wed Sep 9 08:32:32 2015 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Wed, 09 Sep 2015 08:32:32 +0200 Subject: [Scilab-users] Reading an xcos diagram with scs_m In-Reply-To: References: Message-ID: <1441780352.2687.62.camel@scilab-enterprises.com> Hello Pablo, Your 'scs_m' variable is a complete diagram created using `scicos_diagram` `scicos_block` and `scicos_link`. To check that is is correct, "xcos(scs_m)" will open the graphical editor for the scs_m diagram. The documentation is included within the Scilab help. Regards, -- Cl?ment Le dimanche 06 septembre 2015 ? 19:03 -0300, Pablo Fonovich a ?crit : > Hi: > > I was wondering how does scilab to generate a cos diagram from > scs_m... > > For example, i have a diagram whose scs_m is: > > scs_m = > > wpar = [600,450,0,0,600,450] > title = "Controller" > tol = [0.000001;0.000001;1.000D-10;100001;0;1;0] > tf = 30 > context = ["A=[ > -.3,3,1;0,0,2;0,0,0];B=[1;2;3];C=[1,1,2;0,2,3];D=0;x0=[ > -2;1;2]";"K=ppol(A'',C'',-.7*ones(x0))'';";"L=-ppol(A,B, > -.7*ones(x0));";""] > void1 = [] > options = > tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8, > 1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]) > void2 = [] > void3 = [] > doc = list() > 1 CLOCK_f > 2 RAND_f > 3 SUMMATION > 4 SPLIT_f > 5 CLKSPLIT_f > 6 DEMUX > 7 GAIN_f > 8 SUM_f > 9 SPLIT_f > 10 SUPER_f > 11 SUPER_f > 12 SUM_f > 13 CSCOPE > > i would like to be able to generate the same diagram with that > information by myself, to open it with a custom application... is the > scs_m enough? is there any documentation from where to start? > > Thanks > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From jasper at amsterchem.com Wed Sep 9 09:00:58 2015 From: jasper at amsterchem.com (jasper van baten) Date: Wed, 9 Sep 2015 09:00:58 +0200 Subject: [Scilab-users] threading model in Scilab 6 (alpha) In-Reply-To: <5B6E037D-7B43-4684-BEB1-32A3D18A66C3@scilab-enterprises.com> References: <55BBA3E6.4080903@amsterchem.com> <55C067F3.6010009@amsterchem.com> <4A7E6280-FEB2-4795-99F9-3ACC8DC4B6A6@scilab-enterprises.com> <55C1CD01.8070304@amsterchem.com> <55E85E57.6070301@amsterchem.com> <5B6E037D-7B43-4684-BEB1-32A3D18A66C3@scilab-enterprises.com> Message-ID: <55EFD92A.5000509@amsterchem.com> Hi Fran?ois, Perfect - yes that would work great for me. Is there an update on the alpha available that has this change? Strings: nice. I am impressed with the API interface. Best wishes, Jasper. On 9/8/2015 19:49, Fran?ois Granade wrote: > hi Jasper, > > Yes, we made a decision - and in fact we implemented it already: and > we changed it to be simply always use the same thread. That should > work for you, right ? > > Regarding your other question (api scilab): I believe that there is > string support for cpp (we implemented it), however this is still in > development, and may still change before the release... > > Fran?ois Granade > > > On Sep 3, 2015, at 4:51 PM, jasper van baten > wrote: > >> Hi Fran?ois, >> >> Is there a decision on the threading model yet? >> >> Many thanks, best wishes, >> >> Jasper. >> >> On 8/5/2015 10:44, jasper van baten wrote: >>> Hi Fran?ois, >>> >>> Many thanks for your reply. As soon as you know more, I would be >>> very pleased to test again in a new alpha. I would like to have my >>> software back up-and-running before the actual release of Scilab 6. >>> Before doing so I will have to decide how to handle the threading issue. >>> >>> If the solution will be that all is single threaded but in different >>> threads, I suppose my best work-around would still be to synchronize >>> access to the underlying objects over a private thread. I hope you >>> will decide to keep the core thread alive and recycle it between >>> calls, so that all calls are made on the same thread. >>> >>> If on the other hand your solution will be full multi-threaded >>> execution, I would welcome that too. Also in this case I hope you >>> will create a fixed number of threads and recycle them, for the same >>> reason. In this case I can simply create a corresponding number of >>> COM objects under the hood. >>> >>> I am not sure why events from outside the thread would have to make >>> that you stop the thread and start another one (unless you >>> forcefully terminate the thread, but I suppose you do not as this >>> will surely lead to memory leaks and other trouble). You can simply >>> set up your calculation thread to do something like >>> >>> void core_threadproc() { >>> >>> for (;;) { >>> //wait until next command >>> synchronizationObject.wait(); >>> //pick up next (set of) command(s) and execute >>> if (nextCommand==CommandTerminate()) break; >>> ... >>> >>> } >>> >>> } >>> >>> For interrupting calculations you could poll between individual >>> commands and during length commands. >>> >>> On another note: removal of the intersci exe forced me to switch to >>> the api-scilab (short of keeping previous builds of scilab around). >>> I am pleased with this interface, it is a lot nicer than intersci. >>> The C++ interface is nicer than the C interface, I think, but does >>> not seem to have support for strings and some other data types >>> (unless I missed something). So I am now mixing my approach: "csci" >>> interfaces for all routines that take string matrices as in- our >>> output, and "cppsci" interfaces for all routines that only deal with >>> numeric matrices. Support for string (and other) data types from the >>> cppsci interface would be welcome in the future. >>> >>> Best wishes, >>> >>> Jasper >>> >>> >>> >>> On 8/5/2015 10:21, Fran?ois Granade wrote: >>>> Hi Jasper, >>>> >>>> Looks like you have found an interesting question here... >>>> >>>> First - there are no multiple concurrent threads in the core. So we >>>> are safe (and so is the API, without being thread-safe). >>>> >>>> However, what you saw is right: each command executes in a new >>>> thread. We designed it on purpose, with one of the reason being >>>> that this thread can be what we call the "storeCommand" which >>>> manages events from outside the main thread (UI, interruption). >>>> Another idea was that - later - to allow multithreaded execution >>>> (under some serious constraints). >>>> >>>> Now, your point about COM loading, and thread-local storage, is >>>> very valid, and may very well mean that we should change this. >>>> >>>> We will study if/how we could modify that... we'll keep you posted. >>>> >>>> Thanks *a lot* for reporting this; it's exactly what we released >>>> the alpha for, and even though we were hoping we would not have >>>> such questions, it's better to have them now than later... >>>> >>>> for the Scilab team, >>>> Fran?ois Granade >>>> >>>> >>>> >>>> On Aug 4, 2015, at 9:21 AM, jasper van baten >>>> wrote: >>>> >>>>> Does anybody know what threading model is used in Scilab 6 alpha? >>>>> I am referring to the default mode of operation, and not while >>>>> executing parallel_for, or MPI as described here >>>>> (http://wiki.scilab.org/Documentation/ParallelComputingInScilab). >>>>> >>>>> If there are multiple core threads that execute concurrently, then >>>>> all api-scilab code needs to be written in a thread-safe >>>>> re-entrant safe manner. I doubt this is the case. >>>>> >>>>> If there is one core thread alive at any point, it would make >>>>> sense for this to remain the same thread, which does not appear to >>>>> be the case. If not the same thread, any application that depends >>>>> on apartment threaded COM objects or thread local storage will no >>>>> longer function as it did in Scilab 5. The solution may be to >>>>> synchronize such applications over a private thread, but that >>>>> surely will come at a performance cost. >>>>> >>>>> Having some idea about the threading model that is intended and >>>>> used would be helpful. >>>>> >>>>> Best wishes, >>>>> >>>>> Jasper. >>>>> >>>>> On 7/31/2015 18:35, jasper van baten wrote: >>>>>> All, >>>>>> >>>>>> What's the story with threading in Scilab 6? Whereas previous >>>>>> versions appeared to be single threaded from an external DLL >>>>>> point of view, I see that the DLLmain function gets called by a >>>>>> one thread, whereas interface routines get called from another >>>>>> thread. Worse, looks like each interface routine call is made >>>>>> from a new thread. What is the threading model?? Is there a >>>>>> limited number of threads, or are threads created on the fly? >>>>>> >>>>>> Thanks, best wishes, >>>>>> >>>>>> Jasper >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> users mailing list >>>>>> users at lists.scilab.org >>>>>> http://lists.scilab.org/mailman/listinfo/users >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>>> >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>> >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From samuel.enibe at unn.edu.ng Thu Sep 10 16:39:18 2015 From: samuel.enibe at unn.edu.ng (Samuel Enibe) Date: Thu, 10 Sep 2015 15:39:18 +0100 Subject: [Scilab-users] Fwd: End of line and tab characters in SCILAB In-Reply-To: References: Message-ID: Dear sir, Could you please let me know the command to detect white spaces such as end of line and tab characters in SCILAB. I tried the "\n" and "\t" respectively but they did not work. Thank you very much. God bless you. -- Samuel Ogbonna Enibe BEng (Nig), MSc (Reading, England), PhD (Nig) Professor of Mechanical Engineering Dean, Faculty of Engineering University of Nigeria, Nsukka, Nigeria Tel: +2348063646798 Email: samuel.enibe at unn.edu.ng enibesam at yahoo.com -- Samuel Ogbonna Enibe BEng (Nig), MSc (Reading, England), PhD (Nig) Professor of Mechanical Engineering Dean, Faculty of Engineering University of Nigeria, Nsukka, Nigeria Tel: +2348063646798 Email: samuel.enibe at unn.edu.ng enibesam at yahoo.com From sgougeon at free.fr Thu Sep 10 21:30:33 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 10 Sep 2015 21:30:33 +0200 Subject: [Scilab-users] Fwd: End of line and tab characters in SCILAB In-Reply-To: References: Message-ID: <55F1DA59.5060505@free.fr> Hello, If you are processing strings with only ASCII characters -- with no UTF-8 extensions --, you may use ascii() and then test the presence of ascii(10) for "\n" or ascii(9) for "\t". But the most efficient way is to use a regular expression. In a regexp, EndOfLine is represented with $. As far as i know, it represents either "\n" or "\r" or both. tab is "\t", or any white separator is "\s" (for " ","\t", "\n" or "\r"). May you post your test with "\n" or "\t", with the way you get/generate the string in which you want to detect white spaces? It would help answering to you for your application. Regards Samuel Gougeon Le 10/09/2015 16:39, Samuel Enibe a ?crit : > Dear sir, > > Could you please let me know the command to detect white spaces such > as end of line and tab characters in SCILAB. I tried the "\n" and "\t" > respectively but they did not work. > > Thank you very much. > > God bless you. > From samuel.enibe at unn.edu.ng Thu Sep 10 23:14:37 2015 From: samuel.enibe at unn.edu.ng (Samuel Enibe) Date: Thu, 10 Sep 2015 22:14:37 +0100 Subject: [Scilab-users] Fwd: End of line and tab characters in SCILAB In-Reply-To: <55F1DA59.5060505@free.fr> References: <55F1DA59.5060505@free.fr> Message-ID: Thank you very much. The string was generated from Excel 2003 files. Some cells contained blank spaces which when processed for use in a LaTeX document or csv file, the blank lines cause errors and had to be removed manually. I tried using the expression datax = strsubst(datax, "\n", " ");//replace EndOfLine with " " everywhere to replace the EndOfLine characters with ordinary spaced but this did not produce the desired results. -- Samuel Ogbonna Enibe University of Nigeria, Nsukka, Nigeria On 9/10/15, Samuel Gougeon wrote: > Hello, > > If you are processing strings with only ASCII characters -- with no > UTF-8 extensions --, you may use ascii() and then test the presence of > ascii(10) for "\n" or ascii(9) for "\t". > But the most efficient way is to use a regular expression. In a regexp, > EndOfLine is represented with $. As far as i know, it represents either > "\n" or "\r" or both. tab is "\t", or any white separator is "\s" (for " > ","\t", "\n" or "\r"). > > May you post your test with "\n" or "\t", with the way you get/generate > the string in which you want to detect white spaces? It would help > answering to you for your application. > Regards > Samuel Gougeon > > Le 10/09/2015 16:39, Samuel Enibe a ?crit : >> Dear sir, >> >> Could you please let me know the command to detect white spaces such >> as end of line and tab characters in SCILAB. I tried the "\n" and "\t" >> respectively but they did not work. >> >> Thank you very much. >> >> God bless you. >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Fri Sep 11 08:26:27 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 11 Sep 2015 08:26:27 +0200 Subject: [Scilab-users] Fwd: End of line and tab characters in SCILAB In-Reply-To: References: <55F1DA59.5060505@free.fr> Message-ID: <55F27413.8010809@free.fr> Hello, Le 10/09/2015 23:14, Samuel Enibe a ?crit : > Thank you very much. The string was generated from Excel 2003 files. > Some cells contained blank spaces which when processed for use in a > LaTeX document or csv file, the blank lines cause errors and had to be > removed manually. > > I tried using the expression > > datax = strsubst(datax, "\n", " ");//replace EndOfLine with " " everywhere > > to replace the EndOfLine characters with ordinary spaced but this did > not produce the desired results. > > You may try datax = strsubst(datax, ascii(10), " "); datax = strsubst(datax, ascii(13), " "); -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurent.bonaventure at ac-nantes.fr Sun Sep 13 16:41:47 2015 From: laurent.bonaventure at ac-nantes.fr (Laurent Bonaventure) Date: Sun, 13 Sep 2015 16:41:47 +0200 Subject: [Scilab-users] Prompt strange behavior in Windows7/Scilex5 Message-ID: Hello. I'm experimenting with piping commands through Scilex interactive (with the goal of interfacing it with an IPython Notebook, actually). This is one of my problems: the prompt has a strange behavior as soon as a command gets a delayed error (e.g., the command opens a window in a separate thread; then the windows throws an error). I don't know how to restore the normal behavior. Steps to reproduce (Windows 7, Scilab >= 5.4): 1)launch Scilex (or Scilex -nw) 2)type: clf; 3)A Tk window opens. Fiddle with it to get an error. (E.g.: trying to change the axes (Edit/Axes properties), you get in the console: Error: can't read "wfortree": no such variable) 4)Back to the interactive prompt, press Enter. At that point, the input isn't functioning correctly anymore. - two prompts appear in a row instead of one - the history works correctly - but any commands you type directly won't be displayed at all (and won't be executed except if you press Enter twice, and then strange characters are added to your input) I suppose that all this is already documented, but I can't find anything related to the question (I tried many searches in Google/SO/gmane but without success). Could someone, either point me to the right page, or tell me how to restore the correct behavior without a reset, or better yet, tell me what's happening here? Note. The behavior is correct under the WScilex console, but I have no clue about how to pipe instructions through it / get its output. Thank you. L. B. From sgougeon at free.fr Sun Sep 13 17:54:55 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 13 Sep 2015 17:54:55 +0200 Subject: [Scilab-users] Prompt strange behavior in Windows7/Scilex5 In-Reply-To: References: Message-ID: <55F59C4F.50404@free.fr> Hello, I confirm the behavior that you reported. The graphic windows opened with clf is a java one, while the graphical Editor is a Tk one. I do not clearly catch what you need, either using Scilab in batch mode -- with no interaction, just piping instructions with the -e or -f launching options (-->help scilab)--, or with interaction? In batch mode, off-screen graphical drivers may be used (-->help driver). HTH Samuel Le 13/09/2015 16:41, Laurent Bonaventure a ?crit : > Hello. > > I'm experimenting with piping commands through Scilex interactive > (with the goal of interfacing it with an IPython Notebook, actually). > > This is one of my problems: the prompt has a strange behavior as soon > as a command gets a delayed error (e.g., the command opens a window in > a separate thread; then the windows throws an error). I don't know how > to restore the normal behavior. > > Steps to reproduce (Windows 7, Scilab >= 5.4): > > 1)launch Scilex (or Scilex -nw) > 2)type: clf; > 3)A Tk window opens. Fiddle with it to get an error. > (E.g.: trying to change the axes (Edit/Axes properties), you get in > the console: Error: can't read "wfortree": no such variable) > 4)Back to the interactive prompt, press Enter. > > At that point, the input isn't functioning correctly anymore. > > - two prompts appear in a row instead of one > - the history works correctly > - but any commands you type directly won't be displayed at all (and > won't be executed except if you press Enter twice, and then strange > characters are added to your input) > > I suppose that all this is already documented, but I can't find > anything related to the question (I tried many searches in > Google/SO/gmane but without success). > > Could someone, either point me to the right page, or tell me how to > restore the correct behavior without a reset, or better yet, tell me > what's happening here? > > Note. The behavior is correct under the WScilex console, but I have no > clue about how to pipe instructions through it / get its output. > > Thank you. > L. B. From laurent.bonaventure at ac-nantes.fr Sun Sep 13 19:04:59 2015 From: laurent.bonaventure at ac-nantes.fr (Laurent Bonaventure) Date: Sun, 13 Sep 2015 19:04:59 +0200 Subject: [Scilab-users] Prompt strange behavior in Windows7/Scilex5 In-Reply-To: <55F59C4F.50404@free.fr> References: <55F59C4F.50404@free.fr> Message-ID: Thank you for your quick answer! First, about what I want to achieve : I want to interact with a Scilab kernel, to which I want to send instructions and get the output (including the error messages I guess) in a consistent way. Meaning that I should be able to force the kernel (or in my case, its input loop) to be in a state where it's able to interpret my commands, whatever errors it got from the preceding ones. But I need a persistent kernel : I want the variables and functions to persist from executing a group of commands onto the next one. So I can't just throw up a new one every time. I managed to do all this, but crudely (btw, the idea is not from me) : open a single Scilex process with pipes at both ends, send and read, with tweaks: - send only commands garanteed without errors (the other ones are encapsulated in a temporary exec file, with a tweak to grab the ans value) because errors change the Scilex input ("prompt") state - getting Scilab to put some marks in the output to better interpret it. I was elated when I managed to display a plot this way, then near despair when I saw I couldn't interact with it by using the graphical interface (the -nw switch doesn't have any visible effect). Note. I have a similar problem when I use the editvar widget. Right now, I'm running out of ideas to circumvent that problem, so I'm trying to understand what causes it. While investigating, I stumbled on the strange behavior I described, and that's why I'm trying to understand it, in the hope that it will help me solve my bigger problem. Cheers, Laurent - Le 13/09/2015 17:54, Samuel Gougeon a ?crit : > Hello, > I confirm the behavior that you reported. The graphic windows opened > with clf is a java one, while the graphical Editor is a Tk one. > I do not clearly catch what you need, either using Scilab in batch mode > -- with no interaction, just piping instructions with the -e or -f > launching options (-->help scilab)--, or with interaction? > In batch mode, off-screen graphical drivers may be used (-->help driver). > HTH > Samuel > > Le 13/09/2015 16:41, Laurent Bonaventure a ?crit : >> Hello. >> >> I'm experimenting with piping commands through Scilex interactive >> (with the goal of interfacing it with an IPython Notebook, actually). >> >> This is one of my problems: the prompt has a strange behavior as soon >> as a command gets a delayed error (e.g., the command opens a window in >> a separate thread; then the windows throws an error). I don't know how >> to restore the normal behavior. >> >> Steps to reproduce (Windows 7, Scilab >= 5.4): >> >> 1)launch Scilex (or Scilex -nw) >> 2)type: clf; >> 3)A Tk window opens. Fiddle with it to get an error. >> (E.g.: trying to change the axes (Edit/Axes properties), you get in >> the console: Error: can't read "wfortree": no such variable) >> 4)Back to the interactive prompt, press Enter. >> >> At that point, the input isn't functioning correctly anymore. >> >> - two prompts appear in a row instead of one >> - the history works correctly >> - but any commands you type directly won't be displayed at all (and >> won't be executed except if you press Enter twice, and then strange >> characters are added to your input) >> >> I suppose that all this is already documented, but I can't find >> anything related to the question (I tried many searches in >> Google/SO/gmane but without success). >> >> Could someone, either point me to the right page, or tell me how to >> restore the correct behavior without a reset, or better yet, tell me >> what's happening here? >> >> Note. The behavior is correct under the WScilex console, but I have no >> clue about how to pipe instructions through it / get its output. >> >> Thank you. >> L. B. From fujimoto2005 at gmail.com Mon Sep 14 02:59:36 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 13 Sep 2015 17:59:36 -0700 (MST) Subject: [Scilab-users] =?utf-8?q?scilab6=E3=80=80and_interrupt?= Message-ID: <1442192376368-4032823.post@n3.nabble.com> scilab6?does't accept interrupt command. Is this bug or not providing that command as alpha stage? -- View this message in context: http://mailinglists.scilab.org/scilab6-and-interrupt-tp4032823.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Tue Sep 15 05:13:11 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Mon, 14 Sep 2015 20:13:11 -0700 (MST) Subject: [Scilab-users] =?utf-8?q?Strange=E3=80=80behavior_of_interpln_fun?= =?utf-8?q?ction?= Message-ID: <1442286791840-4032824.post@n3.nabble.com> I expect to get the value of yy less than 0.01 which is the most left value of x. But actually I get 0.0591. When I adopt only the first 3 elements of x and y,it works rightly. I get 0.0100075 of yy2. Please tell me where I was wrong in the first script. Best regards ************** x1=[-1604,-23982,-31978,-38883,-45638,-52660,-59782,-60536,-67648,-75176,-82997,-92066,-101438,-110067,-119852,-130754,-142046,-153749,-165495] y1=[0.01,0.04,0.05,0.06,0.07,0.08,0.09,0.091,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2] yy1=interpln([x1;y1],0) x2=[-1604,-23982,-31978] y2=[0.01,0.04,0.05] yy2=interpln([x2;y2],0) -- View this message in context: http://mailinglists.scilab.org/Strange-behavior-of-interpln-function-tp4032824.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Tue Sep 15 07:28:07 2015 From: sgougeon at free.fr (sgougeon at free.fr) Date: Tue, 15 Sep 2015 07:28:07 +0200 (CEST) Subject: [Scilab-users] =?utf-8?q?Strange=E3=80=80behavior_of_interpln_fun?= =?utf-8?q?ction?= In-Reply-To: <1442286791840-4032824.post@n3.nabble.com> Message-ID: <244510391.199516792.1442294887889.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello, >x1=[-1604,-23982,-31978,-38883,-45638,-52660,-59782,-60536,-67648,-75176,-82997,-92066,-101438,-110067,-119852,-130754,-142046,-153749,-165495] >y1=[0.01,0.04,0.05,0.06,0.07,0.08,0.09,0.091,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2] >yy1=interpln([x1;y1],0) --> help interpln Description: given xyd a set of points in the xy-plane which increasing abscissae... -->[x1,k] = gsort(x1,"g","i"); -->y1 = y1(k); -->yy1 = interpln([x1;y1],0) yy1 = 0.0078497 SG From fujimoto2005 at gmail.com Tue Sep 15 15:59:17 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Tue, 15 Sep 2015 06:59:17 -0700 (MST) Subject: [Scilab-users] =?utf-8?q?Strange=E3=80=80behavior_of_interpln_fun?= =?utf-8?q?ction?= In-Reply-To: <244510391.199516792.1442294887889.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <1442286791840-4032824.post@n3.nabble.com> <244510391.199516792.1442294887889.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <1442325557904-4032827.post@n3.nabble.com> Hello, Thanks for your advice. I can fix the problem. Best regards. Fujmoto -- View this message in context: http://mailinglists.scilab.org/Strange-behavior-of-interpln-function-tp4032824p4032827.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grivet at cnrs-orleans.fr Tue Sep 15 15:57:41 2015 From: grivet at cnrs-orleans.fr (grivet) Date: Tue, 15 Sep 2015 15:57:41 +0200 Subject: [Scilab-users] animation of multiple plots Message-ID: <55F823D5.20200@cnrs-orleans.fr> Hi, I am trying to animate multiple plots. For instance, when modeling the motion of a planet around the sun, I wish to plot, in one window, the planet's position and, in another window, the tip of the velocity vector, both plots evolving with time. I can do that in principle with the following algorithm. for each time point compute x,y,vx,vy define he2 handle of the trajectory define he6 handle of the velocity curve drawlater() subplot(1,2,1) update trajectory: he2.children(1).data = [x(t(1:i)),y(t(1:i))] subplot (1,2,2) update velocity: he6.children(1).data = [vx(t(1:i)),vy(t(1:i))] drawnow() record gif image update x,y,vx,vy end Using imageMagick, I then combine all the gif's in an single animation file. This process works on my computer. I can visualize the animation using Irfanview, Chrome or Internet Explorer, but not Firefox which shows only the last image. The situation gets worse when I try to post this animation on the Net: no program that I know of can display the animation, they all display the first image. I have written other animations which behave properly (see https://grenoble-sciences.ujf-grenoble.fr/pap-ebook/grivet/liste-animations). However, there is one, probably significant, difference: these working animations don't use multiple windows. I would be very grateful for any suggestion on how to run two animations side by side. Thank you in advance for your time and help. JP Grivet From antoine.monmayrant at laas.fr Tue Sep 15 16:45:45 2015 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Tue, 15 Sep 2015 16:45:45 +0200 Subject: [Scilab-users] animation of multiple plots In-Reply-To: <55F823D5.20200@cnrs-orleans.fr> References: <55F823D5.20200@cnrs-orleans.fr> Message-ID: <55F82F19.1050709@laas.fr> Le 09/15/2015 03:57 PM, grivet a ?crit : > Hi, > > I am trying to animate multiple plots. For instance, when modeling the > motion of a planet > around the sun, I wish to plot, in one window, the planet's position > and, in another window, the tip of the velocity vector, both plots > evolving with time. > I can do that in principle with the following algorithm. > for each time point > compute x,y,vx,vy > define he2 handle of the trajectory > define he6 handle of the velocity curve > drawlater() > subplot(1,2,1) > update trajectory: he2.children(1).data = > [x(t(1:i)),y(t(1:i))] > subplot (1,2,2) > update velocity: he6.children(1).data = > [vx(t(1:i)),vy(t(1:i))] > drawnow() > record gif image > update x,y,vx,vy > end > Using imageMagick, I then combine all the gif's in an single animation > file. > > This process works on my computer. I can visualize the animation using > Irfanview, > Chrome or Internet Explorer, but not Firefox which shows only the last > image. > The situation gets worse when I try to post this animation on the Net: > no program > that I know of can display the animation, they all display the first > image. > > I have written other animations which behave properly (see > https://grenoble-sciences.ujf-grenoble.fr/pap-ebook/grivet/liste-animations). > However, there is one, > probably significant, difference: these working animations don't use > multiple windows. > > I would be very grateful for any suggestion on how to run two > animations side by side. > Thank you in advance for your time and help. > JP Grivet Hi, It does not sound like a Scilab issue, more a problem with ImageMagick/gif. Anyway, you can send me a couple of gifs (a working one and a problematic one) and I'll try to have a look. Cheers, Antoine > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From fujimoto2005 at gmail.com Tue Sep 15 17:37:01 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Tue, 15 Sep 2015 08:37:01 -0700 (MST) Subject: [Scilab-users] sometime fail to save a file Message-ID: <1442331421891-4032831.post@n3.nabble.com> In below script,,It sometime fail to execute the line 'save(fileName,y)' with the error message 'save can not open fileName' where fileName is the specific name depending i. But after stop, I can execute that line by selecting it and executing with echo . The value of i which makes error changes. So I can't run whole process. Is there any advise to fix this problem Best regards. ********************** for i=1:20 y=f(i)//in actual script this line is more complicated fileName='valuey_'+strimg(i)+'.dat' save(fileName,'y') end -- View this message in context: http://mailinglists.scilab.org/sometime-fail-to-save-a-file-tp4032831.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From support at ariana-communications.com Tue Sep 15 17:44:57 2015 From: support at ariana-communications.com (arianacomm) Date: Tue, 15 Sep 2015 08:44:57 -0700 (MST) Subject: [Scilab-users] Stockwell transform In-Reply-To: <541DBBA9.6020803@gmail.com> References: <541DBBA9.6020803@gmail.com> Message-ID: <1442331897647-4032832.post@n3.nabble.com> s_transform.sci - hope this helps/ArianaCommunications -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Stockwell-transform-tp4031193p4032832.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Tue Sep 15 17:50:06 2015 From: cfuttrup at gmail.com (Claus Futtrup) Date: Tue, 15 Sep 2015 17:50:06 +0200 Subject: [Scilab-users] Stockwell transform In-Reply-To: <1442331897647-4032832.post@n3.nabble.com> References: <541DBBA9.6020803@gmail.com> <1442331897647-4032832.post@n3.nabble.com> Message-ID: <55F83E2E.5060002@gmail.com> Thank you to Arindam Das ! :-) Best regards, Claus On 15-09-2015 17:44, arianacomm wrote: > s_transform.sci > - hope > this helps /ArianaCommunications > ------------------------------------------------------------------------ > View this message in context: Re: [Scilab-users] Stockwell transform > > Sent from the Scilab users - Mailing Lists Archives mailing list > archive > > at Nabble.com. > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Tue Sep 15 18:02:24 2015 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 15 Sep 2015 18:02:24 +0200 Subject: [Scilab-users] animation of multiple plots In-Reply-To: <55F823D5.20200@cnrs-orleans.fr> References: <55F823D5.20200@cnrs-orleans.fr> Message-ID: <55F84110.3090301@inria.fr> Le 15/09/2015 15:57, grivet a ?crit : > Hi, > > I am trying to animate multiple plots. For instance, when modeling the > motion of a planet > around the sun, I wish to plot, in one window, the planet's position > and, in another window, the tip of the velocity vector, both plots > evolving with time. > I can do that in principle with the following algorithm. > for each time point > compute x,y,vx,vy > define he2 handle of the trajectory > define he6 handle of the velocity curve > drawlater() > subplot(1,2,1) The subplot instruction above is of no use > update trajectory: he2.children(1).data = > [x(t(1:i)),y(t(1:i))] > subplot (1,2,2) The subplot instruction above is of no use > update velocity: he6.children(1).data = > [vx(t(1:i)),vy(t(1:i))] > drawnow() > record gif image > update x,y,vx,vy > end > Using imageMagick, I then combine all the gif's in an single animation > file. > > This process works on my computer. I can visualize the animation using > Irfanview, > Chrome or Internet Explorer, but not Firefox which shows only the last > image. > The situation gets worse when I try to post this animation on the Net: > no program > that I know of can display the animation, they all display the first > image. > > I have written other animations which behave properly (see > https://grenoble-sciences.ujf-grenoble.fr/pap-ebook/grivet/liste-animations). > However, there is one, > probably significant, difference: these working animations don't use > multiple windows. > Strange. It does not seem to be a Scilab problem, Each gif image is a bitmap so there is no reason why several sub windows create a problem.... > I would be very grateful for any suggestion on how to run two > animations side by side. > Thank you in advance for your time and help. > JP Grivet > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From tim at wescottdesign.com Tue Sep 15 19:44:37 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Tue, 15 Sep 2015 10:44:37 -0700 Subject: [Scilab-users] animation of multiple plots In-Reply-To: <55F823D5.20200@cnrs-orleans.fr> References: <55F823D5.20200@cnrs-orleans.fr> Message-ID: <1442339077.2667.56.camel@Servo> I cannot remember the name of the application, but there is software out there that will take a number of static images and compile them into mpeg or other "movie" format. I've done it, but it was long ago on a computer far, far away. I'd have to google for it, and my Google Fu is not something to write home about -- try some variation on "animated movie from stills" or "jpeg to mpeg" or some such. On Tue, 2015-09-15 at 15:57 +0200, grivet wrote: > Hi, > > I am trying to animate multiple plots. For instance, when modeling the > motion of a planet > around the sun, I wish to plot, in one window, the planet's position > and, in another window, the tip of the velocity vector, both plots > evolving with time. > I can do that in principle with the following algorithm. > for each time point > compute x,y,vx,vy > define he2 handle of the trajectory > define he6 handle of the velocity curve > drawlater() > subplot(1,2,1) > update trajectory: he2.children(1).data = [x(t(1:i)),y(t(1:i))] > subplot (1,2,2) > update velocity: he6.children(1).data = [vx(t(1:i)),vy(t(1:i))] > drawnow() > record gif image > update x,y,vx,vy > end > Using imageMagick, I then combine all the gif's in an single animation > file. > > This process works on my computer. I can visualize the animation using > Irfanview, > Chrome or Internet Explorer, but not Firefox which shows only the last > image. > The situation gets worse when I try to post this animation on the Net: > no program > that I know of can display the animation, they all display the first image. > > I have written other animations which behave properly (see > https://grenoble-sciences.ujf-grenoble.fr/pap-ebook/grivet/liste-animations). > However, there is one, > probably significant, difference: these working animations don't use > multiple windows. > > I would be very grateful for any suggestion on how to run two animations > side by side. > Thank you in advance for your time and help. > JP Grivet > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From Christophe.Dang at sidel.com Wed Sep 16 09:13:09 2015 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 16 Sep 2015 07:13:09 +0000 Subject: [Scilab-users] animation of multiple plots In-Reply-To: <55F823D5.20200@cnrs-orleans.fr> References: <55F823D5.20200@cnrs-orleans.fr> Message-ID: Hello, > De : grivet > Envoy? : mardi 15 septembre 2015 15:58 > > Using imageMagick, I then combine all the gif's in an single animation file. I personally use The Gimp to generate animated GIFs, and it usually works fine. -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From support at ariana-communications.com Wed Sep 16 10:53:31 2015 From: support at ariana-communications.com (arianacomm) Date: Wed, 16 Sep 2015 01:53:31 -0700 (MST) Subject: [Scilab-users] Stockwell transform In-Reply-To: <55F83E2E.5060002@gmail.com> References: <541DBBA9.6020803@gmail.com> <1442331897647-4032832.post@n3.nabble.com> <55F83E2E.5060002@gmail.com> Message-ID: <1442393611540-4032837.post@n3.nabble.com> You're welcome. I hope you've been able to figure out the typo in line 51. Moreover, as you might have already figured out, the for-loop can been replaced by using the .*. operator. Regards, Arindam -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Stockwell-transform-tp4031193p4032837.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Wed Sep 16 11:31:12 2015 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 16 Sep 2015 09:31:12 +0000 Subject: [Scilab-users] sometime fail to save a file In-Reply-To: <1442331421891-4032831.post@n3.nabble.com> References: <1442331421891-4032831.post@n3.nabble.com> Message-ID: Hello, > De : fujimoto2005 > Envoy? : mardi 15 septembre 2015 17:37 > > In below script,,It sometime fail to execute the line 'save(fileName,y)' > with the error message 'save can not open fileName' > [...] > fileName='valuey_'+strimg(i)+'.dat' > save(fileName,'y') Except the fact that you wrote stri*m*g instead of sting, I got no problem with your script on my side (used x.^2 for f). -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From stephane.mottelet at utc.fr Wed Sep 16 14:46:03 2015 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 16 Sep 2015 14:46:03 +0200 Subject: [Scilab-users] nightly builds of scilab 6 ? Message-ID: <55F9648B.7010300@utc.fr> Hello, When will be recent nighty builds of Scilab 6 available ? Some important bugs have been fixed since the alpha version so it would be nice to benefit from these fixes. S. -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex From grivet at cnrs-orleans.fr Wed Sep 16 15:22:15 2015 From: grivet at cnrs-orleans.fr (grivet) Date: Wed, 16 Sep 2015 15:22:15 +0200 Subject: [Scilab-users] animation of multiple plots Message-ID: <55F96D07.6060103@cnrs-orleans.fr> Hi, Many thanks to all who responded to my post. Your help is all the more commendable that my problem had (as Serge pointed out) nothing to do with Scilab. Special thanks to Antoine Monmayrant who discovered my error. When creating an animation with ImageMagick, one may specify a parameter (-delay) which is the delay between successive frames. I sometimes chose (randomly) a zero value. With recent versions of Firefox, this is equivalent to showing the last frame. Any non-zero value leads to a correct display. Such is not the case with Internet Explorer which apparently forces a minimum value of this parameter. Subsidiary question to Antoine. I know how to set the delay (-delay nn or -set delay nn), but how can I find out its value for an existing animatio ? Cheers, JP Grivet From john.gliksberg at scilab-enterprises.com Wed Sep 16 15:25:14 2015 From: john.gliksberg at scilab-enterprises.com (John Gliksberg) Date: Wed, 16 Sep 2015 15:25:14 +0200 Subject: [Scilab-users] animation of multiple plots In-Reply-To: <55F96D07.6060103@cnrs-orleans.fr> References: <55F96D07.6060103@cnrs-orleans.fr> Message-ID: <55F96DBA.8070809@scilab-enterprises.com> > Subsidiary question to Antoine. I know how to set the delay (-delay nn > or -set delay nn), but how can I find out its value for an existing > animatio ? Each frame can optionally have its own delay, you can see this in the layer names if you load it in GIMP. I don't know how to do it in ImageMagick though Cheers, -- John Gliksberg Scilab Enterprises tel: +33.6.40.60.76.95 -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Wed Sep 16 15:37:47 2015 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 16 Sep 2015 15:37:47 +0200 Subject: [Scilab-users] animation of multiple plots In-Reply-To: <55F96D07.6060103@cnrs-orleans.fr> References: <55F96D07.6060103@cnrs-orleans.fr> Message-ID: <55F970AB.4080400@laas.fr> Le 09/16/2015 03:22 PM, grivet a ?crit : > Hi, > Many thanks to all who responded to my post. Your help is all the more > commendable that my > problem had (as Serge pointed out) nothing to do with Scilab. > > Special thanks to Antoine Monmayrant who discovered my error. When > creating an animation with ImageMagick, > one may specify a parameter (-delay) which is the delay between > successive frames. I sometimes chose (randomly) a zero value. With > recent versions of Firefox, this is equivalent to showing the last > frame. Any non-zero value leads to a correct display. Such is not the > case with Internet Explorer which apparently forces a minimum value of > this parameter. > > Subsidiary question to Antoine. I know how to set the delay (-delay nn > or -set delay nn), but how can I find out its value for an existing > animatio ? C'est loin d'?tre optimum, mais en ouvrant l'animation gif dans Gimp, les diff?rentes trames apparaissent comme des calques (Ctrl+L pour les voir) avec le d?lai d'affichage de chaque trame indiqu? ? c?t? du calque. Il doit y avoir des outils plus adapt?s ( http://www.lcdf.org/gifsicle/ ?). Antoine > > Cheers, > JP Grivet > _______________________________________________ > 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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ From antoine.elias at scilab-enterprises.com Wed Sep 16 17:05:13 2015 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Wed, 16 Sep 2015 17:05:13 +0200 Subject: [Scilab-users] nightly builds of scilab 6 ? In-Reply-To: <55F9648B.7010300@utc.fr> References: <55F9648B.7010300@utc.fr> Message-ID: <55F98529.3080808@scilab-enterprises.com> Hello St?phane, We have some troubles with documentation generation that prevent nightly builds release. I hope we can solve it quickly. Thank you for reporting Antoine Le 16/09/2015 14:46, St?phane Mottelet a ?crit : > Hello, > > When will be recent nighty builds of Scilab 6 available ? Some important bugs have been fixed since the alpha version so it would be nice to benefit from these fixes. > > S. > -- Antoine ELIAS Software developer ----------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles Phone: 01.80.77.04.70 http://www.scilab-enterprises.com From grivet at cnrs-orleans.fr Wed Sep 16 17:37:30 2015 From: grivet at cnrs-orleans.fr (grivet) Date: Wed, 16 Sep 2015 17:37:30 +0200 Subject: [Scilab-users] animation of multiple plots In-Reply-To: <55F970AB.4080400@laas.fr> References: <55F96D07.6060103@cnrs-orleans.fr> <55F970AB.4080400@laas.fr> Message-ID: <55F98CBA.7030802@cnrs-orleans.fr> >> Subsidiary question to Antoine. I know how to set the delay (-delay >> nn or -set delay nn), but how can I find out its value for an >> existing animation ? > > C'est loin d'?tre optimum, mais en ouvrant l'animation gif dans Gimp, > les diff?rentes trames apparaissent comme des calques (Ctrl+L pour les > voir) avec le d?lai d'affichage de chaque trame indiqu? ? c?t? du calque. > Il doit y avoir des outils plus adapt?s ( > http://www.lcdf.org/gifsicle/ ?). > > Antoine Here is how to do it with ImageMagick (from the page http://www.imagemagick.org/Usage/anim_basics/#study, which I should have read long ago). This command line statement (under Win7) identify -format " %T" myfile.gif will print the delay (in hundredths of seconds) between each frame of myfile.gif. Simple ! Cheers, JP Grivet From fujimoto2005 at gmail.com Wed Sep 16 19:22:14 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Wed, 16 Sep 2015 10:22:14 -0700 (MST) Subject: [Scilab-users] sometime fail to save a file In-Reply-To: References: <1442331421891-4032831.post@n3.nabble.com> Message-ID: <1442424134662-4032846.post@n3.nabble.com> Hello, I am sure there is no error in the script because selecting that line to execute works with no error just after error happened in the run of whole script. Actually I load a same file, renew value of y and before save the file. So the error might be due to loading and saving a same file in very short time. I don't know the internal structure of scilab. If some one can think possible cause of the error, please suggest some solution. Best regards. -- View this message in context: http://mailinglists.scilab.org/sometime-fail-to-save-a-file-tp4032831p4032846.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Wed Sep 16 19:24:19 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Wed, 16 Sep 2015 10:24:19 -0700 (MST) Subject: [Scilab-users] sometime fail to save a file In-Reply-To: References: <1442331421891-4032831.post@n3.nabble.com> Message-ID: <1442424259708-4032847.post@n3.nabble.com> Hello, I am sure there is no error in the script because selecting that line to execute works with no error just after error happened in the run of whole script. Actually I load a same file, renew value of y and save the file with renewed value. So the error might be due to loading and saving a same file in very short time. I don't know the internal structure of scilab. If some one can think possible cause of the error, please suggest some solution. Best regards. -- View this message in context: http://mailinglists.scilab.org/sometime-fail-to-save-a-file-tp4032831p4032847.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Thu Sep 17 09:03:25 2015 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Thu, 17 Sep 2015 07:03:25 +0000 Subject: [Scilab-users] sometime fail to save a file In-Reply-To: <1442424134662-4032846.post@n3.nabble.com> References: <1442331421891-4032831.post@n3.nabble.com> <1442424134662-4032846.post@n3.nabble.com> Message-ID: Hello, > De : fujimoto2005 > Envoy? : mercredi 16 septembre 2015 19:22 > > I am sure there is no error in the [...] > Actually I load a same file, renew value of y and before save the file. > So the error might be due to loading and saving a same file in very short time. The small script you sent did not reproduce the error. Maybe you could try to create a minimal script that generate the error, and share it with us. Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From Yves.Rambinintsoa at gmail.com Thu Sep 17 14:15:40 2015 From: Yves.Rambinintsoa at gmail.com (Yves Rambi) Date: Thu, 17 Sep 2015 05:15:40 -0700 (MST) Subject: [Scilab-users] Create a super block through a script Message-ID: <1442492140766-4032849.post@n3.nabble.com> Hello to all, I am new in this forum and I use sometimes scicos. Now I'd like to create a script which creates a custom block in Scicos. The structural information are read from an excel file. In the m-language there are two commands new_system(...) and add_block(...) in order to perform this task and there are also commands to create ports, links between the blocks etc.... Which are the corresponding commands for Scilab? Here is my m-code: *************************************** clc clear; [num, txt] = xlsread('TCS.xls'); dim = size(txt); laenge = dim(1,1); breite = dim (1,2); System_Name = 'SYS2'; Subsys_Name =''; PathFlag = '<>'; InPortFlag = '<>'; OutPortFlag = '<>'; %POSITION sys_blk_left = 10; sys_blk_top = 10; sys_blk_width = 100; sys_blk_height = 100; sys_blk_right = sys_blk_left + sys_blk_width; sys_blk_bottom = sys_blk_top + sys_blk_height; inp_blk_left = 100; inp_blk_top = 10; inp_blk_width = 20; inp_blk_height = 10; inp_blk_right = inp_blk_left + inp_blk_width; inp_blk_bottom = inp_blk_top + inp_blk_height; Dist_InPort_OutPort = 1000; out_blk_left = inp_blk_left + Dist_InPort_OutPort; out_blk_top = 10; out_blk_width = 20; out_blk_height = 10; out_blk_right = out_blk_left + out_blk_width; out_blk_bottom = out_blk_top + out_blk_height; %CREATE AND OPEN SYSTEM *new_system*(System_Name); open_system(System_Name); inter_row=0; inter_block = 0; i=1; block_nr =0; dim_port_name(1) = 5; while iadd_block*('built-in/SubSystem',Subsys_Name); sys_blk_top = sys_blk_bottom + 10; sys_blk_bottom = sys_blk_top + sys_blk_height; sys_blk_right= sys_blk_left + 2*5* max(dim_port_name); %PLACE AND SIZE BLOCK if ~isempty(Subsys_Name) set_param(Subsys_Name,'Position',[sys_blk_left sys_blk_top sys_blk_right sys_blk_bottom]); end inp_blk_left = 10; inp_blk_top = 10; out_blk_left = 10; out_blk_top = 10; elseif strcmp( ColumnText ,InPortFlag) == 1 inp_blk_left = 10; inp_blk_top = inp_blk_top + 50; inp_blk_right = inp_blk_left + inp_blk_width; inp_blk_bottom = inp_blk_top + inp_blk_height; Subsys_InPort = strcat(Subsys_Name,'/',txt{i,2}); siz_port_name = size(txt{i,2}); dim_port_name(i) = siz_port_name (1,2); add_block('built-in/Inport',Subsys_InPort); set_param(Subsys_InPort,'Position',[inp_blk_left inp_blk_top inp_blk_right inp_blk_bottom]); sys_blk_bottom = sys_blk_bottom + 5; old_dim_port_name = dim_port_name; elseif strcmp( ColumnText ,OutPortFlag) == 1 out_blk_left = inp_blk_left + Dist_InPort_OutPort; out_blk_top = out_blk_top + 50; out_blk_right = out_blk_left + out_blk_width; out_blk_bottom = out_blk_top + out_blk_height; Subsys_OutPort = strcat(Subsys_Name,'/',txt{i,2}); siz_port_name = size(txt{i,2}); dim_port_name(i) = siz_port_name (1,2); add_block('built-in/Outport',Subsys_OutPort); set_param(Subsys_OutPort,'Position',[out_blk_left out_blk_top out_blk_right out_blk_bottom]); sys_blk_bottom = sys_blk_bottom + 5; end i=i+1; end **************************************** Thank you in advance. Yves -- View this message in context: http://mailinglists.scilab.org/Create-a-super-block-through-a-script-tp4032849.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From clement.david at scilab-enterprises.com Thu Sep 17 14:30:21 2015 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Thu, 17 Sep 2015 14:30:21 +0200 Subject: [Scilab-users] Create a super block through a script In-Reply-To: <1442492140766-4032849.post@n3.nabble.com> References: <1442492140766-4032849.post@n3.nabble.com> Message-ID: <1442493021.2817.7.camel@scilab-enterprises.com> Hello Yves and welcome, Yep, it is possible to instantiate a diagram using the functions : * scicos_diagram() * scicos_block() * scicos_link() to add a block simply append the block (here named `blkX`) to the list of children of a diagram (here named `scs_m`): ``` scs_m = scicos_diagram(); blk1 = scicos_block(); // or instantiate a block blk2 = BIGSOM_f("define"); scs_m.objs($+1) = blk1; scs_m.objs($+1) = blk2; ``` Everything is documented on scilab help pages and to check do not hesitate to use `xcos(scs_m)` to watch the resulting diagram. You can also draw a template diagram on xcos and then export it to Scilab (using the diagram browser). Regards, -- Cl?ment Le jeudi 17 septembre 2015 ? 05:15 -0700, Yves Rambi a ?crit : > Hello to all, > I am new in this forum and I use sometimes scicos. > > Now I'd like to create a script which creates a custom block in > Scicos. The > structural information are read from an excel file. In the m-language > there > are two commands new_system(...) and add_block(...) in order to > perform this > task and there are also commands to create ports, links between the > blocks > etc.... Which are the corresponding commands for Scilab? > > Here is my m-code: > > *************************************** > clc > clear; > [num, txt] = xlsread('TCS.xls'); > dim = size(txt); > laenge = dim(1,1); > breite = dim (1,2); > System_Name = 'SYS2'; > Subsys_Name =''; > PathFlag = '<>'; > InPortFlag = '<>'; > OutPortFlag = '<>'; > > %POSITION > sys_blk_left = 10; > sys_blk_top = 10; > sys_blk_width = 100; > sys_blk_height = 100; > sys_blk_right = sys_blk_left + sys_blk_width; > sys_blk_bottom = sys_blk_top + sys_blk_height; > > inp_blk_left = 100; > inp_blk_top = 10; > inp_blk_width = 20; > inp_blk_height = 10; > inp_blk_right = inp_blk_left + inp_blk_width; > inp_blk_bottom = inp_blk_top + inp_blk_height; > > Dist_InPort_OutPort = 1000; > out_blk_left = inp_blk_left + Dist_InPort_OutPort; > out_blk_top = 10; > out_blk_width = 20; > out_blk_height = 10; > out_blk_right = out_blk_left + out_blk_width; > out_blk_bottom = out_blk_top + out_blk_height; > > > > %CREATE AND OPEN SYSTEM > *new_system*(System_Name); > open_system(System_Name); > > inter_row=0; > inter_block = 0; > i=1; > block_nr =0; > > dim_port_name(1) = 5; > while i ColumnText = txt{i,1}; > > if strcmp( ColumnText ,PathFlag) == 1 > block_nr = block_nr +1; > Subsys_Name = txt{i,2}; > dim = size(Subsys_Name); > dim = dim(1,2); > Subsys_Name(dim)=''; > <b>add_block*('built-in/SubSystem',Subsys_Name); > sys_blk_top = sys_blk_bottom + 10; > sys_blk_bottom = sys_blk_top + sys_blk_height; > sys_blk_right= sys_blk_left + 2*5* max(dim_port_name); > > %PLACE AND SIZE BLOCK > if ~isempty(Subsys_Name) > set_param(Subsys_Name,'Position',[sys_blk_left > sys_blk_top > sys_blk_right sys_blk_bottom]); > end > inp_blk_left = 10; > inp_blk_top = 10; > out_blk_left = 10; > out_blk_top = 10; > elseif strcmp( ColumnText ,InPortFlag) == 1 > inp_blk_left = 10; > inp_blk_top = inp_blk_top + 50; > inp_blk_right = inp_blk_left + inp_blk_width; > inp_blk_bottom = inp_blk_top + inp_blk_height; > Subsys_InPort = strcat(Subsys_Name,'/',txt{i,2}); > siz_port_name = size(txt{i,2}); > dim_port_name(i) = siz_port_name (1,2); > add_block('built-in/Inport',Subsys_InPort); > set_param(Subsys_InPort,'Position',[inp_blk_left inp_blk_top > inp_blk_right inp_blk_bottom]); > sys_blk_bottom = sys_blk_bottom + 5; > old_dim_port_name = dim_port_name; > elseif strcmp( ColumnText ,OutPortFlag) == 1 > out_blk_left = inp_blk_left + Dist_InPort_OutPort; > out_blk_top = out_blk_top + 50; > out_blk_right = out_blk_left + out_blk_width; > out_blk_bottom = out_blk_top + out_blk_height; > Subsys_OutPort = strcat(Subsys_Name,'/',txt{i,2}); > siz_port_name = size(txt{i,2}); > dim_port_name(i) = siz_port_name (1,2); > add_block('built-in/Outport',Subsys_OutPort); > set_param(Subsys_OutPort,'Position',[out_blk_left out_blk_top > out_blk_right out_blk_bottom]); > sys_blk_bottom = sys_blk_bottom + 5; > end > i=i+1; > > end > **************************************** > > Thank you in advance. > > > Yves > > > > -- > View this message in context: http://mailinglists.scilab.org/Create-a > -super-block-through-a-script-tp4032849.html > Sent from the Scilab users - Mailing Lists Archives mailing list > archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Yves.Rambinintsoa at gmail.com Thu Sep 17 14:35:00 2015 From: Yves.Rambinintsoa at gmail.com (Yves Rambi) Date: Thu, 17 Sep 2015 05:35:00 -0700 (MST) Subject: [Scilab-users] Create a super block through a script In-Reply-To: <1442493021.2817.7.camel@scilab-enterprises.com> References: <1442492140766-4032849.post@n3.nabble.com> <1442493021.2817.7.camel@scilab-enterprises.com> Message-ID: <1442493300985-4032851.post@n3.nabble.com> Many thanks Cl?ment. I will have try right now. -- View this message in context: http://mailinglists.scilab.org/Create-a-super-block-through-a-script-tp4032849p4032851.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Yves.Rambinintsoa at gmail.com Thu Sep 17 15:09:11 2015 From: Yves.Rambinintsoa at gmail.com (Yves Rambi) Date: Thu, 17 Sep 2015 06:09:11 -0700 (MST) Subject: [Scilab-users] Create a super block through a script In-Reply-To: <1442493021.2817.7.camel@scilab-enterprises.com> References: <1442492140766-4032849.post@n3.nabble.com> <1442493021.2817.7.camel@scilab-enterprises.com> Message-ID: <1442495351637-4032852.post@n3.nabble.com> Hello Cl?ment, I have tried it. But it is really not obvious to me how to use e.g "scicos_block" (graphics, model, etc...). Even the help didn't give me further information. Even by looking at the .sci file I couldn't get it. Is there some example code how to create a custom block with inputs, outputs, connections? Thank you Yves -- View this message in context: http://mailinglists.scilab.org/Create-a-super-block-through-a-script-tp4032849p4032852.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Thu Sep 17 16:04:00 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Thu, 17 Sep 2015 07:04:00 -0700 (MST) Subject: [Scilab-users] sometime fail to save a file In-Reply-To: References: <1442331421891-4032831.post@n3.nabble.com> Message-ID: <1442498640997-4032853.post@n3.nabble.com> please try this script for i=1 :100 y=i^3 save('test.dat','y') end -- View this message in context: http://mailinglists.scilab.org/sometime-fail-to-save-a-file-tp4032831p4032853.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jasper at amsterchem.com Thu Sep 17 16:15:05 2015 From: jasper at amsterchem.com (jasper van baten) Date: Thu, 17 Sep 2015 16:15:05 +0200 Subject: [Scilab-users] sometime fail to save a file In-Reply-To: <1442498640997-4032853.post@n3.nabble.com> References: <1442331421891-4032831.post@n3.nabble.com> <1442498640997-4032853.post@n3.nabble.com> Message-ID: <55FACAE9.4050403@amsterchem.com> If you access a file that rapidly, all kinds of things may have a lock on it. Try disabling your virus scanner for a few minutes and try again? Best wishes, Jasper. On 9/17/2015 16:04, fujimoto2005 wrote: > please try this script > > for i=1 :100 > y=i^3 > save('test.dat','y') > end > > > > -- > View this message in context: http://mailinglists.scilab.org/sometime-fail-to-save-a-file-tp4032831p4032853.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Thu Sep 17 16:17:14 2015 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 17 Sep 2015 16:17:14 +0200 Subject: [Scilab-users] sometime fail to save a file In-Reply-To: <1442498640997-4032853.post@n3.nabble.com> References: <1442331421891-4032831.post@n3.nabble.com> <1442498640997-4032853.post@n3.nabble.com> Message-ID: <55FACB6A.1010303@laas.fr> Le 09/17/2015 04:04 PM, fujimoto2005 a ?crit : > for i=1 :100 > y=i^3 > save('test.dat','y') > end It works fine here. Antoine -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo.caron at gmail.com Thu Sep 17 16:18:49 2015 From: pablo.caron at gmail.com (Pablo Caron) Date: Thu, 17 Sep 2015 11:18:49 -0300 Subject: [Scilab-users] Fwd: How to get fjac from lsqrsolve In-Reply-To: References: Message-ID: Dear user group, I need to extract the Jacobian from the lsqrsolve function. The fortran routine lmdif (http://www.netlib.org/minpack/lmdif.f) provide this as the output fjac, but lsqrsolve does not have this option. I need to evaluate the goodness of a regression I made using lsqrsolve and I found that this is done through the correlation matrix. I need either the correlation matrix or the jacobian. I would like to get an output similar to the following Final set of parameters Asymptotic Standard Error ======================= ========================== m = 0.174844 +/- 0.0002964 (0.1695%) b = 1506.34 +/- 5.756 (0.3821%) correlation matrix of the fit parameters: m b m 1.000 b -0.448 1.000 Regards Pablo -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Thu Sep 17 16:23:36 2015 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 17 Sep 2015 16:23:36 +0200 Subject: [Scilab-users] sometime fail to save a file In-Reply-To: <1442498640997-4032853.post@n3.nabble.com> References: <1442331421891-4032831.post@n3.nabble.com> <1442498640997-4032853.post@n3.nabble.com> Message-ID: <55FACCE8.8000105@laas.fr> As suggested by Jasper, you should not access the same file that fast without a bit of caution. Can you try the following script: for i=1 :100 y=i^3 save('test_'+string(i)+'.dat','y');//new name for each file to avoid accessing the same file over and over end ? Do you still have your problem with this script? Antoine Le 09/17/2015 04:04 PM, fujimoto2005 a ?crit : > please try this script > > for i=1 :100 > y=i^3 > save('test.dat','y') > end > > > > -- > View this message in context: http://mailinglists.scilab.org/sometime-fail-to-save-a-file-tp4032831p4032853.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From stephane.mottelet at utc.fr Thu Sep 17 16:43:10 2015 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 17 Sep 2015 16:43:10 +0200 Subject: [Scilab-users] Fwd: How to get fjac from lsqrsolve In-Reply-To: References: Message-ID: <55FAD17E.8080603@utc.fr> Hello, You can use the numderivative macro, with your residual function as first argument. hth S. Le 17/09/2015 16:18, Pablo Caron a ?crit : > Dear user group, > > I need to extract the Jacobian from the lsqrsolve function. The > fortran routine lmdif (http://www.netlib.org/minpack/lmdif.f) provide > this as the output fjac, but lsqrsolve does not have this option. > > I need to evaluate the goodness of a regression I made using lsqrsolve > and I found that this is done through the correlation matrix. I need > either the correlation matrix or the jacobian. > > I would like to get an output similar to the following > > Final set of parameters Asymptotic Standard Error > ======================= ========================== > m = 0.174844 +/- 0.0002964 (0.1695%) > b = 1506.34 +/- 5.756 (0.3821%) > > correlation matrix of the fit parameters: > m b > m 1.000 > b -0.448 1.000 > > Regards > > Pablo > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Sep 17 22:46:45 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 17 Sep 2015 22:46:45 +0200 Subject: [Scilab-users] sometime fail to save a file In-Reply-To: <55FACCE8.8000105@laas.fr> References: <1442331421891-4032831.post@n3.nabble.com> <1442498640997-4032853.post@n3.nabble.com> <55FACCE8.8000105@laas.fr> Message-ID: <55FB26B5.6060609@free.fr> Le 17/09/2015 16:23, Antoine Monmayrant a ?crit : > As suggested by Jasper, you should not access the same file that fast > without a bit of caution. . Are you wondering about save() returning without waiting for the file being closed...? > Can you try the following script: > > for i=1 :100 > y=i^3 > save('test_'+string(i)+'.dat','y');//new name for each file to > avoid accessing the same file over and over . or with sleep(100); for instance? Samuel From fujimoto2005 at gmail.com Fri Sep 18 01:46:23 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Thu, 17 Sep 2015 16:46:23 -0700 (MST) Subject: [Scilab-users] sometime fail to save a file In-Reply-To: <55FB26B5.6060609@free.fr> References: <1442331421891-4032831.post@n3.nabble.com> <1442498640997-4032853.post@n3.nabble.com> <55FACCE8.8000105@laas.fr> <55FB26B5.6060609@free.fr> Message-ID: <1442533583247-4032861.post@n3.nabble.com> Hello,all Both solutions are fine!! The reason why I want to save every time, I want to keep the result. Renewal of y's value depends on the other condition and when renewal process is skipped the same file is accessed rapidly. (Actually this phenomena began to happen after I replace my old PC with more fast and multi-core PC) Any way I understand the cause of the error, so I modify the script into saving once in 10 renewal or sleep(100) whenever renewal is skipped. Best regards. -- View this message in context: http://mailinglists.scilab.org/sometime-fail-to-save-a-file-tp4032831p4032861.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From pgsmntry at gmail.com Fri Sep 18 08:24:47 2015 From: pgsmntry at gmail.com (Parthageet Samantaray) Date: Fri, 18 Sep 2015 11:54:47 +0530 Subject: [Scilab-users] Regarding a error message "List element number 13 is Undefined." In-Reply-To: References: <1441039435.9213.165.camel@Servo> Message-ID: Hii everyone, Could anyone figure out the issue I had posted. What I could find out is that the Error message that I am getting is Numbered as Error 117 in the error table of Scialb Help. This problem is still unresolved. Kindly help me out. I have already attached the .xcos file in which I am having trouble. Any kind of solution if anyone comes across please let me know. Regards Parthageet Samantaray On Thu, Sep 3, 2015 at 10:46 AM, Parthageet Samantaray wrote: > Hello, > > I am posting the xcos file which shows the error. Thanks Tim, your trick > worked out in identifying the the exact block in which the error existed. > But the problem is still persists. Please find the block and suggest > something regarding. > > With regards, > Parthageet Samantaray > > On Tue, Sep 1, 2015 at 11:45 AM, Parthageet Samantaray > wrote: > >> Hello Tim, >> >> Thanks for suggestion. I will not be able to send the whole xcos >> file because of proprietary reasons. I am trying to trim the blocks up and >> see if the problem is with any particular block. >> >> To give you a big picture, I am actually mathematically modelling >> a PLL. In this when I am trying to connect the feedback path from the VCO >> to the PFD, the error message is coming. >> >> Thanks again for replying. I will reply soon once I find >> something on this. >> >> With Regards. >> Parthageet Samantaray >> >> On Mon, Aug 31, 2015 at 10:13 PM, Tim Wescott >> wrote: >> >>> On Mon, 2015-08-31 at 17:49 +0530, Parthageet Samantaray wrote: >>> > Hello all, >>> > >>> > >>> > I am having problem while running the simulation in Xcos. Actually I >>> > am trying to simulate a closed loop system. The model was working till >>> > it was open loop, with considered inputs. But as I connect a feedback >>> > path it is showing a message on the Scilab console - "List element >>> > number 13 is Undefined." >>> > >>> > >>> > I attempted to make the feedback path in many ways but nothing worked >>> > out. I am unable to understand why this error is displaying. >>> > >>> > >>> > If anyone has any suggestions kindly post me. >>> >>> Post your xcos file. This won't help me help you, but someone who knows >>> more than I do about xcos will probably need it. >>> >>> If you can't because it's huge or proprietary, try trimming bits out -- >>> if the problem persists when it's small and simple, that'll make an even >>> better thing to post. If the problem goes away when you excise some >>> specific block, then you can consider that a huge blinking arrow to the >>> problem. >>> >>> -- >>> >>> Tim Wescott >>> www.wescottdesign.com >>> Control & Communications systems, circuit & software design. >>> Phone: 503.631.7815 >>> Cell: 503.349.8432 >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yves.Rambinintsoa at gmail.com Fri Sep 18 09:49:46 2015 From: Yves.Rambinintsoa at gmail.com (Yves Rambi) Date: Fri, 18 Sep 2015 00:49:46 -0700 (MST) Subject: [Scilab-users] Create a super block through a script In-Reply-To: <1442493021.2817.7.camel@scilab-enterprises.com> References: <1442492140766-4032849.post@n3.nabble.com> <1442493021.2817.7.camel@scilab-enterprises.com> Message-ID: <1442562586450-4032863.post@n3.nabble.com> Hello Cl?ment, it works. I don't know why but yesterday I didn't see the small square (the system) that has been created in the Scicos model. Thank you -- View this message in context: http://mailinglists.scilab.org/Create-a-super-block-through-a-script-tp4032849p4032863.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From francois.granade at scilab-enterprises.com Fri Sep 18 12:23:27 2015 From: francois.granade at scilab-enterprises.com (=?iso-8859-1?Q?Fran=E7ois_Granade?=) Date: Fri, 18 Sep 2015 12:23:27 +0200 Subject: [Scilab-users] nightly builds of scilab 6 ? In-Reply-To: <55F98529.3080808@scilab-enterprises.com> References: <55F9648B.7010300@utc.fr> <55F98529.3080808@scilab-enterprises.com> Message-ID: <144E2A54-A35C-4202-A0B9-E544DA904B1E@scilab-enterprises.com> hi St?phane, We've (somewhat) fixed the website; the page http://www.scilab.org/development/nightly_builds/master now has the latest builds listed. Some are a few days old, and there are still other issues (the commit date seem to be wrong, as well as the size) -- but at least they are recent builds. It'll most likely continue to be this way... not perfect, but at least available... Fran?ois Granade On Sep 16, 2015, at 5:05 PM, Antoine ELIAS wrote: > Hello St?phane, > > We have some troubles with documentation generation that prevent nightly builds release. > I hope we can solve it quickly. > > Thank you for reporting > Antoine > > Le 16/09/2015 14:46, St?phane Mottelet a ?crit : >> Hello, >> >> When will be recent nighty builds of Scilab 6 available ? Some important bugs have been fixed since the alpha version so it would be nice to benefit from these fixes. >> >> S. >> > > > -- > Antoine ELIAS > Software developer > ----------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles > Phone: 01.80.77.04.70 > http://www.scilab-enterprises.com > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Yves.Rambinintsoa at gmail.com Fri Sep 18 13:23:36 2015 From: Yves.Rambinintsoa at gmail.com (Yves Rambi) Date: Fri, 18 Sep 2015 04:23:36 -0700 (MST) Subject: [Scilab-users] Create a super block through a script In-Reply-To: <1442493021.2817.7.camel@scilab-enterprises.com> References: <1442492140766-4032849.post@n3.nabble.com> <1442493021.2817.7.camel@scilab-enterprises.com> Message-ID: <1442575416581-4032865.post@n3.nabble.com> Hello Cl?ment, it's really not so easy to begin with writing sce scripts. So I could finally after hours of research and trials partly understand how this scripting works. Here is my code: ********************** scs_m = scicos_diagram(); scs_m.props.title = "Test_Superblock"; //SUM-Block //scs_m.objs(1) = SUMMATION("define"); //scs_m.objs(1).graphics.sz = [30 50]; //super block scs_m.objs(1) = SUPER_f("define"); scs_m.objs(1).graphics.sz = [200 200]; //create one additional input scs_m.objs(1).model.rpar.objs(3)= IN_f("define") //define input-structure scs_m.objs(1).model.in = [2;-1] scs_m.objs(1).model.in2 = [1;-2] scs_m.objs(1).model.intyp = [2;-1] xcos(scs_m) ********************** I have some questions: - what are the vectors in[2; -1] and in2[1; -2] ? I write it just "instinctively" by looking at the diagram browser. - is there not another simplier way to create inputs in a kind of one command like "create_input"? - is my code correct or did I forget something? By the way I don't know how to export a model to the "diagram browser". When I open it I see a tree structure. From there I deduced how to create sub-model-elements. But I don't know if my code is complete or if there are some additional things necessary. If I could get some example code from somewhere it would help me a lot. Thank you Yves -- View this message in context: http://mailinglists.scilab.org/Create-a-super-block-through-a-script-tp4032849p4032865.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From clement.david at scilab-enterprises.com Fri Sep 18 13:50:28 2015 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Fri, 18 Sep 2015 13:50:28 +0200 Subject: [Scilab-users] Create a super block through a script In-Reply-To: <1442575416581-4032865.post@n3.nabble.com> References: <1442492140766-4032849.post@n3.nabble.com> <1442493021.2817.7.camel@scilab-enterprises.com> <1442575416581-4032865.post@n3.nabble.com> Message-ID: <1442577028.2611.10.camel@scilab-enterprises.com> Hello Yves, hello all, Yep in fact this is not trivial and we try to improve that for Scilab6 (such as automatic definitions of port properties). > I have some questions:> - what are the vectors in[2; -1] and in2[1; -2] ? I write it just> "instinctively" by looking at the diagram browser.> - is there not another simplier way to create inputs in a kind of one> command like "create_input"?> - is my code correct or did I forget something?> Your code seems correct. The model.in and model.in2 let the user specify the size of the inputs. > By the way I don't know how to export a model to the "diagram > browser". When> I open it I see a tree structure. From there I deduced how to create> sub-model-elements. But I don't know if my code is complete or if > there are> some additional things necessary. Opening the diagram browser push an 'scs_m' variable into Scilab and you can then access its fields. Regards, -- Cl?ment From pablo.caron at gmail.com Fri Sep 18 17:16:35 2015 From: pablo.caron at gmail.com (Pablo Caron) Date: Fri, 18 Sep 2015 12:16:35 -0300 Subject: [Scilab-users] Fwd: How to get fjac from lsqrsolve In-Reply-To: <55FAD17E.8080603@utc.fr> References: <55FAD17E.8080603@utc.fr> Message-ID: Hello St?phane, thank you! I solved the problem with your hint. For further reference I attach a ZIP file with a linear regression comparing statistical results from Scilab and gnuplot. Regards Pablo 2015-09-17 11:43 GMT-03:00 St?phane Mottelet : > Hello, > > You can use the numderivative macro, with your residual function as first > argument. > > hth > > S. > > > > Le 17/09/2015 16:18, Pablo Caron a ?crit : > > Dear user group, > > I need to extract the Jacobian from the lsqrsolve function. The fortran > routine lmdif ( > http://www.netlib.org/minpack/lmdif.f) provide this as the output fjac, > but lsqrsolve does not have this option. > > I need to evaluate the goodness of a regression I made using lsqrsolve and > I found that this is done through the correlation matrix. I need either the > correlation matrix or the jacobian. > > I would like to get an output similar to the following > > Final set of parameters Asymptotic Standard Error > ======================= ========================== > m = 0.174844 +/- 0.0002964 (0.1695%) > b = 1506.34 +/- 5.756 (0.3821%) > > correlation matrix of the fit parameters: > m b > m 1.000 > b -0.448 1.000 > > Regards > > Pablo > > > > _______________________________________________ > users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users > > > > -- > D?partement de G?nie Informatique > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > Universit? de Technologie de Compi?gne - CS 60319 > 60203 Compi?gne cedex > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LM_stats.zip Type: application/zip Size: 1415 bytes Desc: not available URL: From kootsoop+scilab at gmail.com Fri Sep 18 20:10:27 2015 From: kootsoop+scilab at gmail.com (kootsoop) Date: Fri, 18 Sep 2015 11:10:27 -0700 (MST) Subject: [Scilab-users] Associative Array Keys Message-ID: <1442599827049-4032868.post@n3.nabble.com> I am thinking of associative arrays in Scilab: and was wondering whether it's possible to either enumerate all the keys ("test", "test2") or check whether a key exists? If I just do: without having previously set "test3" I get Any pointers appreciated! -- View this message in context: http://mailinglists.scilab.org/Associative-Array-Keys-tp4032868.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Fri Sep 18 20:20:06 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 18 Sep 2015 20:20:06 +0200 Subject: [Scilab-users] Associative Array Keys In-Reply-To: <1442599827049-4032868.post@n3.nabble.com> References: <1442599827049-4032868.post@n3.nabble.com> Message-ID: <55FC55D6.9090206@free.fr> Le 18/09/2015 20:10, kootsoop a ?crit : > I am thinking of associative arrays in Scilab: . It is called a /structure/, and keys are fields. aa("key1") = %pi aa("boo") = %t aa("pol") = (1-%s)^3 aa("txt") = "Hi" > and was wondering whether it's possible to either enumerate all the keys > ("test", "test2") fieldnames(aa) // does it > or check whether a key exists? or(fieldnames(aa)=="thatKey") // does it Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sat Sep 19 13:46:05 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 19 Sep 2015 04:46:05 -0700 (MST) Subject: [Scilab-users] get the intersect x and y Message-ID: <1442663165089-4032870.post@n3.nabble.com> I want to get the indices of vector x which satisfied x==y(j) for some j where x and y are row vectors. I am using z=[] for i=1 :size(y,2) z=[z,find(x==y(j)) end If there is a simpler code which use find method please teach me. Best regards. Fujimoto -- View this message in context: http://mailinglists.scilab.org/get-the-intersect-x-and-y-tp4032870.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From cfuttrup at gmail.com Sat Sep 19 13:56:52 2015 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 19 Sep 2015 13:56:52 +0200 Subject: [Scilab-users] Yeppp Message-ID: <55FD4D84.4010109@gmail.com> Hi there Interesting math library: http://www.phoronix.com/scan.php?page=news_item&px=Yeppp-Math-Library /Claus From sgougeon at free.fr Sat Sep 19 17:15:42 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 19 Sep 2015 17:15:42 +0200 Subject: [Scilab-users] get the intersect x and y In-Reply-To: <1442663165089-4032870.post@n3.nabble.com> References: <1442663165089-4032870.post@n3.nabble.com> Message-ID: <55FD7C1E.1040601@free.fr> Hello, Le 19/09/2015 13:46, fujimoto2005 a ?crit : > I want to get the indices of vector x which satisfied x==y(j) for some j > where x and y are row vectors. > I am using > z=[] > for i=1 :size(y,2) > z=[z,find(x==y(j)) > end > If there is a simpler code which use find method please teach me. intersect() : http://help.scilab.org/docs/5.5.2/en_US/intersect.html HTH SG From fujimoto2005 at gmail.com Sat Sep 19 18:47:15 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 19 Sep 2015 09:47:15 -0700 (MST) Subject: [Scilab-users] get the intersect x and y In-Reply-To: <55FD7C1E.1040601@free.fr> References: <55FD7C1E.1040601@free.fr> Message-ID: <1442681235299-4032873.post@n3.nabble.com> Hello Samuel Thnks a lot. This is exactry what I want. Is there any function f(a,b) which return ka where [x,ka,kb]=intersect(a,b). I want to get only ka. Best regards Fujimoto -- View this message in context: http://mailinglists.scilab.org/Re-get-the-intersect-x-and-y-tp4032872p4032873.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Sep 19 21:10:54 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 19 Sep 2015 21:10:54 +0200 Subject: [Scilab-users] get the intersect x and y In-Reply-To: <1442681235299-4032873.post@n3.nabble.com> References: <55FD7C1E.1040601@free.fr> <1442681235299-4032873.post@n3.nabble.com> Message-ID: <55FDB33E.1040102@free.fr> Le 19/09/2015 18:47, fujimoto2005 a ?crit : > Is there any function f(a,b) which return ka where > [x,ka,kb]=intersect(a,b). > I want to get only ka. It's not possible. The first argout can't be skipped, just ignored: [trash, ka] = intersect(a,b) From jleppert at uni-bonn.de Sat Sep 19 23:09:40 2015 From: jleppert at uni-bonn.de (JanLeppert) Date: Sat, 19 Sep 2015 14:09:40 -0700 (MST) Subject: [Scilab-users] netcdf with scilab Message-ID: <1442696980562-4032875.post@n3.nabble.com> Hi, I want to read netcdf files with scilab. In older Posts I find the following link for a Project to read netcdf: http://ace.acadiau.ca/math/ACMMaC/software/scilab_netcdf.html but this site doesn't exist anymore. Thanks, Jan -- View this message in context: http://mailinglists.scilab.org/netcdf-with-scilab-tp4032875.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Sun Sep 20 00:25:46 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 19 Sep 2015 15:25:46 -0700 (MST) Subject: [Scilab-users] get the intersect x and y In-Reply-To: <55FDB33E.1040102@free.fr> References: <55FD7C1E.1040601@free.fr> <1442681235299-4032873.post@n3.nabble.com> <55FDB33E.1040102@free.fr> Message-ID: <1442701546065-4032876.post@n3.nabble.com> Hello Thanks a lot. Best regrds Fujimoto -- View this message in context: http://mailinglists.scilab.org/Re-get-the-intersect-x-and-y-tp4032872p4032876.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Sun Sep 20 02:04:14 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 19 Sep 2015 17:04:14 -0700 (MST) Subject: [Scilab-users] Change display x axis as % Message-ID: <1442707454753-4032877.post@n3.nabble.com> Hello, First please load the attached data file 'test.dat'. Then run the below script. In the script, x has values from 0.091 to 0.15. I want to set % expression. Before 'pause', the graph display x ticks with the values from 0.091 to 0.15 rightly. But after 'resume' command to continue the run, 0.15(15%) disappear. I want to keep 15%. Please teach me how to do. test.dat Best regards. ***** X_V=[min(x),max(x)]; scf plot2d(x,y',[color('green'),color('blue'),color('red')]); ax=get('current_axes'); ax.data_bounds(:,1)=[X_V]'; ax.tight_limits='on'; pause //set x % xt=ax.x_ticks; for i=1:size(xt.locations,1) xtLabels_V(i)=msprintf('%.'+string(0)+'f%%\n',xt.locations(i)*100) end xt.labels=xtLabels_V ax.x_ticks=xt; -- View this message in context: http://mailinglists.scilab.org/Change-display-x-axis-as-tp4032877.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From laurent.bonaventure at ac-nantes.fr Sun Sep 20 04:41:52 2015 From: laurent.bonaventure at ac-nantes.fr (Laurent Bonaventure) Date: Sun, 20 Sep 2015 04:41:52 +0200 Subject: [Scilab-users] Cannot understand scilex behavior when piping In-Reply-To: References: <55F59C4F.50404@free.fr> Message-ID: Hello. I'm still trying to pipe instructions into scilex (Windows 7, Scilab 5.4). When I send a plot command, scilex opens the graphics window and draw my polyline -> Great ! Then I try to open the graphics editor from within the graphics window (e.g. Edit/Axes properties) : nothing happens. Then I close the graphics window. Then I send the plot command again. And poof! The graphics windows opens AND the long awaited graphics editor too. Except that nothing works in it. I guess it's some sort of handlers problem: the graphics window cannot communicate correctly with the scilab kernel and get the correct handlers to the figure. What's more strange, is that the behaviour is correct when I start scilex from within an interactive console (cmd)... Steps to reproduce (you need some utility like cat from gnuwin32, or any way to pipe commands to scilex) : (Incorrect behaviour, with a pipe) cat | scilex x = 0:0.1:10 plot(x,cos(x)) plot(x,cos(x)) (Correct behaviour, without pipe) scilex x = 0:0.1:10 plot(x,cos(x)) I don't understand how scilex can see any difference between both approaches, and why it would have a different behaviour based on that difference. From its point of view, there shouldn't be any difference. Ah! And the -nw switch doesn't change anything... You get exactly the same behaviour in both cases. Can someone give me some sort of solution, or pointers, or even give me an idea for a workaround. I need to pipe things in scilex, and I need the first approach to work correctly... Thank you. Laurent From amonmayr at laas.fr Sun Sep 20 08:26:59 2015 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Sun, 20 Sep 2015 08:26:59 +0200 Subject: [Scilab-users] =?utf-8?q?Yeppp?= In-Reply-To: <55FD4D84.4010109@gmail.com> Message-ID: I see there are Java and C interfaces, has anyone tried to call ones of the base functions (log, exp, ...) to see how ti compares to scilab builtin's? Antoine Le Samedi 19 Septembre 2015 13:56 CEST, Claus Futtrup a ?crit: > Hi there > > Interesting math library: > > http://www.phoronix.com/scan.php?page=news_item&px=Yeppp-Math-Library > > /Claus > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From jvfengda at yahoo.com Sun Sep 20 11:14:16 2015 From: jvfengda at yahoo.com (Da Feng) Date: Sun, 20 Sep 2015 09:14:16 +0000 (UTC) Subject: [Scilab-users] captions too long Message-ID: <1721986326.398514.1442740456698.JavaMail.yahoo@mail.yahoo.com> Hi:? I'm using plot() and find that if the caption is too long, then part of it can't be seen. If I resize the figure and turn off auto_resize, then part of the captions is still not drawn. But if I turn on auto_resize, then the figure enlarges, and the captions is still too long. What should I do??????????????? Da Feng -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Sep 20 15:49:09 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 20 Sep 2015 15:49:09 +0200 Subject: [Scilab-users] captions too long In-Reply-To: <1721986326.398514.1442740456698.JavaMail.yahoo@mail.yahoo.com> References: <1721986326.398514.1442740456698.JavaMail.yahoo@mail.yahoo.com> Message-ID: <55FEB955.2040109@free.fr> Hello, Le 20/09/2015 11:14, Da Feng a ?crit : > Hi: > I'm using plot() and find that if the caption is too long, then part > of it can't be seen. If I resize the figure and turn off auto_resize, > then part of the captions is still not drawn. But if I turn on > auto_resize, then the figure enlarges, and the captions is still too > long. What should I do? shorten the caption, as using a reference as caption and give its full text elsewhere, or reduce its font size. For a certain plot, there will always be a length for its caption that will require more space than the plot itself. So, you have to chose what should take most place: the plot or its caption. This is why one couldn't advice you to decrease the margins sizes. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Mon Sep 21 02:44:17 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 20 Sep 2015 17:44:17 -0700 Subject: [Scilab-users] captions too long In-Reply-To: <55FEB955.2040109@free.fr> References: <1721986326.398514.1442740456698.JavaMail.yahoo@mail.yahoo.com> <55FEB955.2040109@free.fr> Message-ID: <1442796257.2667.114.camel@Servo> If I'm writing a paper then I generally put very terse captions or (more usually) no captions on the plots, then use whatever editor I'm using (usually Lyx/LaTeX these days) to caption the plot "properly". However, sometimes I need to email just a plot to someone -- to convey "see it works!" or "this is how disaster is striking". Is there a way to put a linefeed into a caption for those times, or a block of text? On Sun, 2015-09-20 at 15:49 +0200, Samuel Gougeon wrote: > Hello, > Le 20/09/2015 11:14, Da Feng a ?crit : > > > Hi: > > I'm using plot() and find that if the caption is too long, then > > part of it can't be seen. If I resize the figure and turn off > > auto_resize, then part of the captions is still not drawn. But if I > > turn on auto_resize, then the figure enlarges, and the captions is > > still too long. What should I do? > shorten the caption, as using a reference as caption and give its full > text elsewhere, or reduce its font size. > > For a certain plot, there will always be a length for its caption that > will require more space than the plot itself. So, you have to chose > what should take most place: the plot or its caption. > This is why one couldn't advice you to decrease the margins sizes. > > HTH > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From greanie at yahoo.com Mon Sep 21 10:00:33 2015 From: greanie at yahoo.com (Michael Greenish) Date: Mon, 21 Sep 2015 08:00:33 +0000 (UTC) Subject: [Scilab-users] Modeling current in a solenoid Message-ID: <448049475.783778.1442822433086.JavaMail.yahoo@mail.yahoo.com> Hi, I need to model the current in a solenoid. ?I would use a resistor with the standard inductor model but the inductance changes considerably with position of the solenoid plunger (as the solenoid is closing). ?The standard inductor model only accommodates a fixed inductance. The equation for inductor current is: ? ? ? I(t) = (V/R)[1-e?(-Rt/L)] Anyone have any suggestions? Thanks, Mike Greenish -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvfengda at yahoo.com Mon Sep 21 10:13:39 2015 From: jvfengda at yahoo.com (Da Feng) Date: Mon, 21 Sep 2015 08:13:39 +0000 (UTC) Subject: [Scilab-users] captions too long In-Reply-To: <1442796257.2667.114.camel@Servo> References: <1442796257.2667.114.camel@Servo> Message-ID: <2139156560.767740.1442823219734.JavaMail.yahoo@mail.yahoo.com> Hi:?? I find a solution. I use larger y axis of data_bounds to press down the curves, and then increase y axis of? the figure_size. The results is acceptable. Actually I've drawn 8 curves and their shape is not ideal for placing the captions.???????? Da Feng On Monday, September 21, 2015 8:46 AM, Tim Wescott wrote: If I'm writing a paper then I generally put very terse captions or (more usually) no captions on the plots, then use whatever editor I'm using (usually Lyx/LaTeX these days) to caption the plot "properly". However, sometimes I need to email just a plot to someone -- to convey "see it works!" or "this is how disaster is striking". Is there a way to put a linefeed into a caption for those times, or a block of text? On Sun, 2015-09-20 at 15:49 +0200, Samuel Gougeon wrote: > Hello, > Le 20/09/2015 11:14, Da Feng a ?crit : > > > Hi: > >? I'm using plot() and find that if the caption is too long, then > > part of it can't be seen. If I resize the figure and turn off > > auto_resize, then part of the captions is still not drawn. But if I > > turn on auto_resize, then the figure enlarges, and the captions is > > still too long. What should I do? > shorten the caption, as using a reference as caption and give its full > text elsewhere, or reduce its font size. > > For a certain plot, there will always be a length for its caption that > will require more space than the plot itself. So, you have to chose > what should take most place: the plot or its caption. > This is why one couldn't advice you to decrease the margins sizes. > > HTH > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell:? 503.349.8432 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvfengda at yahoo.com Mon Sep 21 10:13:39 2015 From: jvfengda at yahoo.com (Da Feng) Date: Mon, 21 Sep 2015 08:13:39 +0000 (UTC) Subject: [Scilab-users] captions too long In-Reply-To: <1442796257.2667.114.camel@Servo> References: <1442796257.2667.114.camel@Servo> Message-ID: <2139156560.767740.1442823219734.JavaMail.yahoo@mail.yahoo.com> Hi:?? I find a solution. I use larger y axis of data_bounds to press down the curves, and then increase y axis of? the figure_size. The results is acceptable. Actually I've drawn 8 curves and their shape is not ideal for placing the captions.???????? Da Feng On Monday, September 21, 2015 8:46 AM, Tim Wescott wrote: If I'm writing a paper then I generally put very terse captions or (more usually) no captions on the plots, then use whatever editor I'm using (usually Lyx/LaTeX these days) to caption the plot "properly". However, sometimes I need to email just a plot to someone -- to convey "see it works!" or "this is how disaster is striking". Is there a way to put a linefeed into a caption for those times, or a block of text? On Sun, 2015-09-20 at 15:49 +0200, Samuel Gougeon wrote: > Hello, > Le 20/09/2015 11:14, Da Feng a ?crit : > > > Hi: > >? I'm using plot() and find that if the caption is too long, then > > part of it can't be seen. If I resize the figure and turn off > > auto_resize, then part of the captions is still not drawn. But if I > > turn on auto_resize, then the figure enlarges, and the captions is > > still too long. What should I do? > shorten the caption, as using a reference as caption and give its full > text elsewhere, or reduce its font size. > > For a certain plot, there will always be a length for its caption that > will require more space than the plot itself. So, you have to chose > what should take most place: the plot or its caption. > This is why one couldn't advice you to decrease the margins sizes. > > HTH > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell:? 503.349.8432 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Mon Sep 21 20:55:44 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Mon, 21 Sep 2015 11:55:44 -0700 Subject: [Scilab-users] Modeling current in a solenoid In-Reply-To: <448049475.783778.1442822433086.JavaMail.yahoo@mail.yahoo.com> References: <448049475.783778.1442822433086.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1442861744.2667.127.camel@Servo> On Mon, 2015-09-21 at 08:00 +0000, Michael Greenish wrote: > Hi, > > > I need to model the current in a solenoid. I would use a resistor > with the standard inductor model but the inductance changes > considerably with position of the solenoid plunger (as the solenoid is > closing). The standard inductor model only accommodates a fixed > inductance. > > > The equation for inductor current is: > > > I(t) = (V/R)[1-e?(-Rt/L)] > > > Anyone have any suggestions? > Hey Mike: That's the equation for inductor current when driven by a voltage, yes. It comes from the differential equation: i(t) * R + (d/dt i(t)) L = V. It's a first-order ordinary linear differential equation. Life gets complicated when you have that solenoid in there. I'm almost certain that the correct way to model the i/v behavior of the solenoid is v_l(t) = d/dt (i(t) * L(t)) -- in other words, accept that both current and inductance change with time, and take the derivative of the pair. The place to look to check up on my assumption is texts in electrical machines (it's a 3rd-year electronics course. My book is "Electric Machines: Steady-State Theory and Dynamic Performance" by Mulukutla S. Sarma, WCB, 1985. Note that, at best, you'll have to treat the system as a time-varying linear system, and you may have to treat the system as being nonlinear (depending on how quickly the solenoid position varies with time compared to the current). You'll also see that finding the inductance vs. position relationship is (ehem) left as an exercise to the reader. This isn't a complete answer, but I hope that it sets your feet on the right road. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From greanie at yahoo.com Tue Sep 22 15:00:52 2015 From: greanie at yahoo.com (Michael Greenish) Date: Tue, 22 Sep 2015 13:00:52 +0000 (UTC) Subject: [Scilab-users] Modeling current in a solenoid In-Reply-To: <1442861744.2667.127.camel@Servo> References: <1442861744.2667.127.camel@Servo> Message-ID: <545972203.1551620.1442926852354.JavaMail.yahoo@mail.yahoo.com> Hi Tim, Thank you for the quick feedback. ?The inductance changes with position and I have taken measurements of the inductance vs. position. ?I have the position data from model of the mechanical system, a simply sprung-damped mass system. ? What I don't know how to do is to either break up the math into constituent blocks (I can't find a block for Euler number or to program a block that can take the inductance in as an input parameter (although I do program in various languages, I've never programmed in scilab or xcos before). ? What would be the best way to proceed, in your opinion? Separate blocks or program a custom block? Thanks, Mike From: Tim Wescott To: Michael Greenish ; Users mailing list for Scilab Sent: Monday, September 21, 2015 8:55 PM Subject: Re: [Scilab-users] Modeling current in a solenoid On Mon, 2015-09-21 at 08:00 +0000, Michael Greenish wrote: > Hi, > > > I need to model the current in a solenoid.? I would use a resistor > with the standard inductor model but the inductance changes > considerably with position of the solenoid plunger (as the solenoid is > closing).? The standard inductor model only accommodates a fixed > inductance. > > > The equation for inductor current is: > > >? ? ? I(t) = (V/R)[1-e?(-Rt/L)] > > > Anyone have any suggestions? > Hey Mike: That's the equation for inductor current when driven by a voltage, yes. It comes from the differential equation: i(t) * R + (d/dt i(t)) L = V.? It's a first-order ordinary linear differential equation. Life gets complicated when you have that solenoid in there.? I'm almost certain that the correct way to model the i/v behavior of the solenoid is v_l(t) = d/dt (i(t) * L(t)) -- in other words, accept that both current and inductance change with time, and take the derivative of the pair.? The place to look to check up on my assumption is texts in electrical machines (it's a 3rd-year electronics course.? My book is "Electric Machines: Steady-State Theory and Dynamic Performance" by Mulukutla S. Sarma, WCB, 1985. Note that, at best, you'll have to treat the system as a time-varying linear system, and you may have to treat the system as being nonlinear (depending on how quickly the solenoid position varies with time compared to the current).? You'll also see that finding the inductance vs. position relationship is (ehem) left as an exercise to the reader. This isn't a complete answer, but I hope that it sets your feet on the right road. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell:? 503.349.8432 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathphud at hotmail.com Thu Sep 24 05:11:50 2015 From: mathphud at hotmail.com (Robert McLean MD PhD) Date: Wed, 23 Sep 2015 20:11:50 -0700 (MST) Subject: [Scilab-users] How to replace Matlab stairs function in Scilab In-Reply-To: <001801c9a18c$87ec6640$97c532c0$@tschische@cisc.at> References: <001801c9a18c$87ec6640$97c532c0$@tschische@cisc.at> Message-ID: <1443064310459-4032896.post@n3.nabble.com> So here is what I did for the stairs graph: // we are going to make a stair step graphing program in scilab // o------o // o--o | | // | | o---o // o----o // // We take the vector (x1,x2,x3,...,xn) and (y1,y2,y3,...,yn) and instead of // graphing a lines from the data points (x1,y1) to (x2,y2), (x2,y2) to (x3,y3), // etc., we graph (x1,y1) to (x2,y1) then (x2,y1) to (x2,y2), etc. // // the number of graphed points goes from n to 2n-1. // (x1,x2,...,xn) // (y1,y2,...,yn) goes to // (x1,x2,x2,x3,x3,x4,x4,...) // (y1,y1,y2,y2,y3,y3,y4,...) function stairs(x,y) n=length(x); x_indices=int((1:2*n-1)/2)+1; // gives 1,2,2,3,3,...,2n-1,2n-1 x_ss=x(x_indices); // the stair step graph's x values y_indices=int((2:2*n)/2); // gives 1,1,2,2,...,2n-2,2n-2,2n-1 y_ss=y(y_indices) plot2d(x_ss,y_ss) endfunction // We create an example: n=10; x=linspace(0,2,n); x=x.*x; //irregularly spaced x interval points from 0 to 4 y=sin(x*%pi); stairs(x,y) -- View this message in context: http://mailinglists.scilab.org/How-to-replace-Matlab-stairs-function-in-Scilab-tp2615846p4032896.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Thu Sep 24 09:32:29 2015 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 24 Sep 2015 09:32:29 +0200 Subject: [Scilab-users] How to replace Matlab stairs function in Scilab In-Reply-To: <1443064310459-4032896.post@n3.nabble.com> References: <001801c9a18c$87ec6640$97c532c0$@tschische@cisc.at> <1443064310459-4032896.post@n3.nabble.com> Message-ID: <5603A70D.2030807@inria.fr> Thers is no stair function but you can obtain this king of plot using the polyline_properties: clf;plot(sin(linspace(0,2*%pi,40))) e=gce();//plot creates an entity of type compound p=e.children;//the handle on the polyline p.polyline_style=2; //set stair case mode Serge Steer Le 24/09/2015 05:11, Robert McLean MD PhD a ?crit : > So here is what I did for the stairs graph: > > // we are going to make a stair step graphing program in scilab > // o------o > // o--o | | > // | | o---o > // o----o > // > // We take the vector (x1,x2,x3,...,xn) and (y1,y2,y3,...,yn) and instead of > // graphing a lines from the data points (x1,y1) to (x2,y2), (x2,y2) to > (x3,y3), > // etc., we graph (x1,y1) to (x2,y1) then (x2,y1) to (x2,y2), etc. > // > // the number of graphed points goes from n to 2n-1. > > // (x1,x2,...,xn) > // (y1,y2,...,yn) goes to > // (x1,x2,x2,x3,x3,x4,x4,...) > // (y1,y1,y2,y2,y3,y3,y4,...) > > function stairs(x,y) > n=length(x); > x_indices=int((1:2*n-1)/2)+1; // gives 1,2,2,3,3,...,2n-1,2n-1 > x_ss=x(x_indices); // the stair step graph's x values > y_indices=int((2:2*n)/2); // gives 1,1,2,2,...,2n-2,2n-2,2n-1 > y_ss=y(y_indices) > plot2d(x_ss,y_ss) > endfunction > > // We create an example: > n=10; > x=linspace(0,2,n); > x=x.*x; //irregularly spaced x interval points from 0 to 4 > y=sin(x*%pi); > stairs(x,y) > > > > -- > View this message in context: http://mailinglists.scilab.org/How-to-replace-Matlab-stairs-function-in-Scilab-tp2615846p4032896.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Thu Sep 24 09:34:53 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 24 Sep 2015 09:34:53 +0200 Subject: [Scilab-users] How to replace Matlab stairs function in Scilab In-Reply-To: <1443064310459-4032896.post@n3.nabble.com> References: <001801c9a18c$87ec6640$97c532c0$@tschische@cisc.at> <1443064310459-4032896.post@n3.nabble.com> Message-ID: <5603A79D.4050507@free.fr> Hello, Le 24/09/2015 05:11, Robert McLean MD PhD a ?crit : > So here is what I did for the stairs graph: > .../... > function stairs(x,y) > n=length(x); > x_indices=int((1:2*n-1)/2)+1; // gives 1,2,2,3,3,...,2n-1,2n-1 > x_ss=x(x_indices); // the stair step graph's x values > y_indices=int((2:2*n)/2); // gives 1,1,2,2,...,2n-2,2n-2,2n-1 > y_ss=y(y_indices) > plot2d(x_ss,y_ss) > endfunction > > // We create an example: > n=10; > x=linspace(0,2,n); > x=x.*x; //irregularly spaced x interval points from 0 to 4 > y=sin(x*%pi); > stairs(x,y) // either plot2d2(x,y) // or.. plot2d(x,y) e = gce(); e.children(1).polyline_style=2; // does the same The polyline_style property enables switching between various plotting modes. help Graphics // http://help.scilab.org/docs/5.5.2/en_US/Graphics.html help polyline_properties // http://help.scilab.org/docs/5.5.2/en_US/polyline_properties.html HTH Samuel Gougeon From david.cheze at cea.fr Sun Sep 27 12:53:37 2015 From: david.cheze at cea.fr (=?UTF-8?Q?David_Ch=C3=A8ze?=) Date: Sun, 27 Sep 2015 03:53:37 -0700 (MST) Subject: [Scilab-users] multiple element by element between large matrix and vector Message-ID: <1443351217820-4032900.post@n3.nabble.com> Hi all, I was wondering what are the possibilities to do a product element by element between a matrix A (m rows ,n columns)and a vector (let say column vector v (m elements) ): I want each element of each column of A to be multiplied by each element of v at the same row. What I'm using for now is a product by a diagonal matrix based on v. For large matrix in data manipulation (typ. 100000 rows), it's necessary to use sparse to allocate better the diag matrix otherwise it's out of memory for usual machine. So i'm using --> diag(sparse(v)) * A Have you best practise to share on this topic ? Thank you all, David -- View this message in context: http://mailinglists.scilab.org/multiple-element-by-element-between-large-matrix-and-vector-tp4032900.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sun Sep 27 13:43:03 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 27 Sep 2015 13:43:03 +0200 Subject: [Scilab-users] multiple element by element between large matrix and vector In-Reply-To: <1443351217820-4032900.post@n3.nabble.com> References: <1443351217820-4032900.post@n3.nabble.com> Message-ID: <5607D647.7090104@free.fr> Hi David, Le 27/09/2015 12:53, David Ch?ze a ?crit : > Hi all, > > I was wondering what are the possibilities to do a product element by > element between a matrix A (m rows ,n columns)and a vector (let say column > vector v (m elements) ): I want each element of each column of A to be > multiplied by each element of v at the same row. What I'm using for now is a > product by a diagonal matrix based on v. For large matrix in data > manipulation (typ. 100000 rows), it's necessary to use sparse to allocate > better the diag matrix otherwise it's out of memory for usual machine. > So i'm using --> diag(sparse(v)) * A > > Have you best practise to share on this topic ? . I am not sure to catch what you want to do, noticeably what is the format of the result you expect. AFAIU, i would do A .* (v*ones(1,size(A,2))) Samuel From sgougeon at free.fr Sun Sep 27 14:00:28 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 27 Sep 2015 14:00:28 +0200 Subject: [Scilab-users] multiple element by element between large matrix and vector In-Reply-To: <1443351217820-4032900.post@n3.nabble.com> References: <1443351217820-4032900.post@n3.nabble.com> Message-ID: <5607DA5C.9000201@free.fr> Le 27/09/2015 12:53, David Ch?ze a ?crit : > .../... For large matrix in data > manipulation (typ. 100000 rows), it's necessary to use sparse to allocate > better the diag matrix otherwise it's out of memory for usual machine. > So i'm using --> diag(sparse(v)) * A . The sparse encoding may become bulkier than the dense one if the actual density of contents is not low. Now, are A or/and v actually sparse (i mean with a low density)? You did not give infos about that. Samuel From tim at wescottdesign.com Sun Sep 27 22:38:29 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 27 Sep 2015 13:38:29 -0700 Subject: [Scilab-users] multiple element by element between large matrix and vector In-Reply-To: <5607D647.7090104@free.fr> References: <1443351217820-4032900.post@n3.nabble.com> <5607D647.7090104@free.fr> Message-ID: <1443386309.4028.99.camel@Servo> On Sun, 2015-09-27 at 13:43 +0200, Samuel Gougeon wrote: > Hi David, > > Le 27/09/2015 12:53, David Ch?ze a ?crit : > > Hi all, > > > > I was wondering what are the possibilities to do a product element by > > element between a matrix A (m rows ,n columns)and a vector (let say column > > vector v (m elements) ): I want each element of each column of A to be > > multiplied by each element of v at the same row. What I'm using for now is a > > product by a diagonal matrix based on v. For large matrix in data > > manipulation (typ. 100000 rows), it's necessary to use sparse to allocate > > better the diag matrix otherwise it's out of memory for usual machine. > > So i'm using --> diag(sparse(v)) * A > > > > Have you best practise to share on this topic ? > . > I am not sure to catch what you want to do, noticeably what is the > format of the result you expect. > AFAIU, i would do > A .* (v*ones(1,size(A,2))) "Otherwise it's out of memory for usual machine" Meaning, he tried that, and it didn't work. So he does what DOES work, which is diag(sparse(v)) * A This makes the matrix on the left sparse, with a populated diagonal and all the rest zeros (presumably v is fully populated). And, as David has discovered experimentally, it does not run him out of stack space. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From tim at wescottdesign.com Sun Sep 27 22:44:51 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 27 Sep 2015 13:44:51 -0700 Subject: [Scilab-users] multiple element by element between large matrix and vector In-Reply-To: <1443351217820-4032900.post@n3.nabble.com> References: <1443351217820-4032900.post@n3.nabble.com> Message-ID: <1443386691.4028.105.camel@Servo> On Sun, 2015-09-27 at 03:53 -0700, David Ch?ze wrote: > Hi all, > > I was wondering what are the possibilities to do a product element by > element between a matrix A (m rows ,n columns)and a vector (let say column > vector v (m elements) ): I want each element of each column of A to be > multiplied by each element of v at the same row. What I'm using for now is a > product by a diagonal matrix based on v. For large matrix in data > manipulation (typ. 100000 rows), it's necessary to use sparse to allocate > better the diag matrix otherwise it's out of memory for usual machine. > So i'm using --> diag(sparse(v)) * A > > Have you best practice to share on this topic ? You may already be using the best way. Something to try would be B = A; for n = 1:size(B, 1) B(n, :) = v(n) * A(n, :); end I suspect it'll be slower, but you can always give it a whirl and see. Use tic() and toc() for timing. If you want to engage in heroic measures, write a C or FORTRAN function to do what you want, and then learn how to dynamically link it to Scilab. I've done this in the past for quaternion arithmetic in a Kalman filter, but it was a lot of work and not 100% robust in the face of Scilab upgrades. Also, if you don't already know about it, stacksize is a handy Scilab function if you're working with large data arrays. "stacksize max" will either give you the biggest Scilab stack that can be had or crash your machine, depending on your version (it appears to work in the current version). "stacksize(nnn)" will set your stacksize to nnn, without crashing your machine (to my knowledge). "stacksize" will report the current stacksize. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From david.cheze at cea.fr Mon Sep 28 10:36:51 2015 From: david.cheze at cea.fr (CHEZE David 227480) Date: Mon, 28 Sep 2015 08:36:51 +0000 Subject: [Scilab-users] multiple element by element between large matrix and vector In-Reply-To: <1443386691.4028.105.camel@Servo> References: <1443351217820-4032900.post@n3.nabble.com> <1443386691.4028.105.camel@Servo> Message-ID: Hi , Indeed it's the way I found to get it work on my machine. Each element (double) of v is distinct of each other, it's a kind of sizing factor that I want to apply on all the columns of matrix A (double), according to index of the row. Usually for such element by element I would have done: B=A; For k=1:size(v,1) B(:,k)=A(:,k) .* v end but it's a loop that I want to remove on speeding-up purpose therefore I tried the proposed workaround. Thank you for your feedback. David -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de Tim Wescott Envoy??: dimanche 27 septembre 2015 22:45 ??: Users mailing list for Scilab Objet?: Re: [Scilab-users] multiple element by element between large matrix and vector On Sun, 2015-09-27 at 03:53 -0700, David Ch?ze wrote: > Hi all, > > I was wondering what are the possibilities to do a product element by > element between a matrix A (m rows ,n columns)and a vector (let say > column vector v (m elements) ): I want each element of each column of > A to be multiplied by each element of v at the same row. What I'm > using for now is a product by a diagonal matrix based on v. For large > matrix in data manipulation (typ. 100000 rows), it's necessary to use > sparse to allocate better the diag matrix otherwise it's out of memory for usual machine. > So i'm using --> diag(sparse(v)) * A > > Have you best practice to share on this topic ? You may already be using the best way. Something to try would be B = A; for n = 1:size(B, 1) B(n, :) = v(n) * A(n, :); end I suspect it'll be slower, but you can always give it a whirl and see. Use tic() and toc() for timing. If you want to engage in heroic measures, write a C or FORTRAN function to do what you want, and then learn how to dynamically link it to Scilab. I've done this in the past for quaternion arithmetic in a Kalman filter, but it was a lot of work and not 100% robust in the face of Scilab upgrades. Also, if you don't already know about it, stacksize is a handy Scilab function if you're working with large data arrays. "stacksize max" will either give you the biggest Scilab stack that can be had or crash your machine, depending on your version (it appears to work in the current version). "stacksize(nnn)" will set your stacksize to nnn, without crashing your machine (to my knowledge). "stacksize" will report the current stacksize. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From clement.david at scilab-enterprises.com Mon Sep 28 12:01:13 2015 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 28 Sep 2015 12:01:13 +0200 Subject: [Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) Message-ID: <1443434473.3942.29.camel@scilab-enterprises.com> Hello all, > Also, if you don't already know about it, stacksize is a handy Scilab > function if you're working with large data arrays. "stacksize max" > will > either give you the biggest Scilab stack that can be had or crash > your > machine, depending on your version (it appears to work in the current > version). "stacksize(nnn)" will set your stacksize to nnn, without > crashing your machine (to my knowledge). "stacksize" will report the > current stacksize. As a reference, David posted a bug on that http://bugzilla.scilab.org/show_bug.cgi?id=14176?and he targets Scilab 6. So I have a question on your needs for Scilab 6. There is currently no more stacksize as all the system's memory is available. To protect users, I suggested to re-introduce `stacksize` with a changed behavior : * M=stacksize(N) : will set N * sizeof(double) bytes available on the Scilab datatypes raw memory will return M the previous sett'ed value * stacksize('max') : will disable any memory restriction ## Why re-introducing `stacksize` ? On my Linux system (with 8Go of RAM and some applications started), allocating all my memory (like with `zeros(2**30,2**3)`) slow my computer down and succeed after a lot of time. Reducing the memory available to Scilab using `stacksize` will help user discover algorithm or memory issues more rapidly and without swapping most of the other applications *by default* . My point is not to limit the available memory issue but ease language usage for new-comers by protect them against typo or mis-design algorithms. Awaiting your opinion, -- Cl?ment David From antoine.monmayrant at laas.fr Mon Sep 28 14:01:49 2015 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Mon, 28 Sep 2015 14:01:49 +0200 Subject: [Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) In-Reply-To: <1443434473.3942.29.camel@scilab-enterprises.com> References: <1443434473.3942.29.camel@scilab-enterprises.com> Message-ID: <56092C2D.4070509@laas.fr> I second this proposal, I think it's not a good thing for scilab to allow "by default" to bring someone's computer to a crawl. It's a good way to turn users away. For me, this proposal fits in the same category of improvements than any solution to the forgotten ";" of death (if M is a huge matrix and you type "M" instead of "M;", you are greeted with an endless printing of numbers that you cannot interrupt, even with Ctrl+C). Can't we at least get a warning when we tend to consume way too much memory (ie above a certain % of the total available memory)? Cheers, Antoine Le 09/28/2015 12:01 PM, Cl?ment David a ?crit : > Hello all, > >> Also, if you don't already know about it, stacksize is a handy Scilab >> function if you're working with large data arrays. "stacksize max" >> will >> either give you the biggest Scilab stack that can be had or crash >> your >> machine, depending on your version (it appears to work in the current >> version). "stacksize(nnn)" will set your stacksize to nnn, without >> crashing your machine (to my knowledge). "stacksize" will report the >> current stacksize. > As a reference, David posted a bug on that > http://bugzilla.scilab.org/show_bug.cgi?id=14176 and he targets Scilab > 6. > > So I have a question on your needs for Scilab 6. There is currently no > more stacksize as all the system's memory is available. To protect > users, I suggested to re-introduce `stacksize` with a changed behavior > : > > * M=stacksize(N) : will set N * sizeof(double) bytes available on the > Scilab datatypes raw memory > will return M the previous sett'ed value > * stacksize('max') : will disable any memory restriction > > ## Why re-introducing `stacksize` ? > > On my Linux system (with 8Go of RAM and some applications started), > allocating all my memory (like with `zeros(2**30,2**3)`) slow my > computer down and succeed after a lot of time. Reducing the memory > available to Scilab using `stacksize` will help user discover algorithm > or memory issues more rapidly and without swapping most of the other > applications *by default* . > > My point is not to limit the available memory issue but ease language > usage for new-comers by protect them against typo or mis-design > algorithms. > > Awaiting your opinion, > > -- > Cl?ment David > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From david.cheze at cea.fr Mon Sep 28 14:37:44 2015 From: david.cheze at cea.fr (CHEZE David 227480) Date: Mon, 28 Sep 2015 12:37:44 +0000 Subject: [Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) In-Reply-To: <56092C2D.4070509@laas.fr> References: <1443434473.3942.29.camel@scilab-enterprises.com> <56092C2D.4070509@laas.fr> Message-ID: I agree with the proposal to reintroduce stacksize for the reasons explained. As Antoine suggests, It would make sense to have a safe "default" value for the "default" max allocable memory, related to % of installed hardware memory (2, 4, 8.. Go) and appropriate warnings when you go above. Then user could set by himself a desired max allocable memory value and in this case, if you try to allocate more, Scilab issues an error of max memory reached. I think this could satisfy each user: for the first works on new data, you might be happy to have the max possible memory to run first your script and see the first results (default on stacksize), eventually being aware of risk of memory issue (warnings), then you could improve robustness of your script by tuning code and sizing the memory as further steps. Thanks, David Ch?ze ? -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de Antoine Monmayrant Envoy??: lundi 28 septembre 2015 14:02 ??: users at lists.scilab.org Objet?: Re: [Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) I second this proposal, I think it's not a good thing for scilab to allow "by default" to bring someone's computer to a crawl. It's a good way to turn users away. For me, this proposal fits in the same category of improvements than any solution to the forgotten ";" of death (if M is a huge matrix and you type "M" instead of "M;", you are greeted with an endless printing of numbers that you cannot interrupt, even with Ctrl+C). Can't we at least get a warning when we tend to consume way too much memory (ie above a certain % of the total available memory)? Cheers, Antoine Le 09/28/2015 12:01 PM, Cl?ment David a ?crit : > Hello all, > >> Also, if you don't already know about it, stacksize is a handy Scilab >> function if you're working with large data arrays. "stacksize max" >> will >> either give you the biggest Scilab stack that can be had or crash >> your machine, depending on your version (it appears to work in the >> current version). "stacksize(nnn)" will set your stacksize to nnn, >> without crashing your machine (to my knowledge). "stacksize" will >> report the current stacksize. > As a reference, David posted a bug on that > http://bugzilla.scilab.org/show_bug.cgi?id=14176 and he targets Scilab > 6. > > So I have a question on your needs for Scilab 6. There is currently no > more stacksize as all the system's memory is available. To protect > users, I suggested to re-introduce `stacksize` with a changed behavior > : > > * M=stacksize(N) : will set N * sizeof(double) bytes available on > the Scilab datatypes raw memory > will return M the previous sett'ed value > * stacksize('max') : will disable any memory restriction > > ## Why re-introducing `stacksize` ? > > On my Linux system (with 8Go of RAM and some applications started), > allocating all my memory (like with `zeros(2**30,2**3)`) slow my > computer down and succeed after a lot of time. Reducing the memory > available to Scilab using `stacksize` will help user discover > algorithm or memory issues more rapidly and without swapping most of > the other applications *by default* . > > My point is not to limit the available memory issue but ease language > usage for new-comers by protect them against typo or mis-design > algorithms. > > Awaiting your opinion, > > -- > Cl?ment David > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From antoine.monmayrant at laas.fr Mon Sep 28 15:47:44 2015 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Mon, 28 Sep 2015 15:47:44 +0200 Subject: [Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) In-Reply-To: References: <1443434473.3942.29.camel@scilab-enterprises.com> <56092C2D.4070509@laas.fr> Message-ID: <56094500.10907@laas.fr> Le 09/28/2015 02:37 PM, CHEZE David 227480 a ?crit : > I agree with the proposal to reintroduce stacksize for the reasons explained. > As Antoine suggests, It would make sense to have a safe "default" value for the "default" max allocable memory, related to % of installed hardware memory (2, 4, 8.. Go) and appropriate warnings when you go above. Then user could set by himself a desired max allocable memory value and in this case, if you try to allocate more, Scilab issues an error of max memory reached. > I think this could satisfy each user: for the first works on new data, you might be happy to have the max possible memory to run first your script and see the first results (default on stacksize), eventually being aware of risk of memory issue (warnings), then you could improve robustness of your script by tuning code and sizing the memory as further steps. > Thanks, > > David Ch?ze Should this be turned into a bug report or a SEP? What would make more sense? Out of topic, but what about the missing ";" of death ? I quite like what Julia is doing by omitting the central part of arrays, only showing the head and tail: julia> rand(10000,1) 10000x1 Array{Float64,2}: 0.492459 0.865151 0.269796 0.409073 0.642442 0.468003 0.450019 0.766186 0.419766 0.885939 0.423559 0.416282 0.644324 0.0867144 ? 0.675171 0.0554125 0.159523 0.520639 0.479544 0.694801 0.421987 0.57718 0.770263 0.397439 0.392381 0.698025 0.31154 What do you think? Antoine > > > -----Message d'origine----- > De : users [mailto:users-bounces at lists.scilab.org] De la part de Antoine Monmayrant > Envoy? : lundi 28 septembre 2015 14:02 > ? : users at lists.scilab.org > Objet : Re: [Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) > > I second this proposal, I think it's not a good thing for scilab to allow "by default" to bring someone's computer to a crawl. > It's a good way to turn users away. > For me, this proposal fits in the same category of improvements than any solution to the forgotten ";" of death (if M is a huge matrix and you type "M" instead of "M;", you are greeted with an endless printing of numbers that you cannot interrupt, even with Ctrl+C). > Can't we at least get a warning when we tend to consume way too much memory (ie above a certain % of the total available memory)? > > Cheers, > > Antoine > > Le 09/28/2015 12:01 PM, Cl?ment David a ?crit : >> Hello all, >> >>> Also, if you don't already know about it, stacksize is a handy Scilab >>> function if you're working with large data arrays. "stacksize max" >>> will >>> either give you the biggest Scilab stack that can be had or crash >>> your machine, depending on your version (it appears to work in the >>> current version). "stacksize(nnn)" will set your stacksize to nnn, >>> without crashing your machine (to my knowledge). "stacksize" will >>> report the current stacksize. >> As a reference, David posted a bug on that >> http://bugzilla.scilab.org/show_bug.cgi?id=14176 and he targets Scilab >> 6. >> >> So I have a question on your needs for Scilab 6. There is currently no >> more stacksize as all the system's memory is available. To protect >> users, I suggested to re-introduce `stacksize` with a changed behavior >> : >> >> * M=stacksize(N) : will set N * sizeof(double) bytes available on >> the Scilab datatypes raw memory >> will return M the previous sett'ed value >> * stacksize('max') : will disable any memory restriction >> >> ## Why re-introducing `stacksize` ? >> >> On my Linux system (with 8Go of RAM and some applications started), >> allocating all my memory (like with `zeros(2**30,2**3)`) slow my >> computer down and succeed after a lot of time. Reducing the memory >> available to Scilab using `stacksize` will help user discover >> algorithm or memory issues more rapidly and without swapping most of >> the other applications *by default* . >> >> My point is not to limit the available memory issue but ease language >> usage for new-comers by protect them against typo or mis-design >> algorithms. >> >> Awaiting your opinion, >> >> -- >> Cl?ment David >> _______________________________________________ >> 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 clement.david at scilab-enterprises.com Mon Sep 28 17:00:44 2015 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 28 Sep 2015 17:00:44 +0200 Subject: [Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) In-Reply-To: <56094500.10907@laas.fr> References: <1443434473.3942.29.camel@scilab-enterprises.com> <56092C2D.4070509@laas.fr> <56094500.10907@laas.fr> Message-ID: <1443452444.3942.41.camel@scilab-enterprises.com> Hello Antoine, Le lundi 28 septembre 2015 ? 15:47 +0200, Antoine Monmayrant a ?crit : > Should this be turned into a bug report or a SEP? > What would make more sense? Well, this started as a bug report but closed as worksforme as it works on my machine. For me this behavior change should not be on a SEP as we are on a major release but should be clearly state in the documentation (history part). >From the user perspective, the common `stacksize("max")` does not have a modified meaning but behaves differently. In my view, this re -introduction is kind of an "implementation detail" ; the only strong point is that Scilab 6 has been presented as a Scilab without stack limitation (and thus without `stacksize`). > Out of topic, but what about the missing ";" of death ? > I quite like what Julia is doing by omitting the central part of > arrays, > only showing the head and tail: Seems linked to the `lines` function. Would you open another ML thread on that topic please ? -- Cl?ment From amonmayr at laas.fr Mon Sep 28 21:03:15 2015 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Mon, 28 Sep 2015 21:03:15 +0200 Subject: [Scilab-users] Sound acquisition with Scilab under Linux Message-ID: <7516-56098f00-3-74882c80@106630982> Hi all, Well, everything is in the title: how can I acquire sound in Scilab under Linux? The only package I've found so far is only working under Windows? Cheers, Antoine From clement.david at scilab-enterprises.com Tue Sep 29 08:16:45 2015 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Tue, 29 Sep 2015 08:16:45 +0200 Subject: [Scilab-users] Sound acquisition with Scilab under Linux In-Reply-To: <7516-56098f00-3-74882c80@106630982> References: <7516-56098f00-3-74882c80@106630982> Message-ID: <1443507405.2867.9.camel@scilab-enterprises.com> Hello, To handle a cross-platform sound handling in Scilab I suggest you to take a look at JIMS and the "Java Sound API". Not sure if it will fit your needs but might be. Note: another more advanced approach is to use SWIG-Scilab to generate the mapping of a library (Gstreamer might be a good cross platform candidate). Regards, -- Cl?ment Le lundi 28 septembre 2015 ? 21:03 +0200, Antoine Monmayrant a ?crit : > Hi all, > > Well, everything is in the title: how can I acquire sound in Scilab > under Linux? > The only package I've found so far is only working under Windows? > > Cheers, > > Antoine > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From btoven66 at gmail.com Tue Sep 29 15:58:55 2015 From: btoven66 at gmail.com (Peter Q.) Date: Tue, 29 Sep 2015 08:58:55 -0500 Subject: [Scilab-users] Function Message-ID: Hi. I need your help. Is there a function for distance between two points? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jasper at amsterchem.com Tue Sep 29 16:19:24 2015 From: jasper at amsterchem.com (jasper van baten) Date: Tue, 29 Sep 2015 16:19:24 +0200 Subject: [Scilab-users] Function In-Reply-To: References: Message-ID: <560A9DEC.9090808@amsterchem.com> sqrt(sum((a-b).^2)) if your points are stored in vectors a and b. Best wishes, Jasper On 9/29/2015 15:58, Peter Q. wrote: > > Hi. > I need your help. > Is there a function for distance between two points? > Thanks in advance. > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Tue Sep 29 16:20:32 2015 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 29 Sep 2015 16:20:32 +0200 Subject: [Scilab-users] Function In-Reply-To: References: Message-ID: <560A9E30.4060503@inria.fr> Le 29/09/2015 15:58, Peter Q. a ?crit : > > Hi. > I need your help. > Is there a function for distance between two points? > If your points are given by cartesian coordinates stored in 2 arrays p1 and p2 you can compute the distance between these 2 points with norm(p2-p1) or equivalently by sqrt(sum(p2-p1).^2) Serge Steer > > Thanks in advance. > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jasper at amsterchem.com Tue Sep 29 16:23:24 2015 From: jasper at amsterchem.com (jasper van baten) Date: Tue, 29 Sep 2015 16:23:24 +0200 Subject: [Scilab-users] Function In-Reply-To: <560A9E30.4060503@inria.fr> References: <560A9E30.4060503@inria.fr> Message-ID: <560A9EDC.9060402@amsterchem.com> I think you are missing brackets there, presuming .^ now operates on the sum? Best wishes, Jasper. On 9/29/2015 16:20, Serge Steer wrote: > Le 29/09/2015 15:58, Peter Q. a ?crit : >> >> Hi. >> I need your help. >> Is there a function for distance between two points? >> > If your points are given by cartesian coordinates stored in 2 arrays > p1 and p2 > you can compute the distance between these 2 points with > norm(p2-p1) > or equivalently by > sqrt(sum(p2-p1).^2) > Serge Steer >> >> Thanks in advance. >> >> >> >> _______________________________________________ >> 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 cfuttrup at gmail.com Tue Sep 29 16:23:04 2015 From: cfuttrup at gmail.com (Claus Futtrup) Date: Tue, 29 Sep 2015 16:23:04 +0200 Subject: [Scilab-users] Function In-Reply-To: References: Message-ID: <560A9EC8.2080709@gmail.com> Hi Peter Q This question is just the strangest question I have ever seen on the Scilab forum. I'm not sure whether I shall think this is spam? ... alternatively, consider reading a Calculus book from high school. Possibly come back with a more well-defined question. Best regards, Claus On 29-09-2015 15:58, Peter Q. wrote: > > Hi. > I need your help. > Is there a function for distance between two points? > Thanks in advance. > > > > _______________________________________________ > 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 Sep 29 20:52:36 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 29 Sep 2015 20:52:36 +0200 Subject: [Scilab-users] Function In-Reply-To: References: Message-ID: <560ADDF4.5040204@free.fr> Hi, Le 29/09/2015 15:58, Peter Q. a ?crit : > > Hi. > I need your help. > Is there a function for distance between two points? > Thanks in advance. > . Sharing the thoughtful skepticism of Claus, i would say: If the points are lying on a sphere and you are looking for the shortest direct arc linking them along the sphere, the Wikipedia page about spherical trigonometry might help you: https://en.wikipedia.org/wiki/Spherical_trigonometry Then, the usual cos(), and sin() Scilab functions will allow you implementing the relevant spherical formula. ;) Samuel Gougeon From btoven66 at gmail.com Tue Sep 29 21:34:16 2015 From: btoven66 at gmail.com (Peter Q.) Date: Tue, 29 Sep 2015 14:34:16 -0500 Subject: [Scilab-users] Function In-Reply-To: <560A9EC8.2080709@gmail.com> References: <560A9EC8.2080709@gmail.com> Message-ID: Thanks guys for answer. Two points on plane; norm and sqrt work. On Sep 29, 2015 9:26 AM, "Claus Futtrup" wrote: > Hi Peter Q > > This question is just the strangest question I have ever seen on the > Scilab forum. I'm not sure whether I shall think this is spam? ... > alternatively, consider reading a Calculus book from high school. Possibly > come back with a more well-defined question. > > Best regards, > Claus > > On 29-09-2015 15:58, Peter Q. wrote: > > Hi. > I need your help. > Is there a function for distance between two points? > Thanks in advance. > > > _______________________________________________ > users mailing listusers at lists.scilab.orghttp://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 contact at pierre-vuillemin.fr Tue Sep 29 16:20:17 2015 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Tue, 29 Sep 2015 16:20:17 +0200 Subject: [Scilab-users] Strange behaviour with for loops Message-ID: Hello, In the help, it is specified that the syntax 'for e = l ...' when l is a list is authorised. When l is replaced by a vector, the result appears to depend on whether its a column or row vector : With this code, the for loops runs 3 times and each time i is equal to another value of the vector idx idx =[1 2 3]; for i = idx disp("newIter") disp(i) end When the vector idx is a column vector now, there is only one loop and i is equal to the vector idx idx = [1 2 3]'; for i = idx disp("newIter") disp(i) end Is this behaviour intended? Pierre Vuillemin From sgougeon at free.fr Wed Sep 30 09:50:52 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 30 Sep 2015 09:50:52 +0200 Subject: [Scilab-users] Strange behaviour with for loops In-Reply-To: References: Message-ID: <560B945C.7010404@free.fr> Hello Pierre, Le 29/09/2015 16:20, Pierre Vuillemin a ?crit : > Hello, > In the help, it is specified that the syntax 'for e = l ...' when l is > a list is authorised. When l is replaced by a vector, the result > appears to depend on whether its a column or row vector : > .../... > Is this behaviour intended? . Yes, and it is as well documented: -->help for "Description: .../... If expression is a matrix or a row vector, variable takes as values the values of each column of the matrix." Samuel Gougeon From contact at pierre-vuillemin.fr Wed Sep 30 10:09:01 2015 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Wed, 30 Sep 2015 10:09:01 +0200 Subject: [Scilab-users] Strange behaviour with for loops In-Reply-To: <560B945C.7010404@free.fr> References: <560B945C.7010404@free.fr> Message-ID: <521b06a65473264d9cd41131b03bf9ff@pierre-vuillemin.fr> My bad, I was only focused on the list part of the help... Thank you, Pierre Le 30.09.2015 09:50, Samuel Gougeon a ?crit?: > Hello Pierre, > Le 29/09/2015 16:20, Pierre Vuillemin a ?crit : >> Hello, >> In the help, it is specified that the syntax 'for e = l ...' when l is >> a list is authorised. When l is replaced by a vector, the result >> appears to depend on whether its a column or row vector : >> .../... >> Is this behaviour intended? > . > Yes, and it is as well documented: > -->help for > "Description: .../... If expression is a matrix or a row vector, > variable takes as values the values of each column of the matrix." > > Samuel Gougeon > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Christophe.Dang at sidel.com Wed Sep 30 10:18:04 2015 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 30 Sep 2015 08:18:04 +0000 Subject: [Scilab-users] Function In-Reply-To: References: <560A9EC8.2080709@gmail.com> Message-ID: Hello, > De : users [mailto:users-bounces at lists.scilab.org] De la part de Peter Q. > Envoy? : mardi 29 septembre 2015 21:34 > > Thanks guys for answer. You're welcome. I personally think that we should sometimes simply answer elementary questions without sarcasm, as it is good news: the popularity of Scilab increases and people start using it without being senior calculators (this is also for myself, as I confess I have been myself sometimes sarcastic). If we suspect some lazy student, maybe we could discuss to have a common and adapted answer, such as asking first for the formulas before helping coding it. Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From Christophe.Dang at sidel.com Wed Sep 30 10:26:47 2015 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 30 Sep 2015 08:26:47 +0000 Subject: [Scilab-users] Strange behaviour with for loops In-Reply-To: <560B945C.7010404@free.fr> References: <560B945C.7010404@free.fr> Message-ID: Hello, > De Samuel Gougeon > Envoy? : mercredi 30 septembre 2015 09:51 > > Le 29/09/2015 16:20, Pierre Vuillemin a ?crit : > > > > Is this behaviour intended? > > Yes, and it is as well documented: Hint: you can transform any matrix A into a line vector using A(:)' So in the present case, try the following code and see the difference idx = [1 2 3]'; for i = idx(:)' disp("newIter") disp(i) end Hope this helps -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From sgougeon at free.fr Wed Sep 30 10:35:43 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 30 Sep 2015 10:35:43 +0200 Subject: [Scilab-users] setmemory() <= Re: Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) In-Reply-To: <1443434473.3942.29.camel@scilab-enterprises.com> References: <1443434473.3942.29.camel@scilab-enterprises.com> Message-ID: <560B9EDF.4050703@free.fr> Hello Cl?ment, Le 28/09/2015 12:01, Cl?ment David a ?crit : > .../... > So I have a question on your needs for Scilab 6. There is currently no > more stacksize as all the system's memory is available. To protect > users, I suggested to re-introduce `stacksize` with a changed behavior > : > > * M=stacksize(N) : will set N * sizeof(double) bytes available on the > Scilab datatypes raw memory > will return M the previous sett'ed value > * stacksize('max') : will disable any memory restriction > > ## Why re-introducing `stacksize` ? > > On my Linux system (with 8Go of RAM and some applications started), > allocating all my memory (like with `zeros(2**30,2**3)`) slow my > computer down and succeed after a lot of time. Reducing the memory > available to Scilab using `stacksize` will help user discover algorithm > or memory issues more rapidly and without swapping most of the other > applications *by default* . > > My point is not to limit the available memory issue but ease language > usage for new-comers by protect them against typo or mis-design > algorithms. > > Awaiting your opinion, . Since the 6.0.0-a1 release, several bugs somewhat linked to memory saturation were reported. After one of them, you are going to allow users to configure the maximal recursivity depth. It will be a useful improvement to avoid memory overflow, but it is not sufficient to avoid saturations. Indeed, not only the number of recursive calls is involved, but also the quantity of additional intermediate memory used by each call, which usually depends on the recursive level reached, etc. The fact that memory management is changed in Scilab 6 does not kill the need to control the maximal amount of memory to ascribe to each Scilab session, because, unfortunately, operating systems do not always manage the computer ressources in processors and RAM load or interruptions in a relevant or efficient way to avoid "burning" a processor. IMO, this is not a matter of Scilab 5=>6 back compatibility. It is a main specific characteristic of major releases to not be necessarily back-compatible with the previous ones. So, which function with which features ? * setmemory() would be a better name than stacksize(): It is converse to getmemory(). It is more explicit and user-oriented. * it should merge in a whole local intermediate and global memory domains, corresponding to the former stacksize() and gstacksize(). This is another reason to not use "stacksize" as function name. * It should work in Bytes, not in doubles. The documentation has always been somewhat confused about unit used for amounts of memory, mixing "double" with "word" (a word = 8 bytes. not really common for users). The standard unit is either the bit or the byte. There is no reason to stress on the 8-bytes "double". Scilab deals with int8, int16, int32, int64, double. By the way, "double" is an oldies. Amounts of RAM, disk spaces, etc are given in bytes, not in doubles. So, let's make setmemory() working in bytes. * The last question i have in mind is about the Java memory heap that can already be configured through preferences, and reserved to Scilab usages. a) it should be decided whether the memory amount set with setmemory() should take the Java heap into account or not. IMO, it should include it. Or an option should specify it. b) Is the amount set for the java heap reserved for the only Scilab session, or is it shared for all running scilab sessions? It may be an obvious question for a developer, but it is not clear for me. It would deserve to be documented. c) i think that setmemory() should propose an option to set the java heap amount, as a shortcut to the preferences, in such a way to be a "single desk" for all memory settings for scilab. To be discussed. Anyway, thanks for your proposal, since yes, a memory setting function is still needed. Best regards Samuel Gougeon From simon.marchetto at scilab-enterprises.com Wed Sep 30 11:15:16 2015 From: simon.marchetto at scilab-enterprises.com (Simon Marchetto) Date: Wed, 30 Sep 2015 11:15:16 +0200 Subject: [Scilab-users] setmemory() <= Re: Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) In-Reply-To: <560B9EDF.4050703@free.fr> References: <1443434473.3942.29.camel@scilab-enterprises.com> <560B9EDF.4050703@free.fr> Message-ID: <560BA824.6090504@scilab-enterprises.com> Hello, You cannot protect users from OS memory allocation errors. There can be other softwares running on the machine that consume a big amount of memory, like VirtualBox. You can have also low end machines with a low RAM size. The only way is to a implement a dedicated memory manager which allocates a big memory buffer at startup, and manages all the memory allocations in it....exactly what Scilab 5 does. There are some uses cases for which this system can be useful however, but not to prevent coding errors. By the way, the goal of tuning the Java heap size is to optimize the time production servers spend doing garbage collection. I don't think we have this problem in Scilab. Simon Le 30/09/2015 10:35, Samuel Gougeon a ?crit : > Hello Cl?ment, > > Le 28/09/2015 12:01, Cl?ment David a ?crit : >> .../... >> So I have a question on your needs for Scilab 6. There is currently no >> more stacksize as all the system's memory is available. To protect >> users, I suggested to re-introduce `stacksize` with a changed behavior >> : >> >> * M=stacksize(N) : will set N * sizeof(double) bytes available on the >> Scilab datatypes raw memory >> will return M the previous sett'ed value >> * stacksize('max') : will disable any memory restriction >> >> ## Why re-introducing `stacksize` ? >> >> On my Linux system (with 8Go of RAM and some applications started), >> allocating all my memory (like with `zeros(2**30,2**3)`) slow my >> computer down and succeed after a lot of time. Reducing the memory >> available to Scilab using `stacksize` will help user discover algorithm >> or memory issues more rapidly and without swapping most of the other >> applications *by default* . >> >> My point is not to limit the available memory issue but ease language >> usage for new-comers by protect them against typo or mis-design >> algorithms. >> >> Awaiting your opinion, > . > Since the 6.0.0-a1 release, several bugs somewhat linked to memory > saturation were reported. > After one of them, you are going to allow users to configure the > maximal recursivity depth. > It will be a useful improvement to avoid memory overflow, but it is > not sufficient to avoid > saturations. Indeed, not only the number of recursive calls is > involved, but also the > quantity of additional intermediate memory used by each call, which > usually depends on > the recursive level reached, etc. > The fact that memory management is changed in Scilab 6 does not kill > the need to control > the maximal amount of memory to ascribe to each Scilab session, > because, unfortunately, > operating systems do not always manage the computer ressources in > processors and > RAM load or interruptions in a relevant or efficient way to avoid > "burning" a processor. > IMO, this is not a matter of Scilab 5=>6 back compatibility. It is a > main specific characteristic > of major releases to not be necessarily back-compatible with the > previous ones. > So, which function with which features ? > > * setmemory() would be a better name than stacksize(): > It is converse to getmemory(). It is more explicit and user-oriented. > > * it should merge in a whole local intermediate and global memory > domains, corresponding to > the former stacksize() and gstacksize(). > This is another reason to not use "stacksize" as function name. > > * It should work in Bytes, not in doubles. > The documentation has always been somewhat confused about unit used > for amounts of memory, > mixing "double" with "word" (a word = 8 bytes. not really common > for users). > The standard unit is either the bit or the byte. There is no reason > to stress on the 8-bytes "double". > Scilab deals with int8, int16, int32, int64, double. By the way, > "double" is an oldies. > Amounts of RAM, disk spaces, etc are given in bytes, not in doubles. > So, let's make setmemory() working in bytes. > > * The last question i have in mind is about the Java memory heap that > can already be configured > through preferences, and reserved to Scilab usages. > a) it should be decided whether the memory amount set with > setmemory() should take the Java > heap into account or not. IMO, it should include it. Or an > option should specify it. > > b) Is the amount set for the java heap reserved for the only > Scilab session, or is it shared for > all running scilab sessions? It may be an obvious question for > a developer, but it is not > clear for me. It would deserve to be documented. > > c) i think that setmemory() should propose an option to set the > java heap amount, as a > shortcut to the preferences, in such a way to be a "single > desk" for all memory settings > for scilab. > > To be discussed. > Anyway, thanks for your proposal, since yes, a memory setting function > is still needed. > > Best regards > Samuel Gougeon > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Wed Sep 30 16:04:43 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 30 Sep 2015 16:04:43 +0200 Subject: [Scilab-users] setmemory() <= Re: Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector) In-Reply-To: <560BA824.6090504@scilab-enterprises.com> References: <1443434473.3942.29.camel@scilab-enterprises.com> <560B9EDF.4050703@free.fr> <560BA824.6090504@scilab-enterprises.com> Message-ID: <560BEBFB.8040000@free.fr> Hello, > .../... > The only way is to a implement a dedicated memory manager which > allocates a big memory buffer at startup, and manages all the memory > allocations in it....exactly what Scilab 5 does. So, my questions are: * can't the same be implemented in Scilab 6? * If yes: is there a way to implement it in such a way that sharing between global and local+intermediate variables/memory would be set dynamically, in a transparent way for the user that would not have to specify fixed amounts for each kind of variables? * How the "default" buffer is initially sized in Scilab 5? Does it take into account the available memory at the time of launching the Scilab session, such as it could be different from a Scilab session to the other, particularly when several concurrent Scilab sessions are simultaneously run on the same computer? How could it be managed in Scilab 6, while the former Scilab memory limit that became quite smaller than common available RAM does no longer hold? > By the way, the goal of tuning the Java heap size is to optimize the > time production servers spend doing garbage collection. I don't think > we have this problem in Scilab. Which problem are you referring to? Knowing almost nothing about JVM and memory management by Java, i am rather unable to understand the meaning of your answer wrt my initial question about tuning the size of the java heap from Scilab. In a practical way, what can be noticed is that when using a lot of graphics in Scilab -- like for image processing --, some java exceptions can be avoided by increasing the size of the java heap. For practical usage, my remaining questions are: * Is this setting a memory reservation?.. in such a way that increasing the java heap max size makes this memory unavailable for other processes external to Scilab, or even unavailable for other Scilab sessions running on the same computer? * Does each Scilab session have its own java heap, or is the java heap shared? In the first case, including its setting through setmemory() of a session could be meaningful. The meaning of my first post was that, from a user point of view, knowing that the amount of memory involved in a Scilab session is of "Scilab global kind" or of "Scilab intermediate kind" or of "java kind" or of "TCL kind" (for so-called TCL interpreters) is of no importance. The only thing that really matters is that my calculations and graphics work within a specified total amount of memory. In an ideal world, even the size of the java heap should be dynamically set as a part of the total amount of memory set for the Scilab session. It might not be possible, but it was the idea of my question/discussion. Samuel PS: By the way, in Scilab 5, are the TCL variables -- that are "persistent" -- stored in the global area, or anywhere else? From cfuttrup at gmail.com Wed Sep 30 23:51:11 2015 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 30 Sep 2015 23:51:11 +0200 Subject: [Scilab-users] Function In-Reply-To: References: <560A9EC8.2080709@gmail.com> Message-ID: <560C594F.1070803@gmail.com> Hi Christophe, et al. Sarcasm can create an unpleasant atmosphere, which is generally not desirable in a forum. Just ot be clear, I don't see any sarcasm in my own response. If you see it otherwise, please explain. When it comes to my points, please bear in mind that I did find the question by Peter Q highly suspicious. I think that very simple questions needs to be turned over and studied further. Also please be aware that if young people show up and need answers, it could interfere with educational programs. Therefore skepticism may be just right under certain circumstances. An approach for helpers in the forum could be, that if a question is very simple, consider asking questions, like for example "what is the general purpose?" - and/or - "can you explain more about the problem you're trying to solve?" I appreciate Samuels reply in that the answer may not be so simple, if the space is not a simple cartesian space. This was also part of the thoughts underlying my response. I was thinking, "where's the catch?" I do think that the forum members should be concerned with interfering with educational programs (like classes in school). Best regards, Claus On 30-09-2015 10:18, Dang, Christophe wrote: > Hello, > >> De : users [mailto:users-bounces at lists.scilab.org] De la part de Peter Q. >> Envoy? : mardi 29 septembre 2015 21:34 >> >> Thanks guys for answer. > You're welcome. > > I personally think that we should sometimes simply answer elementary questions without sarcasm, as it is good news: the popularity of Scilab increases and people start using it without being senior calculators (this is also for myself, as I confess I have been myself sometimes sarcastic). > > If we suspect some lazy student, maybe we could discuss to have a common and adapted answer, such as asking first for the formulas before helping coding it. > > Regards > > -- > Christophe Dang Ngoc Chan > Mechanical calculation engineer > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users