From Clement.David at esi-group.com Fri Sep 1 08:32:52 2017 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Fri, 1 Sep 2017 06:32:52 +0000 Subject: [Scilab-users] Server migration lists.scilab.org In-Reply-To: <1504083870.24307.10.camel@esi-group.com> References: <1504083870.24307.10.camel@esi-group.com> Message-ID: <1504247570.2353.2.camel@esi-group.com> Dear users, The migration is complete for this server. Do not hesitate to report any issue on https://bugzilla.scilab.org / Scilab websites product. Thanks for your patience, -- Cl?ment Le mercredi 30 ao?t 2017 ? 09:04 +0000, Cl?ment David a ?crit : > Dear users, > > The mailing list server will be migrated to our new ESI-backed infrastructure. The lists will be > down for 24 to 48 hours ; we will do our best to minimize the down time. > > Sorry for the inconvenience, > > -- > Cl?ment From cfuttrup at gmail.com Fri Sep 1 10:24:30 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 1 Sep 2017 10:24:30 +0200 Subject: [Scilab-users] Server migration lists.scilab.org In-Reply-To: <1504247570.2353.2.camel@esi-group.com> References: <1504083870.24307.10.camel@esi-group.com> <1504247570.2353.2.camel@esi-group.com> Message-ID: Hi Clement Thank you for excellent information in the process. Best regards Claus On Sep 1, 2017 08:33, "Cl?ment David" wrote: > Dear users, > > The migration is complete for this server. Do not hesitate to report any > issue on > https://bugzilla.scilab.org / Scilab websites product. > > Thanks for your patience, > > -- > Cl?ment > > Le mercredi 30 ao?t 2017 ? 09:04 +0000, Cl?ment David a ?crit : > > Dear users, > > > > The mailing list server will be migrated to our new ESI-backed > infrastructure. The lists will be > > down for 24 to 48 hours ; we will do our best to minimize the down time. > > > > Sorry for the inconvenience, > > > > -- > > Cl?ment > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Sep 2 18:19:36 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 2 Sep 2017 18:19:36 +0200 Subject: [Scilab-users] Installing SIVP and IPD upon Scilab Installation In-Reply-To: <1497419391909-4036579.post@n3.nabble.com> References: <1497419391909-4036579.post@n3.nabble.com> Message-ID: <26027c74-030d-cf35-12d1-fcb23d692b38@free.fr> Hello nigamakashkumar Le 14/06/2017 ? 07:49, nigamakashkumar a ?crit : > Hi folks, > > I am currently working on application development through labview, which > uses the Labview to Scilab Gateway (1.31) to run scilab scripts. Also, my > scilab scripts require the toolboxes SIVP (0.5.3) and IPD(8.2) for Image > Processing. > > I intend to make an installer for my application that installs my program, > labview runtime engine and scilab (5.3.3). These part may be done > automatically with the user just clicking next (for my program, runtime > engine and scilab) which would be fairly obvious for them. > > However, I want scilab to install SIVP and IPD too. I would need atoms for > that, since I use the command atomsLoad in my scilab script for labview > (Since scilab GUI is not open in my application). This would require the > user to open up scilab and install SIVP and IPD manually either through GUI > or atomsInstall command. > > I was wondering whether we can save the user from this (and me from writing > detailed instructions and constantly answering queries). Can SIVP and IPD be > installed by calling scilab backend just after installation and installing > the toolboxes. Or better still, by showing the user we are installing > something > but doing it programmatically. > > The only way I can think of that is writing a C-code to first execute Scilab > installer, then call scilab engine and install both the toolboxes using > atomsInstall, thereafter converting this whole process into an executable. > However, I know C very less and it may take a lot of time for me. Is there > any simpler method?? If you are a Windows user, you can do the same in a human-readable batch file, without to have to compile anything. On Linux, it should be also possible to write a similar batch in shell interpreted language. HTH Samuel From rlandersen at gmail.com Sat Sep 2 20:58:08 2017 From: rlandersen at gmail.com (rlandersen) Date: Sat, 2 Sep 2017 11:58:08 -0700 (MST) Subject: [Scilab-users] can not create Scilab Java Main_Class after installation of SL 5.5.0.32 on windows 7 In-Reply-To: <4496DE0B-0F3F-4EFD-A89F-40D9E0AA5615@gmail.com> References: <1440326479863-4032713.post@n3.nabble.com> <1498411303270-4036657.post@n3.nabble.com> <5012af39-429a-6ef3-5b6c-3ab518c158d2@durietz.se> <4496DE0B-0F3F-4EFD-A89F-40D9E0AA5615@gmail.com> Message-ID: <1504378688686-0.post@n3.nabble.com> I still have the problem. Anyone found a solution for this? Please post. Thank you! -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sat Sep 2 21:39:37 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 2 Sep 2017 21:39:37 +0200 Subject: [Scilab-users] can not create Scilab Java Main_Class after installation of SL 5.5.0.32 on windows 7 In-Reply-To: <1504378688686-0.post@n3.nabble.com> References: <1440326479863-4032713.post@n3.nabble.com> <1498411303270-4036657.post@n3.nabble.com> <5012af39-429a-6ef3-5b6c-3ab518c158d2@durietz.se> <4496DE0B-0F3F-4EFD-A89F-40D9E0AA5615@gmail.com> <1504378688686-0.post@n3.nabble.com> Message-ID: <28f995c6-b009-1026-1acf-df6ae7bf4270@free.fr> Le 02/09/2017 ? 20:58, rlandersen a ?crit : > I still have the problem. > > Anyone found a solution for this? > Please post. Does the console version run? It does not run the Java virtual Machine. This may make a difference in your case. If it does, then type --> SCIHOME // in the "safe" scilab session and delete the correponding directory (after closing the Scilab session). It is usually useless to uninstal/reinstal Scilab. Most of problems come from a corrupted file in the SCIHOME directory. Uninstalling Scilab does not remove its SCIHOME reated directory. HTH Samuel From sdr at durietz.se Sun Sep 3 10:08:41 2017 From: sdr at durietz.se (Stefan Du Rietz) Date: Sun, 3 Sep 2017 10:08:41 +0200 Subject: [Scilab-users] can not create Scilab Java Main_Class after installation of SL 5.5.0.32 on windows 7 In-Reply-To: <28f995c6-b009-1026-1acf-df6ae7bf4270@free.fr> References: <1440326479863-4032713.post@n3.nabble.com> <1498411303270-4036657.post@n3.nabble.com> <5012af39-429a-6ef3-5b6c-3ab518c158d2@durietz.se> <4496DE0B-0F3F-4EFD-A89F-40D9E0AA5615@gmail.com> <1504378688686-0.post@n3.nabble.com> <28f995c6-b009-1026-1acf-df6ae7bf4270@free.fr> Message-ID: <4e65a046-2ab7-2811-60ef-602a97a4650c@durietz.se> On 2017-09-02 21:39, Samuel Gougeon wrote: > Le 02/09/2017 ? 20:58, rlandersen a ?crit : >> I still have the problem. >> >> Anyone found a solution for this? >> Please post. > > Does the console version run? It does not run the Java virtual Machine. > This may make a difference in your case. > If it does, then type > --> SCIHOME // in the "safe" scilab session > and delete the correponding directory (after closing the Scilab session). > > It is usually useless to uninstal/reinstal Scilab. Most of problems come > from a corrupted file in the SCIHOME directory. Uninstalling Scilab > does not remove its SCIHOME reated directory. > > HTH > Samuel I also still have the problem with 32-bit Windows 7. Not even does the console version run with a local installation of Scilab 5.5.2 ... And Scilab 5.4.1 has stopped running as well (just an invisible error window)! In computers with Windows 10 or Ubuntu Linux all Scilab versions run. Regards Stefan From payen.pierre at gmail.com Mon Sep 4 15:34:14 2017 From: payen.pierre at gmail.com (Pierre Payen) Date: Mon, 4 Sep 2017 06:34:14 -0700 (MST) Subject: [Scilab-users] equationstoMatrix o GenerateMatrix In-Reply-To: <1504085891088-0.post@n3.nabble.com> References: <1504085891088-0.post@n3.nabble.com> Message-ID: <1504532054014-0.post@n3.nabble.com> As far as I know, no. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Tue Sep 5 20:02:30 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 5 Sep 2017 18:02:30 +0000 Subject: [Scilab-users] equationstoMatrix o GenerateMatrix In-Reply-To: <1504085891088-0.post@n3.nabble.com> References: <1504085891088-0.post@n3.nabble.com> Message-ID: Maybe you could try the 'aff2ab' function? See one twisted example here below: // aff2ab - linear function to A,b conversion deff('y = f(X,D)','A=[1 2 3; -1 0 1;-2 -1 0];c=[-1 0 1]''; x=X(:); y = A*x+c') dimX=[3,1]; D = list(); [A,b]=aff2ab(f,dimX,D); Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Hermes Sent: Wednesday, August 30, 2017 11:38 AM To: users at lists.scilab.org Subject: [Scilab-users] equationstoMatrix o GenerateMatrix Hello, There exists in Scilab a function equivalent to "equationstoMatrix" from MatLab or to "GenerateMatrix" from Maple Hermes Gracias -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonybuchi.okoani at yahoo.com Wed Sep 6 09:27:05 2017 From: tonybuchi.okoani at yahoo.com (tonybuchi.okoani at yahoo.com) Date: Wed, 6 Sep 2017 07:27:05 +0000 (UTC) Subject: [Scilab-users] Email post References: <12081174.3633184.1504682825986.ref@mail.yahoo.com> Message-ID: <12081174.3633184.1504682825986@mail.yahoo.com> My email is tonybuchi.okoani at yahoo.com Thanks for accepting my subscription request. Best Regards! -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonybuchi.okoani at yahoo.com Wed Sep 6 09:34:47 2017 From: tonybuchi.okoani at yahoo.com (tonybuchi.okoani at yahoo.com) Date: Wed, 6 Sep 2017 07:34:47 +0000 (UTC) Subject: [Scilab-users] Question References: <2113165677.3644482.1504683287705.ref@mail.yahoo.com> Message-ID: <2113165677.3644482.1504683287705@mail.yahoo.com> Hello.I am a new user of scilab. Please I wish to find out the advantages of scilab over MATLAB.Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonybuchi.okoani at gmail.com Wed Sep 6 09:38:08 2017 From: tonybuchi.okoani at gmail.com (Tony Okoani) Date: Wed, 6 Sep 2017 09:38:08 +0200 Subject: [Scilab-users] To post my list Message-ID: my email is: tonybuchi.okoani at gmail.com Thanks for accepting my subscription request. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Clement.David at esi-group.com Wed Sep 6 15:43:41 2017 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Wed, 6 Sep 2017 13:43:41 +0000 Subject: [Scilab-users] scilab2c toolbox query In-Reply-To: References: Message-ID: <1504705418.4910.34.camel@esi-group.com> Hello Abhinav, Nice to have someone interested in scilab2c. Currently there is no active maintainer, feel free to contribute to it. > 1) To write a new function, we always have to decide the output sizes according to scalar inputs > or size of input matrix. But, if our output size depends on an element which is a part of matrix, > what can we do to assign the output size accordingly. The current code generation need a C-like arguments representation for the Scilab function to generate the good corresponding C function call. If you wish to have a more dynamic behavior to define the outputs argument you should probably need to serialize/deserialize them in some way to a raw vector. > 2) There are few functions whose output size has no relation to input matrix sizes, or they don't > follow any regular pattern. For example, they depend on rank of input matrix or something else. > For such functions, is there any work around to estimate the size first and assign accordingly in > the Tool Initialisation part. No currently in the Scilab2C code and with my limited understanding, there is no way to compute the number of / size of the arguments. This approach however is fully valid and is partially implemented in the Scilab 6 analysis pass. A completely rewritten Scilab2C could then use the propagated size / types constraints to handle theses dynamic functions. Could you give me a function you wish to add ? Thanks, -- Cl?ment From cfuttrup at gmail.com Wed Sep 6 21:33:22 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 6 Sep 2017 21:33:22 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" Message-ID: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> Hi there I've started to use the prettify functions by Pierre Vuillemin. So far so good in Scilab 5.5 Now I've started to look into Scilab 6 (not least because graphics is much faster), but I get a weird error. If I start Scilab, first time I execute the code, I get an "Invalid buffer." message. Second time I execute the code then I get a bad message: --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) at line??? 93 of executed file C:\Users\claus\Documents\Scilab54\z3mfit.sce ??????????????????????????? 'labels_font_size'? ,? 3,... ??????????????????????????? ^^ Error: syntax error, unexpected "'", expecting "," or ) When I run my script, the first thing my code does - it clears all variables, all graphics and clears console, so it's not "old" stuff from previous run that is the problem. Or ??? The "line 93" is part of the default options in Prettify, where it says labels_font_size. It looks like this: default_options = struct('title_font_size' , 4,... 'labels_font_size' , 3,... 'thicks_font_size' , 2,... 'num_format' , '',... 'leg_font_size' , 3,... 'line_thickness' , 2,... 'xstring_font_size' , 2) Can anyone spot, what is the problem? P.S. This part of the code is in a section that is controlled by an if-statement, and even if I make sure the condition is false (so that the Prettify code is not executed), Scilab still spits out this error. It's really weird - and even weirder it doesn't get the error the first time that the code is executed. P.S. My entire code is ca. 915 lines long + requires input data, so I prefer not to attach it to a post here in the mailing list. Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Thu Sep 7 09:15:16 2017 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 7 Sep 2017 07:15:16 +0000 Subject: [Scilab-users] {EXT} Question In-Reply-To: <2113165677.3644482.1504683287705@mail.yahoo.com> References: <2113165677.3644482.1504683287705.ref@mail.yahoo.com> <2113165677.3644482.1504683287705@mail.yahoo.com> Message-ID: Hello, > De : tonybuchi.okoani at yahoo.com > Envoy? : mercredi 6 septembre 2017 09:35 > > Please I wish to find out the advantages of scilab over MATLAB. A quick search in the mailing list with the keyword "matlab" should give you some answers, e.g.: http://mailinglists.scilab.org/Scilab-users-Matlab-Scilab-td4031174.html 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 contact at pierre-vuillemin.fr Thu Sep 7 08:49:39 2017 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Thu, 07 Sep 2017 08:49:39 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> Message-ID: <9ded171dd4925c3055531353135b1747@pierre-vuillemin.fr> Dear Claus, I've not experienced any issue on Scilab 6 so far with this routine. If this error shows up even if the code is not executed then the error may come from elsewhere? I've had some issues with Scilab 6 error messages pointing out the wrong chunk of code. The "invalid buffer" message may indicate that there is a problem during the first run. I would start by investigating this part. Best regards, Pierre Le 06.09.2017 21:33, Claus Futtrup a ?crit : > Hi there > > I've started to use the prettify functions by Pierre Vuillemin. So far so good in Scilab 5.5 > > Now I've started to look into Scilab 6 (not least because graphics is much faster), but I get a weird error. > > If I start Scilab, first time I execute the code, I get an "Invalid buffer." message. > > Second time I execute the code then I get a bad message: > > --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) > at line 93 of executed file C:\Users\claus\Documents\Scilab54\z3mfit.sce > > 'labels_font_size' , 3,... > ^^ > Error: syntax error, unexpected "'", expecting "," or ) > > When I run my script, the first thing my code does - it clears all variables, all graphics and clears console, so it's not "old" stuff from previous run that is the problem. Or ??? > > The "line 93" is part of the default options in Prettify, where it says labels_font_size. It looks like this: > > default_options = struct('title_font_size' , 4,... > 'labels_font_size' , 3,... > 'thicks_font_size' , 2,... > 'num_format' , '',... > 'leg_font_size' , 3,... > 'line_thickness' , 2,... > 'xstring_font_size' , 2) > > Can anyone spot, what is the problem? > > P.S. This part of the code is in a section that is controlled by an if-statement, and even if I make sure the condition is false (so that the Prettify code is not executed), Scilab still spits out this error. It's really weird - and even weirder it doesn't get the error the first time that the code is executed. > > P.S. My entire code is ca. 915 lines long + requires input data, so I prefer not to attach it to a post here in the mailing list. > > Best regards, > > Claus > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From danaferg at gmail.com Thu Sep 7 17:50:55 2017 From: danaferg at gmail.com (quant) Date: Thu, 7 Sep 2017 08:50:55 -0700 (MST) Subject: [Scilab-users] getd in a script Message-ID: <1504799455256-0.post@n3.nabble.com> I am running Scilab 6 on Windows 8.1. I have a directory named Macros where I have one file - helperfuncs.sci. In the console: I cd to the directory that contains Macros. --> getd('Macros\'); That works. However, when I execute an .sci script that does the same thing I get an error Undefined variable: ?Macros I have tried the call without the '\' and get the same thing. Thanks for the help, Dana -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Thu Sep 7 21:25:07 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 7 Sep 2017 21:25:07 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> Message-ID: <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> Hello Claus, In Scilab, clear is deleterious. As a first hint, i would try commenting it before rerunning the script. Best regards Samuel Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit : > > Hi there > > I've started to use the prettify functions by Pierre Vuillemin. So far > so good in Scilab 5.5 > > Now I've started to look into Scilab 6 (not least because graphics is > much faster), but I get a weird error. > > If I start Scilab, first time I execute the code, I get an "Invalid > buffer." message. > > Second time I execute the code then I get a bad message: > > > --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) > at line 93 of executed file > C:\Users\claus\Documents\Scilab54\z3mfit.sce > > 'labels_font_size' , 3,... > ^^ > Error: syntax error, unexpected "'", expecting "," or ) > > > When I run my script, the first thing my code does - it clears all > variables, all graphics and clears console, so it's not "old" stuff > from previous run that is the problem. Or ??? > > The "line 93" is part of the default options in Prettify, where it > says labels_font_size. It looks like this: > > default_options = struct('title_font_size' , 4,... > 'labels_font_size' , 3,... > 'thicks_font_size' , 2,... > 'num_format' , '',... > 'leg_font_size' , 3,... > 'line_thickness' , 2,... > 'xstring_font_size' , 2) > > Can anyone spot, what is the problem? > > P.S. This part of the code is in a section that is controlled by an > if-statement, and even if I make sure the condition is false (so that > the Prettify code is not executed), Scilab still spits out this error. > It's really weird - and even weirder it doesn't get the error the > first time that the code is executed. > > P.S. My entire code is ca. 915 lines long + requires input data, so I > prefer not to attach it to a post here in the mailing list. > > Best regards, > > Claus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Thu Sep 7 21:45:56 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 7 Sep 2017 21:45:56 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> Message-ID: <6674c9ed-7ee0-c8e9-e540-9cf5d95fc1f2@gmail.com> Hi Samuel, et al. Thanks for the tip, I commented "// clear;" - so this is no longer executed. First script run still generate the "Invalid buffer." error - and second run still generate the line 93 error. This level of debugging is not my strong side. Sorry. This is really weird. I modified my script so that the first line executed is "disp("hello1");" ... I never see this message displayed, only the below error. The only thing that "works" is to close down and restart Scilab. P.S. I believe I looked through the changes to 6.0 to ensure that I wasn't using any functions that cannot work under 6.0, but I might have failed. Is there a tool which can parse a script and give advice? Best regards, Claus On 07-09-2017 21:25, Samuel Gougeon wrote: > Hello Claus, > In Scilab, clear is deleterious. As a first hint, i would try > commenting it before rerunning? the script. > Best regards > Samuel > > Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >> >> Hi there >> >> I've started to use the prettify functions by Pierre Vuillemin. So >> far so good in Scilab 5.5 >> >> Now I've started to look into Scilab 6 (not least because graphics is >> much faster), but I get a weird error. >> >> If I start Scilab, first time I execute the code, I get an "Invalid >> buffer." message. >> >> Second time I execute the code then I get a bad message: >> >> >> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >> at line??? 93 of executed file >> C:\Users\claus\Documents\Scilab54\z3mfit.sce >> >> ??????????????????????????? 'labels_font_size'? ,? 3,... >> ??????????????????????????? ^^ >> Error: syntax error, unexpected "'", expecting "," or ) >> >> >> When I run my script, the first thing my code does - it clears all >> variables, all graphics and clears console, so it's not "old" stuff >> from previous run that is the problem. Or ??? >> >> The "line 93" is part of the default options in Prettify, where it >> says labels_font_size. It looks like this: >> >> default_options = struct('title_font_size' , 4,... >> 'labels_font_size' , 3,... >> 'thicks_font_size' , 2,... >> 'num_format' , '',... >> 'leg_font_size' , 3,... >> 'line_thickness' , 2,... >> 'xstring_font_size' , 2) >> >> Can anyone spot, what is the problem? >> >> P.S. This part of the code is in a section that is controlled by an >> if-statement, and even if I make sure the condition is false (so that >> the Prettify code is not executed), Scilab still spits out this >> error. It's really weird - and even weirder it doesn't get the error >> the first time that the code is executed. >> >> P.S. My entire code is ca. 915 lines long + requires input data, so I >> prefer not to attach it to a post here in the mailing list. >> >> Best regards, >> >> Claus >> > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Thu Sep 7 21:51:56 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 7 Sep 2017 21:51:56 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> Message-ID: Hi Samuel About "clear" I looked and it's still a documented feature in 6.0: https://help.scilab.org/docs/6.0.0/en_US/clear.html I also revisited the 6.0 Release Notes (PDF) and it lists only these as obsolete: Obsolete functions or features w maxfiles is now obsolete. w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use isoview("on"), replot(..) instead. w eval3d will be removed from Scilab 6.1. Please use ndgrid instead. w strcmpi is deprecated. Please use strcmp(..,"i")instead. w square will be removed from Scilab 6.1. Please use gcf().axes_ size and replot instead. ... You might be right that clear is on its way out, but I don't know where to find the information. /Claus On 07-09-2017 21:25, Samuel Gougeon wrote: > Hello Claus, > In Scilab, clear is deleterious. As a first hint, i would try > commenting it before rerunning? the script. > Best regards > Samuel > > Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >> >> Hi there >> >> I've started to use the prettify functions by Pierre Vuillemin. So >> far so good in Scilab 5.5 >> >> Now I've started to look into Scilab 6 (not least because graphics is >> much faster), but I get a weird error. >> >> If I start Scilab, first time I execute the code, I get an "Invalid >> buffer." message. >> >> Second time I execute the code then I get a bad message: >> >> >> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >> at line??? 93 of executed file >> C:\Users\claus\Documents\Scilab54\z3mfit.sce >> >> ??????????????????????????? 'labels_font_size'? ,? 3,... >> ??????????????????????????? ^^ >> Error: syntax error, unexpected "'", expecting "," or ) >> >> >> When I run my script, the first thing my code does - it clears all >> variables, all graphics and clears console, so it's not "old" stuff >> from previous run that is the problem. Or ??? >> >> The "line 93" is part of the default options in Prettify, where it >> says labels_font_size. It looks like this: >> >> default_options = struct('title_font_size' , 4,... >> 'labels_font_size' , 3,... >> 'thicks_font_size' , 2,... >> 'num_format' , '',... >> 'leg_font_size' , 3,... >> 'line_thickness' , 2,... >> 'xstring_font_size' , 2) >> >> Can anyone spot, what is the problem? >> >> P.S. This part of the code is in a section that is controlled by an >> if-statement, and even if I make sure the condition is false (so that >> the Prettify code is not executed), Scilab still spits out this >> error. It's really weird - and even weirder it doesn't get the error >> the first time that the code is executed. >> >> P.S. My entire code is ca. 915 lines long + requires input data, so I >> prefer not to attach it to a post here in the mailing list. >> >> Best regards, >> >> Claus >> > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Thu Sep 7 21:55:02 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 7 Sep 2017 21:55:02 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> Message-ID: <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> Hi all The "Invalid buffer." message becomes even weirder. It is not in the list of error messages: https://help.scilab.org/docs/6.0.0/en_US/error_table.html I guarantee it's not an error message I've made up myself. The entire script does not contain the word "buffer" (or "buffer.") anywhere. /Claus On 07-09-2017 21:25, Samuel Gougeon wrote: > Hello Claus, > In Scilab, clear is deleterious. As a first hint, i would try > commenting it before rerunning? the script. > Best regards > Samuel > > Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >> >> Hi there >> >> I've started to use the prettify functions by Pierre Vuillemin. So >> far so good in Scilab 5.5 >> >> Now I've started to look into Scilab 6 (not least because graphics is >> much faster), but I get a weird error. >> >> If I start Scilab, first time I execute the code, I get an "Invalid >> buffer." message. >> >> Second time I execute the code then I get a bad message: >> >> >> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >> at line??? 93 of executed file >> C:\Users\claus\Documents\Scilab54\z3mfit.sce >> >> ??????????????????????????? 'labels_font_size'? ,? 3,... >> ??????????????????????????? ^^ >> Error: syntax error, unexpected "'", expecting "," or ) >> >> >> When I run my script, the first thing my code does - it clears all >> variables, all graphics and clears console, so it's not "old" stuff >> from previous run that is the problem. Or ??? >> >> The "line 93" is part of the default options in Prettify, where it >> says labels_font_size. It looks like this: >> >> default_options = struct('title_font_size' , 4,... >> 'labels_font_size' , 3,... >> 'thicks_font_size' , 2,... >> 'num_format' , '',... >> 'leg_font_size' , 3,... >> 'line_thickness' , 2,... >> 'xstring_font_size' , 2) >> >> Can anyone spot, what is the problem? >> >> P.S. This part of the code is in a section that is controlled by an >> if-statement, and even if I make sure the condition is false (so that >> the Prettify code is not executed), Scilab still spits out this >> error. It's really weird - and even weirder it doesn't get the error >> the first time that the code is executed. >> >> P.S. My entire code is ca. 915 lines long + requires input data, so I >> prefer not to attach it to a post here in the mailing list. >> >> Best regards, >> >> Claus >> > > > > _______________________________________________ > 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 Thu Sep 7 22:53:25 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 7 Sep 2017 22:53:25 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> Message-ID: <726d6e58-ae8c-b6a6-40df-3b07cdbf87ce@free.fr> Claus, I might have been unclear about clear(). I meant --> clear // clears everything, even all user defined functions and libraries is deleterious. I do not really understand how you could use prettify() if it is not in a protected autoloaded ATOMS library, since it will be deleted by your "clear" statement, with all other things? clear() is useful to delete an explicit set of given variables. There is no project about removing it. About your issue: may be it's time to use the new debug() debugger :) It is hard to help without being able to see and test the code (i don't ask for it ;) So, IMO your best way would be using debug(). Cheers Samuel Le 07/09/2017 ? 21:51, Claus Futtrup a ?crit : > Hi Samuel > > About "clear" I looked and it's still a documented feature in 6.0: > https://help.scilab.org/docs/6.0.0/en_US/clear.html > > I also revisited the 6.0 Release Notes (PDF) and it lists only these > as obsolete: > Obsolete functions or features w maxfiles is now obsolete. > w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use > isoview("on"), replot(..) instead. > w eval3d will be removed from Scilab 6.1. Please use ndgrid instead. > w strcmpi is deprecated. Please use strcmp(..,"i")instead. > w square will be removed from Scilab 6.1. Please use gcf().axes_ size > and replot instead. > > ... You might be right that clear is on its way out, but I don't know > where to find the information. > > /Claus > > On 07-09-2017 21:25, Samuel Gougeon wrote: >> Hello Claus, >> In Scilab, clear is deleterious. As a first hint, i would try >> commenting it before rerunning the script. >> Best regards >> Samuel >> >> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit : >>> >>> Hi there >>> >>> I've started to use the prettify functions by Pierre Vuillemin. So >>> far so good in Scilab 5.5 >>> >>> Now I've started to look into Scilab 6 (not least because graphics >>> is much faster), but I get a weird error. >>> >>> If I start Scilab, first time I execute the code, I get an "Invalid >>> buffer." message. >>> >>> Second time I execute the code then I get a bad message: >>> >>> >>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>> at line 93 of executed file >>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>> >>> 'labels_font_size' , 3,... >>> ^^ >>> Error: syntax error, unexpected "'", expecting "," or ) >>> >>> >>> When I run my script, the first thing my code does - it clears all >>> variables, all graphics and clears console, so it's not "old" stuff >>> from previous run that is the problem. Or ??? >>> >>> The "line 93" is part of the default options in Prettify, where it >>> says labels_font_size. It looks like this: >>> >>> default_options = struct('title_font_size' , 4,... >>> 'labels_font_size' , 3,... >>> 'thicks_font_size' , 2,... >>> 'num_format' , '',... >>> 'leg_font_size' , 3,... >>> 'line_thickness' , 2,... >>> 'xstring_font_size' , 2) >>> >>> Can anyone spot, what is the problem? >>> >>> P.S. This part of the code is in a section that is controlled by an >>> if-statement, and even if I make sure the condition is false (so >>> that the Prettify code is not executed), Scilab still spits out this >>> error. It's really weird - and even weirder it doesn't get the error >>> the first time that the code is executed. >>> >>> P.S. My entire code is ca. 915 lines long + requires input data, so >>> I prefer not to attach it to a post here in the mailing list. >>> >>> Best regards, >>> >>> Claus >>> >> >> >> >> _______________________________________________ >> 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 contact at pierre-vuillemin.fr Thu Sep 7 22:20:15 2017 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Thu, 7 Sep 2017 22:20:15 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> Message-ID: <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> Hi Claus, You need to spot where the 'invalid buffer' message comes from. Adding 'pause' statements throughout your script may help you (or is there a debugging step by step tool? I don't know). Or you may want to comment suspicious parts of your code until there is no more error.... Do you read data at some point? I would intuitively suspect such a message to be related to some data input/data reading operation but I may be mistaken. Besides, I've encountered a similar behaviour where Scilab 6 seems to work during the first run of a script but then something goes wrong and nothing works quite right anymore (like error messages out of the place) until Scilab is restarted. At this point I find this version quite unstable. Pierre Le 07/09/2017 ? 21:55, Claus Futtrup a ?crit : > Hi all > > The "Invalid buffer." message becomes even weirder. It is not in the > list of error messages: > https://help.scilab.org/docs/6.0.0/en_US/error_table.html > > I guarantee it's not an error message I've made up myself. The entire > script does not contain the word "buffer" (or "buffer.") anywhere. > > /Claus > > On 07-09-2017 21:25, Samuel Gougeon wrote: >> Hello Claus, >> In Scilab, clear is deleterious. As a first hint, i would try >> commenting it before rerunning the script. >> Best regards >> Samuel >> >> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit : >>> >>> Hi there >>> >>> I've started to use the prettify functions by Pierre Vuillemin. So >>> far so good in Scilab 5.5 >>> >>> Now I've started to look into Scilab 6 (not least because graphics >>> is much faster), but I get a weird error. >>> >>> If I start Scilab, first time I execute the code, I get an "Invalid >>> buffer." message. >>> >>> Second time I execute the code then I get a bad message: >>> >>> >>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>> at line 93 of executed file >>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>> >>> 'labels_font_size' , 3,... >>> ^^ >>> Error: syntax error, unexpected "'", expecting "," or ) >>> >>> >>> When I run my script, the first thing my code does - it clears all >>> variables, all graphics and clears console, so it's not "old" stuff >>> from previous run that is the problem. Or ??? >>> >>> The "line 93" is part of the default options in Prettify, where it >>> says labels_font_size. It looks like this: >>> >>> default_options = struct('title_font_size' , 4,... >>> 'labels_font_size' , 3,... >>> 'thicks_font_size' , 2,... >>> 'num_format' , '',... >>> 'leg_font_size' , 3,... >>> 'line_thickness' , 2,... >>> 'xstring_font_size' , 2) >>> >>> Can anyone spot, what is the problem? >>> >>> P.S. This part of the code is in a section that is controlled by an >>> if-statement, and even if I make sure the condition is false (so >>> that the Prettify code is not executed), Scilab still spits out this >>> error. It's really weird - and even weirder it doesn't get the error >>> the first time that the code is executed. >>> >>> P.S. My entire code is ca. 915 lines long + requires input data, so >>> I prefer not to attach it to a post here in the mailing list. >>> >>> Best regards, >>> >>> Claus >>> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Sep 7 23:14:25 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 7 Sep 2017 23:14:25 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> Message-ID: <1287dd59-fbf4-2c77-9c19-451234393ce5@free.fr> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit : > > Hi there > > I've started to use the prettify functions by Pierre Vuillemin. So far > so good in Scilab 5.5 > > Now I've started to look into Scilab 6 (not least because graphics is > much faster), but I get a weird error. > > If I start Scilab, first time I execute the code, I get an "Invalid > buffer." message. > > Second time I execute the code then I get a bad message: > > > --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) > at line 93 of executed file > C:\Users\claus\Documents\Scilab54\z3mfit.sce > > 'labels_font_size' , 3,... > ^^ > Error: syntax error, unexpected "'", expecting "," or ) > > > When I run my script, the first thing my code does - it clears all > variables, all graphics and clears console, so it's not "old" stuff > from previous run that is the problem. Or ??? > > The "line 93" is part of the default options in Prettify, where it > says labels_font_size. It looks like this: > > default_options = struct('title_font_size' , 4,... > 'labels_font_size' , 3,... > 'thicks_font_size' , 2,... > 'num_format' , '',... > 'leg_font_size' , 3,... > 'line_thickness' , 2,... > 'xstring_font_size' , 2) Weird errors sometimes occur after copying/pasting some code from a rich text formated document to Scinotes or the console. Some usual characters like the space or quotes may have some special encoding in formated text, and keep it in Scinotes, but are not aknowledged by the parser. The last time i got this situation, it was about spaces that looked like spaces, but that were not ascii(32). To avoid this, i pasted the text in a raw text unformated .txt file before copying/pasting in Scinotes. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Sep 8 00:25:38 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 8 Sep 2017 00:25:38 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <1287dd59-fbf4-2c77-9c19-451234393ce5@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <1287dd59-fbf4-2c77-9c19-451234393ce5@free.fr> Message-ID: <8be601c5-f6cb-307f-03d0-31aca7fada64@free.fr> Le 07/09/2017 ? 23:14, Samuel Gougeon a ?crit : > Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit : >> >> Hi there >> >> I've started to use the prettify functions by Pierre Vuillemin. So >> far so good in Scilab 5.5 >> >> Now I've started to look into Scilab 6 (not least because graphics is >> much faster), but I get a weird error. >> >> If I start Scilab, first time I execute the code, I get an "Invalid >> buffer." message. >> >> Second time I execute the code then I get a bad message: >> >> >> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >> at line 93 of executed file >> C:\Users\claus\Documents\Scilab54\z3mfit.sce >> >> 'labels_font_size' , 3,... >> ^^ >> Error: syntax error, unexpected "'", expecting "," or ) >> >> >> When I run my script, the first thing my code does - it clears all >> variables, all graphics and clears console, so it's not "old" stuff >> from previous run that is the problem. Or ??? >> >> The "line 93" is part of the default options in Prettify, where it >> says labels_font_size. It looks like this: >> >> default_options = struct('title_font_size' , 4,... >> 'labels_font_size' , 3,... >> 'thicks_font_size' , 2,... >> 'num_format' , '',... >> 'leg_font_size' , 3,... >> 'line_thickness' , 2,... >> 'xstring_font_size' , 2) > > Weird errors sometimes occur after copying/pasting some code from a > rich text formated document to Scinotes or the console. Some usual > characters like the space or quotes may have some special encoding in > formated text, and keep it in Scinotes, but are not aknowledged by the > parser. > The last time i got this situation, it was about spaces that looked > like spaces, but that were not ascii(32). To avoid this, i pasted the > text in a raw text unformated .txt file before copying/pasting in > Scinotes. > If you have copied/pasted some code directly from the web (like Pierre's Github page), it could be a source of encoding bugs: Web pages often use unbreakable spaces (  in HTML). I am pretty sure that Scilab's parser doesn't like them. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Sep 8 09:43:17 2017 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 8 Sep 2017 07:43:17 +0000 Subject: [Scilab-users] {EXT} Re: Scilab 6 problem with "Prettify" In-Reply-To: <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> Message-ID: Hello, > De : Pierre Vuillemin > Envoy? : jeudi 7 septembre 2017 22:20 > > Or you may want to comment suspicious parts of your code until there is no more error.... A very efficient way to isolate the error is to use dichotomy. Normally, the core of your script should consist in calling functions. So remove the first half of the functions and see if you get the error. If not, remove the other half. You can then isolate in which half your function is. Remove then the first half of the problematic half etc. If both fail, then the problematic part is in the core And you can isolate it in the same way. 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 payen.pierre at gmail.com Fri Sep 8 11:11:21 2017 From: payen.pierre at gmail.com (Pierre Payen) Date: Fri, 8 Sep 2017 02:11:21 -0700 (MST) Subject: [Scilab-users] Regression: Fac3d direct surfaces along cartesian axis, no matter user definition Message-ID: <1504861881434-0.post@n3.nabble.com> Answering this stackoverflow question , when using plot3d to plot a custom surface, if this surface is directed along x (respectively y or z) meaning that any vector collinear to x (respect to y or z) is normal to the surface, then the outside color will always be in the direction of the axis. Bugzilla beeing down, i could not see if this bugs was already know. below a small testscript to replicate the problem. ///////////////////////////////////////////////////////////////////////////////////////////////////////// clc clear xdel(winsid()) figure(1) set(gcf(),'background',-2) cr=color('red') // color of the outside surface P1 = [0,0,0] // P2 = [0,1,0] P3 = [1,0,0] F1 = [P1;P2;P3] // defining surface clockwise F2 = [P1;P3;P2] // counterclockwise subplot(2,2,1) plot3d(F1(:,1),F1(:,2),list(F1(:,3),cr*ones(F1(:,3)))) xstring(F1(:,1),F1(:,2),['P1','P2','P3']) title('surface is [P1,P2,P3] with z_P3=0') set(gca(),'data_bounds',[0,1,0,1,-1,1]) subplot(2,2,2) plot3d(F2(:,1),F2(:,2),list(F2(:,3),cr*ones(F2(:,3)))) xstring(F2(:,1),F2(:,2),['P1','P3','P2']) title('surface is [P1,P3,P2] with z_P3=0, broken with Scilab 6.0.0') set(gca(),'data_bounds',[0,1,0,1,-1,1]) subplot(2,2,3) plot3d(F2(:,1),F2(:,2),list(F2(:,3)+[0;0;10^-7],cr*ones(F2(:,3)))) xstring(F2(:,1),F2(:,2),['P1','P3','P2']) title('surface is [P1,P3,P2] with |z_P3| < 10^-8') set(gca(),'data_bounds',[0,1,0,1,-1,1]) subplot(2,2,4) plot3d(F2(:,1),F2(:,2),list(F2(:,3)+[0;0;10^-8],cr*ones(F2(:,3)))) xstring(F2(:,1),F2(:,2),['P1','P3','P2']) title('surface is [P1,P3,P2] with |z_P3| = 10^-8, broken in 6.0.0') set(gca(),'data_bounds',[0,1,0,1,-1,1]) ////////////////////////////////////////////////////////////////////////////////////////////////////////////// and the outputs Scilab 5.5.1 Scilab 6.0.0 -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From cfuttrup at gmail.com Fri Sep 8 16:41:39 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 16:41:39 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> Message-ID: Hi Pierre >At this point I find this version quite unstable. Yes. If I don't find a solution, I'll have to revert to Scilab 5.5 ... but 6.0 is so much faster with graphics, so I'll continue a bit to see what's the problem. Best regards, Claus On 07-09-2017 22:20, Pierre Vuillemin wrote: > > Hi Claus, > > You need to spot where the 'invalid buffer' message comes from. Adding > 'pause' statements throughout your script may help you (or is there a > debugging step by step tool? I don't know). Or you may want to comment > suspicious parts of your code until there is no more error.... > > Do you read data at some point? I would intuitively suspect such a > message to be related to some data input/data reading operation but I > may be mistaken. > > Besides, I've encountered a similar behaviour where Scilab 6 seems to > work during the first run of a script but then something goes wrong > and nothing works quite right anymore (like error messages out of the > place) until Scilab is restarted. At this point I find this version > quite unstable. > > > Pierre > > > Le 07/09/2017 ? 21:55, Claus Futtrup a ?crit?: >> Hi all >> >> The "Invalid buffer." message becomes even weirder. It is not in the >> list of error messages: >> https://help.scilab.org/docs/6.0.0/en_US/error_table.html >> >> I guarantee it's not an error message I've made up myself. The entire >> script does not contain the word "buffer" (or "buffer.") anywhere. >> >> /Claus >> >> On 07-09-2017 21:25, Samuel Gougeon wrote: >>> Hello Claus, >>> In Scilab, clear is deleterious. As a first hint, i would try >>> commenting it before rerunning? the script. >>> Best regards >>> Samuel >>> >>> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >>>> >>>> Hi there >>>> >>>> I've started to use the prettify functions by Pierre Vuillemin. So >>>> far so good in Scilab 5.5 >>>> >>>> Now I've started to look into Scilab 6 (not least because graphics >>>> is much faster), but I get a weird error. >>>> >>>> If I start Scilab, first time I execute the code, I get an "Invalid >>>> buffer." message. >>>> >>>> Second time I execute the code then I get a bad message: >>>> >>>> >>>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>>> at line??? 93 of executed file >>>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>>> >>>> ??????????????????????????? 'labels_font_size'? ,? 3,... >>>> ??????????????????????????? ^^ >>>> Error: syntax error, unexpected "'", expecting "," or ) >>>> >>>> >>>> When I run my script, the first thing my code does - it clears all >>>> variables, all graphics and clears console, so it's not "old" stuff >>>> from previous run that is the problem. Or ??? >>>> >>>> The "line 93" is part of the default options in Prettify, where it >>>> says labels_font_size. It looks like this: >>>> >>>> default_options = struct('title_font_size' , 4,... >>>> 'labels_font_size' , 3,... >>>> 'thicks_font_size' , 2,... >>>> 'num_format' , '',... >>>> 'leg_font_size' , 3,... >>>> 'line_thickness' , 2,... >>>> 'xstring_font_size' , 2) >>>> >>>> Can anyone spot, what is the problem? >>>> >>>> P.S. This part of the code is in a section that is controlled by an >>>> if-statement, and even if I make sure the condition is false (so >>>> that the Prettify code is not executed), Scilab still spits out >>>> this error. It's really weird - and even weirder it doesn't get the >>>> error the first time that the code is executed. >>>> >>>> P.S. My entire code is ca. 915 lines long + requires input data, so >>>> I prefer not to attach it to a post here in the mailing list. >>>> >>>> Best regards, >>>> >>>> Claus >>>> >>> >>> >>> >>> _______________________________________________ >>> 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 cfuttrup at gmail.com Fri Sep 8 16:45:07 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 16:45:07 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <726d6e58-ae8c-b6a6-40df-3b07cdbf87ce@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <726d6e58-ae8c-b6a6-40df-3b07cdbf87ce@free.fr> Message-ID: Hi Samuel OK, I see - regarding clear. Yes, maybe the new debugger could be helpful. The code is not top-secret, but to test the complete code in a meaningful way I'd need to also include 40 kb of data... so it's best to share with private email to whom wish to help me out. P.S. The tip with copy-paste from "rich" source could indeed be the problem. I don't know (and don't remember) ... but it works fine in Scilab 5.5. Best regards, Claus On 07-09-2017 22:53, Samuel Gougeon wrote: > Claus, > > I might have been unclear about clear(). I meant > --> clear? // clears everything, even all user defined functions and > libraries > is deleterious. I do not really understand how you could use > prettify() if it is not in a protected autoloaded ATOMS library, since > it will be deleted by your "clear" statement, with all other things? > > clear() is useful to delete an explicit set of given variables. There > is no project about removing it. > > About your issue: may be it's time to use the new debug() debugger :) > It is hard to help without being able to see and test the code (i > don't ask for it ;) > So, IMO your best way would be using debug(). > > Cheers > Samuel > > Le 07/09/2017 ? 21:51, Claus Futtrup a ?crit?: >> Hi Samuel >> >> About "clear" I looked and it's still a documented feature in 6.0: >> https://help.scilab.org/docs/6.0.0/en_US/clear.html >> >> I also revisited the 6.0 Release Notes (PDF) and it lists only these >> as obsolete: >> Obsolete functions or features w maxfiles is now obsolete. >> w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use >> isoview("on"), replot(..) instead. >> w eval3d will be removed from Scilab 6.1. Please use ndgrid instead. >> w strcmpi is deprecated. Please use strcmp(..,"i")instead. >> w square will be removed from Scilab 6.1. Please use gcf().axes_ size >> and replot instead. >> >> ... You might be right that clear is on its way out, but I don't know >> where to find the information. >> >> /Claus >> >> On 07-09-2017 21:25, Samuel Gougeon wrote: >>> Hello Claus, >>> In Scilab, clear is deleterious. As a first hint, i would try >>> commenting it before rerunning? the script. >>> Best regards >>> Samuel >>> >>> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >>>> >>>> Hi there >>>> >>>> I've started to use the prettify functions by Pierre Vuillemin. So >>>> far so good in Scilab 5.5 >>>> >>>> Now I've started to look into Scilab 6 (not least because graphics >>>> is much faster), but I get a weird error. >>>> >>>> If I start Scilab, first time I execute the code, I get an "Invalid >>>> buffer." message. >>>> >>>> Second time I execute the code then I get a bad message: >>>> >>>> >>>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>>> at line??? 93 of executed file >>>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>>> >>>> ??????????????????????????? 'labels_font_size'? ,? 3,... >>>> ??????????????????????????? ^^ >>>> Error: syntax error, unexpected "'", expecting "," or ) >>>> >>>> >>>> When I run my script, the first thing my code does - it clears all >>>> variables, all graphics and clears console, so it's not "old" stuff >>>> from previous run that is the problem. Or ??? >>>> >>>> The "line 93" is part of the default options in Prettify, where it >>>> says labels_font_size. It looks like this: >>>> >>>> default_options = struct('title_font_size' , 4,... >>>> 'labels_font_size' , 3,... >>>> 'thicks_font_size' , 2,... >>>> 'num_format' , '',... >>>> 'leg_font_size' , 3,... >>>> 'line_thickness' , 2,... >>>> 'xstring_font_size' , 2) >>>> >>>> Can anyone spot, what is the problem? >>>> >>>> P.S. This part of the code is in a section that is controlled by an >>>> if-statement, and even if I make sure the condition is false (so >>>> that the Prettify code is not executed), Scilab still spits out >>>> this error. It's really weird - and even weirder it doesn't get the >>>> error the first time that the code is executed. >>>> >>>> P.S. My entire code is ca. 915 lines long + requires input data, so >>>> I prefer not to attach it to a post here in the mailing list. >>>> >>>> Best regards, >>>> >>>> Claus >>>> >>> >>> >>> >>> _______________________________________________ >>> 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 cfuttrup at gmail.com Fri Sep 8 16:46:35 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 16:46:35 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <8be601c5-f6cb-307f-03d0-31aca7fada64@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <1287dd59-fbf4-2c77-9c19-451234393ce5@free.fr> <8be601c5-f6cb-307f-03d0-31aca7fada64@free.fr> Message-ID: Hi Samuel Good points with the "rich" text. I don't know how to locate these. If Scinotes / Scilab 6.0 is sensitive to this, could it maybe include a "cleaner" for such stuff? Best regards, Claus On 08-09-2017 00:25, Samuel Gougeon wrote: > Le 07/09/2017 ? 23:14, Samuel Gougeon a ?crit?: >> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >>> >>> Hi there >>> >>> I've started to use the prettify functions by Pierre Vuillemin. So >>> far so good in Scilab 5.5 >>> >>> Now I've started to look into Scilab 6 (not least because graphics >>> is much faster), but I get a weird error. >>> >>> If I start Scilab, first time I execute the code, I get an "Invalid >>> buffer." message. >>> >>> Second time I execute the code then I get a bad message: >>> >>> >>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>> at line??? 93 of executed file >>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>> >>> ??????????????????????????? 'labels_font_size'? ,? 3,... >>> ??????????????????????????? ^^ >>> Error: syntax error, unexpected "'", expecting "," or ) >>> >>> >>> When I run my script, the first thing my code does - it clears all >>> variables, all graphics and clears console, so it's not "old" stuff >>> from previous run that is the problem. Or ??? >>> >>> The "line 93" is part of the default options in Prettify, where it >>> says labels_font_size. It looks like this: >>> >>> default_options = struct('title_font_size' , 4,... >>> 'labels_font_size' , 3,... >>> 'thicks_font_size' , 2,... >>> 'num_format' , '',... >>> 'leg_font_size' , 3,... >>> 'line_thickness' , 2,... >>> 'xstring_font_size' , 2) >> >> Weird errors sometimes occur after copying/pasting some code from a >> rich text formated document to Scinotes or the console. Some usual >> characters like the space or quotes may have some special encoding in >> formated text, and keep it in Scinotes, but are not aknowledged by >> the parser. >> The last time i got this situation, it was about spaces? that looked >> like spaces, but that were not ascii(32). To avoid this, i pasted the >> text in a raw text unformated .txt file before copying/pasting in >> Scinotes. >> > > If you have copied/pasted some code directly from the web (like > Pierre's Github page), it could be a source of encoding bugs: Web > pages often use unbreakable spaces (  in HTML). I am pretty sure > that Scilab's parser doesn't like them. > > > > _______________________________________________ > 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 Fri Sep 8 16:48:15 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 16:48:15 +0200 Subject: [Scilab-users] {EXT} Re: Scilab 6 problem with "Prettify" In-Reply-To: References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> Message-ID: Hi Christophe Good points. I guess one thing I could do is to delete the entire Prettify from my file (and not call Prettify). Then see if Scilab 6 complains. It's weird, though, that the errors are prior to execution of any code. I guess Scilab first "reads" the entire code somehow and if there's anything less than perfect, it breaks and cannot start stepping through the code. /Claus On 08-09-2017 09:43, Dang Ngoc Chan, Christophe wrote: > Hello, > >> De : Pierre Vuillemin >> Envoy? : jeudi 7 septembre 2017 22:20 >> >> Or you may want to comment suspicious parts of your code until there is no more error.... > A very efficient way to isolate the error is to use dichotomy. > > Normally, the core of your script should consist in calling functions. > So remove the first half of the functions and see if you get the error. > If not, remove the other half. > You can then isolate in which half your function is. > Remove then the first half of the problematic half etc. > > If both fail, then the problematic part is in the core > And you can isolate it in the same way. > > 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 > From cfuttrup at gmail.com Fri Sep 8 16:55:16 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 16:55:16 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <726d6e58-ae8c-b6a6-40df-3b07cdbf87ce@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <726d6e58-ae8c-b6a6-40df-3b07cdbf87ce@free.fr> Message-ID: <8f6c40b2-7016-645a-5828-b53249c542ba@gmail.com> Hi Samuel >I do not really understand how you could use prettify() if it is not in a protected autoloaded ATOMS library For potential easy distribution of the code, I do not include any requirement of any ATOMS modules, just clean Scilab installation is expected and everything is contained in a single .sce file. Since Prettify code was released as source code in a way, I have copied the entire text into my mainline-script. Hence the functions are loaded each time I run the code. The code includes the authorship / code ownership of Pierre Vuillemin and mentions the BSD license that comes with it. It's in my mainline script from line 47 to line 231. To the best of my knowledge Prettify is currently not available as an ATOMS module. Am I right? Best regards, Claus On 07-09-2017 22:53, Samuel Gougeon wrote: > Claus, > > I might have been unclear about clear(). I meant > --> clear? // clears everything, even all user defined functions and > libraries > is deleterious. I do not really understand how you could use > prettify() if it is not in a protected autoloaded ATOMS library, since > it will be deleted by your "clear" statement, with all other things? > > clear() is useful to delete an explicit set of given variables. There > is no project about removing it. > > About your issue: may be it's time to use the new debug() debugger :) > It is hard to help without being able to see and test the code (i > don't ask for it ;) > So, IMO your best way would be using debug(). > > Cheers > Samuel > > Le 07/09/2017 ? 21:51, Claus Futtrup a ?crit?: >> Hi Samuel >> >> About "clear" I looked and it's still a documented feature in 6.0: >> https://help.scilab.org/docs/6.0.0/en_US/clear.html >> >> I also revisited the 6.0 Release Notes (PDF) and it lists only these >> as obsolete: >> Obsolete functions or features w maxfiles is now obsolete. >> w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use >> isoview("on"), replot(..) instead. >> w eval3d will be removed from Scilab 6.1. Please use ndgrid instead. >> w strcmpi is deprecated. Please use strcmp(..,"i")instead. >> w square will be removed from Scilab 6.1. Please use gcf().axes_ size >> and replot instead. >> >> ... You might be right that clear is on its way out, but I don't know >> where to find the information. >> >> /Claus >> >> On 07-09-2017 21:25, Samuel Gougeon wrote: >>> Hello Claus, >>> In Scilab, clear is deleterious. As a first hint, i would try >>> commenting it before rerunning? the script. >>> Best regards >>> Samuel >>> >>> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >>>> >>>> Hi there >>>> >>>> I've started to use the prettify functions by Pierre Vuillemin. So >>>> far so good in Scilab 5.5 >>>> >>>> Now I've started to look into Scilab 6 (not least because graphics >>>> is much faster), but I get a weird error. >>>> >>>> If I start Scilab, first time I execute the code, I get an "Invalid >>>> buffer." message. >>>> >>>> Second time I execute the code then I get a bad message: >>>> >>>> >>>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>>> at line??? 93 of executed file >>>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>>> >>>> ??????????????????????????? 'labels_font_size'? ,? 3,... >>>> ??????????????????????????? ^^ >>>> Error: syntax error, unexpected "'", expecting "," or ) >>>> >>>> >>>> When I run my script, the first thing my code does - it clears all >>>> variables, all graphics and clears console, so it's not "old" stuff >>>> from previous run that is the problem. Or ??? >>>> >>>> The "line 93" is part of the default options in Prettify, where it >>>> says labels_font_size. It looks like this: >>>> >>>> default_options = struct('title_font_size' , 4,... >>>> 'labels_font_size' , 3,... >>>> 'thicks_font_size' , 2,... >>>> 'num_format' , '',... >>>> 'leg_font_size' , 3,... >>>> 'line_thickness' , 2,... >>>> 'xstring_font_size' , 2) >>>> >>>> Can anyone spot, what is the problem? >>>> >>>> P.S. This part of the code is in a section that is controlled by an >>>> if-statement, and even if I make sure the condition is false (so >>>> that the Prettify code is not executed), Scilab still spits out >>>> this error. It's really weird - and even weirder it doesn't get the >>>> error the first time that the code is executed. >>>> >>>> P.S. My entire code is ca. 915 lines long + requires input data, so >>>> I prefer not to attach it to a post here in the mailing list. >>>> >>>> Best regards, >>>> >>>> Claus >>>> >>> >>> >>> >>> _______________________________________________ >>> 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 cfuttrup at gmail.com Fri Sep 8 19:47:08 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 19:47:08 +0200 Subject: [Scilab-users] Follow-up Re: {EXT} Re: Scilab 6 problem with "Prettify" In-Reply-To: References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> Message-ID: <1181c4e6-a296-5c35-6faa-b57744f52a4c@gmail.com> Hi all First follow-up. I completely removed the entire section of Prettify code, and all instances of calls to the prettify function was commented out. This executes fine in Scilab 5.5. In Scilab 6 I still get the "Invalid buffer." response, but now it can execute repeatedly. I just gotta chase down what buffer, etc. ... you know, the error which is not listed in the error table: https://help.scilab.org/docs/6.0.0/en_US/error_table.html Best regards, Claus On 08-09-2017 16:48, Claus Futtrup wrote: > Hi Christophe > > Good points. I guess one thing I could do is to delete the entire > Prettify from my file (and not call Prettify). Then see if Scilab 6 > complains. > > It's weird, though, that the errors are prior to execution of any > code. I guess Scilab first "reads" the entire code somehow and if > there's anything less than perfect, it breaks and cannot start > stepping through the code. > > /Claus > > On 08-09-2017 09:43, Dang Ngoc Chan, Christophe wrote: >> Hello, >> >>> De : Pierre Vuillemin >>> Envoy? : jeudi 7 septembre 2017 22:20 >>> >>> Or you may want to comment suspicious parts of your code until there >>> is no more error.... >> A very efficient way to isolate the error is to use dichotomy. >> >> Normally, the core of your script should consist in calling functions. >> So remove the first half of the functions and see if you get the error. >> If not, remove the other half. >> You can then isolate in which half your function is. >> Remove then the first half of the problematic half etc. >> >> If both fail, then the problematic part is in the core >> And you can isolate it in the same way. >> >> 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 >> > From cfuttrup at gmail.com Fri Sep 8 19:57:27 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 19:57:27 +0200 Subject: [Scilab-users] Follow-up Re: {EXT} Re: Scilab 6 problem with "Prettify" In-Reply-To: <1181c4e6-a296-5c35-6faa-b57744f52a4c@gmail.com> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> <1181c4e6-a296-5c35-6faa-b57744f52a4c@gmail.com> Message-ID: Hi all I see Scinotes supports "Execute file with echo" ... so I did that (and stopped the execution in its tracks). This is the code which gives me an invalid buffer error: --> // ---- Change active directory to script directory ---- --> [units,typs,nams]=file(); // nams(1) = script file name incl. path --> fpathname=strsplit(nams(1), [filesep()]); // disp(b($-1)); --> scriptpath = get_absolute_file_path(fpathname($)); --> chdir(scriptpath); Invalid buffer. --> // ---- READ CONFIG FILE ---- The scriptpath variable is empty. When I look at the commands, it seems the logic has changes since 5.5 so that instead of nams(1) one should use nams(2) instead, but nams(2) doesn't contain the script path. Instead (on Windows 10) it contains a link to a temporary file in AppData/Local/Temp ... and the file is named (randomly, I suppose): LOAD_INTO_SCILAB-17 84290624451915792.sce So - please let me know, how do I now determine where my script is located? (So that I can save output data to the same folder) Thanks. P.S. It seems I still have an unresolved problem with the Prettify code that I've copied into my script. I wonder if Pierre Vuillemin is willing to help by providing suitable code for Scilab 6 - and please let me know where (and how) to pick it up without errors. /Claus On 08-09-2017 19:47, Claus Futtrup wrote: > Hi all > > First follow-up. I completely removed the entire section of Prettify > code, and all instances of calls to the prettify function was > commented out. This executes fine in Scilab 5.5. > > In Scilab 6 I still get the "Invalid buffer." response, but now it can > execute repeatedly. I just gotta chase down what buffer, etc. ... you > know, the error which is not listed in the error table: > https://help.scilab.org/docs/6.0.0/en_US/error_table.html > > Best regards, > Claus > > On 08-09-2017 16:48, Claus Futtrup wrote: >> Hi Christophe >> >> Good points. I guess one thing I could do is to delete the entire >> Prettify from my file (and not call Prettify). Then see if Scilab 6 >> complains. >> >> It's weird, though, that the errors are prior to execution of any >> code. I guess Scilab first "reads" the entire code somehow and if >> there's anything less than perfect, it breaks and cannot start >> stepping through the code. >> >> /Claus >> >> On 08-09-2017 09:43, Dang Ngoc Chan, Christophe wrote: >>> Hello, >>> >>>> De : Pierre Vuillemin >>>> Envoy? : jeudi 7 septembre 2017 22:20 >>>> >>>> Or you may want to comment suspicious parts of your code until >>>> there is no more error.... >>> A very efficient way to isolate the error is to use dichotomy. >>> >>> Normally, the core of your script should consist in calling functions. >>> So remove the first half of the functions and see if you get the error. >>> If not, remove the other half. >>> You can then isolate in which half your function is. >>> Remove then the first half of the problematic half etc. >>> >>> If both fail, then the problematic part is in the core >>> And you can isolate it in the same way. >>> >>> 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 >>> >> > From cfuttrup at gmail.com Fri Sep 8 21:03:51 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 21:03:51 +0200 Subject: [Scilab-users] Follow-up Re: {EXT} Re: Scilab 6 problem with "Prettify" In-Reply-To: References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> <1181c4e6-a296-5c35-6faa-b57744f52a4c@gmail.com> Message-ID: <9843b546-a5fb-7417-92f2-160478dd6cc3@gmail.com> Hi all At the moment the problem has resolved itself. The below code now correctly gives me the script path. I have no idea what happened. The code is the same. Maybe a Windows-10 "burp" and after a reboot it's fixed (??). Since we've talked about this yesterday (and the computer is turned off overnight) it wasn't just due to a reboot alone (since the problem was persistent today also), but alas, at the moment the script works. It shall be interesting to see if it also works tomorrow. Best regards, Claus On 08-09-2017 19:57, Claus Futtrup wrote: > Hi all > > I see Scinotes supports "Execute file with echo" ... so I did that > (and stopped the execution in its tracks). This is the code which > gives me an invalid buffer error: > > --> // ---- Change active directory to script directory ---- > --> [units,typs,nams]=file(); // nams(1) = script file name incl. path > --> fpathname=strsplit(nams(1), [filesep()]); // disp(b($-1)); > --> scriptpath = get_absolute_file_path(fpathname($)); > --> chdir(scriptpath); > Invalid buffer. > --> // ---- READ CONFIG FILE ---- > > The scriptpath variable is empty. When I look at the commands, it > seems the logic has changes since 5.5 so that instead of nams(1) one > should use nams(2) instead, but nams(2) doesn't contain the script > path. Instead (on Windows 10) it contains a link to a temporary file > in AppData/Local/Temp ... and the file is named (randomly, I suppose): > LOAD_INTO_SCILAB-17 84290624451915792.sce > > So - please let me know, how do I now determine where my script is > located? (So that I can save output data to the same folder) > > Thanks. > > P.S. It seems I still have an unresolved problem with the Prettify > code that I've copied into my script. I wonder if Pierre Vuillemin is > willing to help by providing suitable code for Scilab 6 - and please > let me know where (and how) to pick it up without errors. > > /Claus > > On 08-09-2017 19:47, Claus Futtrup wrote: >> Hi all >> >> First follow-up. I completely removed the entire section of Prettify >> code, and all instances of calls to the prettify function was >> commented out. This executes fine in Scilab 5.5. >> >> In Scilab 6 I still get the "Invalid buffer." response, but now it >> can execute repeatedly. I just gotta chase down what buffer, etc. ... >> you know, the error which is not listed in the error table: >> https://help.scilab.org/docs/6.0.0/en_US/error_table.html >> >> Best regards, >> Claus >> >> On 08-09-2017 16:48, Claus Futtrup wrote: >>> Hi Christophe >>> >>> Good points. I guess one thing I could do is to delete the entire >>> Prettify from my file (and not call Prettify). Then see if Scilab 6 >>> complains. >>> >>> It's weird, though, that the errors are prior to execution of any >>> code. I guess Scilab first "reads" the entire code somehow and if >>> there's anything less than perfect, it breaks and cannot start >>> stepping through the code. >>> >>> /Claus >>> >>> On 08-09-2017 09:43, Dang Ngoc Chan, Christophe wrote: >>>> Hello, >>>> >>>>> De : Pierre Vuillemin >>>>> Envoy? : jeudi 7 septembre 2017 22:20 >>>>> >>>>> Or you may want to comment suspicious parts of your code until >>>>> there is no more error.... >>>> A very efficient way to isolate the error is to use dichotomy. >>>> >>>> Normally, the core of your script should consist in calling functions. >>>> So remove the first half of the functions and see if you get the >>>> error. >>>> If not, remove the other half. >>>> You can then isolate in which half your function is. >>>> Remove then the first half of the problematic half etc. >>>> >>>> If both fail, then the problematic part is in the core >>>> And you can isolate it in the same way. >>>> >>>> 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 >>>> >>> >> > From cfuttrup at gmail.com Fri Sep 8 21:07:52 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 21:07:52 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> Message-ID: Hi Pierre, et al. I was able to resolve the problem with the Prettify code by changing ' to " in the code for default_options. I have no idea why this should matter. AFAIR Scilab accepts both (just not mixed anymore - and there's no mix-up in the code). Just to prevent confusion, here's the code change which works for me (at the moment, again, we'll see tomorrow if the fix continues to work): default_options = struct("title_font_size" , 4,... "labels_font_size" , 3,... "thicks_font_size" , 2,... "num_format" , '',... "leg_font_size" , 3,... "line_thickness" , 2,... "xstring_font_size" , 2); // default_options = struct('title_font_size', 4,... // 'labels_font_size', 3,... // 'thicks_font_size', 2,... // 'num_format', '',... // 'leg_font_size', 3,... // 'line_thickness', 2,... // 'xstring_font_size', 2) Best regards, Claus On 07-09-2017 22:20, Pierre Vuillemin wrote: > > Hi Claus, > > You need to spot where the 'invalid buffer' message comes from. Adding > 'pause' statements throughout your script may help you (or is there a > debugging step by step tool? I don't know). Or you may want to comment > suspicious parts of your code until there is no more error.... > > Do you read data at some point? I would intuitively suspect such a > message to be related to some data input/data reading operation but I > may be mistaken. > > Besides, I've encountered a similar behaviour where Scilab 6 seems to > work during the first run of a script but then something goes wrong > and nothing works quite right anymore (like error messages out of the > place) until Scilab is restarted. At this point I find this version > quite unstable. > > > Pierre > > > Le 07/09/2017 ? 21:55, Claus Futtrup a ?crit?: >> Hi all >> >> The "Invalid buffer." message becomes even weirder. It is not in the >> list of error messages: >> https://help.scilab.org/docs/6.0.0/en_US/error_table.html >> >> I guarantee it's not an error message I've made up myself. The entire >> script does not contain the word "buffer" (or "buffer.") anywhere. >> >> /Claus >> >> On 07-09-2017 21:25, Samuel Gougeon wrote: >>> Hello Claus, >>> In Scilab, clear is deleterious. As a first hint, i would try >>> commenting it before rerunning? the script. >>> Best regards >>> Samuel >>> >>> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >>>> >>>> Hi there >>>> >>>> I've started to use the prettify functions by Pierre Vuillemin. So >>>> far so good in Scilab 5.5 >>>> >>>> Now I've started to look into Scilab 6 (not least because graphics >>>> is much faster), but I get a weird error. >>>> >>>> If I start Scilab, first time I execute the code, I get an "Invalid >>>> buffer." message. >>>> >>>> Second time I execute the code then I get a bad message: >>>> >>>> >>>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>>> at line??? 93 of executed file >>>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>>> >>>> ??????????????????????????? 'labels_font_size'? ,? 3,... >>>> ??????????????????????????? ^^ >>>> Error: syntax error, unexpected "'", expecting "," or ) >>>> >>>> >>>> When I run my script, the first thing my code does - it clears all >>>> variables, all graphics and clears console, so it's not "old" stuff >>>> from previous run that is the problem. Or ??? >>>> >>>> The "line 93" is part of the default options in Prettify, where it >>>> says labels_font_size. It looks like this: >>>> >>>> default_options = struct('title_font_size' , 4,... >>>> 'labels_font_size' , 3,... >>>> 'thicks_font_size' , 2,... >>>> 'num_format' , '',... >>>> 'leg_font_size' , 3,... >>>> 'line_thickness' , 2,... >>>> 'xstring_font_size' , 2) >>>> >>>> Can anyone spot, what is the problem? >>>> >>>> P.S. This part of the code is in a section that is controlled by an >>>> if-statement, and even if I make sure the condition is false (so >>>> that the Prettify code is not executed), Scilab still spits out >>>> this error. It's really weird - and even weirder it doesn't get the >>>> error the first time that the code is executed. >>>> >>>> P.S. My entire code is ca. 915 lines long + requires input data, so >>>> I prefer not to attach it to a post here in the mailing list. >>>> >>>> Best regards, >>>> >>>> Claus >>>> >>> >>> >>> >>> _______________________________________________ >>> 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 cfuttrup at gmail.com Fri Sep 8 21:15:40 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 21:15:40 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <1287dd59-fbf4-2c77-9c19-451234393ce5@free.fr> <8be601c5-f6cb-307f-03d0-31aca7fada64@free.fr> Message-ID: <78f2caf5-2173-973e-0c46-3193af6ecaa6@gmail.com> Hi Samuel, et al. (I write this response just for completeness) I loaded the Prettify code that generated an error (the default_options code) into my Programming Editor, which has a HEX editor function. I walked through all chars in the code to see if there was any peculiar ASCii code. There was not. The lowest ASCii char in the code was 20 (i.e. a space) and the highest was 7A (i.e. a z). This means every byte in the code is (and has always been) within the normal ASCii chars. P.S. The editor I use is TSE (The Semware Editor) Pro 4.20, see https://www.semware.com/ for details. Best regards, Claus On 08-09-2017 16:46, Claus Futtrup wrote: > Hi Samuel > > Good points with the "rich" text. I don't know how to locate these. > > If Scinotes / Scilab 6.0 is sensitive to this, could it maybe include > a "cleaner" for such stuff? > > Best regards, > Claus > > On 08-09-2017 00:25, Samuel Gougeon wrote: >> Le 07/09/2017 ? 23:14, Samuel Gougeon a ?crit?: >>> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >>>> >>>> Hi there >>>> >>>> I've started to use the prettify functions by Pierre Vuillemin. So >>>> far so good in Scilab 5.5 >>>> >>>> Now I've started to look into Scilab 6 (not least because graphics >>>> is much faster), but I get a weird error. >>>> >>>> If I start Scilab, first time I execute the code, I get an "Invalid >>>> buffer." message. >>>> >>>> Second time I execute the code then I get a bad message: >>>> >>>> >>>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>>> at line??? 93 of executed file >>>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>>> >>>> ??????????????????????????? 'labels_font_size'? ,? 3,... >>>> ??????????????????????????? ^^ >>>> Error: syntax error, unexpected "'", expecting "," or ) >>>> >>>> >>>> When I run my script, the first thing my code does - it clears all >>>> variables, all graphics and clears console, so it's not "old" stuff >>>> from previous run that is the problem. Or ??? >>>> >>>> The "line 93" is part of the default options in Prettify, where it >>>> says labels_font_size. It looks like this: >>>> >>>> default_options = struct('title_font_size' , 4,... >>>> 'labels_font_size' , 3,... >>>> 'thicks_font_size' , 2,... >>>> 'num_format' , '',... >>>> 'leg_font_size' , 3,... >>>> 'line_thickness' , 2,... >>>> 'xstring_font_size' , 2) >>> >>> Weird errors sometimes occur after copying/pasting some code from a >>> rich text formated document to Scinotes or the console. Some usual >>> characters like the space or quotes may have some special encoding >>> in formated text, and keep it in Scinotes, but are not aknowledged >>> by the parser. >>> The last time i got this situation, it was about spaces that looked >>> like spaces, but that were not ascii(32). To avoid this, i pasted >>> the text in a raw text unformated .txt file before copying/pasting >>> in Scinotes. >>> >> >> If you have copied/pasted some code directly from the web (like >> Pierre's Github page), it could be a source of encoding bugs: Web >> pages often use unbreakable spaces (  in HTML). I am pretty sure >> that Scilab's parser doesn't like them. >> >> >> >> _______________________________________________ >> 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 Fri Sep 8 21:43:19 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 21:43:19 +0200 Subject: [Scilab-users] Follow-up Re: {EXT} Re: Scilab 6 problem with "Prettify" In-Reply-To: References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> <1181c4e6-a296-5c35-6faa-b57744f52a4c@gmail.com> Message-ID: <547d14f9-a733-0405-5485-ca6f45c38380@gmail.com> Hi all Oh, BTW, I forgot. The problem with nams(1) in Scilab 5 = nams(2) in Scilab 6 persist, so the code now looks like this: [units,typs,nams]=file(); // nams(1) = script file name incl. path version = evstr(part(getversion(),[8])); if version<6 then fpathname=strsplit(nams(1), [filesep()]); else fpathname=strsplit(nams(2), [filesep()]); end scriptpath = get_absolute_file_path(fpathname($)); chdir(scriptpath); As you can see, I now check for the Scilab version, then pick the proper part of the nams variable. /Claus On 08-09-2017 19:57, Claus Futtrup wrote: > Hi all > > I see Scinotes supports "Execute file with echo" ... so I did that > (and stopped the execution in its tracks). This is the code which > gives me an invalid buffer error: > > --> // ---- Change active directory to script directory ---- > --> [units,typs,nams]=file(); // nams(1) = script file name incl. path > --> fpathname=strsplit(nams(1), [filesep()]); // disp(b($-1)); > --> scriptpath = get_absolute_file_path(fpathname($)); > --> chdir(scriptpath); > Invalid buffer. > --> // ---- READ CONFIG FILE ---- > > The scriptpath variable is empty. When I look at the commands, it > seems the logic has changes since 5.5 so that instead of nams(1) one > should use nams(2) instead, but nams(2) doesn't contain the script > path. Instead (on Windows 10) it contains a link to a temporary file > in AppData/Local/Temp ... and the file is named (randomly, I suppose): > LOAD_INTO_SCILAB-17 84290624451915792.sce > > So - please let me know, how do I now determine where my script is > located? (So that I can save output data to the same folder) > > Thanks. > > P.S. It seems I still have an unresolved problem with the Prettify > code that I've copied into my script. I wonder if Pierre Vuillemin is > willing to help by providing suitable code for Scilab 6 - and please > let me know where (and how) to pick it up without errors. > > /Claus > > On 08-09-2017 19:47, Claus Futtrup wrote: >> Hi all >> >> First follow-up. I completely removed the entire section of Prettify >> code, and all instances of calls to the prettify function was >> commented out. This executes fine in Scilab 5.5. >> >> In Scilab 6 I still get the "Invalid buffer." response, but now it >> can execute repeatedly. I just gotta chase down what buffer, etc. ... >> you know, the error which is not listed in the error table: >> https://help.scilab.org/docs/6.0.0/en_US/error_table.html >> >> Best regards, >> Claus >> >> On 08-09-2017 16:48, Claus Futtrup wrote: >>> Hi Christophe >>> >>> Good points. I guess one thing I could do is to delete the entire >>> Prettify from my file (and not call Prettify). Then see if Scilab 6 >>> complains. >>> >>> It's weird, though, that the errors are prior to execution of any >>> code. I guess Scilab first "reads" the entire code somehow and if >>> there's anything less than perfect, it breaks and cannot start >>> stepping through the code. >>> >>> /Claus >>> >>> On 08-09-2017 09:43, Dang Ngoc Chan, Christophe wrote: >>>> Hello, >>>> >>>>> De : Pierre Vuillemin >>>>> Envoy? : jeudi 7 septembre 2017 22:20 >>>>> >>>>> Or you may want to comment suspicious parts of your code until >>>>> there is no more error.... >>>> A very efficient way to isolate the error is to use dichotomy. >>>> >>>> Normally, the core of your script should consist in calling functions. >>>> So remove the first half of the functions and see if you get the >>>> error. >>>> If not, remove the other half. >>>> You can then isolate in which half your function is. >>>> Remove then the first half of the problematic half etc. >>>> >>>> If both fail, then the problematic part is in the core >>>> And you can isolate it in the same way. >>>> >>>> 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 >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Fri Sep 8 21:48:50 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 8 Sep 2017 21:48:50 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <726d6e58-ae8c-b6a6-40df-3b07cdbf87ce@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <726d6e58-ae8c-b6a6-40df-3b07cdbf87ce@free.fr> Message-ID: Hi Samuel >I might have been unclear about clear(). I meant >--> clear? // clears everything, even all user defined functions and libraries >is deleterious. >clear() is useful to delete an explicit set of given variables. There is no project about removing it. I think you're right. The clear statement (without specific reference to anything) seems to clear a bit too much, so I've removed it from the initialization part of my script. Not only does it clear too much, but I have to reboot the computer to get it to behave ... at least, this solved my problem once. As with my other messages tonight, things seems to be "messy" and I'm not comfortable speaking in general terms until I have re-tested this over some period of time. P.S. Sorry for the _many_ emails today ... Best regards, Claus On 07-09-2017 22:53, Samuel Gougeon wrote: > Claus, > > I might have been unclear about clear(). I meant > --> clear? // clears everything, even all user defined functions and > libraries > is deleterious. I do not really understand how you could use > prettify() if it is not in a protected autoloaded ATOMS library, since > it will be deleted by your "clear" statement, with all other things? > > clear() is useful to delete an explicit set of given variables. There > is no project about removing it. > > About your issue: may be it's time to use the new debug() debugger :) > It is hard to help without being able to see and test the code (i > don't ask for it ;) > So, IMO your best way would be using debug(). > > Cheers > Samuel > > Le 07/09/2017 ? 21:51, Claus Futtrup a ?crit?: >> Hi Samuel >> >> About "clear" I looked and it's still a documented feature in 6.0: >> https://help.scilab.org/docs/6.0.0/en_US/clear.html >> >> I also revisited the 6.0 Release Notes (PDF) and it lists only these >> as obsolete: >> Obsolete functions or features w maxfiles is now obsolete. >> w isoview(xmin,xmax,ymin,ymax) is deprecated. Please use >> isoview("on"), replot(..) instead. >> w eval3d will be removed from Scilab 6.1. Please use ndgrid instead. >> w strcmpi is deprecated. Please use strcmp(..,"i")instead. >> w square will be removed from Scilab 6.1. Please use gcf().axes_ size >> and replot instead. >> >> ... You might be right that clear is on its way out, but I don't know >> where to find the information. >> >> /Claus >> >> On 07-09-2017 21:25, Samuel Gougeon wrote: >>> Hello Claus, >>> In Scilab, clear is deleterious. As a first hint, i would try >>> commenting it before rerunning? the script. >>> Best regards >>> Samuel >>> >>> Le 06/09/2017 ? 21:33, Claus Futtrup a ?crit?: >>>> >>>> Hi there >>>> >>>> I've started to use the prettify functions by Pierre Vuillemin. So >>>> far so good in Scilab 5.5 >>>> >>>> Now I've started to look into Scilab 6 (not least because graphics >>>> is much faster), but I get a weird error. >>>> >>>> If I start Scilab, first time I execute the code, I get an "Invalid >>>> buffer." message. >>>> >>>> Second time I execute the code then I get a bad message: >>>> >>>> >>>> --> exec('C:\Users\claus\Documents\Scilab54\z3mfit.sce', -1) >>>> at line??? 93 of executed file >>>> C:\Users\claus\Documents\Scilab54\z3mfit.sce >>>> >>>> ??????????????????????????? 'labels_font_size'? ,? 3,... >>>> ??????????????????????????? ^^ >>>> Error: syntax error, unexpected "'", expecting "," or ) >>>> >>>> >>>> When I run my script, the first thing my code does - it clears all >>>> variables, all graphics and clears console, so it's not "old" stuff >>>> from previous run that is the problem. Or ??? >>>> >>>> The "line 93" is part of the default options in Prettify, where it >>>> says labels_font_size. It looks like this: >>>> >>>> default_options = struct('title_font_size' , 4,... >>>> 'labels_font_size' , 3,... >>>> 'thicks_font_size' , 2,... >>>> 'num_format' , '',... >>>> 'leg_font_size' , 3,... >>>> 'line_thickness' , 2,... >>>> 'xstring_font_size' , 2) >>>> >>>> Can anyone spot, what is the problem? >>>> >>>> P.S. This part of the code is in a section that is controlled by an >>>> if-statement, and even if I make sure the condition is false (so >>>> that the Prettify code is not executed), Scilab still spits out >>>> this error. It's really weird - and even weirder it doesn't get the >>>> error the first time that the code is executed. >>>> >>>> P.S. My entire code is ca. 915 lines long + requires input data, so >>>> I prefer not to attach it to a post here in the mailing list. >>>> >>>> Best regards, >>>> >>>> Claus >>>> >>> >>> >>> >>> _______________________________________________ >>> 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 sgougeon at free.fr Fri Sep 8 22:06:32 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 8 Sep 2017 22:06:32 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> Message-ID: <683338ef-e72e-dd4f-37c9-fd177bbbf76b@free.fr> Le 08/09/2017 ? 21:07, Claus Futtrup a ?crit : > Hi Pierre, et al. > > I was able to resolve the problem with the Prettify code by changing ' > to " in the code for default_options. > > I have no idea why this should matter. As explained in a previous message, this confirms that quotes were wrongly encoded. You can put back some single quotes but from your keyboard. They will pass the parser. Cheers Samuel From cfuttrup at gmail.com Sat Sep 9 07:03:35 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 9 Sep 2017 07:03:35 +0200 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <683338ef-e72e-dd4f-37c9-fd177bbbf76b@free.fr> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> <683338ef-e72e-dd4f-37c9-fd177bbbf76b@free.fr> Message-ID: <4eb83bdc-7c0f-2038-928b-055022d06c32@gmail.com> Hi Samuel I wonder in which way I as a user is supposed to find a wrongly encoded quote. I again copied the original code to an editor and studied the HEX code. All (single-) quotes have HEX code 27. When I save the .sce file to disk, the information in the file contains nothing outside the ordinary. Yet, when I reopened this file in Scilab 6 (many times) then each time, the problem would be the same. Scilab 5 has no problems. To me it doesn't sound like a problem with the TEXT file, but a problem inside Scilab 6 editor + parser. Best regards, Claus On 08-09-2017 22:06, Samuel Gougeon wrote: > Le 08/09/2017 ? 21:07, Claus Futtrup a ?crit : >> Hi Pierre, et al. >> >> I was able to resolve the problem with the Prettify code by changing >> ' to " in the code for default_options. >> >> I have no idea why this should matter. > > As explained in a previous message, this confirms that quotes were > wrongly encoded. > You can put back some single quotes but from your keyboard. They will > pass the parser. > > Cheers > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From jrafaelbguerra at hotmail.com Sat Sep 9 11:52:30 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 9 Sep 2017 09:52:30 +0000 Subject: [Scilab-users] Scilab 6 problem with "Prettify" In-Reply-To: <4eb83bdc-7c0f-2038-928b-055022d06c32@gmail.com> References: <3e8abc85-aa3b-dc79-62dc-b1822c663c4a@gmail.com> <73a0d70e-b50b-9477-67a8-fb68d8632567@free.fr> <900e551a-38e7-4430-2318-825116e3b58a@gmail.com> <75ad2a09-2458-2f63-2880-8eeb8db12651@pierre-vuillemin.fr> <683338ef-e72e-dd4f-37c9-fd177bbbf76b@free.fr> <4eb83bdc-7c0f-2038-928b-055022d06c32@gmail.com> Message-ID: Hi, See example below of wrong quotes and of a site to check their encoding: // http://asciivalue.com/ // Wrong quotes: // Char Dec Hex Oct // " 148 94 224 // Right quotes: // Char Dec Hex Oct // " 34 22 42 // Scilab code: printf("Wrong quotes: "\n") printf("Right quotes: '"\n") SciNotes Find/Replace can be used to replace all. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Saturday, September 09, 2017 7:04 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] Scilab 6 problem with "Prettify" Hi Samuel I wonder in which way I as a user is supposed to find a wrongly encoded quote. I again copied the original code to an editor and studied the HEX code. All (single-) quotes have HEX code 27. When I save the .sce file to disk, the information in the file contains nothing outside the ordinary. Yet, when I reopened this file in Scilab 6 (many times) then each time, the problem would be the same. Scilab 5 has no problems. To me it doesn't sound like a problem with the TEXT file, but a problem inside Scilab 6 editor + parser. Best regards, Claus On 08-09-2017 22:06, Samuel Gougeon wrote: > Le 08/09/2017 ? 21:07, Claus Futtrup a ?crit : >> Hi Pierre, et al. >> >> I was able to resolve the problem with the Prettify code by changing >> ' to " in the code for default_options. >> >> I have no idea why this should matter. > > As explained in a previous message, this confirms that quotes were > wrongly encoded. > You can put back some single quotes but from your keyboard. They will > pass the parser. > > Cheers > Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From rlandersen at gmail.com Sat Sep 9 15:44:31 2017 From: rlandersen at gmail.com (rlandersen) Date: Sat, 9 Sep 2017 06:44:31 -0700 (MST) Subject: [Scilab-users] can not create Scilab Java Main_Class after installation of SL 5.5.0.32 on windows 7 In-Reply-To: <28f995c6-b009-1026-1acf-df6ae7bf4270@free.fr> References: <1440326479863-4032713.post@n3.nabble.com> <1498411303270-4036657.post@n3.nabble.com> <5012af39-429a-6ef3-5b6c-3ab518c158d2@durietz.se> <4496DE0B-0F3F-4EFD-A89F-40D9E0AA5615@gmail.com> <1504378688686-0.post@n3.nabble.com> <28f995c6-b009-1026-1acf-df6ae7bf4270@free.fr> Message-ID: <1504964671066-0.post@n3.nabble.com> I was able to run the Console and delete that directory, but nothing changed. I still have the problem. Any suggestions? -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From brijeshguptacr at gmail.com Sun Sep 10 08:47:30 2017 From: brijeshguptacr at gmail.com (brijesh guptacr) Date: Sun, 10 Sep 2017 12:17:30 +0530 Subject: [Scilab-users] scilab2c toolbox query In-Reply-To: <1504705418.4910.34.camel@esi-group.com> References: <1504705418.4910.34.camel@esi-group.com> Message-ID: Hello, Brijesh here. Abhinav and I work together on Scilab2c. 1)Will a completely rewritten scilab2c in 5.5.2 solve the issues we are facing? 2) Can you please explain in a little more detail as to how the suggested approach works in Scilab 6 and why not in 5.5.2. 3)Would switching from 5.5.2 to 6 help us? Sysdiag, orth, pca and svd to name a few functions that are problematic. With Regards, Brijesh Gupta C R On Wed, Sep 6, 2017 at 7:13 PM, Cl?ment David wrote: > Hello Abhinav, > > Nice to have someone interested in scilab2c. Currently there is no active > maintainer, feel free to > contribute to it. > > > 1) To write a new function, we always have to decide the output sizes > according to scalar inputs > > or size of input matrix. But, if our output size depends on an element > which is a part of matrix, > > what can we do to assign the output size accordingly. > > The current code generation need a C-like arguments representation for the > Scilab function to > generate the good corresponding C function call. If you wish to have a > more dynamic behavior to > define the outputs argument you should probably need to > serialize/deserialize them in some way to a > raw vector. > > > 2) There are few functions whose output size has no relation to input > matrix sizes, or they don't > > follow any regular pattern. For example, they depend on rank of input > matrix or something else. > > For such functions, is there any work around to estimate the size first > and assign accordingly in > > the Tool Initialisation part. > > No currently in the Scilab2C code and with my limited understanding, there > is no way to compute the > number of / size of the arguments. This approach however is fully valid > and is partially implemented > in the Scilab 6 analysis pass. A completely rewritten Scilab2C could then > use the propagated size / > types constraints to handle theses dynamic functions. Could you give me a > function you wish to add ? > > Thanks, > > -- > Cl?ment > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Sep 10 13:35:30 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 10 Sep 2017 13:35:30 +0200 Subject: [Scilab-users] figure_size Message-ID: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> Hi there When I create a new figure, I do newfig = scf(); Then to make the figure larger I do newfig.figure_size = [931,750]; // default is 626 x 587 // When height = 750 is specified, then it correctly becomes 817. // I have no idea why. Scilab is a bit weird. The top left corner stays the same, so the figure scales down. (Kinda smart, so you can always get hold of the top bar of the window), but unfortunately my PC monitor is not so large, the figure expand beyond the bottom of the screen. Is there a way in which I can call scf() with the desired figure size already preset? ... something like scf(figure._size = [931,750]); maybe ? Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Sep 10 14:03:20 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 10 Sep 2017 14:03:20 +0200 Subject: [Scilab-users] figure_size In-Reply-To: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> Message-ID: <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> Hi all I figured it out. At the beginning of the script I can call gdf and set parameters. I did: if saveplots then // if plots are to be saved to disk, then plotsize = [931,750]; // make larger plot, default is 626 x 587 p = gdf(); // Get Default Figure (p = PLOT) settings p.figure_position = [80,20]; // default is 200 x 200 // p.figure_size = [931,750]; end ... The (default) figure_size didn't work, so it's commented out, and so I continue to reset the plot size for each plot individually. Is this a Scilab bug, or is it my scripting being weird (again) ?? Best regards, Claus On 10-09-2017 13:35, Claus Futtrup wrote: > > Hi there > > When I create a new figure, I do newfig = scf(); > > Then to make the figure larger I do newfig.figure_size = [931,750]; // > default is 626 x 587 > > // When height = 750 is specified, then it correctly becomes 817. > > // I have no idea why. Scilab is a bit weird. > > The top left corner stays the same, so the figure scales down. (Kinda > smart, so you can always get hold of the top bar of the window), but > unfortunately my PC monitor is not so large, the figure expand beyond > the bottom of the screen. > > Is there a way in which I can call scf() with the desired figure size > already preset? ... something like scf(figure._size = [931,750]); maybe ? > > Best regards, > > Claus > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Sep 10 14:19:46 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 10 Sep 2017 12:19:46 +0000 Subject: [Scilab-users] figure_size In-Reply-To: <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> Message-ID: Hi Claus, You probably also need to set: p.auto_resize="off"; before ?p.figure_size?; otherwise it may not stick. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Sunday, September 10, 2017 2:03 PM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] figure_size Hi all I figured it out. At the beginning of the script I can call gdf and set parameters. I did: if saveplots then // if plots are to be saved to disk, then plotsize = [931,750]; // make larger plot, default is 626 x 587 p = gdf(); // Get Default Figure (p = PLOT) settings p.figure_position = [80,20]; // default is 200 x 200 // p.figure_size = [931,750]; end ... The (default) figure_size didn't work, so it's commented out, and so I continue to reset the plot size for each plot individually. Is this a Scilab bug, or is it my scripting being weird (again) ?? Best regards, Claus On 10-09-2017 13:35, Claus Futtrup wrote: Hi there When I create a new figure, I do newfig = scf(); Then to make the figure larger I do newfig.figure_size = [931,750]; // default is 626 x 587 // When height = 750 is specified, then it correctly becomes 817. // I have no idea why. Scilab is a bit weird. The top left corner stays the same, so the figure scales down. (Kinda smart, so you can always get hold of the top bar of the window), but unfortunately my PC monitor is not so large, the figure expand beyond the bottom of the screen. Is there a way in which I can call scf() with the desired figure size already preset? ... something like scf(figure._size = [931,750]); maybe ? Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Sep 10 14:47:50 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 10 Sep 2017 14:47:50 +0200 Subject: [Scilab-users] figure_size In-Reply-To: References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> Message-ID: Hi Rafael FYI, just adding auto_resize = "off" means that the actual plot doesn't resize to the new (bigger) plot area. I get a small plot in a larger plot area and lots of white space. You're probably right, I need a combo of settings. Best regards, Claus On 10-09-2017 14:19, Rafael Guerra wrote: > > Hi Claus, > > You probably also need to set: > > p.auto_resize="off"; > > before?p.figure_size?; otherwise it may not stick. > > Regards, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Claus Futtrup > *Sent:* Sunday, September 10, 2017 2:03 PM > *To:* International users mailing list for Scilab. > > *Subject:* Re: [Scilab-users] figure_size > > Hi all > > I figured it out. At the beginning of the script I can call gdf and > set parameters. I did: > > ifsaveplots then/// if plots are to be saved to disk, then/ > plotsize =[931,750]; /// make larger plot, default is 626 x 587/ > p =gdf(); /// Get Default Figure (p = PLOT) settings/ > p.figure_position =[80,20]; /// default is 200 x 200/ > ///p.figure_size = [931,750];/ > end > > ... The (default) figure_size didn't work, so it's commented out, and > so I continue to reset the plot size for each plot individually. > > Is this a Scilab bug, or is it my scripting being weird (again) ?? > > Best regards, > Claus > > On 10-09-2017 13:35, Claus Futtrup wrote: > > Hi there > > When I create a new figure, I do newfig = scf(); > > Then to make the figure larger I do newfig.figure_size = > [931,750]; /// default is 626 x 587/ > > /// When height = 750 is specified, then it correctly becomes 817./ > > /// I have no idea why. Scilab is a bit weird./ > > The top left corner stays the same, so the figure scales down. > (Kinda smart, so you can always get hold of the top bar of the > window), but unfortunately my PC monitor is not so large, the > figure expand beyond the bottom of the screen. > > Is there a way in which I can call scf() with the desired figure > size already preset? ... something like scf(figure._size = > [931,750]); maybe ? > > Best regards, > > Claus > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Sep 10 15:41:07 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 10 Sep 2017 13:41:07 +0000 Subject: [Scilab-users] figure_size In-Reply-To: References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> Message-ID: For your example, adding the p.axes_size command below should be enough: p=gdf(); p.background=8; p.figure_position = [80,20]; p.auto_resize="off"; p.figure_size = [931,750]; p.axes_size=[910,620]; plot2d() //create a figure Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Sunday, September 10, 2017 2:48 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] figure_size Hi Rafael FYI, just adding auto_resize = "off" means that the actual plot doesn't resize to the new (bigger) plot area. I get a small plot in a larger plot area and lots of white space. You're probably right, I need a combo of settings. Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Sep 10 16:03:22 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 10 Sep 2017 16:03:22 +0200 Subject: [Scilab-users] figure_size In-Reply-To: References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> Message-ID: <51cffa2e-5a5d-c5b5-7441-8759c646bef2@gmail.com> Hi Rafael You're right. I didn't find any other way (no automatic version). Thank you for your help. What does p.background = "8" do? ... officially it sets the background color = white (the default). Is there a reason / a trick to it? The biggest axis_size that works (for the 931 x 750 figure size) is [915,623]. This I found by trial and error. I didn't find an easy logical way to figure this out. I think keeping auto_resize = "on" is OK. Then you can change the size (e.g. with your mouse) and the figure resizes accordingly (just wait a bit, it takes some seconds). Thank you for your help. This is better because I don't have to resize during the script run (such resizing takes additional time to execute). I probably save half a minute every time I execute the script. :-) Best regards, Claus On 10-09-2017 15:41, Rafael Guerra wrote: > > For your example, adding the p.axes_sizecommand below should be enough: > > p=_gdf_(); > > p.background=8; > > p.figure_position=[80,20]; > > p.auto_resize="off"; > > p.figure_size=[931,750]; > > p.axes_size=[910,620]; > > plot2d()///create a figure/ > > Regards, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Claus Futtrup > *Sent:* Sunday, September 10, 2017 2:48 PM > *To:* users at lists.scilab.org > *Subject:* Re: [Scilab-users] figure_size > > Hi Rafael > > FYI, just adding auto_resize = "off" means that the actual plot > doesn't resize to the new (bigger) plot area. I get a small plot in a > larger plot area and lots of white space. > > You're probably right, I need a combo of settings. > > Best regards, > Claus > > > > _______________________________________________ > 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 Sun Sep 10 17:15:50 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Sep 2017 17:15:50 +0200 Subject: [Scilab-users] figure_size In-Reply-To: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> Message-ID: Hello, Le 10/09/2017 ? 13:35, Claus Futtrup a ?crit : > > Hi there > > When I create a new figure, I do newfig = scf(); > > Then to make the figure larger I do newfig.figure_size = [931,750]; // > default is 626 x 587 > > // When height = 750 is specified, then it correctly becomes 817. > > // I have no idea why. Scilab is a bit weird. > > The top left corner stays the same, so the figure scales down. (Kinda > smart, so you can always get hold of the top bar of the window), but > unfortunately my PC monitor is not so large, the figure expand beyond > the bottom of the screen. > > Is there a way in which I can call scf() with the desired figure size > already preset? ... something like scf(figure._size = [931,750]); maybe ? > In Scilab 6: --> scf().figure_size = [931 750]; --> // Isn't this great? There are not only weird things in Scilab ;) In both Scilab 5 and 6: --> set(scf(), "figure_size", [931 750]); HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Sep 10 17:26:24 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Sep 2017 17:26:24 +0200 Subject: [Scilab-users] figure_size In-Reply-To: References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> Message-ID: <90e93151-4ed4-b9dd-4c76-1dbf6cb0f6d1@free.fr> Le 10/09/2017 ? 14:47, Claus Futtrup a ?crit : > Hi Rafael > > FYI, just adding auto_resize = "off" means that the actual plot > doesn't resize to the new (bigger) plot area. I get a small plot in a > larger plot area and lots of white space. Right. By the way, fig.auto_resize = "off" makes fig.figure_size prone to the bug http://bugzilla.scilab.org/14650 From sgougeon at free.fr Sun Sep 10 17:32:29 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Sep 2017 17:32:29 +0200 Subject: [Scilab-users] figure_size In-Reply-To: <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> Message-ID: <133bbc7c-a66b-45d2-b1d8-f8ab13308a1b@free.fr> Le 10/09/2017 ? 14:03, Claus Futtrup a ?crit : > Hi all > > I figured it out. At the beginning of the script I can call gdf and > set parameters. I did: > > if saveplots then // if plots are to be saved to disk, then > plotsize = [931,750]; // make larger plot, default is 626 x 587 > p = gdf(); // Get Default Figure (p = PLOT) settings > p.figure_position = [80,20]; // default is 200 x 200 > // p.figure_size = [931,750]; > end > ... The (default) figure_size didn't work, so it's commented out, and > so I continue to reset the plot size for each plot individually. > > Is this a Scilab bug, Yes it is: confirmed. It is not yet reported. Just after calling scf() or figure(), the new figure is correctly sized according to the gdf().figure_size values. After a fraction of a second, it is then resized to the default default sizes instead.. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Sep 10 17:37:39 2017 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 10 Sep 2017 17:37:39 +0200 Subject: [Scilab-users] figure_size In-Reply-To: References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> Message-ID: Hi Samuel Thanks for all the (different email) responses - and below tip how to directly put the figure size with the scf() command. This directly answers my initial question. Thanks. How do you guys figure this out? Looking directly in the Scilab source-code? :-) Best regards, Claus On 10-09-2017 17:15, Samuel Gougeon wrote: > Hello, > > Le 10/09/2017 ? 13:35, Claus Futtrup a ?crit?: >> >> Hi there >> >> When I create a new figure, I do newfig = scf(); >> >> Then to make the figure larger I do newfig.figure_size = [931,750]; >> // default is 626 x 587 >> >> // When height = 750 is specified, then it correctly becomes 817. >> >> // I have no idea why. Scilab is a bit weird. >> >> The top left corner stays the same, so the figure scales down. (Kinda >> smart, so you can always get hold of the top bar of the window), but >> unfortunately my PC monitor is not so large, the figure expand beyond >> the bottom of the screen. >> >> Is there a way in which I can call scf() with the desired figure size >> already preset? ... something like scf(figure._size = [931,750]); maybe ? >> > > In Scilab 6: > --> scf().figure_size = [931 750]; > --> // Isn't this great? There are not only weird things in Scilab ;) > > In both Scilab 5 and 6: > --> set(scf(), "figure_size", [931 750]); > > HTH > 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 sgougeon at free.fr Sun Sep 10 18:04:37 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Sep 2017 18:04:37 +0200 Subject: [Scilab-users] figure_size In-Reply-To: References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> Message-ID: <7d423f28-550e-d98a-ff6e-6a64c2757e5f@free.fr> Le 10/09/2017 ? 17:37, Claus Futtrup a ?crit : > Hi Samuel > > Thanks for all the (different email) responses - and below tip how to > directly put the figure size with the scf() command. This directly > answers my initial question. Thanks. > > How do you guys figure this out? Looking directly in the Scilab > source-code? :-) That's right, Claus, this new feature named "Recursive extraction" is not documented (*), and even not announced in the 6.0.0 CHANGES page! Apparently, it must remain confidential. It was just announced at the last 2015 Scilabtech, and already sometimes addressed in this ML. (*) http://bugzilla.scilab.org/14211#c6 Best regards Samuel From sgougeon at free.fr Sun Sep 10 23:47:16 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Sep 2017 23:47:16 +0200 Subject: [Scilab-users] figure_size In-Reply-To: <133bbc7c-a66b-45d2-b1d8-f8ab13308a1b@free.fr> References: <0d02540f-22d3-2301-205e-59481a8aefdd@gmail.com> <1b2a7337-974d-a5be-df63-013e3d3aedbb@gmail.com> <133bbc7c-a66b-45d2-b1d8-f8ab13308a1b@free.fr> Message-ID: <9426be23-0dc3-3173-83ef-725a1aa62482@free.fr> Le 10/09/2017 ? 17:32, Samuel Gougeon a ?crit : > Le 10/09/2017 ? 14:03, Claus Futtrup a ?crit : >> Hi all >> >> I figured it out. At the beginning of the script I can call gdf and >> set parameters. I did: >> >> if saveplots then // if plots are to be saved to disk, then >> plotsize = [931,750]; // make larger plot, default is 626 x 587 >> p = gdf(); // Get Default Figure (p = PLOT) settings >> p.figure_position = [80,20]; // default is 200 x 200 >> // p.figure_size = [931,750]; >> end >> ... The (default) figure_size didn't work, so it's commented out, and >> so I continue to reset the plot size for each plot individually. >> >> Is this a Scilab bug, > > Yes it is: confirmed. It is not yet reported. > Just after calling scf() or figure(), the new figure is correctly > sized according to the gdf().figure_size values. > After a fraction of a second, it is then resized to the default > default sizes instead.. It is now reported here: http://bugzilla.scilab.org/15270 This bug is a regression brought by Scilab 5.0! (yes: 5, not 6) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Clement.David at esi-group.com Mon Sep 11 15:30:37 2017 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Mon, 11 Sep 2017 13:30:37 +0000 Subject: [Scilab-users] scilab2c toolbox query In-Reply-To: References: <1504705418.4910.34.camel@esi-group.com> Message-ID: <1505136636.4101.40.camel@esi-group.com> Hello Brijesh, To me, scilab2c for 5.5.2 works in its limited functional scope. For sysdiag or any other complex function is suggest you to define types / sizes in a dynamic way using a scilab function to compute them from inputs rather than implementing a mapping table (as it is currently done). FYI scilab2c does not seems to work on Scilab 6.0.0 (at least last time I checked). Thanks, -- Cl?ment Le dimanche 10 septembre 2017 ? 12:17 +0530, brijesh guptacr a ?crit : > Hello, > > Brijesh here. Abhinav and I work together on Scilab2c. > > 1)Will a completely rewritten scilab2c in 5.5.2 solve the issues we are facing? > > 2) Can you please explain in a little more detail as to how the suggested approach works in Scilab > 6 and why not in 5.5.2. > > 3)Would switching from 5.5.2 to 6 help us? > > Sysdiag, orth, pca and svd to name a few functions that are problematic. > > With Regards, > Brijesh Gupta C R > > On Wed, Sep 6, 2017 at 7:13 PM, Cl?ment David wrote: > > Hello Abhinav, > > > > Nice to have someone interested in scilab2c. Currently there is no active maintainer, feel free > > to > > contribute to it. > > > > > 1) To write a new function, we always have to decide the output sizes according to scalar > > inputs > > > or size of input matrix. But, if our output size depends on an element which is a part of > > matrix, > > > what can we do to assign the output size accordingly. > > > > The current code generation need a C-like arguments representation for the Scilab function to > > generate the good corresponding C function call. If you wish to have a more dynamic behavior to > > define the outputs argument you should probably need to serialize/deserialize them in some way > > to a > > raw vector. > > > > > 2) There are few functions whose output size has no relation to input matrix sizes, or they > > don't > > > follow any regular pattern. For example, they depend on rank of input matrix or something > > else. > > > For such functions, is there any work around to estimate the size first and assign accordingly > > in > > > the Tool Initialisation part. > > > > No currently in the Scilab2C code and with my limited understanding, there is no way to compute > > the > > number of / size of the arguments. This approach however is fully valid and is partially > > implemented > > in the Scilab 6 analysis pass. A completely rewritten Scilab2C could then use the propagated > > size / > > types constraints to handle theses dynamic functions. Could you give me a function you wish to > > add ? > > > > Thanks, > > > > -- > > Cl?ment > > _______________________________________________ > > 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 11 21:13:45 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 11 Sep 2017 21:13:45 +0200 Subject: [Scilab-users] getd in a script In-Reply-To: <1504799455256-0.post@n3.nabble.com> References: <1504799455256-0.post@n3.nabble.com> Message-ID: <4a6b37c7-3899-1cc8-7924-a19bda67b59e@free.fr> Hello Dana, Le 07/09/2017 ? 17:50, quant a ?crit : > I am running Scilab 6 on Windows 8.1. > > I have a directory named Macros where I have one file - helperfuncs.sci. > > In the console: > I cd to the directory that contains Macros. > --> getd('Macros\'); > That works. > > However, when I execute an .sci script that does the same thing I get an > error > Undefined variable: ?Macros > > I have tried the call without the '\' and get the same thing. Where is the script located wrt \Macros ? From where do you execute it, wrt \Macros ? Is there any cd(..) in the script? Reading you soon Samuel From herozigle at gmail.com Wed Sep 13 08:05:19 2017 From: herozigle at gmail.com (Hermes) Date: Tue, 12 Sep 2017 23:05:19 -0700 (MST) Subject: [Scilab-users] xselect () from previous versions of scilab Message-ID: <1505282719129-0.post@n3.nabble.com> Hello, What is the function in scilab 6.00 that replaces xselect () from previous versions of scilab? Have a good day Gracias Hermes -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From j-lan at online.no Wed Sep 13 09:41:03 2017 From: j-lan at online.no (=?UTF-8?Q?Jan_=c3=85ge_Langeland?=) Date: Wed, 13 Sep 2017 09:41:03 +0200 Subject: [Scilab-users] xselect () from previous versions of scilab In-Reply-To: <1505282719129-0.post@n3.nabble.com> References: <1505282719129-0.post@n3.nabble.com> Message-ID: <30970798-1e71-6e24-5114-c94035e207ff@online.no> On 13.09.2017 08:05, Hermes wrote: > Hello, > What is the function in scilab 6.00 that replaces xselect () from previous > versions of scilab? > Have a good day > Gracias > Hermes > show_window() ? J From herozigle at gmail.com Wed Sep 13 10:16:29 2017 From: herozigle at gmail.com (Hermes) Date: Wed, 13 Sep 2017 01:16:29 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab Message-ID: <1505290589159-0.post@n3.nabble.com> Hello, How to solve the following system of equations in scilab: U=(x-2)^2+(y-2)^2-z^2-9; V=x^6+y^6+z^6-9; avaluated U and V for z = 0 Gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From herozigle at gmail.com Wed Sep 13 10:36:07 2017 From: herozigle at gmail.com (Hermes) Date: Wed, 13 Sep 2017 01:36:07 -0700 (MST) Subject: [Scilab-users] xselect () from previous versions of scilab In-Reply-To: <30970798-1e71-6e24-5114-c94035e207ff@online.no> References: <1505282719129-0.post@n3.nabble.com> <30970798-1e71-6e24-5114-c94035e207ff@online.no> Message-ID: <1505291767435-0.post@n3.nabble.com> thanks for your attention It worked Hermes -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From nicolas.baleynaud at ecl13.ec-lyon.fr Wed Sep 13 11:45:02 2017 From: nicolas.baleynaud at ecl13.ec-lyon.fr (Nicolas Baleynaud) Date: Wed, 13 Sep 2017 11:45:02 +0200 (CEST) Subject: [Scilab-users] Advices for adaptive Filtering in XCOS In-Reply-To: <106399859.951820.1505295745723.JavaMail.zimbra@ecl13.ec-lyon.fr> References: <106399859.951820.1505295745723.JavaMail.zimbra@ecl13.ec-lyon.fr> Message-ID: <407114256.952277.1505295902466.JavaMail.zimbra@ecl13.ec-lyon.fr> Sorry forgot the state-space system, here in attachement. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sys_id_5red_b.mat Type: application/octet-stream Size: 1008 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sys_id_5red_c.mat Type: application/octet-stream Size: 1024 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sys_id_5red_d.mat Type: application/octet-stream Size: 192 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sys_id_5red_a.mat Type: application/octet-stream Size: 37648 bytes Desc: not available URL: From herozigle at gmail.com Wed Sep 13 17:21:23 2017 From: herozigle at gmail.com (Hermes) Date: Wed, 13 Sep 2017 08:21:23 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: <1505290589159-0.post@n3.nabble.com> References: <1505290589159-0.post@n3.nabble.com> Message-ID: <1505316083385-0.post@n3.nabble.com> I am trying to reproduce in Scilab in method of Draghilev. The document is developed from Maple. For the previous system develop the following script: /function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; [j,v,info]=fsolve([2;-0.1],list(Q,z)) disp(j,v,info) / 1. 0. 1.776D-15 1.496447 *0.9574371* The results do not coincide 100%. The result that differs is highlighted in black. The expected result is as follows: It will be possible to graph the function to guide me to select the initial values. something like this: function y = fct1(x) y = sin(x) - .25*x; endfunction fplot2d([-5:.1:5], fct1) show_window() x0 = [-5:5]; [x,v,info]=fsolve(x0, fct1); fplot2d(x', fct1,-1) disp(x,v) Gracias Hermes -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From Clement.David at esi-group.com Wed Sep 13 18:02:27 2017 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Wed, 13 Sep 2017 16:02:27 +0000 Subject: [Scilab-users] Server migration bugzilla.scilab.org / codereview.scilab.org Message-ID: <1505318546.2315.21.camel@esi-group.com> Dear users, The bugzilla / codereview server will be migrated to our new ESI-backed infrastructure. These services will be down for 24 to 48 hours ; we will do our best to minimize the down time. If you wish to submit a patch, please mail it to the dev mailing list. Sorry for the inconvenience, -- Cl?ment From herozigle at gmail.com Sun Sep 17 08:25:14 2017 From: herozigle at gmail.com (Hermes) Date: Sat, 16 Sep 2017 23:25:14 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: <1505290589159-0.post@n3.nabble.com> References: <1505290589159-0.post@n3.nabble.com> Message-ID: <1505629514455-0.post@n3.nabble.com> Hello, Please I need your comments. I have tried to solve the system with different initial conditions for fsolve and I always get the same wrong result for the second variable. function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; [j,v,info]=fsolve([*1.5;-0.9*],list(Q,z)) disp(j,v,info) Even when putting these initial values, very similar to the expected values, fsolve returns 1.496447 0.9574371 the second positive value By using these values as initial values in this script: //Draghilev's Method clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; [j,v,info]=fsolve([1.5;-0.9],list(Q,z)) disp(j,v,info) N=100; smin=0.0; smax=0.046; h=0.001; x01=1.496447; //3.9691163496*10^-12; x02=0.9574371; //0.353580783; x03=0; //-1.5130442808; ics=[x01; x02; x03]; disp(["x(3)^2+(x(2)-2)^2+(x(1)-2)^2-9";"x(3)^6+x(2)^6+x(1)^6-12"],"systema") disp(["2*(x(1)-2),2*(x(2)-2),2*x(3)";"6*x(1)^5,6*x(2)^5,6*x(3)^5"],"jacobian(Vm,[x(1),x(2),x(3)])"); // //D1=12*x(2)^5*x(3)-12*(x(2)-2)*x(3)^5; //D2=12*(x(1)-2)*x(3)^5-12*x(1)^5*x(3); //DD=12*x(1)^5*(x(2)-2)-12*(x(1)-2)*x(2)^5; function dydt=odes(t,x) //dydt=zeros(x); dydt(1)=-12*x(2)^5*x(3)-12*(x(2)-2)*x(3)^5; dydt(2)=12*(x(1)-2)*x(3)^5-12*x(1)^5*x(3); dydt(3)=12*x(1)^5*(x(2)-2)-12*(x(1)-2)*x(2)^5; endfunction step=smax/N; t=[smin:step:smax*N]; t0=0 atol=h/100000; rtol=h/100000; LL= ode("rk", ics,t0, t',atol,rtol,odes) LL=LL' a=gca();//get the handle of the newly created axes param3d1(LL(:,3),LL(:,2),LL(:,1),alpha=35,theta=45,"X at Y@Z",flag=[2,2]) a.rotation_angles=[65,75]; The calculations have taken a long time without converging to the solution. I have interrupted the execution of the same. By entering the correct values, almost instantaneously, you get the soclucion of the system. Help Me!!! gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sun Sep 17 11:05:14 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 17 Sep 2017 09:05:14 +0000 Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: <1505629514455-0.post@n3.nabble.com> References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> Message-ID: Hi, The solution returned by fsolve seems to be a valid one because: -->Q([1.496447;0.9574371 ],0) ans = - 0.0000002 - 0.0000001 You say that the initial guess of [1.5;-0.9] is close to the expected values, however: -->Q([1.5;-0.9],0) ans = - 7.54 - 0.077934 is far from being zero. So there is probably a typo in your equations. PS: Another trivial solution is: -->Q([-0.9574371,-1.496447],0) ans = - 0.0000002 - 0.0000001 Such non-linear problems should have multiple solutions, including complex ones. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Hermes Sent: Sunday, September 17, 2017 8:25 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] solve a system of equations in scilab Hello, Please I need your comments. I have tried to solve the system with different initial conditions for fsolve and I always get the same wrong result for the second variable. function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; [j,v,info]=fsolve([*1.5;-0.9*],list(Q,z)) disp(j,v,info) Even when putting these initial values, very similar to the expected values, fsolve returns 1.496447 0.9574371 the second positive value By using these values as initial values in this script: //Draghilev's Method clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; [j,v,info]=fsolve([1.5;-0.9],list(Q,z)) disp(j,v,info) N=100; smin=0.0; smax=0.046; h=0.001; x01=1.496447; //3.9691163496*10^-12; x02=0.9574371; //0.353580783; x03=0; //-1.5130442808; ics=[x01; x02; x03]; disp(["x(3)^2+(x(2)-2)^2+(x(1)-2)^2-9";"x(3)^6+x(2)^6+x(1)^6-12"],"systema") disp(["2*(x(1)-2),2*(x(2)-2),2*x(3)";"6*x(1)^5,6*x(2)^5,6*x(3)^5"],"jacobian(Vm,[x(1),x(2),x(3)])"); // //D1=12*x(2)^5*x(3)-12*(x(2)-2)*x(3)^5; //D2=12*(x(1)-2)*x(3)^5-12*x(1)^5*x(3); //DD=12*x(1)^5*(x(2)-2)-12*(x(1)-2)*x(2)^5; function dydt=odes(t,x) //dydt=zeros(x); dydt(1)=-12*x(2)^5*x(3)-12*(x(2)-2)*x(3)^5; dydt(2)=12*(x(1)-2)*x(3)^5-12*x(1)^5*x(3); dydt(3)=12*x(1)^5*(x(2)-2)-12*(x(1)-2)*x(2)^5; endfunction step=smax/N; t=[smin:step:smax*N]; t0=0 atol=h/100000; rtol=h/100000; LL= ode("rk", ics,t0, t',atol,rtol,odes) LL=LL' a=gca();//get the handle of the newly created axes param3d1(LL(:,3),LL(:,2),LL(:,1),alpha=35,theta=45,"X at Y@Z",flag=[2,2]) a.rotation_angles=[65,75]; The calculations have taken a long time without converging to the solution. I have interrupted the execution of the same. By entering the correct values, almost instantaneously, you get the soclucion of the system. Help Me!!! gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From herozigle at gmail.com Sun Sep 17 11:52:03 2017 From: herozigle at gmail.com (Hermes) Date: Sun, 17 Sep 2017 02:52:03 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> Message-ID: <1505641923490-0.post@n3.nabble.com> Hi, Rafael In my case, by setting as initial values [1.5, -0.9] I get: 1.496447 0.9574371 I always get the second positive value, when it is expected to be negative. clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; a=[0,0;1,0;1.2,-1;1.5,-0.9] for i = 1:3 [j,v,info]=fsolve(a(i,:)',list(Q,z)) disp(j,v,"results",a(i,:),"inc;",i) end in this script with several initial values, in the last pair of values, the solution is negative for the two variables, when in fact it is expected: and to my pairs the results are changed with respect to the variables / --> exec('C:\Users\hermesr\Documents\Scilab Xcos\fsolve_eje19.sce', -1) 1. inc; 0. 0. results 0. 1.243D-14 -0.9574371 -1.496447 2. inc; 1. 0. results 1.137D-13 1.345D-11 1.496447 0.9574371 3. inc; 1.2 -1. results 0. -1.599D-14/ * -0.9574371 -1.496447* -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From herozigle at gmail.com Sun Sep 17 12:03:03 2017 From: herozigle at gmail.com (Hermes) Date: Sun, 17 Sep 2017 03:03:03 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> Message-ID: <1505642583121-0.post@n3.nabble.com> Hi, Rafael In my case, by setting as initial values [1.5, -0.9] I get: 1.496447 0.9574371 I always get the second positive value, when it is expected to be negative. clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; a=[0,0;1,0;1.2,-1;1.5,-0.9] for i = 1:3 [j,v,info]=fsolve(a(i,:)',list(Q,z)) disp(j,v,"results",a(i,:),"inc;",i) end in this script with several initial values, in the last pair of values, the solution is negative for the two variables, when in fact it is expected: and to my pairs the results are changed with respect to the variables / --> exec('C:\Users\hermesr\Documents\Scilab Xcos\fsolve_eje19.sce', -1) 1. inc; 0. 0. results 0. 1.243D-14 -0.9574371 -1.496447 2. inc; 1. 0. results 1.137D-13 1.345D-11 1.496447 0.9574371 3. inc; 1.2 -1. results 0. -1.599D-14/ * -0.9574371 -1.496447* And I do not know why it evaluates the last one for vaslores as 1.2 and -1, when in the script for a (3, :) is entered [1.5, -0.9] -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sun Sep 17 12:05:41 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 17 Sep 2017 10:05:41 +0000 Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: <1505641923490-0.post@n3.nabble.com> References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> <1505641923490-0.post@n3.nabble.com> Message-ID: The "expected" solution is not a solution of the equations you forwarded: --> Q([1.496447;-0.9574371],0) ans = - 7.659497 - 0.0000001 Therefore there is probably a typo in the Q function forwarded. Plugin-in the fsolve solution into the Q-function does output zeros: -->Q([1.496447;0.9574371],0) ans = - 0.0000002 - 0.0000001 -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Hermes Sent: Sunday, September 17, 2017 11:52 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] solve a system of equations in scilab Hi, Rafael In my case, by setting as initial values [1.5, -0.9] I get: 1.496447 0.9574371 I always get the second positive value, when it is expected to be negative. clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; a=[0,0;1,0;1.2,-1;1.5,-0.9] for i = 1:3 [j,v,info]=fsolve(a(i,:)',list(Q,z)) disp(j,v,"results",a(i,:),"inc;",i) end in this script with several initial values, in the last pair of values, the solution is negative for the two variables, when in fact it is expected: and to my pairs the results are changed with respect to the variables / --> exec('C:\Users\hermesr\Documents\Scilab Xcos\fsolve_eje19.sce', -1) 1. inc; 0. 0. results 0. 1.243D-14 -0.9574371 -1.496447 2. inc; 1. 0. results 1.137D-13 1.345D-11 1.496447 0.9574371 3. inc; 1.2 -1. results 0. -1.599D-14/ * -0.9574371 -1.496447* -------------- next part -------------- An HTML attachment was scrubbed... URL: From herozigle at gmail.com Sun Sep 17 12:56:01 2017 From: herozigle at gmail.com (Hermes) Date: Sun, 17 Sep 2017 03:56:01 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> <1505641923490-0.post@n3.nabble.com> Message-ID: <1505645761811-0.post@n3.nabble.com> I've tried migrating the Maple code to Scilab: And this is how I do it: clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; [j,v,info]=fsolve([1.5;-0.9],list(Q,z)) disp(j,v,info) is there a better way for Scilab? I would like to get the three result [x1 x2 x3] with x3 = 0. I am venturing into Scilab for the first time. My experience, not much, is in Maple! GRACIAS -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sun Sep 17 13:02:31 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 17 Sep 2017 11:02:31 +0000 Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: <1505645761811-0.post@n3.nabble.com> References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> <1505641923490-0.post@n3.nabble.com> <1505645761811-0.post@n3.nabble.com> Message-ID: Schlumberger-Private As suspected you have an obvious typo in your equations, there is a plus that should be a minus: Sys(1)=(x(1)-2)^2+(x(2) - 2)^2+z^2-9; -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Hermes Sent: Sunday, September 17, 2017 12:56 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] solve a system of equations in scilab I've tried migrating the Maple code to Scilab: And this is how I do it: clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)+2)^2+z^2-9; Sys(2)=x(1)^6+x(2)^6+z^6-12; endfunction z=0; [j,v,info]=fsolve([1.5;-0.9],list(Q,z)) disp(j,v,info) is there a better way for Scilab? I would like to get the three result [x1 x2 x3] with x3 = 0. I am venturing into Scilab for the first time. My experience, not much, is in Maple! GRACIAS -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From herozigle at gmail.com Sun Sep 17 14:39:57 2017 From: herozigle at gmail.com (Hermes) Date: Sun, 17 Sep 2017 05:39:57 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> <1505641923490-0.post@n3.nabble.com> <1505645761811-0.post@n3.nabble.com> Message-ID: <1505651997141-0.post@n3.nabble.com> Thank you Rafael, a million thanks. I had not noticed that mistake, now everything is correct, xec('C:\Users\hermesr\Documents\Scilab Xcos\fsolve_eje19.sce', -1) 1. inc; 0. 0. results 0. 3.553D-15 1.496447 -0.9574371 2. inc; 1. 0. results 1.137D-13 1.345D-11 1.496447 -0.9574371 3. inc; 1.2 -1. results 0. 3.553D-15 1.496447 -0.9574371 4. inc; 1.5 -0.9 results 0. 3.553D-15 1.496447 -0.9574371 GRACIAS -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From taveirajc at gmail.com Sun Sep 17 21:07:25 2017 From: taveirajc at gmail.com (taveira) Date: Sun, 17 Sep 2017 12:07:25 -0700 (MST) Subject: [Scilab-users] SciNotes 5.4.1 crashes on any file action (Win7 64 bit) In-Reply-To: <1372860042875-4026954.post@n3.nabble.com> References: <1372687380998-4026929.post@n3.nabble.com> <51D19588.4070005@scilab-enterprises.com> <1372690632105-4026933.post@n3.nabble.com> <51D19F8E.6040900@scilab-enterprises.com> <1372695038214-4026936.post@n3.nabble.com> <51D1AD5C.7030308@scilab-enterprises.com> <1372696719368-4026938.post@n3.nabble.com> <1372858253463-4026951.post@n3.nabble.com> <51D4288A.1090800@scilab-enterprises.com> <1372860042875-4026954.post@n3.nabble.com> Message-ID: <1505675245425-0.post@n3.nabble.com> Hi, I have the same problem and would like to know if anyone could solve it. It looks like the post has not been terminated. Thank you. Taveira -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sunandakumarr at gmail.com Fri Sep 15 08:35:26 2017 From: sunandakumarr at gmail.com (Nandakumar G S) Date: Thu, 14 Sep 2017 23:35:26 -0700 (MST) Subject: [Scilab-users] Re-docking windows In-Reply-To: <1351762776218-4025128.post@n3.nabble.com> References: <1351762776218-4025128.post@n3.nabble.com> Message-ID: <1505457326074-0.post@n3.nabble.com> To Re-dock windows (file browser, variable browser, command history) Do the following Edit--> Preferences-->General-->Desktop Layout : Select a layout --> in the drop down combo box, select integrated. Important Note: if already integrated is selected Change it to simple and again select integrated and click ok. Close Scilab and Restart._______This works ! -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From herozigle at gmail.com Mon Sep 18 14:40:27 2017 From: herozigle at gmail.com (Hermes) Date: Mon, 18 Sep 2017 05:40:27 -0700 (MST) Subject: [Scilab-users] solve a system of equations in scilab In-Reply-To: <1505651997141-0.post@n3.nabble.com> References: <1505290589159-0.post@n3.nabble.com> <1505629514455-0.post@n3.nabble.com> <1505641923490-0.post@n3.nabble.com> <1505645761811-0.post@n3.nabble.com> <1505651997141-0.post@n3.nabble.com> Message-ID: <1505738427052-0.post@n3.nabble.com> with this script I manage to evaluate and obtain the third value within the results vector. clear; function Sys=Q(x,z) Sys(1)=(x(1)-2)^2+(x(2)-2)^2+x(3)^2-9; Sys(2)=x(1)^6+x(2)^6+x(3)^6-12; Sys(3)=x(3); endfunction a=[0,0 0;1 0 0;1.2 -1 0;1.5 -0.9 0] for i = 1:4 x(3)=0.0; [j,v,info]=fsolve(a(i,:)',list(Q,x(3))) disp(j',"estimated zero",v',"value of function at x","results", a(i,:),"iinitial value:",i) end --> exec('C:\Users\hermesr\Documents\Scilab Xcos\fsolve_eje20.sce', -1) 1. iinitial value: 0. 0. 0. results value of function at x 0. 3.553D-15 0. estimated zero 1.496447 -0.9574371 0. 2. iinitial value: 1. 0. 0. results value of function at x 1.137D-13 1.345D-11 0. estimated zero 1.496447 -0.9574371 0. 3. iinitial value: 1.2 -1. 0. results value of function at x 0. 3.553D-15 0. estimated zero 1.496447 -0.9574371 0. 4. iinitial value: 1.5 -0.9 0. results value of function at x 0. 3.553D-15 0. estimated zero 1.496447 -0.9574371 0. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Mon Sep 18 20:54:01 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Sep 2017 20:54:01 +0200 Subject: [Scilab-users] Strange floating point issue below %eps Message-ID: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> Dear co-Scilabers, I met a strange Scilab's bug this week-end. But today, i tried with Octave, Matlab2016 and R, and i found the same strange behavior. So, either i am missing something, or the bug affects all these languages in the same way. It is reported @ http://bugzilla.scilab.org/15276 In a few words, here it is: The mantissa of any decimal number is recorded on 53 bits (numbered #0 to #52) + 1 bit for the sign. This relative absolute accuracy sets the value of the epsilon-machine : --> %eps == 2^0 / 2^52 ans = T From here, it comes, as expected: --> 2^52 + 1 == 2^52 ans = F --> 2^53 - 1 == 2^53 ans = F --> 2^53 + 1 == 2^53 // (A) ans = T Now comes the issue: In (A), the relative difference 1/2^53 is too small (< %eps) to be recorded and to change the number. OK. Since 1 / (2^53 +2) is even smaller than 1 / (2^53), it should nor make a difference. Yet, it does: --> (2^53 + 2^1) + 1 == (2^53 + 2^1) ans = F How is this possible ??! But this occurs only when THIS bit #0 is set. For higher bits (hebelow the #1 one), we get back to the expected behavior: --> (2^53 + 2^2) + 1 == (2^53 + 2^2) ans = T So, when the bit #0 is set and we add a value on the bit "#-1", the language somewhat behaves as if there was a "withholding" value on the bit #0, and seems to toogle it. Is is a part of any IEEE floating point convention, or am i missing anything, or is it a true bug? Again, R, Octave and Matlab behave exactly in the same way... Looking forward to reading your thoughts, Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at icloud.com Mon Sep 18 23:45:53 2017 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Mon, 18 Sep 2017 14:45:53 -0700 (MST) Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) Message-ID: <1505771153884-0.post@n3.nabble.com> >>This version of Scilab will probably fail on this system (10.13): Scilab requires 10.8.3 (Mountain Lion) or newer system. It has failed. What can I do? I have not Mac OS X 10.13 in my iMac.... Heinz -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From antoine.monmayrant at laas.fr Tue Sep 19 08:51:36 2017 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Tue, 19 Sep 2017 08:51:36 +0200 Subject: [Scilab-users] Strange floating point issue below %eps In-Reply-To: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> References: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> Message-ID: <69b13ea9-daeb-2f25-3171-51e2e694c884@laas.fr> Hello Samuel, Is this some IEEE standard overflow wraparound? For information, Julia (0.6) does not behave exactly in the same way. Both 'print((2^53 + 2^2) + 1 == (2^53 + 2^2))' and? 'print((2^53 + 2^1) + 1 == (2^53 + 2^1))' return false. Antoine From antoine.monmayrant at laas.fr Tue Sep 19 08:58:46 2017 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Tue, 19 Sep 2017 08:58:46 +0200 Subject: [Scilab-users] Strange floating point issue below %eps In-Reply-To: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> References: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> Message-ID: <73ce2d3c-4b16-f4ef-526b-c7a0a5c8e315@laas.fr> Houps, my bad, julia does exactly the same when using Float64, not Int64: println((2.0^53 + 2.0^2) + 1.0 == (2.0^53 + 2.0^2)) true println((2.0^53 + 2.0^1) + 1.0 == (2.0^53 + 2.0^1)) false It has to be some normal IEEE thing but I did not manage to find the proper reference for it. Antoine Le 18/09/2017 ? 20:54, Samuel Gougeon a ?crit?: > > Dear co-Scilabers, > > I met a strange Scilab's bug this week-end. But today, i tried with > Octave, Matlab2016 and R, and i found the same strange behavior. So, > either i am missing something, or the bug affects all these languages > in the same way. It is reported @ http://bugzilla.scilab.org/15276 > > In a few words, here it is: > > The mantissa of any decimal number is recorded on 53 bits (numbered #0 > to #52) + 1 bit for the sign. > This relative absolute accuracy sets the value of the epsilon-machine : > --> %eps == 2^0 / 2^52 > ?ans? = > ? T > From here, it comes, as expected: > > --> 2^52 + 1 == 2^52 > ?ans? = > ? F > > --> 2^53 - 1 == 2^53 > ?ans? = > ? F > > --> 2^53 + 1 == 2^53?? // (A) > ?ans? = > ? T > > Now comes the issue: > In (A), the relative difference 1/2^53 is too small (< %eps) to be > recorded and to change the number. OK. > Since 1 / (2^53 +2) is even smaller than 1 / (2^53), it should nor > make a difference. Yet, it does: > > --> (2^53 + 2^1) + 1 == (2^53 + 2^1) > ?ans? = > ? F > > How is this possible ??! > But this occurs only when THIS bit #0 is set. For higher bits (hebelow > the #1 one), we get back to the expected behavior: > --> (2^53 + 2^2) + 1 == (2^53 + 2^2) > ?ans? = > ? T > > So, when the bit #0 is set and we add a value on the bit "#-1", the > language somewhat behaves as if there was a "withholding" value on the > bit #0, and seems to toogle it. > Is is a part of any IEEE floating point convention, or am i missing > anything, or is it a true bug? > Again, R, Octave and Matlab behave exactly in the same way... > > Looking forward to reading your thoughts, > > Samuel > > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Tue Sep 19 09:22:13 2017 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Tue, 19 Sep 2017 09:22:13 +0200 Subject: [Scilab-users] Strange floating point issue below %eps In-Reply-To: <73ce2d3c-4b16-f4ef-526b-c7a0a5c8e315@laas.fr> References: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> <73ce2d3c-4b16-f4ef-526b-c7a0a5c8e315@laas.fr> Message-ID: <6e9b94a5-02e3-ba81-dd8c-7fa7ad08fb9b@laas.fr> Just digging a bit further in julia: println("2.0^53+2.0^1?? : $(bits(2.0^53+2.0^1))") println("2.0^53+2.0^1+1 : $(bits(2.0^53+2.0^1+1))") println("") println("2.0^53+2.0^2?? : $(bits(2.0^53+2.0^2))") println("2.0^53+2.0^2+1 : $(bits(2.0^53+2.0^2+1))") gives: 2.0^53+2.0^1?? : 0100001101000000000000000000000000000000000000000000000000000001 2.0^53+2.0^1+1 : 0100001101000000000000000000000000000000000000000000000000000010 2.0^53+2.0^2?? : 0100001101000000000000000000000000000000000000000000000000000010 2.0^53+2.0^2+1 : 0100001101000000000000000000000000000000000000000000000000000010 So the first two are different while the last two are bit identical. I anyone can point to the specific bit in IEEE spec for this, I'll be happy! Antoine Le 19/09/2017 ? 08:58, antoine monmayrant a ?crit?: > > Houps, my bad, julia does exactly the same when using Float64, not Int64: > > > println((2.0^53 + 2.0^2) + 1.0 == (2.0^53 + 2.0^2)) > > true > > println((2.0^53 + 2.0^1) + 1.0 == (2.0^53 + 2.0^1)) > > false > > > It has to be some normal IEEE thing but I did not manage to find the > proper reference for it. > > > Antoine > > > Le 18/09/2017 ? 20:54, Samuel Gougeon a ?crit?: >> >> Dear co-Scilabers, >> >> I met a strange Scilab's bug this week-end. But today, i tried with >> Octave, Matlab2016 and R, and i found the same strange behavior. So, >> either i am missing something, or the bug affects all these languages >> in the same way. It is reported @ http://bugzilla.scilab.org/15276 >> >> In a few words, here it is: >> >> The mantissa of any decimal number is recorded on 53 bits (numbered >> #0 to #52) + 1 bit for the sign. >> This relative absolute accuracy sets the value of the epsilon-machine : >> --> %eps == 2^0 / 2^52 >> ?ans? = >> ? T >> From here, it comes, as expected: >> >> --> 2^52 + 1 == 2^52 >> ?ans? = >> ? F >> >> --> 2^53 - 1 == 2^53 >> ?ans? = >> ? F >> >> --> 2^53 + 1 == 2^53?? // (A) >> ?ans? = >> ? T >> >> Now comes the issue: >> In (A), the relative difference 1/2^53 is too small (< %eps) to be >> recorded and to change the number. OK. >> Since 1 / (2^53 +2) is even smaller than 1 / (2^53), it should nor >> make a difference. Yet, it does: >> >> --> (2^53 + 2^1) + 1 == (2^53 + 2^1) >> ?ans? = >> ? F >> >> How is this possible ??! >> But this occurs only when THIS bit #0 is set. For higher bits >> (hebelow the #1 one), we get back to the expected behavior: >> --> (2^53 + 2^2) + 1 == (2^53 + 2^2) >> ?ans? = >> ? T >> >> So, when the bit #0 is set and we add a value on the bit "#-1", the >> language somewhat behaves as if there was a "withholding" value on >> the bit #0, and seems to toogle it. >> Is is a part of any IEEE floating point convention, or am i missing >> anything, or is it a true bug? >> Again, R, Octave and Matlab behave exactly in the same way... >> >> Looking forward to reading your thoughts, >> >> Samuel >> >> >> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Paul.Bignier at esi-group.com Tue Sep 19 09:25:06 2017 From: Paul.Bignier at esi-group.com (Paul Bignier) Date: Tue, 19 Sep 2017 07:25:06 +0000 Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) In-Reply-To: <1505771153884-0.post@n3.nabble.com> References: <1505771153884-0.post@n3.nabble.com> Message-ID: Hello Heinz, I don't know why version 10.13 is detected but you should have a "Try anyway" button is that message window, did you try it? If it doesn't work, can you please try to run Scilab from a terminal (command 'bin/scilab') and send me the return? Which Scilab version are you running, and what MacOS version please? Regards, Paul Paul BIGNIER Development engineer ----------------------------------------------------------- ESI Group - Scilab 99 rue des Solets - 94513 Rungis, France Phone: +33.1.41.73.58.77 https://scilab.io https://esi-group.com ________________________________ From: users on behalf of Heinz Nabielek Sent: Monday, September 18, 2017 11:45 PM To: users at lists.scilab.org Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) >>This version of Scilab will probably fail on this system (10.13): Scilab requires 10.8.3 (Mountain Lion) or newer system. It has failed. What can I do? I have not Mac OS X 10.13 in my iMac.... Heinz -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.pincon at univ-lorraine.fr Tue Sep 19 11:16:39 2017 From: bruno.pincon at univ-lorraine.fr (=?UTF-8?Q?Pin=c3=a7on_Bruno?=) Date: Tue, 19 Sep 2017 11:16:39 +0200 Subject: [Scilab-users] Strange floating point issue below %eps In-Reply-To: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> References: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> Message-ID: <07f17707-c57d-50fa-d6fe-ba7196278fea@univ-lorraine.fr> Le 18/09/2017 ? 20:54, Samuel Gougeon a ?crit?: > > Now comes the issue: > In (A), the relative difference 1/2^53 is too small (< %eps) to be > recorded and to change the number. OK. > Since 1 / (2^53 +2) is even smaller than 1 / (2^53), it should nor > make a difference. Yet, it does: > > --> (2^53 + 2^1) + 1 == (2^53 + 2^1) > ?ans? = > ? F > > How is this possible ??! > Hi all, ?? no issue here but simply the round to even rule. Every real number ? should be approximated by the nearest floating point number but in case of ? a number exactly between 2 successive floats the one with an even end ? digit win. You can see this rule as a mean to approximate those ambiguous cases, ? one in two down and one in two up, but has more subtle features in it such ? (it is explained in Knuth I). ? OK that2^53 + 2^1 is exactly represented ? (it is a double float number). When computing : ????????? x = (2^53 + 2^1) + 1 ? it is not a float but is exactly at the same distance between the two floats : 2^53 + 2^1?? and 2^53 + 2^2? but this last one ends with a even digit (0) ? so : ???????? fl( (2^53 + 2^1) + 1) = 2^53 + 2^2 ? hth ?Bruno -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Tue Sep 19 12:08:02 2017 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Tue, 19 Sep 2017 12:08:02 +0200 Subject: [Scilab-users] Strange floating point issue below %eps In-Reply-To: <07f17707-c57d-50fa-d6fe-ba7196278fea@univ-lorraine.fr> References: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> <07f17707-c57d-50fa-d6fe-ba7196278fea@univ-lorraine.fr> Message-ID: <4741acae-3359-5f54-5c4d-2d57ece2478a@laas.fr> Thanks a lot Bruno! I knew I had read something like that but could not remember what it was called. Cheers, Antoine PS: Samuel, do you think you could close the bug by pointing to this "round to even" rule? Le 19/09/2017 ? 11:16, Pin?on Bruno a ?crit?: > Le 18/09/2017 ? 20:54, Samuel Gougeon a ?crit?: >> >> Now comes the issue: >> In (A), the relative difference 1/2^53 is too small (< %eps) to be >> recorded and to change the number. OK. >> Since 1 / (2^53 +2) is even smaller than 1 / (2^53), it should nor >> make a difference. Yet, it does: >> >> --> (2^53 + 2^1) + 1 == (2^53 + 2^1) >> ?ans? = >> ? F >> >> How is this possible ??! >> > > Hi all, > > ?? no issue here but simply the round to even rule. Every real number > ? should be approximated by the nearest floating point number but in > case of > ? a number exactly between 2 successive floats the one with an even end > ? digit win. You can see this rule as a mean to approximate those > ambiguous cases, > ? one in two down and one in two up, but has more subtle features in > it such > ? (it is explained in Knuth I). > > > ? OK that2^53 + 2^1 is exactly represented > ? (it is a double float number). When computing : > > ????????? x = (2^53 + 2^1) + 1 > > ? it is not a float but is exactly at the same distance between the > two floats : > > 2^53 + 2^1?? and 2^53 + 2^2? but this last one ends with a even digit (0) > ? so : > ???????? fl( (2^53 + 2^1) + 1) = 2^53 + 2^2 > > ? hth > ?Bruno > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From herozigle at gmail.com Tue Sep 19 13:51:56 2017 From: herozigle at gmail.com (Hermes) Date: Tue, 19 Sep 2017 04:51:56 -0700 (MST) Subject: [Scilab-users] update script to Scilab 6.00 Message-ID: <1505821916822-0.post@n3.nabble.com> how to update this script to scilab 6.00. I really do not know where and how to substitute ?pixmap? for drawlater and drawnow and get the animation as good as shown on the source website of the script //http://www.ulb.ac.be/polytech/smana/TUTORIAL.htm function dy=fon(t, y) global g l dy(1) = y(2); dy(2)=-g/l*sin(y(1)); endfunction teta_init = 45;teta_init=teta_init/180*pi;dteta_init = 0; g=9.81;l=1; t=0:0.1:20; y=ode([teta_init;dteta_init],0,[t],fon); //Preparation du graphe f = gcf(); // on recupere le handle de la fen^etre graphique f.pixmap = "on"; // on met la fenetre en mode double buffer f.background = color("white"); f.foreground = color("white");; //FIN Preparation du graphe i = 1; while i<=length(y) i = i+1; clf(); // On efface l'image pr?c?dente - on ?vite le scintillement xtitle('', 'm', 'm'); a = gca(); // On r?cup?re l'objet graphique axes pour modifier les l?gendes a.isoview = "on"; a.data_bounds = [-2 2 -2 2]; a.title.text = "Le pendule "; a.title.font_size = 4; a.title.foreground = color("white"); a.background = color("white");; xpoly([0 +l*sin(y(1,i))],[0 -l*cos(y(1,i))],"lines",0) ep = gce(); // On r?cup?re l'objet graphique double-pendule atwood // pour modifier son aspect cosm?tique ep.thickness = 3;ep.foreground = color("blue"); plot([+l*sin(y(1,i))],[-l*cos(y(1,i))],'o','MarkSize',10,'MarkBackground','b') xgrid(12) show_pixmap() // basculement de la pixmap a l'ecran end f.pixmap = "off"; // on remet la fen^etre en mode usuel Gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From Paul.Bignier at esi-group.com Thu Sep 21 15:00:37 2017 From: Paul.Bignier at esi-group.com (Paul Bignier) Date: Thu, 21 Sep 2017 13:00:37 +0000 Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) In-Reply-To: References: <1505771153884-0.post@n3.nabble.com> , Message-ID: Hi Heinz, As the error seems to be related to libBLAS, as it was for Scilab 5, here's a link to a discussion with a fix that may help: http://mailinglists.scilab.org/Scilab-users-macOS-Sierra-Scilab-not-working-yet-td4034586.html Please get back to us with your results! Regards, Paul Paul BIGNIER Development engineer ----------------------------------------------------------- ESI Group - Scilab 99 rue des Solets - 94513 Rungis, France Phone: +33.1.41.73.58.77 https://scilab.io https://esi-group.com ________________________________ From: Heinz Nabielek Sent: Thursday, September 21, 2017 11:18 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] This version of Scilab will probably fail on this system (10.13) Thanks, Paul. I had recently updated my iMac from Mac OS 10.12 to Mac OS 10.13 and then Scilab 6.0 (nor Scilab 5.5.2) did not work any more. Yes: I clicked the "Try anyway" button, but this had no effect. AND /bin/scilab: No such file or directory ! > Heinzs-iMac:~ heinznabielek$ /bin/scilab > -bash: /bin/scilab: No such file or directory However, /Applications/scilab-6.0.0.app/Contents/MacOS/bin/scilab starts with the "Try anyway" window and an error message true dyld: Symbol not found: _double_general_add Referenced from: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib Expected in: /Applications/scilab-6.0.0.app/Contents/MacOS/lib/thirdparty/libBLAS.dylib in /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib /Applications/scilab-6.0.0.app/Contents/MacOS/bin/scilab: line 957: 1470 Abort trap: 6 "$SCILABBIN" "$@" Where do we go from here? Heinz > On 19.09.2017, at 09:25, Paul Bignier wrote: > > > Hello Heinz, > > I don't know why version 10.13 is detected but you should have a "Try anyway" button is that message window, did you try it? > If it doesn't work, can you please try to run Scilab from a terminal (command 'bin/scilab') and send me the return? > Which Scilab version are you running, and what MacOS version please? > > Regards, > Paul > > Paul BIGNIER > Development engineer > ----------------------------------------------------------- > ESI Group - Scilab > 99 rue des Solets - 94513 Rungis, France > Phone: +33.1.41.73.58.77 > https://scilab.io > https://esi-group.com > > > From: users on behalf of Heinz Nabielek > Sent: Monday, September 18, 2017 11:45 PM > To: users at lists.scilab.org > Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) > > >>This version of Scilab will probably fail on this system (10.13): Scilab > requires 10.8.3 (Mountain Lion) or newer system. > > It has failed. What can I do? I have not Mac OS X 10.13 in my iMac.... > Heinz > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhinav.dronamraju at gmail.com Fri Sep 22 08:20:58 2017 From: abhinav.dronamraju at gmail.com (Abhinav Dronamraju) Date: Fri, 22 Sep 2017 11:50:58 +0530 Subject: [Scilab-users] SCILAB2C toolbox ATOMS update Message-ID: Dear Sir, We have been working on the scilab2c toolbox for some time now and we want to update our changes in the atoms webpage of yours. What do we need to do to get this thing done and update the functions, other changes we have done in your atoms webpage ? Regards, Abhinav Dronamraju -------------- next part -------------- An HTML attachment was scrubbed... URL: From rsthakur922 at gmail.com Fri Sep 22 15:09:42 2017 From: rsthakur922 at gmail.com (rusty148) Date: Fri, 22 Sep 2017 06:09:42 -0700 (MST) Subject: [Scilab-users] actxserver in SciLab Message-ID: <1506085782381-0.post@n3.nabble.com> I am trying to run a program through SciLab using actxserver command ( similar to MATLAB). But it is showing error. I have used the same command in MATLAB and it works. The command is DC= actxserver('DesktopController.CoModel'); % actxserver('ProgID') Please use the ProgID that you have to try on your PC. Thanks I am using : SciLab 6.0.0 for windows 64 Bit https://www.scilab.org/en/download/latest -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sat Sep 23 12:48:42 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 23 Sep 2017 12:48:42 +0200 Subject: [Scilab-users] Strange floating point issue below %eps In-Reply-To: <07f17707-c57d-50fa-d6fe-ba7196278fea@univ-lorraine.fr> References: <03a6b389-083a-0dad-b6ab-b8a9a29ecf44@free.fr> <07f17707-c57d-50fa-d6fe-ba7196278fea@univ-lorraine.fr> Message-ID: Hello, Le 19/09/2017 ? 11:16, Pin?on Bruno a ?crit : > Le 18/09/2017 ? 20:54, Samuel Gougeon a ?crit : >> >> Now comes the issue: >> In (A), the relative difference 1/2^53 is too small (< %eps) to be >> recorded and to change the number. OK. >> Since 1 / (2^53 +2) is even smaller than 1 / (2^53), it should nor >> make a difference. Yet, it does: >> >> --> (2^53 + 2^1) + 1 == (2^53 + 2^1) >> ans = >> F >> >> How is this possible ??! >> > > Hi all, > > no issue here but simply the round to even rule. Every real number > should be approximated by the nearest floating point number but in > case of > a number exactly between 2 successive floats the one with an even end > digit win. You can see this rule as a mean to approximate those > ambiguous cases, > one in two down and one in two up, but has more subtle features in > it such > (it is explained in Knuth I). > > > OK that2^53 + 2^1 is exactly represented > (it is a double float number). When computing : > > x = (2^53 + 2^1) + 1 > > it is not a float but is exactly at the same distance between the > two floats : > > 2^53 + 2^1 and 2^53 + 2^2 but this last one ends with a even digit (0) > so : > fl( (2^53 + 2^1) + 1) = 2^53 + 2^2 > > hth > Bruno Thank you Bruno for this explanation and confirmation! Up to before, i was naively considering that all what is smaller than %eps is ignored. But it is not the case. This rounding rule has some somewhat puzzling side effects, since as initially illustrated, it leads to sometimes take into account some relative quantities smaller than some other ones that are ignored... So, i guess that whether this algorithm has been chosen, it shall have more advantages than this kind of pitfall. Afterwards, i had a look to the Scilab %eps and number_properties help pages: https://help.scilab.org/docs/6.0.0/en_US/percenteps.html https://help.scilab.org/docs/6.0.0/en_US/number_properties.html The IEEE 754 standard is quoted. Digging about it, for instance in https://en.wikipedia.org/wiki/IEEE_754 https://fr.wikipedia.org/wiki/IEEE_754 is very instructive. There is a whole section about rounding methodS. Le 19/09/2017 ? 12:08, antoine monmayrant a ?crit : > PS: Samuel, do you think you could close the bug by pointing to this "round to even" rule? I am keeping open and updating the report. IMO the posted %eps "exception" would deserve being documented as an example, either in the %eps or the number_properties page. Moreover, cross-references are missing between both pages. Finally, an external pointer to IEEE 754 would be welcome. I will propose a revision. Again thanks for your answers. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Sep 23 13:21:02 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 23 Sep 2017 13:21:02 +0200 Subject: [Scilab-users] Cannot access module at atom.scilab In-Reply-To: <1503399013.2344.10.camel@esi-group.com> References: <1503399013.2344.10.camel@esi-group.com> Message-ID: Hello, Le 22/08/2017 ? 12:50, Cl?ment David a ?crit : > Hi, > > You could still use `atomsInstall foo.zip` to install a binary module. To download it, use the link > within the atoms.scilab.org website. It is impossible now for almost 2 full months to update existing ATOMS modules -- noticeably for Scilab 6 -- or to create and upload new ones. The red warning message telling something like "/Dear visitors/customers, due to the migration, the service is suspended; it is no longer possible to login/" was removed this week. But it is still impossible to login. This message was quite clear about the fact that ATOMS does not really address users that are neither just tourists visitors nor customers aka creditworthy users. It is quite easy to understand that maintaining a system that distributes some freely available resources is not a priority for ESI and its business model. This is why, IMO, the Scilab community should seriously consider relieving ESI from this pain and set an external public server managed out of it. In the way, improvements about such an ATOMS and FileExchange clone could be done in an open way. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at icloud.com Sat Sep 23 21:15:43 2017 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Sat, 23 Sep 2017 12:15:43 -0700 (MST) Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) Message-ID: <1506194143801-0.post@n3.nabble.com> This does not work either. Below messages...What can we do now? Heinz Heinzs-iMac:~ heinznabielek$ /Applications/scilab-6.0.0.app/Contents/MacOS/bin/scilab true dyld: Symbol not found: _inflateValidate Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib Expected in: /Applications/scilab-6.0.0.app/Contents/MacOS/lib/thirdparty/libz.1.dylib in /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib /Applications/scilab-6.0.0.app/Contents/MacOS/bin/scilab: line 957: 945 Abort trap: 6 "$SCILABBIN" "$@" On 21.09.2017, at 15:00, Paul Bignier wrote: Hi Heinz, As the error seems to be related to libBLAS, as it was for Scilab 5, here's a link to a discussion with a fix that may help: http://mailinglists.scilab.org/Scilab-users-macOS-Sierra-Scilab-not-working-yet-td4034586.html Please get back to us with your results! Regards, Paul -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From heinznabielek at icloud.com Sun Sep 24 00:51:37 2017 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Sat, 23 Sep 2017 22:51:37 +0000 (GMT) Subject: [Scilab-users] simulated binomial is shifted to the left Message-ID: <7dec7bd4-a19c-4003-8fe7-5b885573328e@me.com> When I compare Monte-Carlo simulated binomial distributions with the respective analytical binomial distributions, the histplot of the simulated ones is shifted to the left. What am I doing wrong? Heinz SciLab code: p=[0.1176471??? 0.2352941??? 0.0588235??? 0.3882353??? 0.2]; N=100; for i=1:5;histplot(0:60,grand(1,10000,"bin",N,p(i)),style=i);plot2d(binomial(p(i),N),style=i,rect=[0 0 60 .175]);end; -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: shifted simulated binomial.pdf Type: application/x-download Size: 10188 bytes Desc: not available URL: From Paul.Bignier at esi-group.com Sun Sep 24 02:15:20 2017 From: Paul.Bignier at esi-group.com (Paul Bignier) Date: Sun, 24 Sep 2017 00:15:20 +0000 Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) In-Reply-To: <1506194143801-0.post@n3.nabble.com> References: <1506194143801-0.post@n3.nabble.com> Message-ID: Looks like there was a libz update, you may refer to http://gnucash.1415818.n4.nabble.com/2-6-17-for-MacOS-X-td4692832.html to replace the libz* files in /Applications/scilab-6.0.0.app/Contents/MacOS/lib/thirdparty/ by the ones in /usr/lib/, it looks like it went from 1.2.3 to 1.2.4 or 1.2.8. Regards, Paul Paul BIGNIER Development engineer ----------------------------------------------------------- ESI Group - Scilab 99 rue des Solets - 94513 Rungis, France Phone: +33.1.41.73.58.77 https://scilab.io https://esi-group.com ________________________________ From: users on behalf of Heinz Nabielek Sent: Saturday, September 23, 2017 9:15 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] This version of Scilab will probably fail on this system (10.13) This does not work either. Below messages...What can we do now? Heinz Heinzs-iMac:~ heinznabielek$ /Applications/scilab-6.0.0.app/Contents/MacOS/bin/scilab true dyld: Symbol not found: _inflateValidate Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib Expected in: /Applications/scilab-6.0.0.app/Contents/MacOS/lib/thirdparty/libz.1.dylib in /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib /Applications/scilab-6.0.0.app/Contents/MacOS/bin/scilab: line 957: 945 Abort trap: 6 "$SCILABBIN" "$@" On 21.09.2017, at 15:00, Paul Bignier wrote: Hi Heinz, As the error seems to be related to libBLAS, as it was for Scilab 5, here's a link to a discussion with a fix that may help: http://mailinglists.scilab.org/Scilab-users-macOS-Sierra-Scilab-not-working-yet-td4034586.html Please get back to us with your results! Regards, Paul -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Sep 24 10:45:59 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 24 Sep 2017 08:45:59 +0000 Subject: [Scilab-users] simulated binomial is shifted to the left In-Reply-To: <7dec7bd4-a19c-4003-8fe7-5b885573328e@me.com> References: <7dec7bd4-a19c-4003-8fe7-5b885573328e@me.com> Message-ID: Defining an appropriate x-axis support for plot2d and binomial helps: // START OF CODE clf; p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2]; N=100; for i=1:5; histplot(0:60,grand(1,10000,"bin",N,p(i)),style=i); x = linspace(-0.5,N-0.5,N+1) plot2d(x,binomial(p(i),N),style=i,rect=[0 0 60 .175]); end; // END OF CODE Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Heinz Nabielek Sent: Sunday, September 24, 2017 12:52 AM To: Users mailing list for Scilab Subject: [Scilab-users] simulated binomial is shifted to the left When I compare Monte-Carlo simulated binomial distributions with the respective analytical binomial distributions, the histplot of the simulated ones is shifted to the left. What am I doing wrong? Heinz SciLab code: p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2]; N=100; for i=1:5;histplot(0:60,grand(1,10000,"bin",N,p(i)),style=i);plot2d(binomial(p(i),N),style=i,rect=[0 0 60 .175]);end; -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at icloud.com Sun Sep 24 11:33:24 2017 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Sun, 24 Sep 2017 11:33:24 +0200 Subject: [Scilab-users] simulated binomial is shifted to the left In-Reply-To: References: <7dec7bd4-a19c-4003-8fe7-5b885573328e@me.com> Message-ID: Hi Rafael: Beautiful. Works like a charm. Thank you so very much.... IMHO, the code shows how to Monte-Carlo simulate discrete distributions that you never find described in such a simple way in statistics textbooks. Heinz On 24.09.2017, at 10:45, Rafael Guerra wrote: > Defining an appropriate x-axis support for plot2d and binomial helps: > > // START OF CODE > clf; > p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2]; > N=100; > for i=1:5; > histplot(0:60,grand(1,10000,"bin",N,p(i)),style=i); > x = linspace(-0.5,N-0.5,N+1); > plot2d(x,binomial(p(i),N),style=i,rect=[0 0 60 .175]); > end; > // END OF CODE > > Regards, > Rafael > > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Heinz Nabielek > Sent: Sunday, September 24, 2017 12:52 AM > To: Users mailing list for Scilab > Subject: [Scilab-users] simulated binomial is shifted to the left > > When I compare Monte-Carlo simulated binomial distributions with the respective analytical binomial distributions, the histplot of the simulated ones is shifted to the left. What am I doing wrong? > Heinz > > > SciLab code: > p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2]; N=100; > for i=1:5;histplot(0:60,grand(1,10000,"bin",N,p(i)),style=i);plot2d(binomial(p(i),N),style=i,rect=[0 0 60 .175]);end; From heinznabielek at icloud.com Mon Sep 25 14:03:05 2017 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Mon, 25 Sep 2017 12:03:05 +0000 (GMT) Subject: [Scilab-users] Is there a way to do it with Matrix Operations? Message-ID: <8fdf4ff1-6bdb-42b2-898e-e2ddbba2f907@me.com> Dear colleagues: in an attempt to code the generation of random deviates for a user-defined probability function p=[0.1176471??? 0.2352941??? 0.0588235??? 0.3882353??? 0.2 ], I spent only a few minutes to write the Scilab code below and it gives me all the solutions (frequency distribution of random numbers) that I need. N=100;X=grand(7,N,'def'); C=[];for j=1:7;Count(1:5)=0;for k=1:N;i=1;while X(j,k)>P(i);i=i+1;end;Count(i)=Count(i)+1;end;C=[C Count];end; and one typical sample run yields this C? = ?? 15.??? 9.???? 6.???? 12.??? 8.???? 12.??? 10. ? ?? 20.??? 26.??? 38.??? 20.??? 23.??? 26.??? 24. ? ?? 6.???? 7.???? 4.???? 7.???? 5.???? 10.??? 4.? ? ?? 38.??? 39.??? 32.??? 37.??? 48.??? 30.??? 39. ? ?? 21.??? 19.??? 20.??? 24.??? 16.??? 22.??? 23. However, the for and while loops will be terribly inefficient and this is not good for large scale Monte-Carlo simulations. Is there a way to do it with Matrix Operations? Best greetings Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Sep 25 18:58:31 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 25 Sep 2017 16:58:31 +0000 Subject: [Scilab-users] Is there a way to do it with Matrix Operations? In-Reply-To: <8fdf4ff1-6bdb-42b2-898e-e2ddbba2f907@me.com> References: <8fdf4ff1-6bdb-42b2-898e-e2ddbba2f907@me.com> Message-ID: Hi Heinz, Your code example is not working. The index ?i? runs out of bounds. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Heinz Nabielek Sent: Monday, September 25, 2017 2:03 PM To: Users mailing list for Scilab Subject: [Scilab-users] Is there a way to do it with Matrix Operations? Dear colleagues: in an attempt to code the generation of random deviates for a user-defined probability function p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2 ], I spent only a few minutes to write the Scilab code below and it gives me all the solutions (frequency distribution of random numbers) that I need. N=100;X=grand(7,N,'def'); C=[];for j=1:7;Count(1:5)=0;for k=1:N;i=1;while X(j,k)>P(i);i=i+1;end;Count(i)=Count(i)+1;end;C=[C Count];end; and one typical sample run yields this C = 15. 9. 6. 12. 8. 12. 10. 20. 26. 38. 20. 23. 26. 24. 6. 7. 4. 7. 5. 10. 4. 38. 39. 32. 37. 48. 30. 39. 21. 19. 20. 24. 16. 22. 23. However, the for and while loops will be terribly inefficient and this is not good for large scale Monte-Carlo simulations. Is there a way to do it with Matrix Operations? Best greetings Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at icloud.com Mon Sep 25 20:01:06 2017 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Mon, 25 Sep 2017 20:01:06 +0200 Subject: [Scilab-users] Is there a way to do it with Matrix Operations? In-Reply-To: References: <8fdf4ff1-6bdb-42b2-898e-e2ddbba2f907@me.com> Message-ID: On 25.09.2017, at 18:58, Rafael Guerra wrote: > Hi Heinz, > > Your code example is not working. > The index ?i? runs out of bounds. > > Regards, > Rafael Sorry, I had forgotten the code line -->P=cumsum(p)'; So my question again: can you suggest matrix operations that make my code more efficient? The code is meant to generate random deviates for a user-defined discrete distribution. Below the full set of instructions and example solutions that are good, but achieved in an inefficient way. Heinz -->p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2 ]; -->P=cumsum(p)'; -->N=100;X=grand(7,N,'def');C=[];for j=1:7;Count(1:5)=0;for k=1:N;i=1;while X(j,k)>P(i);i=i+1;end;Count(i)=Count(i)+1;end;C=[C Count];end;C C = 9. 10. 13. 9. 12. 6. 19. 32. 21. 15. 18. 22. 24. 20. 10. 4. 3. 12. 4. 9. 6. 37. 45. 47. 39. 44. 42. 38. 12. 20. 22. 22. 18. 19. 17. -->N=100;X=grand(7,N,'def');C=[];for j=1:7;Count(1:5)=0;for k=1:N;i=1;while X(j,k)>P(i);i=i+1;end;Count(i)=Count(i)+1;end;C=[C Count];end;C C = 14. 13. 18. 12. 12. 9. 13. 25. 27. 27. 23. 27. 18. 14. 4. 4. 3. 6. 10. 4. 2. 45. 38. 34. 40. 34. 45. 47. 12. 18. 18. 19. 17. 24. 24. From jrafaelbguerra at hotmail.com Mon Sep 25 20:43:34 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 25 Sep 2017 18:43:34 +0000 Subject: [Scilab-users] Is there a way to do it with Matrix Operations? In-Reply-To: <8fdf4ff1-6bdb-42b2-898e-e2ddbba2f907@me.com> References: <8fdf4ff1-6bdb-42b2-898e-e2ddbba2f907@me.com> Message-ID: Hi Heinz, Check this solution: // START OF CODE p = [0.1176471 0.2352941 0.0588235 0.3882353 0.2 ]; P = cumsum(p)'; np = length(P); nj = 7; N = 100; X = grand(nj,N,'def'); C = zeros(np,nj); P = [0;P]; for i=1:np C(i,:) = sum((X>=P(i) & X Subject: [Scilab-users] Is there a way to do it with Matrix Operations? Dear colleagues: in an attempt to code the generation of random deviates for a user-defined probability function p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2 ], I spent only a few minutes to write the Scilab code below and it gives me all the solutions (frequency distribution of random numbers) that I need. N=100;X=grand(7,N,'def'); C=[];for j=1:7;Count(1:5)=0;for k=1:N;i=1;while X(j,k)>P(i);i=i+1;end;Count(i)=Count(i)+1;end;C=[C Count];end; and one typical sample run yields this C = 15. 9. 6. 12. 8. 12. 10. 20. 26. 38. 20. 23. 26. 24. 6. 7. 4. 7. 5. 10. 4. 38. 39. 32. 37. 48. 30. 39. 21. 19. 20. 24. 16. 22. 23. However, the for and while loops will be terribly inefficient and this is not good for large scale Monte-Carlo simulations. Is there a way to do it with Matrix Operations? Best greetings Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at icloud.com Mon Sep 25 21:36:40 2017 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Mon, 25 Sep 2017 21:36:40 +0200 Subject: [Scilab-users] Is there a way to do it with Matrix Operations? In-Reply-To: References: <8fdf4ff1-6bdb-42b2-898e-e2ddbba2f907@me.com> Message-ID: Works like a charm, but I would have never found out myself. Congratulations to your SciLab skills. Heinz PS: In some 20 textbooks and a dozen publications, I could not find such a simple recipe for generating random deviates of a user-defined discrete function............ On 25.09.2017, at 20:43, Rafael Guerra wrote: > Hi Heinz, > > Check this solution: > > // START OF CODE > p = [0.1176471 0.2352941 0.0588235 0.3882353 0.2 ]; > P = cumsum(p)'; > np = length(P); > nj = 7; > N = 100; > X = grand(nj,N,'def'); > C = zeros(np,nj); > P = [0;P]; > for i=1:np > C(i,:) = sum((X>=P(i) & X end > // END OF CODE > > Regards, > Rafael > > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Heinz Nabielek > Sent: Monday, September 25, 2017 2:03 PM > To: Users mailing list for Scilab > Subject: [Scilab-users] Is there a way to do it with Matrix Operations? > > Dear colleagues: > > in an attempt to code the generation of random deviates for a user-defined probability function p=[0.1176471 0.2352941 0.0588235 0.3882353 0.2 ], I spent only a few minutes to write the Scilab code below and it gives me all the solutions (frequency distribution of random numbers) that I need. > > N=100;X=grand(7,N,'def'); > C=[];for j=1:7;Count(1:5)=0;for k=1:N;i=1;while X(j,k)>P(i);i=i+1;end;Count(i)=Count(i)+1;end;C=[C Count];end; > and one typical sample run yields this > C = > 15. 9. 6. 12. 8. 12. 10. > 20. 26. 38. 20. 23. 26. 24. > 6. 7. 4. 7. 5. 10. 4. > 38. 39. 32. 37. 48. 30. 39. > 21. 19. 20. 24. 16. 22. 23. > > However, the for and while loops will be terribly inefficient and this is not good for large scale Monte-Carlo simulations. > > Is there a way to do it with Matrix Operations? From shamika.i.nair at gmail.com Mon Sep 25 23:07:51 2017 From: shamika.i.nair at gmail.com (Shamika Mohanan) Date: Tue, 26 Sep 2017 02:37:51 +0530 Subject: [Scilab-users] Atoms login Message-ID: Hello, Is anyone having trouble logging into their ATOMS account? I'm unable to log in or create a new account. Regards, Shamika -------------- next part -------------- An HTML attachment was scrubbed... URL: From herozigle at gmail.com Tue Sep 26 09:48:25 2017 From: herozigle at gmail.com (Hermes) Date: Tue, 26 Sep 2017 00:48:25 -0700 (MST) Subject: [Scilab-users] Plot Heart Curve in Scilab Message-ID: <1506412105492-0.post@n3.nabble.com> Hello, I've been looking at the forum, how to graph the following function: x2=[-2:0.01:2];x1=[-1:0.01:1]; function val = Heart(x1, x2) val=(1.2*x2-sqrt(abs(x1)))^2+x1^2-1; endfunction And I have not found anything to guide me. Please, could you help me? Gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From W.Schulz at ove.at Tue Sep 26 09:36:54 2017 From: W.Schulz at ove.at (SCHULZ Wolfgang) Date: Tue, 26 Sep 2017 07:36:54 +0000 Subject: [Scilab-users] Nightly builds outdated Message-ID: <07A8AF089844A549B0F0CCC727AF31AA79E72233@OVEKBG.ove.at> Hello, is there any reason why the nightly builds are totally outdated? Thanks Wolfgang -------------- next part -------------- An HTML attachment was scrubbed... URL: From payen.pierre at gmail.com Tue Sep 26 14:08:25 2017 From: payen.pierre at gmail.com (Pierre Payen) Date: Tue, 26 Sep 2017 05:08:25 -0700 (MST) Subject: [Scilab-users] update script to Scilab 6.00 In-Reply-To: <1505821916822-0.post@n3.nabble.com> References: <1505821916822-0.post@n3.nabble.com> Message-ID: <1506427705101-0.post@n3.nabble.com> function dy=fon(t,y,g,l) // get rid of global variable dy(1) = y(2); dy(2)=-g/l*sin(y(1)); endfunction teta_init = 45; teta_init=teta_init/180*%pi; dteta_init = 0; g=9.81; l=1; t=0:0.1:20; y=ode([teta_init;dteta_init],0,[t],list(fon,g,l)); // pass g,l as parameter //Preparation du graphe f = gcf(); // on recupere le handle de la fen^etre graphique f.background = color("white"); //FIN Preparation du graphe i = 1; xtitle('', 'm', 'm'); a = gca(); // On r?cup?re l'objet graphique axes pour modifier les l?gendes a.isoview = "on"; a.data_bounds = [-2 2 -2 2]; a.title.text = "Le pendule"; a.title.font_size = 4; a.title.foreground = color("white"); a.background = color("white"); xpoly([0 +l*sin(y(1,i))],[0 -l*cos(y(1,i))],"lines",0) hline= gce(); // On r?cup?re l'objet graphique double-pendule atwood // pour modifier son aspect cosm?tique hline.thickness = 3; hline.foreground = color("blue"); plot([+l*sin(y(1,i))],[-l*cos(y(1,i))],'o','MarkSize',10,'MarkBackground','b') h=gce() hpoint=h.children xgrid(12) while i<=length(y) i = i+1; hline.data=[0,0;0+l*sin(y(1,i)),0-l*cos(y(1,i))] // update coordinate of the polyline without clearing the figure hpoint.data=[+l*sin(y(1,i)),-l*cos(y(1,i))] // same end -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From payen.pierre at gmail.com Tue Sep 26 14:12:19 2017 From: payen.pierre at gmail.com (Pierre Payen) Date: Tue, 26 Sep 2017 05:12:19 -0700 (MST) Subject: [Scilab-users] update script to Scilab 6.00 In-Reply-To: <1505821916822-0.post@n3.nabble.com> References: <1505821916822-0.post@n3.nabble.com> Message-ID: <1506427939053-0.post@n3.nabble.com> function dy=fon(t,y,g,l) // get rid of global dy(1) = y(2); dy(2)=-g/l*sin(y(1)); endfunction teta_init = 45; teta_init=teta_init/180*%pi; dteta_init = 0; g=9.81; l=1; t=0:0.1:20; y=ode([teta_init;dteta_init],0,[t],list(fon,g,l)); // added g,l as parameter //Preparation du graphe f = gcf(); // on recupere le handle de la fen^etre graphique f.background = color("white"); //FIN Preparation du graphe i = 1; xtitle('', 'm', 'm'); a = gca(); // On r?cup?re l'objet graphique axes pour modifier les l?gendes a.isoview = "on"; a.data_bounds = [-2 2 -2 2]; a.title.text = "Le pendule"; a.title.font_size = 4; a.title.foreground = color("white"); a.background = color("white"); xpoly([0 +l*sin(y(1,i))],[0 -l*cos(y(1,i))],"lines",0) hline= gce(); // On r?cup?re l'objet graphique double-pendule atwood // pour modifier son aspect cosm?tique hline.thickness = 3; hline.foreground = color("blue"); plot([+l*sin(y(1,i))],[-l*cos(y(1,i))],'o','MarkSize',10,'MarkBackground','b') h=gce() hpoint=h.children xgrid(12) while i<=length(y) i = i+1; hline.data=[0,0;0+l*sin(y(1,i)),0-l*cos(y(1,i))] // only updating pendulumm coordinates hpoint.data=[+l*sin(y(1,i)),-l*cos(y(1,i))] end -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From herozigle at gmail.com Tue Sep 26 14:35:59 2017 From: herozigle at gmail.com (Hermes) Date: Tue, 26 Sep 2017 05:35:59 -0700 (MST) Subject: [Scilab-users] update script to Scilab 6.00 In-Reply-To: <1506427939053-0.post@n3.nabble.com> References: <1505821916822-0.post@n3.nabble.com> <1506427939053-0.post@n3.nabble.com> Message-ID: <1506429359271-0.post@n3.nabble.com> Hi, Pierre Payen When running the script get the following error: *--> exec('C:\Users\hermesr\Documents\Scilab Xcos\Animations\penduleUpdated.sce', -1) at line 44 of executed file C:\Users\hermesr\Documents\Scilab Xcos\Animations\penduleUpdated.sce Invalid index. * And the animation is frozen. Gracias Hermes -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From Paul.Bignier at esi-group.com Tue Sep 26 16:52:32 2017 From: Paul.Bignier at esi-group.com (Paul Bignier) Date: Tue, 26 Sep 2017 14:52:32 +0000 Subject: [Scilab-users] Nightly builds outdated In-Reply-To: <07A8AF089844A549B0F0CCC727AF31AA79E72233@OVEKBG.ove.at> References: <07A8AF089844A549B0F0CCC727AF31AA79E72233@OVEKBG.ove.at> Message-ID: Hi Wolfgang, We are experiencing trouble with the automated build & upload chain but working to fix it. Regards, Paul Paul BIGNIER Development engineer ----------------------------------------------------------- ESI Group - Scilab 99 rue des Solets - 94513 Rungis, France Phone: +33.1.41.73.58.77 https://scilab.io https://esi-group.com ________________________________ From: users on behalf of SCHULZ Wolfgang Sent: Tuesday, September 26, 2017 9:36 AM To: Users mailing list for Scilab Subject: [Scilab-users] Nightly builds outdated Hello, is there any reason why the nightly builds are totally outdated? Thanks Wolfgang -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Sep 26 19:06:29 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 26 Sep 2017 17:06:29 +0000 Subject: [Scilab-users] Plot Heart Curve in Scilab In-Reply-To: <1506412105492-0.post@n3.nabble.com> References: <1506412105492-0.post@n3.nabble.com> Message-ID: Hi Hermes, One simple way is to display the 0-contour level of your "heart" function: // START OF CODE nx = 300; ny = 200; X0 = linspace(-1.2,1.2,nx); Y0 = linspace(-1.5,2,ny); X= X0.*.ones(ny,1); Y= (Y0.*.ones(nx,1))'; Z = (1.2*Y - sqrt(abs(X))).^2 + X.^2 - 1; // Heart function clf() a=gca(); a.x_label.text=" X"; a.y_label.text=" Y"; contour(X0,Y0,Z',[0 0]); a.view = "2d"; // END OF CODE Exercise: fill it in red... Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Hermes Sent: Tuesday, September 26, 2017 9:48 AM To: users at lists.scilab.org Subject: [Scilab-users] Plot Heart Curve in Scilab Hello, I've been looking at the forum, how to graph the following function: x2=[-2:0.01:2];x1=[-1:0.01:1]; function val = Heart(x1, x2) val=(1.2*x2-sqrt(abs(x1)))^2+x1^2-1; endfunction And I have not found anything to guide me. Please, could you help me? Gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Sep 26 22:49:14 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 26 Sep 2017 22:49:14 +0200 Subject: [Scilab-users] Atoms login In-Reply-To: References: Message-ID: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> Le 25/09/2017 ? 23:07, Shamika Mohanan a ?crit : > Hello, > > Is anyone having trouble logging into their ATOMS account? I'm unable > to log in or create a new account. Neither are we. Please have a look at http://mailinglists.scilab.org/Scilab-users-Cannot-access-module-at-atom-scilab-tt4036831.html Regards Samuel From herozigle at gmail.com Wed Sep 27 22:28:55 2017 From: herozigle at gmail.com (Hermes) Date: Wed, 27 Sep 2017 13:28:55 -0700 (MST) Subject: [Scilab-users] Plot Heart Curve in Scilab In-Reply-To: References: <1506412105492-0.post@n3.nabble.com> Message-ID: <1506544135788-0.post@n3.nabble.com> Hi Rafa, Here I present the task solved: //start of code nx=300; ny=200; X0=linspace(-1.2,1.2,nx); Y0=linspace(-1.5,2,ny); X=X0.*.ones(ny,1); Y=(Y0.*.ones(nx,1))'; Z=(1.25*Y-sqrt(abs(X))).^2+X.^2-1; clf() a=gca(); a.x_label.text="X"; a.y_label.text="Y"; contour(X0,Y0,Z',[0,0]); *Polyline=a.children.children(1) Polyline.fill_mode="on"; Polyline.foreground=5; Polyline.background=5; Polyline.thickness=2;* a.view="2d"; //end code Two questions: in the Helps of Scilab, where can I find the hierarchy trees for the graphic objects? How do I copy from SciNote to the Forum scripts and maintain the format of it? Thank you Hermes -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From arvid at softube.com Thu Sep 28 08:41:38 2017 From: arvid at softube.com (=?utf-8?B?QXJ2aWQgUm9zw6lu?=) Date: Thu, 28 Sep 2017 06:41:38 +0000 Subject: [Scilab-users] Scilab and macOS 10.13 Message-ID: <387FBD13-80E6-4B93-BB65-DD212C438932@softube.com> Hi! Anyone running Scilab 5.5.2 on macOS 10.13? I tried to and ran into problems. After some fiddling, I found out a workaround, so I?ll post it here if anyone is interested. Scilab seems to expect the following path to exist: /System/Library/Frameworks/JavaVM.framework/Versions/1.5 In 10.13 it doesn?t, but the following one do exists: /System/Library/Frameworks/JavaVM.framework/Versions/A So, you need to reboot in recovery mode, turn off System Integrity Protection, and then create a symlink from A to 1.5. Reboot and turn on System Integrity Protection and you are good to go! I don?t use Scilab 6 yet, so I don?t know if this applies in that case. Cheers, Arvid -- Arvid Ros?n VP Research and Development Softube AB S:t Larsgatan 9D S-582 24 Link?ping Sweden Phone: (+46) 13 21 16 23 Mobile: (+46) 73 25 12 34 7 Mail: arvid at softube.se URL: www.softube.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Sep 28 09:54:31 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 28 Sep 2017 07:54:31 +0000 Subject: [Scilab-users] Plot Heart Curve in Scilab In-Reply-To: <1506544135788-0.post@n3.nabble.com> References: <1506412105492-0.post@n3.nabble.com> , <1506544135788-0.post@n3.nabble.com> Message-ID: Hermes For the second question, use email program with html format. Regards Rafael ________________________________ From: users on behalf of Hermes Sent: Wednesday, September 27, 2017 10:28:55 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Plot Heart Curve in Scilab Hi Rafa, Here I present the task solved: //start of code nx=300; ny=200; X0=linspace(-1.2,1.2,nx); Y0=linspace(-1.5,2,ny); X=X0.*.ones(ny,1); Y=(Y0.*.ones(nx,1))'; Z=(1.25*Y-sqrt(abs(X))).^2+X.^2-1; clf() a=gca(); a.x_label.text="X"; a.y_label.text="Y"; contour(X0,Y0,Z',[0,0]); *Polyline=a.children.children(1) Polyline.fill_mode="on"; Polyline.foreground=5; Polyline.background=5; Polyline.thickness=2;* a.view="2d"; //end code Two questions: in the Helps of Scilab, where can I find the hierarchy trees for the graphic objects? How do I copy from SciNote to the Forum scripts and maintain the format of it? Thank you Hermes -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.crete at thalesgroup.com Thu Sep 28 11:38:05 2017 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Thu, 28 Sep 2017 11:38:05 +0200 Subject: [Scilab-users] Plot Heart Curve in Scilab In-Reply-To: <1506544135788-0.post@n3.nabble.com> References: <1506412105492-0.post@n3.nabble.com> <1506544135788-0.post@n3.nabble.com> Message-ID: <8F1D40232A0E68409E3FC23A30C326620174D3135257@THSONEA01CMS04P.one.grp> Hello, It is also possible to use the couple of solutions (auricle, ventricle) of Z=0: // Start of code nx=201; x=linspace(0,1,nx)'; // computation is done only for x=0 (it saves time for urgent needs!-) auricle=(sqrt(x)+sqrt(1-x.^2))/1.2; ventricle=(sqrt(x)-sqrt(1-x.^2))/1.2; X0=[x;x($:-1:1);-x;-x($:-1:1)]; Y0=[auricle;ventricle($:-1:1);ventricle;auricle($:-1:1)]; scf(); // plot of a symmetrical polygone xset("color",5); xfpoly(X0,Y0); // End of code Thank you, I learned about "xfpoly" ! Denis -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de Hermes Envoy??: mercredi 27 septembre 2017 22:29 ??: users at lists.scilab.org Objet?: Re: [Scilab-users] Plot Heart Curve in Scilab Hi Rafa, Here I present the task solved: //start of code nx=300; ny=200; X0=linspace(-1.2,1.2,nx); Y0=linspace(-1.5,2,ny); X=X0.*.ones(ny,1); Y=(Y0.*.ones(nx,1))'; Z=(1.25*Y-sqrt(abs(X))).^2+X.^2-1; clf() a=gca(); a.x_label.text="X"; a.y_label.text="Y"; contour(X0,Y0,Z',[0,0]); *Polyline=a.children.children(1) Polyline.fill_mode="on"; Polyline.foreground=5; Polyline.background=5; Polyline.thickness=2;* a.view="2d"; //end code Two questions: in the Helps of Scilab, where can I find the hierarchy trees for the graphic objects? How do I copy from SciNote to the Forum scripts and maintain the format of it? Thank you Hermes -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Thu Sep 28 12:00:29 2017 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 28 Sep 2017 12:00:29 +0200 Subject: [Scilab-users] Plot Heart Curve in Scilab In-Reply-To: <8F1D40232A0E68409E3FC23A30C326620174D3135257@THSONEA01CMS04P.one.grp> References: <1506412105492-0.post@n3.nabble.com> <1506544135788-0.post@n3.nabble.com> <8F1D40232A0E68409E3FC23A30C326620174D3135257@THSONEA01CMS04P.one.grp> Message-ID: <161ab18d-9a64-33b9-35a3-e6db943ee057@utc.fr> Hello, Because of the sum of squares form there is also an easy parametric description of this curve : t=linspace(0,2*%pi,1000); x=cos(t); y=(sin(t)+sqrt(abs(x)))/1.25; plot(x,y) S. Le 28/09/2017 ? 11:38, CRETE Denis a ?crit?: > Hello, > It is also possible to use the couple of solutions (auricle, ventricle) of Z=0: > // Start of code > nx=201; > x=linspace(0,1,nx)'; // computation is done only for x=0 (it saves time for urgent needs!-) > auricle=(sqrt(x)+sqrt(1-x.^2))/1.2; > ventricle=(sqrt(x)-sqrt(1-x.^2))/1.2; > X0=[x;x($:-1:1);-x;-x($:-1:1)]; > Y0=[auricle;ventricle($:-1:1);ventricle;auricle($:-1:1)]; > scf(); > // plot of a symmetrical polygone > xset("color",5); > xfpoly(X0,Y0); > // End of code > > Thank you, I learned about "xfpoly" ! > Denis > > -----Message d'origine----- > De?: users [mailto:users-bounces at lists.scilab.org] De la part de Hermes > Envoy??: mercredi 27 septembre 2017 22:29 > ??: users at lists.scilab.org > Objet?: Re: [Scilab-users] Plot Heart Curve in Scilab > > Hi Rafa, > Here I present the task solved: > //start of code > nx=300; > ny=200; > X0=linspace(-1.2,1.2,nx); > Y0=linspace(-1.5,2,ny); > X=X0.*.ones(ny,1); > Y=(Y0.*.ones(nx,1))'; > Z=(1.25*Y-sqrt(abs(X))).^2+X.^2-1; > clf() > a=gca(); > a.x_label.text="X"; > a.y_label.text="Y"; > contour(X0,Y0,Z',[0,0]); > *Polyline=a.children.children(1) > Polyline.fill_mode="on"; > Polyline.foreground=5; > Polyline.background=5; > Polyline.thickness=2;* > a.view="2d"; > //end code > > Two questions: > in the Helps of Scilab, where can I find the hierarchy trees for the graphic objects? > How do I copy from SciNote to the Forum scripts and maintain the format of it? > Thank you > Hermes > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From rouxph.22 at gmail.com Thu Sep 28 23:30:49 2017 From: rouxph.22 at gmail.com (philippe) Date: Thu, 28 Sep 2017 23:30:49 +0200 Subject: [Scilab-users] "unique" bug with complex ? Message-ID: Hi, the following behaviour of "unique" function (with scilab 5.5.2 and 6.0.0) looks like a bug to me : 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<-- unique ([1 -1 1 -1]) ans = - 1. 1. -->unique ([1 -1 1 -1]*%i) ans = - i i - i i -->unique (string([1 -1 1 -1]*%i)) ans = !%i -%i ! 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<-- I don't found bug report on bugzilla, so I should probably report it except if i misunderstood the synopsis of the function ... Can some one confirm the bug? Philippe From sgougeon at free.fr Fri Sep 29 00:27:02 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 29 Sep 2017 00:27:02 +0200 Subject: [Scilab-users] "unique" bug with complex ? In-Reply-To: References: Message-ID: Hello Philippe, unique() sorts components to deduplicate them. So, components are assumed to be sortable. This is not the case for complex numbers. Here there are 2 issues 1) This limitation is not documented. 2) We could need deduplicating complex numbers, but this limitation is not overcome. It would be possible to intersort complex numbers according to their real and secondly their imaginary parts (for instance). The sorting criteria does not really matter, since here we want only use it to deduplicate. For even less sortable objects like polynomials, another algorithm could be implemented. For the time being, unique() can't be use for a set of polynomials or other non-sortable objects. Yes, reporting this behavior would be useful. Thanks! Best regards Samuel Le 28/09/2017 ? 23:30, philippe a ?crit : > Hi, > > the following behaviour of "unique" function (with scilab 5.5.2 and > 6.0.0) looks like a bug to me : > > 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<-- > > unique ([1 -1 1 -1]) > ans = > > - 1. 1. > > -->unique ([1 -1 1 -1]*%i) > ans = > > - i i - i i > > > -->unique (string([1 -1 1 -1]*%i)) > ans = > > !%i -%i ! > > 8<--8<--8<--8<--8<--8<--8<--8<--8<--8<-- > > I don't found bug report on bugzilla, so I should probably report it > except if i misunderstood the synopsis of the function ... > > Can some one confirm the bug? > > > Philippe > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From rouxph.22 at gmail.com Fri Sep 29 09:23:59 2017 From: rouxph.22 at gmail.com (philippe) Date: Fri, 29 Sep 2017 09:23:59 +0200 Subject: [Scilab-users] "unique" bug with complex ? In-Reply-To: References: Message-ID: Hi Samuel, Le 29/09/2017 ? 00:27, Samuel Gougeon a ?crit?: > Hello Philippe, > > unique() sorts components to deduplicate them. So, components are > assumed to be sortable. Ok I understand the problem, I think I could find a workaround using "find" instead of sorting values. > [...] > Yes, reporting this behavior would be useful. Thanks! done : http://bugzilla.scilab.org/show_bug.cgi?id=15279 Have a nice day! Philippe