From antoine.monmayrant at laas.fr Wed Jan 3 09:09:24 2018 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Wed, 3 Jan 2018 09:09:24 +0100 Subject: [Scilab-users] circshift() : Scilab Enhancement Proposal In-Reply-To: <1b44e4b4-a924-06f2-b4ee-c1c416008947@free.fr> References: <1b44e4b4-a924-06f2-b4ee-c1c416008947@free.fr> Message-ID: Hi Samuel, Thanks a lot for this nice SEP. I have a couple of comments: 1) I think I should be good to also show some multidimensional examples using "shifts" and using both "shifts" and "dims". Sometimes in the scilab documentation, the user is served with examples only covering the most basic usage and not the advanced one with N optional arguments. 2) For multidimentional cshift, the order of the shifts (for example shift? by N along the lines than shift by M along the columns or the other way round) is key, right? Inverting the order would give a different result, right? Should this be specified in the SEP: circshift(A, shifts) first circularly shifts indices of A rows by shifts(1), then the indices of A columns by shifts(2), then indices of A layers by shifts(3), etc. Cheers, Antoine (& Happy New Year to all!) Le 23/12/2017 ? 19:06, Samuel Gougeon a ?crit?: > Dear co-scilabers, > > After the wish reported at http://bugzilla.scilab.org/7293 in 2010, > some cshift() function was proposed on the FileExchange at > http://fileexchange.scilab.org/toolboxes/161000 to provide a way > to circularly shift the rows or columns of a matrix or an hypermatrix. > > In order to include this basic but non-trivial feature in Scilab 6.1, > a Scilab Enhancement Proposal is posted on review at > https://codereview.scilab.org/#/c/19625/ > > Proposed features are described in the help page in PDF format in > attachment. > > Every comment is welcome. > > Best regards > Samuel Gougeon > > > > _______________________________________________ > 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 Wed Jan 3 15:17:10 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 3 Jan 2018 15:17:10 +0100 Subject: [Scilab-users] circshift() : Scilab Enhancement Proposal In-Reply-To: References: <1b44e4b4-a924-06f2-b4ee-c1c416008947@free.fr> Message-ID: <1ac27aec-d251-45eb-49a0-a410e65d8753@free.fr> Hello Antoine, Thanks for your time to have read this proposal and comment it. I am afraid i don't catch your first point. As far as i understand your suggestion, the last existing example with an hypermatrix of texts already fulfills it. For my part, in examples, i think it is better to show results as often as possible, not only the code. Since there is presently no way to display examples by default in a fold way (at least in the native Scilab help browser/viewer, with a "+/-" clickable switch), this makes quite long pages that requires to be scrolled a lot. By the way, as soon as hypermatrices are involved, displayed results are still more lengthy. So, in my opinion, there is a compromise. About the order of multiple crossed or parallel or mixed shifts: no, the order does not matter. One gets the same result whatever the order is. Happy new year 2018 to you and to every scilaber. Have nice projects and involvements with Scilab and others. Best wishes Samuel Le 03/01/2018 ? 09:09, antoine monmayrant a ?crit : > > Hi Samuel, > > > Thanks a lot for this nice SEP. > I have a couple of comments: > > 1) I think I should be good to also show some multidimensional > examples using "shifts" and using both "shifts" and "dims". Sometimes > in the scilab documentation, the user is served with examples only > covering the most basic usage and not the advanced one with N optional > arguments. > > 2) For multidimentional cshift, the order of the shifts (for example > shift by N along the lines than shift by M along the columns or the > other way round) is key, right? Inverting the order would give a > different result, right? Should this be specified in the SEP: > > circshift(A, shifts) first circularly shifts indices of A rows by > shifts(1), then the indices of A columns by shifts(2), then indices of > A layers by shifts(3), etc. > > Cheers, > > Antoine > > (& Happy New Year to all!) > > Le 23/12/2017 ? 19:06, Samuel Gougeon a ?crit : >> Dear co-scilabers, >> >> After the wish reported at http://bugzilla.scilab.org/7293 in 2010, >> some cshift() function was proposed on the FileExchange at >> http://fileexchange.scilab.org/toolboxes/161000 to provide a way >> to circularly shift the rows or columns of a matrix or an hypermatrix. >> >> In order to include this basic but non-trivial feature in Scilab 6.1, >> a Scilab Enhancement Proposal is posted on review at >> https://codereview.scilab.org/#/c/19625/ >> >> Proposed features are described in the help page in PDF format in >> attachment. >> >> Every comment is welcome. >> >> Best regards >> Samuel Gougeon >> >> >> >> _______________________________________________ >> 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 jrafaelbguerra at hotmail.com Wed Jan 3 16:00:21 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 3 Jan 2018 15:00:21 +0000 Subject: [Scilab-users] circshift() : Scilab Enhancement Proposal In-Reply-To: References: <1b44e4b4-a924-06f2-b4ee-c1c416008947@free.fr> Message-ID: Samuel, As requested, some further feedback on circshift: * The proposed syntax seems to be compatible with Matlab?s circshift while adding extra functionality, which is very positive * To add to the wish list: if the input matrix represents a regularly sampled function, it would be useful to have in Scilab a generalization of circshift allowing non-integer shifts, also to have option for non-circular shifts and for padding with zeros Best Wishes for 2018! Rafael Le 23/12/2017 ? 19:06, Samuel Gougeon a ?crit : Dear co-scilabers, After the wish reported at http://bugzilla.scilab.org/7293 in 2010, some cshift() function was proposed on the FileExchange at http://fileexchange.scilab.org/toolboxes/161000 to provide a way to circularly shift the rows or columns of a matrix or an hypermatrix. In order to include this basic but non-trivial feature in Scilab 6.1, a Scilab Enhancement Proposal is posted on review at https://codereview.scilab.org/#/c/19625/ Proposed features are described in the help page in PDF format in attachment. Every comment is welcome. Best regards Samuel Gougeon _______________________________________________ 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 Wed Jan 3 22:44:21 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 3 Jan 2018 22:44:21 +0100 Subject: [Scilab-users] circshift() : Scilab Enhancement Proposal In-Reply-To: References: <1b44e4b4-a924-06f2-b4ee-c1c416008947@free.fr> Message-ID: <72e57fd6-323e-4317-7255-519521065f34@free.fr> Thanks for your comments, Rafael. I am answering in the body: Le 03/01/2018 ? 16:00, Rafael Guerra a ?crit : > > Samuel, > > As requested, some further feedback on circshift: > > * The proposed syntax seems to be compatible with Matlab?s circshift > while adding extra functionality, which is very positive > > * To add to the wish list: if the input matrix represents a > regularly sampled function, it would be useful to have in Scilab a > generalization of circshift allowing non-integer shifts, > As far as i understand, you are addressing here an interpolation feature rather than an indices-shifting one. IMO, this is a job much closer to existing interp#() functions than to circshift(). Interpolations modes usually propose options to process edges, and other ones to chose an interpolation mode (linear, splines ,etc). This is far beyond and out of the purpose of circshift(), that does not change values, just indices. > * also to have option for non-circular shifts and for padding with zeros > Something like circshift(), without circ ;) Padding is presently proposed throught resize_matrix(). But indeed, it does not propose left or top padded insertions. This will become easy with circshift() as it is presently proposed. Example: --> m = grand(3,4,"uin",0,9) m = 2. 5. 9. 3. 2. 4. 5. 5. 4. 1. 8. 5. --> circshift(resize_matrix(m, [5,7]),[1,2]) ans = 0. 0. 0. 0. 0. 0. 0. 0. 0. 2. 5. 9. 3. 0. 0. 0. 2. 4. 5. 5. 0. 0. 0. 4. 1. 8. 5. 0. 0. 0. 0. 0. 0. 0. 0. The main resize_matrix() syntax is resMat = resize_matrix(mat, nbRows, nbCols) Specifying a vector of 2 components instead of a scalar for either nbrows or nbcols or both would enable specifying margins on both sides for each direction, instead of the new required sizes. IMO, this would be an improvement for resize_matrix() rather than a circshift() extension. Don't you think so? Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Jan 4 01:54:20 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 4 Jan 2018 01:54:20 +0100 Subject: [Scilab-users] Atoms login In-Reply-To: References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> Message-ID: <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> Hello, After this fix https://codereview.scilab.org/#/c/19273/ and up to the break of ATOMS at the end of July 2017, the whole ATOMS system on both server and client GUI sides behaved exactly as expected (for the first time since ATOMS exists): any online modification of a module on the server was immediately visible in the ATOMS GUI (after updating it). But indeed, this normal behavior was of short duration: During the short access periods to ATOMS without LDAP or other logging issues, it is no longer working. The issue is clearly on the server side: The file listing all modules available for the querying Scilab client and exported by the server is no longer updated. For instance, for Win64, http://atoms.scilab.org/6.0/TOOLBOXES/64/windows.gz unzipped and text edited does not include IPCV 1.2, nor plotplots 1.0 created yesterday with binaries also available for Scilab 6.0. Regards Samuel Le 29/12/2017 ? 13:47, Tan Chin Luh a ?crit : > Hi, > > I am facing the similar issue with Scilab IPCV 1.2 > (https://atoms.scilab.org/toolboxes/IPCV/1.2), after uploading the > module with binaries for quite some times, the atomsGUI still showing > the older version, which is 1.1, and atomsInstall will then install > the old version as well. atomsSystemUpdate() does not help as well. > > Any advice on what extra steps to make the updates available ? > > Thanks. > > Regards, > Chin Luh > > On 18/11/2017 12:35 AM, Grzegorz Skiba wrote: >> Dear Simon, >> >> it seems that there is still some problem with ATOMS, after uploading >> new version of MicroDAQ toolbox isn't isn't visible in Module manage >> in Scilab - the uploaded 1.2 version and previous versions are not >> available. >> >> The 1.2v can be accessed via web: >> >> https://atoms.scilab.org/toolboxes/microdaq/1.2.0 >> >> but it is not possible to install it from Scilab with >> atomsInstall("microdaq"); >> >> The toolbox should be available immediately or server needs to do >> some indexing etc and will be available later? >> >> Regards Grzegorz >> >> 2017-11-17 11:22 GMT+01:00 > >: >> >> Hello, >> >> The login issue has been fixed. There were two problems with LDAP >> configuration (due to migration), and session management. >> >> There is still a problem about email sending, probably due to a >> bad configuration on the new server, we are working on it. >> But it does not prevent toolbox or file (fileexchange) updates. >> >> Sorry for the delay. >> >> Simon Marchetto >> >> Le 2017-11-14 20:53, Samuel Gougeon a ?crit : >> >> Hello, >> >> Le 26/09/2017 ? 22:49, Samuel Gougeon a ?crit : >> >> 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 >> >> >> [1] >> >> >> There are some slight changes on this side, despite it is still >> impossible to update existing modules and filesets and to >> create new >> ones: >> When login, we no longer get neither a blank page without >> actually >> being logged, nor -- more recently -- getting any red >> messages about >> internal errors (likely addressed to debuggers). >> >> But there is now a kind of status inversion: >> Let's logging. Then, we are directed back to the ATOMS >> portal with >> >> displayed on the top right corner, and still without any admin >> rights. The strange thing is that >> when we then click on "create an account" while we have >> already one >> and we just tried to logging, >> we get on the top right corner >> >> So, we have been actually acknowledged by the loggin process! >> Unfortunately, clicking on Preferences does not lead to the >> dedicated personal page. >> No actual page uses the user profile and the SESSION_ID. >> >> This stands also after having removed all old cookies, that >> could >> prevent a sane ATOMS session after the migration of the ATOMS >> server. >> >> Regards >> Samuel Gougeon >> >> >> >> Links: >> ------ >> [1] >> http://mailinglists.scilab.org/Scilab-users-Cannot-access-module-at-atom-scilab-tt4036831.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 >> >> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh at tritytech.com Thu Jan 4 02:54:55 2018 From: chinluh at tritytech.com (Tan Chin Luh) Date: Thu, 4 Jan 2018 09:54:55 +0800 Subject: [Scilab-users] Atoms login In-Reply-To: <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> Message-ID: Hi Samuel, Thanks for your details explanation. The microdaq 1.2 seems to be listed, does it means that it has been manually added ? Thanks. Regards, Chin Luh On 4/1/2018 8:54 AM, Samuel Gougeon wrote: > Hello, > > After this fix https://codereview.scilab.org/#/c/19273/ and up to the > break of ATOMS at the end of July 2017, the whole ATOMS system on both > server and client GUI sides behaved exactly as expected (for the first > time since ATOMS exists): any online modification of a module on the > server was immediately visible in the ATOMS GUI (after updating it). > > But indeed, this normal behavior was of short duration: During the > short access periods to ATOMS without LDAP or other logging issues, it > is no longer working. > The issue is clearly on the server side: The file listing all modules > available for the querying Scilab client and exported by the server is > no longer updated. For instance, for Win64, > http://atoms.scilab.org/6.0/TOOLBOXES/64/windows.gz unzipped and text > edited does not include IPCV 1.2, nor plotplots 1.0 created yesterday > with binaries also available for Scilab 6.0. > > Regards > Samuel > > Le 29/12/2017 ? 13:47, Tan Chin Luh a ?crit?: >> Hi, >> >> I am facing the similar issue with Scilab IPCV 1.2 >> (https://atoms.scilab.org/toolboxes/IPCV/1.2), after uploading the >> module with binaries for quite some times, the atomsGUI still showing >> the older version, which is 1.1, and atomsInstall will then install >> the old version as well. atomsSystemUpdate() does not help as well. >> >> Any advice on what extra steps to make the updates available ? >> >> Thanks. >> >> Regards, >> Chin Luh >> >> On 18/11/2017 12:35 AM, Grzegorz Skiba wrote: >>> Dear Simon, >>> >>> it seems that there is still some problem with ATOMS, after >>> uploading new version of MicroDAQ toolbox isn't isn't visible in >>> Module manage in Scilab - the uploaded 1.2 version and previous >>> versions are not available. >>> >>> The 1.2v can be accessed via web: >>> >>> https://atoms.scilab.org/toolboxes/microdaq/1.2.0 >>> >>> but it is not possible to install it from Scilab with >>> atomsInstall("microdaq"); >>> >>> The toolbox should be available immediately?or server needs to do >>> some indexing etc and will be available?later? >>> >>> Regards Grzegorz >>> >>> 2017-11-17 11:22 GMT+01:00 >> >: >>> >>> Hello, >>> >>> The login issue has been fixed. There were two problems with >>> LDAP configuration (due to migration), and session management. >>> >>> There is still a problem about email sending, probably due to a >>> bad configuration on the new server, we are working on it. >>> But it does not prevent toolbox or file (fileexchange) updates. >>> >>> Sorry for the delay. >>> >>> Simon Marchetto >>> >>> Le 2017-11-14 20:53, Samuel Gougeon a ?crit?: >>> >>> Hello, >>> >>> ?Le 26/09/2017 ? 22:49, Samuel Gougeon a ?crit : >>> >>> 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 >>> >>> >>> [1] >>> >>> >>> ?There are some slight changes on this side, despite it is still >>> impossible to update existing modules and filesets and to >>> create new >>> ones: >>> ?When login, we no longer get neither a blank page without >>> actually >>> being logged, nor -- more recently -- getting any red >>> messages about >>> internal errors (likely addressed to debuggers). >>> >>> ?But there is now a kind of status inversion: >>> ?Let's logging. Then, we are directed back to the ATOMS >>> portal with >>> >>> ?displayed on the top right corner, and still without any admin >>> rights. The strange thing is that >>> ?when we then click on "create an account" while we have >>> already one >>> and we just tried to logging, >>> ?we get on the top right corner >>> >>> ?So, we have been actually acknowledged by the loggin process! >>> ?Unfortunately, clicking? on Preferences does not lead to the >>> dedicated personal page. >>> ?No actual page uses the user profile and the SESSION_ID. >>> >>> ?This stands also after having removed all old cookies, that >>> could >>> prevent a sane ATOMS session after the migration of the >>> ATOMS server. >>> >>> ?Regards >>> ?Samuel Gougeon >>> >>> >>> >>> Links: >>> ------ >>> [1] >>> http://mailinglists.scilab.org/Scilab-users-Cannot-access-module-at-atom-scilab-tt4036831.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 >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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 Thu Jan 4 13:15:59 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 4 Jan 2018 13:15:59 +0100 Subject: [Scilab-users] Atoms login In-Reply-To: References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> Message-ID: Hello Chin Luh, Le 04/01/2018 ? 02:54, Tan Chin Luh a ?crit : > Hi Samuel, > > Thanks for your details explanation. > > The microdaq 1.2 seems to be listed, does it means that it has been > manually added ? I don't know. What i know is that i have packaged recent ATOMS zipped binaries exactly in the same way and scheme and type of contents as usual when it worked in May, and it no longer worked. So, something has been changed in the meanwhile. AFAIK, the ATOMS server's code is not public. So all is possible. By the way, since my message of yesterday, the exported database requested by the ATOMS GUI was updated in the meantime: IPCV 1.2 and plotplot 1.0 are now listed in the GUI. Other updates are likely available: i have got the error "Field "4.2.1" does not exists" after running the GUI once (Ya, with ATOMS, some errors are good news..(*)) Just close the ATOMS GUI and rerun it, and it's OK. Regards Samuel (*) Scanning repository http://atoms.scilab.org/6.0 ... Done at line 118 of function atomsGetLeftListboxElts (SCI\modules\atoms\macros\atoms_internals\atomsGetLeftListboxElts.sci line 139 ) at line 26 of function cbAtomsGui (SCI\modules\atoms\macros\atoms_gui\cbAtomsGui.sci line 40 ) Field "4.2.1" does not exists It's impossible to analyze and fix this kind of transient bug without being able to create test modules immediately exported. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Jan 4 14:46:51 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 4 Jan 2018 14:46:51 +0100 Subject: [Scilab-users] Atoms login In-Reply-To: References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> Message-ID: Le 04/01/2018 ? 02:54, Tan Chin Luh a ?crit : > Hi Samuel, > > Thanks for your details explanation. > > The microdaq 1.2 seems to be listed, does it means that it has been > manually added ? It is very likely. I just updated plotplots 1.0 binaries for 5.4 and 5.5 10 minutes ago (because of the missing macros/names file), and reinstalling plotplots on 5.5.2 downloads the previous binaries... (i removed the former plotplots zip from the archives dir before processing). I could somewhat understand that there is some delay beween pushing files and actually making them public (then this delay should be documented). But if we have to wait for some manual check/approval/operation done time to time, IMO this way is not workable. Or at least, also, it should be clearly documented, not letting thinking that things are automatic, not expecting anything before a documented calendar of review/check/approval... Samuel From delaleau at enib.fr Fri Jan 5 14:56:00 2018 From: delaleau at enib.fr (Emmanuel Delaleau) Date: Fri, 5 Jan 2018 14:56:00 +0100 Subject: [Scilab-users] Problems with Bode and Bode asymptotic Message-ID: <128a2d1d-b6f1-cde5-fb2f-04071bec9f62@enib.fr> I don't succeed in using the Bode plots facilities. (See script below). - on fig 1 and 2 one sees a shift between the true and the asymptotic Bode plot _ on fig 3 one sees a strange plot corresponding to the second argument of frequency bounds. Do you have any idea ? Thank in advance. Emmanuel //------------------------------------------------------------------------------------------------------------- // xdel(winsid()); f1 = 100; w1 = 2*%pi*f1; tau1 = 1/w1; H1 = 10/(1 + tau1*%s); // order 1 system S1 = syslin('c',H1); scf(1); bode(S1);//,[0.001,10000]); bode_asymp(S1); xtitle('Order one'); //xs2pdf(1,'order1bode'); m = .125;//sqrt(2)/4; wn = w1; H2 = 10/(1 + 2*m*%s/wn + %s^2/wn^2); // order 2 system S2 = syslin('c',H2); scf(2); bode(S2,[.01,1e4]); bode_asymp(S2); xtitle('Order two'); //xs2pdf(2,'order2bode'); scf(3); bode(S1,[0.01,1000]); From chinluh at tritytech.com Fri Jan 5 16:20:51 2018 From: chinluh at tritytech.com (Tan Chin Luh) Date: Fri, 5 Jan 2018 23:20:51 +0800 Subject: [Scilab-users] Atoms login In-Reply-To: References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> Message-ID: <3c08316a-5a26-51cf-f5b8-3d254ddf4249@tritytech.com> Yes, after atomsSystemUpdates now seems like the modules are updated. Thanks rgds, Chin Luh On 4/1/2018 9:46 PM, Samuel Gougeon wrote: > Le 04/01/2018 ? 02:54, Tan Chin Luh a ?crit : >> Hi Samuel, >> >> Thanks for your details explanation. >> >> The microdaq 1.2 seems to be listed, does it means that it has been >> manually added ? > > It is very likely. > I just updated plotplots 1.0 binaries for 5.4 and 5.5 10 minutes ago > (because of the missing macros/names file), > and reinstalling plotplots on 5.5.2 downloads the previous binaries... > (i removed the former plotplots zip from the archives dir before > processing). > > I could somewhat understand that there is some delay beween pushing > files and actually making them public (then this delay should be > documented). But if we have to wait for some manual > check/approval/operation done time to time, IMO this way is not > workable. Or at least, also, it should be clearly documented, not > letting thinking that things are automatic, not expecting anything > before a documented calendar of review/check/approval... > > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Fri Jan 5 17:05:14 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 5 Jan 2018 17:05:14 +0100 Subject: [Scilab-users] Atoms login In-Reply-To: <3c08316a-5a26-51cf-f5b8-3d254ddf4249@tritytech.com> References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> <3c08316a-5a26-51cf-f5b8-3d254ddf4249@tritytech.com> Message-ID: <136360ed-18e9-b1f6-f88e-d56023bc678b@free.fr> Le 05/01/2018 ? 16:20, Tan Chin Luh a ?crit : > Yes, after atomsSystemUpdates now seems like the modules are updated. On the ATOMS page of one of your modules, change say the Description, and save. Then run --> atomsSystemUpdate() // in your session. Then --> atomsShow yourModuleName The displayed description is not updated. Same thing if you push new binaries for the same version. Things are not automatically updated as they were in last spring. Samuel From jrafaelbguerra at hotmail.com Sat Jan 6 03:04:34 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 6 Jan 2018 02:04:34 +0000 Subject: [Scilab-users] Problems with Bode and Bode asymptotic In-Reply-To: <128a2d1d-b6f1-cde5-fb2f-04071bec9f62@enib.fr> References: <128a2d1d-b6f1-cde5-fb2f-04071bec9f62@enib.fr> Message-ID: Hello, Noting that bode_asymp() takes (rad/s) inputs and that the bracketed syntax [ , ] in Scilab's help file means optional inputs, please check this: // START OF CODE xdel(winsid()); fmin = 1e-2; fmax = 1e4; wmin = 2*%pi*fmin; wmax = 2*%pi*fmax; f1 = 100; w1 = 2*%pi*f1; tau1 = 1/w1; H1 = 10/(1 + tau1*%s); // order 1 system S1 = syslin('c',H1); scf(1); bode(S1,fmin,fmax); bode_asymp(S1,wmin,wmax); xtitle('Order one'); m = .125;//sqrt(2)/4; wn = w1; H2 = 10/(1 + 2*m*%s/wn + %s^2/wn^2); // order 2 system S2 = syslin('c',H2); scf(2); bode(S2,fmin,fmax); // bode_asymp(S2,wmin,wmax); xtitle('Order two'); scf(3); bode(S1,fmin,fmax); // END OF CODE Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From j_holland at msn.com Sun Jan 7 20:49:28 2018 From: j_holland at msn.com (James Holland) Date: Sun, 7 Jan 2018 12:49:28 -0700 (MST) Subject: [Scilab-users] Formatting Message-ID: <1515354568204-0.post@n3.nabble.com> I'm trying to generate a file for an arbitrary waveform generator, the format is csv but I am having problems formatting the output, this is my current attempt. for i = 1:nr mfprintf(fd,'%i', points(i,1)); mfprintf(fd, ','); mfprintf(fd,'%.2E\n\r', points(i,2)); end Its close it puts a '+' in the output for positive E numbers and the AWG software rejects this. For example I have: 97,-2.50E+00 98,-2.50E+00 99,-2.50E+00 100,-2.50E+00 101,6.00E+00 102,6.00E+00 103,6.00E+00 104,6.00E+00 but I need: 97,6.00E00 98,6.00E00 99,6.00E00 100,6.00E00 101,-2.50E00 102,-2.50E00 103,-2.50E00 is it possible to achieve this just using formatting tags? TIA James -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Sun Jan 7 21:18:13 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 7 Jan 2018 20:18:13 +0000 Subject: [Scilab-users] Formatting In-Reply-To: <1515354568204-0.post@n3.nabble.com> References: <1515354568204-0.post@n3.nabble.com> Message-ID: Why not using decimal floating point output? mfprintf(fd,'%.2f\n\r', points(i,2)); Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of James Holland Sent: Sunday, January 07, 2018 8:49 PM To: users at lists.scilab.org Subject: [Scilab-users] Formatting I'm trying to generate a file for an arbitrary waveform generator, the format is csv but I am having problems formatting the output, this is my current attempt for i = 1:nr mfprintf(fd,'%i', points(i,1)); mfprintf(fd, ','); mfprintf(fd,'%.2E\n\r', points(i,2)); end Its close it puts a '+' in the output for positive E numbers and the AWG software rejects this. For example I have: 97,-2.50E+00 98,-2.50E+00 99,-2.50E+00 100,-2.50E+00 101,6.00E+00 102,6.00E+00 103,6.00E+00 104,6.00E+00 but I need: 97,6.00E00 98,6.00E00 99,6.00E00 100,6.00E00 101,-2.50E00 102,-2.50E00 103,-2.50E00 is it possible to achieve this just using formatting tags? TIA James -- 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 Mon Jan 8 12:01:16 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 8 Jan 2018 11:01:16 +0000 Subject: [Scilab-users] Problems with Bode and Bode asymptotic In-Reply-To: References: <128a2d1d-b6f1-cde5-fb2f-04071bec9f62@enib.fr> Message-ID: You are welcome. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j_holland at msn.com Mon Jan 8 16:42:03 2018 From: j_holland at msn.com (James Holland) Date: Mon, 8 Jan 2018 08:42:03 -0700 (MST) Subject: [Scilab-users] Formatting In-Reply-To: References: <1515354568204-0.post@n3.nabble.com> Message-ID: <1515426123204-0.post@n3.nabble.com> Rafael Guerra wrote > Why not using decimal floating point output? > mfprintf(fd,'%.2f\n\r', points(i,2)); > Regards, > Rafael I tried that but it won't accept that format. Unfortunately I don't have a description of the format so all I can do is copy the format from an existing file that was generated using the manufacturer's software. In the past I have used Excel but it puts additional commas at the end of the data lines which also cause a problem. Ultimately I would like to be able to generate an AWG file mathematically or from an oscilloscope capture. Regards James -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Mon Jan 8 17:09:58 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 8 Jan 2018 16:09:58 +0000 Subject: [Scilab-users] Formatting In-Reply-To: <1515426123204-0.post@n3.nabble.com> References: <1515354568204-0.post@n3.nabble.com> <1515426123204-0.post@n3.nabble.com> Message-ID: You can use strsubst to remove the + sign: str = msprintf('%.2E', points(i,2)); mfprintf(fd,'%s\n\r', strsubst(str,"+","")); Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of James Holland Sent: Monday, January 08, 2018 4:42 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Formatting Rafael Guerra wrote > Why not using decimal floating point output? > mfprintf(fd,'%.2f\n\r', points(i,2)); > Regards, > Rafael I tried that but it won't accept that format. Unfortunately I don't have a description of the format so all I can do is copy the format from an existing file that was generated using the manufacturer's software. In the past I have used Excel but it puts additional commas at the end of the data lines which also cause a problem. Ultimately I would like to be able to generate an AWG file mathematically or from an oscilloscope capture. Regards James From j_holland at msn.com Mon Jan 8 21:22:58 2018 From: j_holland at msn.com (James Holland) Date: Mon, 8 Jan 2018 13:22:58 -0700 (MST) Subject: [Scilab-users] Formatting In-Reply-To: References: <1515354568204-0.post@n3.nabble.com> <1515426123204-0.post@n3.nabble.com> Message-ID: <1515442978517-0.post@n3.nabble.com> Thank you, that's a nice simple solution If I take the data that generates and place it in a known good file then that will load. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From simon.marchetto at scilab-enterprises.com Tue Jan 9 10:35:09 2018 From: simon.marchetto at scilab-enterprises.com (simon.marchetto at scilab-enterprises.com) Date: Tue, 09 Jan 2018 10:35:09 +0100 Subject: [Scilab-users] Atoms login In-Reply-To: <136360ed-18e9-b1f6-f88e-d56023bc678b@free.fr> References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> <3c08316a-5a26-51cf-f5b8-3d254ddf4249@tritytech.com> <136360ed-18e9-b1f6-f88e-d56023bc678b@free.fr> Message-ID: Hello, The ATOMS toolbox cache is once again automatically refreshed every 5 minutes, as before. Regards, Simon >> Yes, after atomsSystemUpdates now seems like the modules are updated. > > On the ATOMS page of one of your modules, change say the Description, > and save. > Then run > --> atomsSystemUpdate() // in your session. Then > --> atomsShow yourModuleName > > The displayed description is not updated. Same thing if you push new > binaries for the same version. > Things are not automatically updated as they were in last spring. > > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From chinluh at tritytech.com Tue Jan 9 10:56:11 2018 From: chinluh at tritytech.com (Tan Chin Luh) Date: Tue, 9 Jan 2018 17:56:11 +0800 Subject: [Scilab-users] Atoms login In-Reply-To: References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> <3c08316a-5a26-51cf-f5b8-3d254ddf4249@tritytech.com> <136360ed-18e9-b1f6-f88e-d56023bc678b@free.fr> Message-ID: <509bf633-6621-b1e7-7170-a0a175f97802@tritytech.com> Hi Simon, Great to hear that. Thanks. rgds, Chin Luh On 9/1/2018 5:35 PM, simon.marchetto at scilab-enterprises.com wrote: > Hello, > > The ATOMS toolbox cache is once again automatically refreshed every 5 > minutes, as before. > > Regards, > > Simon > > >>> Yes, after atomsSystemUpdates now seems like the modules are updated. >> >> On the ATOMS page of one of your modules, change say the Description, >> and save. >> Then run >> --> atomsSystemUpdate() // in your session. Then >> --> atomsShow yourModuleName >> >> The displayed description is not updated. Same thing if you push new >> binaries for the same version. >> Things are not automatically updated as they were in last spring. >> >> 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 > From sgougeon at free.fr Tue Jan 9 20:25:58 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 9 Jan 2018 20:25:58 +0100 Subject: [Scilab-users] circshift() : Scilab Enhancement Proposal In-Reply-To: References: <1b44e4b4-a924-06f2-b4ee-c1c416008947@free.fr> Message-ID: <8f751180-20e9-3c28-83d2-f6801271caf6@free.fr> Hello Rafael, Le 03/01/2018 ? 16:00, Rafael Guerra a ?crit : > > Samuel, > > As requested, some further feedback on circshift: > > .../... > > * To add to the wish list: if the input matrix represents a > regularly sampled function, it would be useful to have in Scilab a > generalization of circshift allowing non-integer shifts, also to > have option for non-circular shifts and for padding with zeros > To go on about resize_matrix() , padding, and shifting without wrapping: Specifying a (N>1 x 2) matrix of positive (pad) or negative (trim) margins resizing would be simple. Padding with other default elements for non-numerical arrays, or with a chosen value, is already enabled. Possible new syntaxes and examples of usages: resMat = resize_matrix(mat, frameWidth) resMat = resize_matrix(mat, frameWidth, ..) m = [ 6 -7 -1 -2 -6 0 -2 -5 -5 4 -1 8 ]; // shift without extension nor wrapping: resize_matrix(m, [0 0 ; -1 1]) ans = -7 -1 -2 0 0 -2 -5 0 4 -1 8 0 // Another case without extensions nor wrapping: resize_matrix(m, [1 -1 ; 2 -2]) ans = 0 0 0 0 0 0 6 -7 0 0 -6 0 // More general resize_matrix(m, [2 1 ; 1 -1]) ans = 0 0 0 0 0 0 0 0 0 6 -7 -1 0 -6 0 -2 0 -5 4 -1 0 0 0 0 Is it the kind of features you were thinking about? IMO, there is no need to implement this in another specific function, because these features are just particular cases or resizing, with a simple syntax allowing to crop borders as well. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Jan 9 20:43:39 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 9 Jan 2018 20:43:39 +0100 Subject: [Scilab-users] Atoms login In-Reply-To: References: <04dc9350-1369-755e-6fd4-cc7ca60fd3ea@free.fr> <64253f89-c22f-358b-47f2-9bc0e61bc07c@free.fr> <6392edd5998b556a10872b645b32ee76@scilab-enterprises.com> <6022fd3b-9efa-193f-7f4e-49db84059c29@free.fr> <3c08316a-5a26-51cf-f5b8-3d254ddf4249@tritytech.com> <136360ed-18e9-b1f6-f88e-d56023bc678b@free.fr> Message-ID: <9f991dfd-5349-34d5-e7a6-8fb74e3895fd@free.fr> Hello Simon, Thanks for these definitely good news, and for the clear information about the refreshing delay. I confirm that, contrarily to last week-end and yesterday, now it works! I hope that all contributors and maintainers will now come back to ATOMS. Thanks again Regards Samuel PS : i noticed that the cache for Scilab 5.5 and 6.0 are refreshed, but not for 5.4. Le 09/01/2018 ? 10:35, simon.marchetto at scilab-enterprises.com a ?crit : > Hello, > > The ATOMS toolbox cache is once again automatically refreshed every 5 > minutes, as before. > > Regards, > > Simon > > >>> Yes, after atomsSystemUpdates now seems like the modules are updated. >> >> On the ATOMS page of one of your modules, change say the Description, >> and save. >> Then run >> --> atomsSystemUpdate() // in your session. Then >> --> atomsShow yourModuleName >> >> The displayed description is not updated. Same thing if you push new >> binaries for the same version. >> Things are not automatically updated as they were in last spring. >> >> Samuel >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > From jrafaelbguerra at hotmail.com Wed Jan 10 00:01:55 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 9 Jan 2018 23:01:55 +0000 Subject: [Scilab-users] circshift() : Scilab Enhancement Proposal In-Reply-To: <8f751180-20e9-3c28-83d2-f6801271caf6@free.fr> References: <1b44e4b4-a924-06f2-b4ee-c1c416008947@free.fr> <8f751180-20e9-3c28-83d2-f6801271caf6@free.fr> Message-ID: Hi Samuel, The functionality is very nice but the syntax proposed is maybe a bit complicated? It would be easier to combine ?newSizes? with a new ?shift? argument (but with no wrapping as proposed in circshift). For example: m = 2. 5. 9. 3. 2. 4. 5. 5. 4. 1. 8. 5. resize_matrix(m, newSizes=[5 7], shift=[1 2]) ans = 0. 0. 0. 0. 0. 0. 0. 0. 0. 2. 5. 9. 3. 0. 0. 0. 2. 4. 5. 5. 0. 0. 0. 4. 1. 8. 5. 0. 0. 0. 0. 0. 0. 0. 0. resize_matrix(m, newSizes=[-1 -1], shift=[-1 -2]) ans = 5. 5. 0. 0. 8. 5. 0. 0. 0. 0. 0. 0. Regarding extending circshift() to non-integers I had in mind n-dimensional matrices and the discrete Fourier transform. These matrices could represent regularly sampled 1D time signals, or 2D/3D spatial functions, etc. In this context the shift theorem gives a specific meaning to the circular shifts of the input signals (corresponding to linear phase shifts in their spectrum). Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Tuesday, January 09, 2018 8:26 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] circshift() : Scilab Enhancement Proposal Hello Rafael, To go on about resize_matrix() , padding, and shifting without wrapping: Specifying a (N>1 x 2) matrix of positive (pad) or negative (trim) margins resizing would be simple. Padding with other default elements for non-numerical arrays, or with a chosen value, is already enabled. Possible new syntaxes and examples of usages: resMat = resize_matrix(mat, frameWidth) resMat = resize_matrix(mat, frameWidth, ..) m = [ 6 -7 -1 -2 -6 0 -2 -5 -5 4 -1 8 ]; // shift without extension nor wrapping: resize_matrix(m, [0 0 ; -1 1]) ans = -7 -1 -2 0 0 -2 -5 0 4 -1 8 0 // Another case without extensions nor wrapping: resize_matrix(m, [1 -1 ; 2 -2]) ans = 0 0 0 0 0 0 6 -7 0 0 -6 0 // More general resize_matrix(m, [2 1 ; 1 -1]) ans = 0 0 0 0 0 0 0 0 0 6 -7 -1 0 -6 0 -2 0 -5 4 -1 0 0 0 0 Is it the kind of features you were thinking about? IMO, there is no need to implement this in another specific function, because these features are just particular cases or resizing, with a simple syntax allowing to crop borders as well. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.soulard at ge.com Thu Jan 11 11:31:02 2018 From: christian.soulard at ge.com (Soulard, Christian (GE Power)) Date: Thu, 11 Jan 2018 10:31:02 +0000 Subject: [Scilab-users] Dump the output of a function Message-ID: Hello, What is the Scilab way to dump the output of a function ? The Matlab equivalent is tilde (~). To give an example, suppose I have an existing function f such as : function [y_1,y_2] = f(x) y_1 = x ^ 2; y_2 = x ^ 3; enfunction Suppose I want to use this function, but I am only interested in the y_2 result, and I don't want to assign a variable to the y_1 output. In Matlab, I would do the following way : [~,b] = f(2) I would only get a single output variable : b = 8 Thank you for your feedback. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Jan 11 13:00:45 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 11 Jan 2018 13:00:45 +0100 Subject: [Scilab-users] Dump the output of a function In-Reply-To: References: Message-ID: Hello Christian, AFAIK there is presently no way to skip an output parameter. The more handy would be [,y2,,y4] = f(x) but unfortunately, it does not work (yet?). I did not find this feature as a wish on bugzilla. IMO it should be. It is possible to use a one-character variable name, for instance among %, #, ! or ?. --> [%,%,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9)); --> kb kb = 7. 5. 2. Even if the tilde was allowed, it is not very smart. A true blackhole would be better. Regards Samuel Le 11/01/2018 ? 11:31, Soulard, Christian (GE Power) a ?crit : > > Hello, > > What is the Scilab way to dump the output of a function ? The Matlab > equivalent is tilde (~). > > To give an example, suppose I have an existing function f such as : > > function [y_1,y_2] = f(x) > > y_1 = x ^ 2; > > y_2 = x ^ 3; > > enfunction > > Suppose I want to use this function, but I am only interested in the > y_2 result, and I don?t want to assign a variable to the y_1 output. > In Matlab, I would do the following way : > > [~,b] = f(2) > > I would only get a single output variable : > > b = 8 > > Thank you for your feedback. > > > > _______________________________________________ > 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 Jan 11 13:43:53 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 11 Jan 2018 13:43:53 +0100 Subject: [Scilab-users] datafit() : upgrade proposal (SEP) Message-ID: <47279e00-22ad-babc-c5e9-8fccbbc8832c@free.fr> Dear co-scilabers, The non-linear fitting function datafit() could be very useful. However, it has presently two important drawbacks that hinder it and somewhat prevent actually using it. Beyond fixing this, other improvements are possible. We propose here to upgrade datafit() in the way described here-below and in the bug report 15344 . All these propositions are back-compatible: 1. *Data weights s**h**ould be accepted*. Presently, it is not possible to specify some data weights. Only the different ways to assess the Model-to-data distance can be weighted. Yet, in the true life, experimental data are almost always qualified with respective uncertainties. The invert of uncertainties are a good first assessment of possible data weights. This SEP proposes to add a new *Wz option*, to be provided just after the data points Z : datafit([iprint,] G[,DG],*Z**[,**Wz**] *[,Wg][,'b',p_inf,p_sup], p0[,algo][,stop]). It must be a row of size(Z,2) of real numbers. Data weights Wz are taken into account in the cost function to be minimized, in the following way (Wg being the matrix of gaps weights, named W in the current documentation): f = (G(p, Z(:,1))' * Wg * G(p,Z(:,1)))* Wz(1) + .. (G(p, Z(:,2))' * Wg * G(p,Z(:,2)))* Wz(2) + .. ... (G(p, Z(:,nz))' * Wg * G(p,Z(:,nz)))* Wz(nz) If only one gap definition is implemented, this cost is simplified into the common weighted least squares f = G(p, Z(:,1))^2 * Wz(1) + .. G(p, Z(:,2))^2 * Wz(2) + .. ... + .. G(p, Z(:,nz))^2 * Wz(nz) In the overhauled datafit help page, the first example illustrates the gain in fitting accuracy when data are weighted. 2. *datafit() should be vectorized for the vector of data points*. Presently, if the gap function G(p,Z) computing the model-to-data-point distance(s) is vectorized for the data points Z, i.e. if it is able to compute distances to all data points in one single call in a fast vectorized way, datafit() is unable to use this feature: It calls G() as many times as there are data points, explicitly looping over points, in Scilab language. This clearly makes datafit() (very) slow. We propose here to make datafit() able 1. to detect whether G(p,Z) is vectorized or not 2. to call G(p,Z) only once whether G(p,Z) is vectorized 3. to still loop over Z(:,i) points whether G(p,Z) is not vectorized (back-compatibility) The gap function G(p,Z) must then return a (ng x nz) matrix (instead of (ng x 1)), where nz = size(Z,2) is the number of data points. A first test for 200 data points has shown that datafit() is fastered by a factor of ~100 (from >50 s to 0.5 s). This kind of acceleration unlocks the function for actual usages. 3. *For the "qn" quasi-newton algorithm, the termination status should be returned*. In contrary to optim() that datafit() uses, datafit() does not return any termination status about the minimization convergence. This prevents to qualify the result, while the convergence may be bad due to initial parameters too far from actual ones. This makes suspectable all datafit() results, even when they are excellent. We propose to return the termination /status/ as returned by optim() for the "qn" algo, as a third optional output argument. When another algorithm is used ("gc" or "nd"), /status/ will be set to %nan instead (no actual value returned by optim()). * * 4. *It should be possible to specify initial parameters p0 and their lower and upper bounds pinf and psup as a matrix, instead of only a mandatory column*. Actually, a matrix may be sometime more readable and handy. For instance, if the model is the sum of N normal laws, p as [mean1 mean2 .. meanN stDev1 stDev2 .. stDevN y1 y2 .. yN ] is more handy than [mean1 stDev1 y1 mean2 stDev2 y2 .. meanN stDevN yN]' noticeably in the G() gap function where a loop over columns/laws then becomes possible and welcome. 5. *The overall least square "error" fmin = value of the minimized cost function should be replaced with the average model-to-data-points distance. *Presently, the returned "err" = fmin 2nd output argument is the value of the minimized cost function f. This raw unnormalized algorithmical output is not really explanatory and practical. It measures the Model-to-data distance only in a quite indirect way: * if we double (clone) each data point, err is doubled * if we double (clone) the used gap criteria, err is doubled althought in both cases the average Model-to-data distance is the same. The true average minimal Model-to-data distance dmin reached can be computed as |sqrt(fmin/ng/nz)| or |sqrt(fmin/ng/sum(Wz))| where ng is the number of gap criteria, nz the number of unweighted data points, and Wz the vector of data weights|.| Since it is normalized against ng, nz or Wz, this |out|put is more relevant and handy to qualify the performed fitting and to compare several fittings.||To provide it when datafit() returns, two ways are possible: * *Either dmin replaces err=fmin as the 2nd output argument*. This is what we propose here. But this is not a back-compatible evolution. We think that, because datafit() is presently very slow and quite poor, and this current err not handy, it has been rarely used up to now. The grey impact of this improvement should then only be light, much smaller than the positive gain we would get from it. * *Or dmin could be added as a new third output* (and the /status/ as a fourth output). 6. Finally, *the help page should be overhauled* (bug 7732 and more) The overhauled help page for this upgrade is there . This upgrade targets Scilab 6.1.0 (~2020 ?) Do you need or already use datafit() ? Hope reading your comments, noticeably about the choice about the 5th item, Best regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Jan 11 16:50:56 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 11 Jan 2018 15:50:56 +0000 Subject: [Scilab-users] Dump the output of a function In-Reply-To: References: Message-ID: Hello, In Scilab 6 you can do: function y=f(x) y = list() y(1) = x ^ 2; y(2) = x ^ 3; endfunction --> y = f(x)(2) y = 27. --> y = f(x)(1) y = 9. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Soulard, Christian (GE Power) Sent: Thursday, January 11, 2018 11:31 AM To: users at lists.scilab.org Subject: [Scilab-users] Dump the output of a function Hello, What is the Scilab way to dump the output of a function ? The Matlab equivalent is tilde (~). To give an example, suppose I have an existing function f such as : function [y_1,y_2] = f(x) y_1 = x ^ 2; y_2 = x ^ 3; enfunction Suppose I want to use this function, but I am only interested in the y_2 result, and I don't want to assign a variable to the y_1 output. In Matlab, I would do the following way : [~,b] = f(2) I would only get a single output variable : b = 8 Thank you for your feedback. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Jan 11 16:52:56 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 11 Jan 2018 15:52:56 +0000 Subject: [Scilab-users] Dump the output of a function In-Reply-To: References: Message-ID: (sorry, x=3 line was missing) Hello, In Scilab 6 you can do: function y=f(x) y = list() y(1) = x ^ 2; y(2) = x ^ 3; endfunction -->x = 3; --> y = f(x)(2) y = 27. --> y = f(x)(1) y = 9. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Soulard, Christian (GE Power) Sent: Thursday, January 11, 2018 11:31 AM To: users at lists.scilab.org Subject: [Scilab-users] Dump the output of a function Hello, What is the Scilab way to dump the output of a function ? The Matlab equivalent is tilde (~). To give an example, suppose I have an existing function f such as : function [y_1,y_2] = f(x) y_1 = x ^ 2; y_2 = x ^ 3; enfunction Suppose I want to use this function, but I am only interested in the y_2 result, and I don't want to assign a variable to the y_1 output. In Matlab, I would do the following way : [~,b] = f(2) I would only get a single output variable : b = 8 Thank you for your feedback. -------------- next part -------------- An HTML attachment was scrubbed... URL: From herozigle at gmail.com Fri Jan 12 10:46:57 2018 From: herozigle at gmail.com (Hermes) Date: Fri, 12 Jan 2018 02:46:57 -0700 (MST) Subject: [Scilab-users] Find the points of intersection of two curves Message-ID: <1515750417981-0.post@n3.nabble.com> Hello, How could I improve the accuracy of intersection points? clear; funcprot(0); timer(); function Sys=F(x) x0=x(1);x1=x(2); Sys(1)=x1^2-x0*x1+x0^2-1; Sys(2)=sin(4*x1^2)+sin(5*x0^2); endfunction function D=Draghilev(x) x0=x(1);x1=x(2);x2=x(3);x00=ics(1);x01=ics(2); D=[8*x01^2*x1*cos(4*x1^2)-8*x00*x01*x1*cos(4*x1^2)+8*x00^2*x1*cos(4*x1^2)-8*x1*cos(4*x1^2)-2*sin(4*x01^2)*x1-2*sin(5*x00^2)*x1+x0*sin(4*x01^2)+x0*sin(5*x00^2); -sin(4*x01^2)*x1-sin(5*x00^2)*x1+2*x0*sin(4*x01^2)-10*x0*cos(5*x0^2)*x01^2+10*x0*cos(5*x0^2)*x00*x01+2*x0*sin(5*x00^2)-10*x0*cos(5*x0^2)*x00^2+10*x0*cos(5*x0^2); -8*x1^2*cos(4*x1^2)+16*x0*x1*cos(4*x1^2)-20*x0*cos(5*x0^2)*x1+10*x0^2*cos(5*x0^2)]; endfunction ics=[0;1] ics=[ics;1]; disp(ics) function [dxdt]=odes(t,x) [dxdt]=Draghilev(x); endfunction N=100; smin=0.0; smax=5; h=0.0001; step=smax/N; t=smin:step:smax; t0=0; atol=h; LL= ode("fix",ics,t0,t,atol,odes) disp(timer(),"tiempo de ejecucion C"); a=get("current_axes")//get the handle of the newly created axes a.axes_visible="on"; // makes the axes visible a.font_size=3; //set the tics label font size a.x_location="middle"; //set the x axis position plot(t,LL(1,1:$),"-cya",t,LL(2,1:$),"-g",t,LL(3,1:$),"-r") s=LL(3,:)-LL(1,:); ym=s(1:$-1).*s(2:$); z=find(ym <= h); yi=interpln([t;LL(1,:)],t(z+1)); plot(t(z+1),yi,"b*") // s=LL(3,:)-LL(2,:); ym=s(1:$-1).*s(2:$); z=find(ym <= 0); I1=LL(2,find(ym <= h)); plot(t(z+1),I1,"g*") Gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From Christophe.Dang at sidel.com Fri Jan 12 11:03:19 2018 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 12 Jan 2018 10:03:19 +0000 Subject: [Scilab-users] {EXT} Find the points of intersection of two curves In-Reply-To: <1515750417981-0.post@n3.nabble.com> References: <1515750417981-0.post@n3.nabble.com> Message-ID: Hello Hermes, If I understand well,, the core of your question : > De : Hermes > Envoy? : vendredi 12 janvier 2018 10:47 > > How could I improve the accuracy of intersection points? Lies here: > s=LL(3,:)-LL(1,:); > ym=s(1:$-1).*s(2:$); > z=find(ym <= h); So you have 2 curves which y-values are LL(1,:) and LL(3,:) and you search where the sign of the difference changes. Correct? So you suppose that both curves are continuous. The refinement of the solution is more a mathematical topic than a Scilab one and I'm afraid I don't have the skill and time to analyze your functions. There are some general methods you could use: use a polynomial interpolation instead of a linear interpolation, i.e. choose an interval around the z values found above, perform a polynomial regression - you have an example of such code here : https://fr.wikibooks.org/wiki/D%C3%A9couvrir_Scilab/Calcul_num%C3%A9rique#R%C3%A9gression_polynomiale - and search the local root of the polynomial. You can also refine the step of calculation around the z values. -- 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 jrafaelbguerra at hotmail.com Fri Jan 12 12:32:27 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 12 Jan 2018 11:32:27 +0000 Subject: [Scilab-users] {EXT} Find the points of intersection of two curves In-Reply-To: References: <1515750417981-0.post@n3.nabble.com> Message-ID: Hi, This problem is equivalent to finding n-zeros over a given interval. Matlab function fnzeros uses the following reference, which uses spline interpolation: M?rken K. and Reimers, M. [2007] An unconditionally convergent method for computing zeros of splines and polynomials, Math. Comp., 76, 845--865 Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Dang Ngoc Chan, Christophe Sent: Friday, January 12, 2018 11:03 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] {EXT} Find the points of intersection of two curves Hello Hermes, If I understand well,, the core of your question : > De : Hermes > Envoy? : vendredi 12 janvier 2018 10:47 > > How could I improve the accuracy of intersection points? Lies here: > s=LL(3,:)-LL(1,:); > ym=s(1:$-1).*s(2:$); > z=find(ym <= h); So you have 2 curves which y-values are LL(1,:) and LL(3,:) and you search where the sign of the difference changes. Correct? So you suppose that both curves are continuous. The refinement of the solution is more a mathematical topic than a Scilab one and I'm afraid I don't have the skill and time to analyze your functions. There are some general methods you could use: use a polynomial interpolation instead of a linear interpolation, i.e. choose an interval around the z values found above, perform a polynomial regression - you have an example of such code here : https://fr.wikibooks.org/wiki/D%C3%A9couvrir_Scilab/Calcul_num%C3%A9rique#R%C3%A9gression_polynomiale - and search the local root of the polynomial. You can also refine the step of calculation around the z values. -- 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 jrafaelbguerra at hotmail.com Fri Jan 12 20:54:03 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 12 Jan 2018 19:54:03 +0000 Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: References: <1515750417981-0.post@n3.nabble.com> Message-ID: Hi Hermes, Find here below a simple solution using linear interpolation that works fine with your data but would need some further refinement for general arbitrary inputs. // START OF CODE clear; clf(); function Sys=F(x) x0=x(1);x1=x(2); Sys(1)=x1^2-x0*x1+x0^2-1; Sys(2)=sin(4*x1^2)+sin(5*x0^2); endfunction function D=Draghilev(x) x0=x(1);x1=x(2);x2=x(3);x00=ics(1);x01=ics(2); D=[8*x01^2*x1*cos(4*x1^2)-8*x00*x01*x1*cos(4*x1^2)+8*x00^2*x1*cos(4*x1^2)-8*x1*cos(4*x1^2)-2*sin(4*x01^2)*x1-2*sin(5*x00^2)*x1+x0*sin(4*x01^2)+x0*sin(5*x00^2); -sin(4*x01^2)*x1-sin(5*x00^2)*x1+2*x0*sin(4*x01^2)-10*x0*cos(5*x0^2)*x01^2+10*x0*cos(5*x0^2)*x00*x01+2*x0*sin(5*x00^2)-10*x0*cos(5*x0^2)*x00^2+10*x0*cos(5*x0^2); -8*x1^2*cos(4*x1^2)+16*x0*x1*cos(4*x1^2)-20*x0*cos(5*x0^2)*x1+10*x0^2*cos(5*x0^2)]; endfunction function [dxdt]=odes(t, x) [dxdt]=Draghilev(x); endfunction ics=[0;1;1] N=100; smin=0.0; smax=5; h=0.0001; step=smax/N; t=smin:step:smax; t0=0; atol=h; LL= ode("fix",ics,t0,t,atol,odes) plot(t,LL(1,1:$),"-cya",t,LL(2,1:$),"-g",t,LL(3,1:$),"-r") a=gca(); s= LL(3,:) - LL(1,:); ym= s(1:$-1).*s(2:$); z=find(ym <= 0); t0 = t(z) - s(z).*(t(z+1)-t(z))./(s(z+1)-s(z)); y0 = interpln([t;LL(1,:)],t0); plot(t0,y0,"b*") s= LL(3,:) - LL(2,:); ym= s(1:$-1).*s(2:$); z=find(ym <= 0); t0 = t(z) - s(z).*(t(z+1)-t(z))./(s(z+1)-s(z)); y0 = interpln([t;LL(2,:)],t0); plot(t0,y0,"black*") // END OF CODE Regards, Rafael From Clement.David at esi-group.com Tue Jan 16 09:31:20 2018 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Tue, 16 Jan 2018 08:31:20 +0000 Subject: [Scilab-users] Dump the output of a function In-Reply-To: References: Message-ID: <1516091479.2132.13.camel@esi-group.com> Hello Christian, Samuel, My 2c, most of the modern languages supporting such a feature are using the one-character variable trick; sometimes enforced by conventions. For example, Go, Rust and Python are using `_` as in : [_,_,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9)); This character appears as a visual blank thus the function call is easily readable. Regards, -- Cl?ment Le jeudi 11 janvier 2018 ? 13:00 +0100, Samuel Gougeon a ?crit : > Hello Christian, > > AFAIK there is presently no way to skip an output parameter. The more handy would be > [,y2,,y4] = f(x) > but unfortunately, it does not work (yet?). > I did not find this feature as a wish on bugzilla. IMO it should be. > It is possible to use a one-character variable name, for instance among %, #, ! or ?. > > --> [%,%,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9)); > --> kb > kb = > > 7. 5. 2. > > Even if the tilde was allowed, it is not very smart. A true blackhole would be better. > > Regards > Samuel > > Le 11/01/2018 ? 11:31, Soulard, Christian (GE Power) a ?crit : > > Hello, > > > > What is the Scilab way to dump the output of a function ? The Matlab equivalent is tilde (~). > > > > To give an example, suppose I have an existing function f such as : > > > > function [y_1,y_2] = f(x) > > y_1 = x ^ 2; > > y_2 = x ^ 3; > > enfunction > > > > Suppose I want to use this function, but I am only interested in the y_2 result, and I don?t > > want to assign a variable to the y_1 output. In Matlab, I would do the following way : > > > > [~,b] = f(2) > > > > I would only get a single output variable : > > > > b = 8 > > > > Thank you for your feedback. > > > > > > > > _______________________________________________ > > 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 shashank.thapa at gmail.com Fri Jan 12 13:08:46 2018 From: shashank.thapa at gmail.com (baloo) Date: Fri, 12 Jan 2018 05:08:46 -0700 (MST) Subject: [Scilab-users] Cannot run Coselica in windows 7? Message-ID: <1515758926778-0.post@n3.nabble.com> Hello, i m not sure if i can post this i did not get any confirmation from the mailing list. I am trying to run the example of coselica in Xcos i am getting a error which says something like ? la ligne 1 du texte ex?cut? ? la ligne 58 de la fonction loadXcosLibs ( C:\Program Files\scilab-6.0.0\modules\xcos\macros\loadXcosLibs.sci ligne 73 ) Impossible de red?finir la primitive scicos_scicoslib de cette mani?re (voir clearfun). csvRead : C:\Users\SHASHA~1.THA\AppData\Roaming\Scilab\SCILAB~1.0\atoms\x64\coselica\06DFEA~1.5\macros\Utils..\..\etc\messages.csv n'existe pas. do_eval : Erreur ? l'appel du bloc CMPJ_ActuatedRevolute [uid='5b41ef5:133698f02c7:-7fde']: param?tre invalide (ier=999.000 000, %scicos_prob=%F). And this are the message which i get when i load SciLab Initialisation : Chargement de l'environnement de travail Start iodelay toolbox Load macros Load help Load demos Start COSELICA module Load macros Load palette: Coselica - Blocks Load palette: Coselica - Electrical Load palette: Coselica - Heat transfer Load palette: Coselica - Mechanics/Translational Load palette: Coselica - Mechanics/Rotational Load palette: Coselica - Mechanics/Planar Load palette: Coselica - Components Load help Load demos Load Modelica Equations Coselica Version: 0.6.4 Start CPGE - Xcos toolbox Load macros Load palette - CPGE - Standard blocks Load help Load demos CPGE Version: 1.6.0 Mingw Compiler support for Scilab Load macros Load help Am i doing something wrong cause when i look at the programs I already have microsoft visual c++. Thank you, Best regards -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From moncler at mail5.parkaser.site Fri Jan 12 13:15:19 2018 From: moncler at mail5.parkaser.site (Moncler) Date: Fri, 12 Jan 2018 20:15:19 +0800 Subject: [Scilab-users] *****SPAM***** Moncler Clothing - 2018 New year Clearance!Save 70% OFF Message-ID: <6c74f9d5dd0dcbff6ae8b7bc43c923d7@192.168.0.10> Spam detection software, running on the system "corvo.inria.fr", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Untitled document Happy New Year 2018 MONCLER JACKETS MEN'S JACKETS WOMEN'S COATS Moncler 70% OFF Flash SALE !!!! Moncler Acorus Men Down Jacket Black 236.001040.00 [...] Content analysis details: (6.5 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100% [score: 1.0000] 1.0 RCVD_IN_CSS RBL: Received via a relay in Spamhaus CSS [116.196.120.114 listed in zen.spamhaus.org] 0.0 NORMAL_HTTP_TO_IP URI: Uses a dotted-decimal IP address in URL 0.4 HTML_IMAGE_RATIO_02 BODY: HTML has a low ratio of text to image area 0.0 HTML_MESSAGE BODY: HTML included in message 0.7 MIME_HTML_ONLY BODY: Message only has text/html MIME parts 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS 0.0 T_REMOTE_IMAGE Message contains an external image The original message was not completely plain text, and may be unsafe to open with some email clients; in particular, it may contain a virus, or confirm that your address can receive spam. If you wish to view it, it may be safer to save it to a file and open it with an editor. -------------- next part -------------- An embedded message was scrubbed... From: Moncler Subject: Moncler Clothing - 2018 New year Clearance!Save 70% OFF Date: Fri, 12 Jan 2018 20:15:19 +0800 Size: 12909 URL: From jrafaelbguerra at hotmail.com Fri Jan 12 20:44:29 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 12 Jan 2018 19:44:29 +0000 Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: <1515750417981-0.post@n3.nabble.com> References: <1515750417981-0.post@n3.nabble.com> Message-ID: Hi Hermes, Here below a simple solution using linear interpolation that works fine with your data but would need some further refinement for general arbitrary inputs. // START OF CODE clear; clf(); function Sys=F(x) x0=x(1);x1=x(2); Sys(1)=x1^2-x0*x1+x0^2-1; Sys(2)=sin(4*x1^2)+sin(5*x0^2); endfunction function D=Draghilev(x) x0=x(1);x1=x(2);x2=x(3);x00=ics(1);x01=ics(2); D=[8*x01^2*x1*cos(4*x1^2)-8*x00*x01*x1*cos(4*x1^2)+8*x00^2*x1*cos(4*x1^2)-8*x1*cos(4*x1^2)-2*sin(4*x01^2)*x1-2*sin(5*x00^2)*x1+x0*sin(4*x01^2)+x0*sin(5*x00^2); -sin(4*x01^2)*x1-sin(5*x00^2)*x1+2*x0*sin(4*x01^2)-10*x0*cos(5*x0^2)*x01^2+10*x0*cos(5*x0^2)*x00*x01+2*x0*sin(5*x00^2)-10*x0*cos(5*x0^2)*x00^2+10*x0*cos(5*x0^2); -8*x1^2*cos(4*x1^2)+16*x0*x1*cos(4*x1^2)-20*x0*cos(5*x0^2)*x1+10*x0^2*cos(5*x0^2)]; endfunction function [dxdt]=odes(t, x) [dxdt]=Draghilev(x); endfunction ics=[0;1;1] N=100; smin=0.0; smax=5; h=0.0001; step=smax/N; t=smin:step:smax; t0=0; atol=h; LL= ode("fix",ics,t0,t,atol,odes) plot(t,LL(1,1:$),"-cya",t,LL(2,1:$),"-g",t,LL(3,1:$),"-r") a=gca(); s= LL(3,:) - LL(1,:); ym= s(1:$-1).*s(2:$); z=find(ym <= 0); t0 = t(z) - s(z).*(t(z+1)-t(z))./(s(z+1)-s(z)); y0 = interpln([t;LL(1,:)],t0); plot(t0,y0,"b*") s= LL(3,:) - LL(2,:); ym= s(1:$-1).*s(2:$); z=find(ym <= 0); t0 = t(z) - s(z).*(t(z+1)-t(z))./(s(z+1)-s(z)); y0 = interpln([t;LL(2,:)],t0); plot(t0,y0,"black*") // END OF CODE Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From Paul.Bignier at esi-group.com Tue Jan 16 14:04:23 2018 From: Paul.Bignier at esi-group.com (Paul Bignier) Date: Tue, 16 Jan 2018 13:04:23 +0000 Subject: [Scilab-users] Cannot run Coselica in windows 7? In-Reply-To: <1515758926778-0.post@n3.nabble.com> References: <1515758926778-0.post@n3.nabble.com> Message-ID: Hello baloo, This bug has been reported & fixed, Coselica will be available in the next scilab release. If you want a nightly build you may download one on our Jenkins (link is for Windows 64). Best 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 baloo Sent: Friday, January 12, 2018 1:08 PM To: users at lists.scilab.org Subject: [Scilab-users] Cannot run Coselica in windows 7? Hello, i m not sure if i can post this i did not get any confirmation from the mailing list. I am trying to run the example of coselica in Xcos i am getting a error which says something like ? la ligne 1 du texte ex?cut? ? la ligne 58 de la fonction loadXcosLibs ( C:\Program Files\scilab-6.0.0\modules\xcos\macros\loadXcosLibs.sci ligne 73 ) Impossible de red?finir la primitive scicos_scicoslib de cette mani?re (voir clearfun). csvRead : C:\Users\SHASHA~1.THA\AppData\Roaming\Scilab\SCILAB~1.0\atoms\x64\coselica\06DFEA~1.5\macros\Utils..\..\etc\messages.csv n'existe pas. do_eval : Erreur ? l'appel du bloc CMPJ_ActuatedRevolute [uid='5b41ef5:133698f02c7:-7fde']: param?tre invalide (ier=999.000 000, %scicos_prob=%F). And this are the message which i get when i load SciLab Initialisation : Chargement de l'environnement de travail Start iodelay toolbox Load macros Load help Load demos Start COSELICA module Load macros Load palette: Coselica - Blocks Load palette: Coselica - Electrical Load palette: Coselica - Heat transfer Load palette: Coselica - Mechanics/Translational Load palette: Coselica - Mechanics/Rotational Load palette: Coselica - Mechanics/Planar Load palette: Coselica - Components Load help Load demos Load Modelica Equations Coselica Version: 0.6.4 Start CPGE - Xcos toolbox Load macros Load palette - CPGE - Standard blocks Load help Load demos CPGE Version: 1.6.0 Mingw Compiler support for Scilab Load macros Load help Am i doing something wrong cause when i look at the programs I already have microsoft visual c++. Thank you, Best regards -- 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 Jan 16 14:12:00 2018 From: sgougeon at free.fr (sgougeon at free.fr) Date: Tue, 16 Jan 2018 14:12:00 +0100 (CET) Subject: [Scilab-users] Dump the output of a function In-Reply-To: <1516091479.2132.13.camel@esi-group.com> Message-ID: <1487002393.166958070.1516108320251.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello Cl?ment, OK for your confirmation. Unfortunately, in Scilab "_" can't be used, because _() is a defined function aliasing gettext(), and Scilab needs it as is. I don't think it was a good thing to use a single character to define such an alias, but it is as is. It would be unlikely possible to rename it... Would it? Best regards Samuel ----- Mail original ----- De: "Cl?ment David" ?: users at lists.scilab.org Envoy?: Mardi 16 Janvier 2018 09:31:20 Objet: Re: [Scilab-users] Dump the output of a function Hello Christian, Samuel, My 2c, most of the modern languages supporting such a feature are using the one-character variable trick; sometimes enforced by conventions. For example, Go, Rust and Python are using `_` as in : [_,_,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9)); This character appears as a visual blank thus the function call is easily readable. Regards, -- Cl?ment From stephane.mottelet at utc.fr Tue Jan 16 15:34:10 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 16 Jan 2018 15:34:10 +0100 Subject: [Scilab-users] Run OSX nightly builds Message-ID: <25e900c1-22d2-1989-ac10-86afcc369453@utc.fr> Hello, How nightly builds (master and 6.0) can be run on OSX ? I suppose that the .tar.gz archive is not enough but needs also a generic scilab.app folder. I am almost able to run the 6.0 on the command line with "./bin/scilab -nwni" but hacking the classpath seems to be needed for full gui. Trying the master build with "./bin/scilab -nwni" I got the following output : Scilab branch-master (Jan 15 2018, 10:16:13) ?Impossible d'ex?cuter SCI/modules/preferences/etc/preferences.start : ?xmlXPath : Type erron? de l'argument d'entr?e n?1 :? Un XMLDoc ou un XMLElem attendu. Thanks for your help. S. -- 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 herozigle at gmail.com Tue Jan 16 15:55:41 2018 From: herozigle at gmail.com (Hermes) Date: Tue, 16 Jan 2018 07:55:41 -0700 (MST) Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: <1515750417981-0.post@n3.nabble.com> References: <1515750417981-0.post@n3.nabble.com> Message-ID: <1516114541370-0.post@n3.nabble.com> Hello Rafael, with your proposal the result is as expected. Thank you I have delayed responding because I wanted to arrive to the next step by my means. But without results: I want to achieve the following graph from the data obtained in LL. I have played with several configurations of the following graphical function: plot3d (LL (1, :), LL (2, :), 0 * ones (1,101), alpha = 35, theta = 45), for the circle parallel to the xy plane. plot3d (LL (1, :), LL (2, :), LL (3, :), alpha = 35, theta = 45), for the function in space. then it would be to put the intersection points. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From herozigle at gmail.com Tue Jan 16 16:36:28 2018 From: herozigle at gmail.com (Hermes) Date: Tue, 16 Jan 2018 08:36:28 -0700 (MST) Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: <1516114541370-0.post@n3.nabble.com> References: <1515750417981-0.post@n3.nabble.com> <1516114541370-0.post@n3.nabble.com> Message-ID: <1516116988369-0.post@n3.nabble.com> The correct graph for the script shown should be the following: my apologies -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Tue Jan 16 23:37:53 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 16 Jan 2018 22:37:53 +0000 Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: <1516116988369-0.post@n3.nabble.com> References: <1515750417981-0.post@n3.nabble.com> <1516114541370-0.post@n3.nabble.com> <1516116988369-0.post@n3.nabble.com> Message-ID: Hi Hermes, Check this solution out: // START OF CODE clear; clf(); function Sys=F(x) x0=x(1);x1=x(2); Sys(1)=x1^2-x0*x1+x0^2-1; Sys(2)=sin(4*x1^2)+sin(5*x0^2); endfunction function D=Draghilev(x) x0=x(1);x1=x(2);x2=x(3);x00=ics(1);x01=ics(2); D=[8*x01^2*x1*cos(4*x1^2)-8*x00*x01*x1*cos(4*x1^2)+8*x00^2*x1*cos(4*x1^2)-8*x1*cos(4*x1^2)-2*sin(4*x01^2)*x1-2*sin(5*x00^2)*x1+x0*sin(4*x01^2)+x0*sin(5*x00^2); -sin(4*x01^2)*x1-sin(5*x00^2)*x1+2*x0*sin(4*x01^2)-10*x0*cos(5*x0^2)*x01^2+10*x0*cos(5*x0^2)*x00*x01+2*x0*sin(5*x00^2)-10*x0*cos(5*x0^2)*x00^2+10*x0*cos(5*x0^2); -8*x1^2*cos(4*x1^2)+16*x0*x1*cos(4*x1^2)-20*x0*cos(5*x0^2)*x1+10*x0^2*cos(5*x0^2)]; endfunction function [dxdt]=odes(t,x) [dxdt]=Draghilev(x); endfunction ics=[0;1;1] N=100; smin=0.0; smax=5; h=0.0001; step=smax/N; t=smin:step:smax; t0=0; atol=h; LL= ode("fix",ics,t0,t,atol,odes) s= LL(3,:); ym= s(1:$-1).*s(2:$); z= find(ym <= 0); t0 = t(z) - s(z).*(t(z+1)-t(z))./(s(z+1)-s(z)); x0 = interpln([t;LL(1,:)],t0); y0 = interpln([t;LL(2,:)],t0); param3d(LL(1,:), LL(2,:), 0 * LL(1,:), alpha=35, theta=45); // circle in the xy plane e = gce(); e.foreground =17; param3d(LL(1,:), LL(2,:), LL(3,:), alpha=35, theta=45) // parametric function in 3d-space param3d(x0, y0, 0*x0, alpha=35, theta=45) // zero-crossings e = gce(); e.line_mode = "off"; e.mark_mode = "on" e.mark_style = 3; e.mark_foreground =5 ; // END OF CODE Regards, Rafael From jrafaelbguerra at hotmail.com Tue Jan 16 23:44:54 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 16 Jan 2018 22:44:54 +0000 Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: References: <1515750417981-0.post@n3.nabble.com> <1516114541370-0.post@n3.nabble.com> <1516116988369-0.post@n3.nabble.com> Message-ID: In previous email the code formatting got messed up, fixed it here below: // START OF CODE clear; clf(); function Sys=F(x) x0=x(1);x1=x(2); Sys(1)=x1^2-x0*x1+x0^2-1; Sys(2)=sin(4*x1^2)+sin(5*x0^2); endfunction function D=Draghilev(x) x0=x(1);x1=x(2);x2=x(3);x00=ics(1);x01=ics(2); D=[8*x01^2*x1*cos(4*x1^2)-8*x00*x01*x1*cos(4*x1^2)+8*x00^2*x1*cos(4*x1^2)-8*x1*cos(4*x1^2)-2*sin(4*x01^2)*x1-2*sin(5*x00^2)*x1+x0*sin(4*x01^2)+x0*sin(5*x00^2); -sin(4*x01^2)*x1-sin(5*x00^2)*x1+2*x0*sin(4*x01^2)-10*x0*cos(5*x0^2)*x01^2+10*x0*cos(5*x0^2)*x00*x01+2*x0*sin(5*x00^2)-10*x0*cos(5*x0^2)*x00^2+10*x0*cos(5*x0^2); -8*x1^2*cos(4*x1^2)+16*x0*x1*cos(4*x1^2)-20*x0*cos(5*x0^2)*x1+10*x0^2*cos(5*x0^2)]; endfunction function [dxdt]=odes(t,x) [dxdt]=Draghilev(x); endfunction ics=[0;1;1] N=100; smin=0.0; smax=5; h=0.0001; step=smax/N; t=smin:step:smax; t0=0; atol=h; LL= ode("fix",ics,t0,t,atol,odes) s= LL(3,:); ym= s(1:$-1).*s(2:$); z= find(ym <= 0); t0 = t(z) - s(z).*(t(z+1)-t(z))./(s(z+1)-s(z)); x0 = interpln([t;LL(1,:)],t0); y0 = interpln([t;LL(2,:)],t0); param3d(LL(1,:), LL(2,:), 0 * LL(1,:), alpha=35, theta=45); // circle in the xy plane e = gce(); e.foreground =17; param3d(LL(1,:), LL(2,:), LL(3,:), alpha=35, theta=45); // parametric function in 3d-space param3d(x0, y0, 0*x0, alpha=35, theta=45); // zero-crossings e = gce(); e.line_mode = "off"; e.mark_mode = "on" e.mark_style = 3; e.mark_foreground =5 ; // END OF CODE Regards, Rafael From jrafaelbguerra at hotmail.com Wed Jan 17 09:00:12 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 17 Jan 2018 08:00:12 +0000 Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: References: <1515750417981-0.post@n3.nabble.com> <1516114541370-0.post@n3.nabble.com> <1516116988369-0.post@n3.nabble.com> Message-ID: (still problems with the cut and pasting of code from SciNotes, removed some of the comments now) // START OF CODE clear; clf(); function Sys=F(x) x0=x(1);x1=x(2); Sys(1)=x1^2-x0*x1+x0^2-1; Sys(2)=sin(4*x1^2)+sin(5*x0^2); endfunction function D=Draghilev(x) x0=x(1);x1=x(2);x2=x(3);x00=ics(1);x01=ics(2); D=[8*x01^2*x1*cos(4*x1^2)-8*x00*x01*x1*cos(4*x1^2)+8*x00^2*x1*cos(4*x1^2)-8*x1*cos(4*x1^2)-2*sin(4*x01^2)*x1-2*sin(5*x00^2)*x1+x0*sin(4*x01^2)+x0*sin(5*x00^2); -sin(4*x01^2)*x1-sin(5*x00^2)*x1+2*x0*sin(4*x01^2)-10*x0*cos(5*x0^2)*x01^2+10*x0*cos(5*x0^2)*x00*x01+2*x0*sin(5*x00^2)-10*x0*cos(5*x0^2)*x00^2+10*x0*cos(5*x0^2); -8*x1^2*cos(4*x1^2)+16*x0*x1*cos(4*x1^2)-20*x0*cos(5*x0^2)*x1+10*x0^2*cos(5*x0^2)]; endfunction function [dxdt]=odes(t,x) [dxdt]=Draghilev(x); endfunction ics=[0;1;1] N=100; smin=0.0; smax=5; h=0.0001; step=smax/N; t=smin:step:smax; t0=0; atol=h; LL= ode("fix",ics,t0,t,atol,odes) s= LL(3,:); ym= s(1:$-1).*s(2:$); z= find(ym <= 0); t0 = t(z) - s(z).*(t(z+1)-t(z))./(s(z+1)-s(z)); x0 = interpln([t;LL(1,:)],t0); y0 = interpln([t;LL(2,:)],t0); param3d(LL(1,:), LL(2,:), 0 * LL(1,:), alpha=35, theta=45); e = gce(); e.foreground =17; param3d(LL(1,:), LL(2,:), LL(3,:), alpha=35, theta=45); param3d(x0, y0, 0*x0, alpha=35, theta=45); e = gce(); e.line_mode = "off"; e.mark_mode = "on"; e.mark_style = 3; e.mark_foreground =5; // END OF CODE Regards, Rafael From herozigle at gmail.com Wed Jan 17 09:31:54 2018 From: herozigle at gmail.com (Hermes) Date: Wed, 17 Jan 2018 01:31:54 -0700 (MST) Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: References: <1515750417981-0.post@n3.nabble.com> <1516114541370-0.post@n3.nabble.com> <1516116988369-0.post@n3.nabble.com> Message-ID: <1516177914989-0.post@n3.nabble.com> Hello Rafael, Thankful for your help. I think that in Scilab's help there should be examples of this type of graphics. Is there a site where you can see a gallery of "pretentious and intrepid" graphics? It would be a great help to assimilate the graphic potentialities of Scilab to those who immigrated from other systems or software. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jrafaelbguerra at hotmail.com Wed Jan 17 12:11:35 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 17 Jan 2018 11:11:35 +0000 Subject: [Scilab-users] Find the points of intersection of two curves In-Reply-To: <1516177914989-0.post@n3.nabble.com> References: <1515750417981-0.post@n3.nabble.com> <1516114541370-0.post@n3.nabble.com> <1516116988369-0.post@n3.nabble.com> <1516177914989-0.post@n3.nabble.com> Message-ID: Hi Hermes, You may want to check out this page in French which is very comprehensive: https://perso.univ-rennes1.fr/philippe.roux/scilab/graphiques/fiche_graphiques.html Regards, Rafael From antoine.monmayrant at laas.fr Wed Jan 17 18:16:15 2018 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Wed, 17 Jan 2018 18:16:15 +0100 Subject: [Scilab-users] Dump the output of a function In-Reply-To: <1487002393.166958070.1516108320251.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <1487002393.166958070.1516108320251.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <1834a2f4-8cad-da2a-55c8-4a2496a56869@laas.fr> Hello all, I might say something really stupid, but can't we define a special variable like %eps, %i, etc to act as a black hole ? Something like %null (like piping to /dev/null or a null pointer) or a better name (%blackhole, %lostforever, %byebye, ;-) ). The idea being that no memory is allocated when someone try to affect some value to it: [%null,%null,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9)); Antoine Le 16/01/2018 ? 14:12, sgougeon at free.fr a ?crit?: > Hello Cl?ment, > > OK for your confirmation. Unfortunately, in Scilab "_" can't be used, because _() is a defined function aliasing gettext(), and Scilab needs it as is. > > I don't think it was a good thing to use a single character to define such an alias, but it is as is. > It would be unlikely possible to rename it... Would it? > > Best regards > Samuel > > ----- Mail original ----- > De: "Cl?ment David" > ?: users at lists.scilab.org > Envoy?: Mardi 16 Janvier 2018 09:31:20 > Objet: Re: [Scilab-users] Dump the output of a function > > Hello Christian, Samuel, > > My 2c, most of the modern languages supporting such a feature are using the one-character variable > trick; sometimes enforced by conventions. For example, Go, Rust and Python are using `_` as in : > > [_,_,kb] = intersect(grand(1,10,"uin",0,9), grand(1,10,"uin",0,9)); > > This character appears as a visual blank thus the function call is easily readable. > > Regards, > > -- > Cl?ment > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Wed Jan 17 20:26:52 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 17 Jan 2018 20:26:52 +0100 Subject: [Scilab-users] Dump the output of a function In-Reply-To: <1834a2f4-8cad-da2a-55c8-4a2496a56869@laas.fr> References: <1487002393.166958070.1516108320251.JavaMail.root@zimbra75-e12.priv.proxad.net> <1834a2f4-8cad-da2a-55c8-4a2496a56869@laas.fr> Message-ID: Le 17/01/2018 ? 18:16, antoine monmayrant a ?crit : > Hello all, > > > I might say something really stupid, but can't we define a special > variable like %eps, %i, etc to act as a black hole ? > Something like %null (like piping to /dev/null or a null pointer) or a > better name (%blackhole, %lostforever, %byebye, ;-) ). > The idea being that no memory is allocated when someone try to affect > some value to it: > > [%null,%null,kb] = intersect(grand(1,10,"uin",0,9), > grand(1,10,"uin",0,9)); A true black hole has even no name :) Otherwise, the shorter the better, and "_" would be nice after deprecating _() (*). Anyway, IMO this black hole feature has a very low priority compared to some other ones, like some big regressions (bug 13808 = 14881 , sparse() with repeated indices, etc etc) or some very and longly expected ones like a varprot()... Samuel (*) it could be renamed something like _tr() (standing for /tr/anslate). The number of occurrences of _() to be converted in the Scilab native code is very important, but the conversion might be automated (since the gettext() scanner has a reliable detection criterium, and only .sci, .sce, .tst and .dia.ref files are targeted). gettext() and _() are almost unused in external modules, because the gettext domain feature has never worked (or please just give us a working example... Never seen a single one). -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Jan 17 20:36:53 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 17 Jan 2018 20:36:53 +0100 Subject: [Scilab-users] Dump the output of a function In-Reply-To: References: <1487002393.166958070.1516108320251.JavaMail.root@zimbra75-e12.priv.proxad.net> <1834a2f4-8cad-da2a-55c8-4a2496a56869@laas.fr> Message-ID: Le 17/01/2018 ? 20:26, Samuel Gougeon a ?crit : > Le 17/01/2018 ? 18:16, antoine monmayrant a ?crit : >> Hello all, >> >> >> I might say something really stupid, but can't we define a special >> variable like %eps, %i, etc to act as a black hole ? >> Something like %null (like piping to /dev/null or a null pointer) or >> a better name (%blackhole, %lostforever, %byebye, ;-) ). >> The idea being that no memory is allocated when someone try to affect >> some value to it: >> >> [%null,%null,kb] = intersect(grand(1,10,"uin",0,9), >> grand(1,10,"uin",0,9)); > > A true black hole has even no name :) > Otherwise, the shorter the better, and "_" would be nice after > deprecating _() (*). > > Anyway, IMO this black hole feature has a very low priority compared > to some other ones, like some big regressions (bug 13808 > = 14881 > , sparse() with > repeated indices, etc etc) or some very and longly expected ones like > a varprot()... > > Samuel > > (*) it could be renamed something like _tr() (standing for /tr/anslate). > The number of occurrences of _() to be converted in the Scilab native > code is very important, but the conversion might be automated (since > the gettext() scanner has a reliable detection criterium, and only > .sci, .sce, .tst and .dia.ref files are targeted sorry, that's wrong. Other files in C, C++ etc, and xml have _() occurences as well. But it's possible to parse them with no issue, since the scanner does it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Sat Jan 20 08:45:26 2018 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Sat, 20 Jan 2018 08:45:26 +0100 Subject: [Scilab-users] ?==?utf-8?q? Both scilab 5.5.2 & 6.0 stopped working (java issue under linux) In-Reply-To: <1512403509.17393.9.camel@esi-group.com> References: <1512403509.17393.9.camel@esi-group.com> Message-ID: <267f8c33-b083-c6da-9746-762a120f445a@laas.fr> I just noticed that I did not fill a bug report for that. I have 3 of my colleagues running Scilab on Ubuntu 17.04 /17.10 that are also affected. Should I fill a bug report or it corresponds to a known one? Antoine Le 04/12/2017 ? 17:05, Cl?ment David a ?crit?: > Hi all, > > Nice catch Antoine ! From my understanding of the crash and depending on your graphic card, you > could switch the actual GL implementation to a well supported one rather than relying on the latest > GL. For example, using mesa on my Intel i965 system, I can tweak the used Profile through > MESA_GL_VERSION_OVERRIDE and MESA_EXTENSION_OVERRIDE [https://www.mesa3d.org/envvars.html]. > > Regards, > > -- > Cl?ment > > Le lundi 04 d?cembre 2017 ? 16:38 +0100, Antoine Monmayrant a ?crit : >> Hi all, >> >> Answering my own post: it was a graphic driver issue, as usual. >> I switch to another driver and now scilab starts, but all the graphics windows are empty! >> >> Antoine >> >> >> On Monday, December 04, 2017 16:12 CET, "Antoine Monmayrant" wrote: >> >>> Hi everyone, >>> >>> It seems that some automatic update have broken scilab on my linux station (16.04.3 64bits). >>> Any java related feature is broken and only scilab-cli is working. >>> As any of you any idea on how to investigate this issue? >>> >>> Thanks in advance, >>> >>> Antoine >>> >>> PS: Here is the crash log: >>> >>> >>> $ scilab >>> Could not create a Scilab main class. Error: >>> Exception in thread "main" java.lang.InternalError: XXX0 profile[1]: GL3bc -> profileImpl GL4bc >>> !!! not mapped >>> at com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2071) >>> at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1954) >>> at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1875) >>> at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1842) >>> at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) >>> at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) >>> at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297) >>> at com.jogamp.opengl.GLProfile.get(GLProfile.java:988) >>> at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:722) >>> at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:733) >>> at org.scilab.modules.gui.SwingView.(Unknown Source) >>> at org.scilab.modules.gui.SwingView.registerSwingView(Unknown Source) >>> at org.scilab.modules.core.Scilab.(Unknown Source) >>> >>> Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab >>> class. Check if the Scilab and thirdparty packages are available). >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From cfuttrup at gmail.com Sat Jan 20 11:08:50 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 20 Jan 2018 11:08:50 +0100 Subject: [Scilab-users] Polarplot help Message-ID: Dear Scilabers This weekend I'm trying to do some polar plots and experiment with GUI. What I'm trying to do is quite similar to Example 3 in the help: https://help.scilab.org/docs/6.0.0/en_US/polarplot.html I work with loudspeakers and in our industry it's standard to have the zero degree angle up the y-axis (as in above Example 3). How can I rotate the labels of the polarplot so that zero is up the y-axis instead of out the x-axis? Alternatively, how can I disable the labels? Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From rouxph.22 at gmail.com Sat Jan 20 16:21:13 2018 From: rouxph.22 at gmail.com (philippe) Date: Sat, 20 Jan 2018 16:21:13 +0100 Subject: [Scilab-users] Polarplot help In-Reply-To: References: Message-ID: Hi, Le 20/01/2018 ? 11:08, Claus Futtrup a ?crit?: > > > How can I rotate the labels of the polarplot so that zero is up the > y-axis instead of out the x-axis? Alternatively, how can I disable the > labels? look at the Axis handle, the labels of a polar plot are additional children of "Text" . Try this example : clf t = 0:0.01:2*%pi; polarplot(t, -1 + sin(t)); A=gca() // get the axis handle A.children// look at all its children //The labels are those of "Text" type id=find(A.children.type="Text" )// get their id //then modify the properties of the handles A.children(id).visible="off" // no labels A.children(id).visible="on" // all labels A.children(id).text="mylabel" // change labels for k=id A.children(k).text=string(k); end Philippe From cfuttrup at gmail.com Sat Jan 20 17:05:47 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 20 Jan 2018 17:05:47 +0100 Subject: [Scilab-users] Polarplot help In-Reply-To: References: Message-ID: Hi Philippe Thank you for the pointer. It works. To everybodys amusement, here comes a script (with data reduced from more than 13000 to 21, so it can be posted here). The reason is I have a new problem. Plotting in this case 3 set of data, polarplot seems to auto_scale and turning it off doesn't work (??). Please see this one: // Test datafrequencies = [200 2000 20000]; // Hzangles = [0 30 60 90 120 150 180]; // degrees - convert to radians!mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-responsemag30 = [68.461357 90.569082 76.073549];mag60 = [65.842262 90.745621 74.152067];mag90 = [59.420658 80.893365 55.975304];mag120 = [52.505173 80.795915 44.363582];mag150 = [53.829987 59.793715 42.443964];mag180 = [55.650341 73.457973 55.608187];magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; // 3 freq x 7 angles = 21 data points, put into a matrix.// In the complete dataset there's 183 frequencies and 72 angles. negative_angles = -angles(2:7);neg_angle_magnitudes = magnitudes(:,2:7); angles = [angles negative_angles];magnitudes = [magnitudes neg_angle_magnitudes]; [angles idx] = gsort(angles,'g','i');magnitudes = magnitudes(:,idx); // Polar plot example: polplt = scf(); p = gca(); // p = "polarplot" ... how ingenious :-/ polarplot(%pi*angles/180,magnitudes(1,:)); p.auto_scale = "off"; polarplot(%pi*angles/180,magnitudes(2,:)); // index 2 = 2 kHz polarplot(%pi*angles/180,magnitudes(3,:)); legend("200 Hz","2 kHz","20 kHz"); p = gca(); // p = "polarplot" ... how ingenious :-/ idx=find(p.children.type=="Text"); p.children(idx).visible="off"; My "problem" is I cannot just specify polarplot to plot all three curves in one go. So I execute one at the time, but now see the axis changes for each of them (in the same figure)... I hope it makes sense what I'm trying to do and my problem is understandable. Best regards, Claus On Sat, Jan 20, 2018 at 4:21 PM, philippe wrote: > Hi, > > Le 20/01/2018 ? 11:08, Claus Futtrup a ?crit : > > > > > > How can I rotate the labels of the polarplot so that zero is up the > > y-axis instead of out the x-axis? Alternatively, how can I disable the > > labels? > > look at the Axis handle, the labels of a polar plot are additional > children of "Text" . Try this example : > > > clf > t = 0:0.01:2*%pi; > polarplot(t, -1 + sin(t)); > A=gca() // get the axis handle > A.children// look at all its children > //The labels are those of "Text" type > id=find(A.children.type="Text" )// get their id > //then modify the properties of the handles > A.children(id).visible="off" // no labels > A.children(id).visible="on" // all labels > A.children(id).text="mylabel" // change labels > for k=id > A.children(k).text=string(k); > end > > > Philippe > > _______________________________________________ > 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 Jan 21 12:55:43 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 21 Jan 2018 11:55:43 +0000 Subject: [Scilab-users] Polarplot help In-Reply-To: References: Message-ID: Hi Claus, For the angles orientation problem in polar plot and correct labelling, here below a simple solution: // START OF CODE clf t = 0:0.01:2*%pi; t90 = %pi/2 - t; //redefine angle-convention consistent with loudspeaker plots theta = t; // keep Scilab angles for theta rho = -1 + sin(t90); // use new angle mapping for rho polarplot(theta, rho); a=gca(); set(a,'rotation_angles',[180,0]); // rotate plot axes // END OF CODE Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Jan 21 13:08:11 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 21 Jan 2018 12:08:11 +0000 Subject: [Scilab-users] Polarplot help In-Reply-To: References: Message-ID: Hi Claus, Regarding your problem of not being able to plot all curves in one go preserving the scales, if I am not mistaken this can be solved by invoking polarplot with a single call using array notation. See example here below with 2 curves for simplicity: // START OF CODE clf t = 0:0.01:2*%pi; t90 = %pi/2 - t; //redefine angle-convention consistent with loudspeaker plots theta = t; // keep Scilab angles for theta rho1 = 1 + sin(t90).^2; // use new angle mapping for rho1 rho2 = 1 + 2*cos(t90).^2; // use new angle mapping for rho2 polarplot([theta,theta], [rho1,rho2]); a=gca(); set(a,'rotation_angles',[180,0]); // rotate plot axes // END OF CODE Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Jan 21 13:37:49 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Jan 2018 13:37:49 +0100 Subject: [Scilab-users] Polarplot help In-Reply-To: References: Message-ID: Hi Rafael Thank you. It works. Interesting how the 'set' command alone can do the trick: set(a,'rotation_angles',[180,0]); Excellent. :-) Best regards, Claus On Sun, Jan 21, 2018 at 12:55 PM, Rafael Guerra wrote: > Hi Claus, > > > > For the angles orientation problem in polar plot and correct labelling, > here below a simple solution: > > > > *// START OF CODE* > > *clf* > > t = 0:0.01:2*%pi; > > t90 = %pi/2 - t; *//redefine angle-convention consistent with loudspeaker plots* > > theta = t; *// keep Scilab angles for theta* > > rho = -1 + sin(t90); *// use new angle mapping for rho* > > *polarplot*(theta, rho); > > a=*gca*(); > > set(a,'rotation_angles',[180,0]); *// rotate plot axes* > > *// END OF CODE* > > > > Regards, > > Rafael > > _______________________________________________ > 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 Jan 21 13:41:27 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Jan 2018 13:41:27 +0100 Subject: [Scilab-users] Polarplot help In-Reply-To: References: Message-ID: Hi Rafael Array notation. After Reading your suggestion I looked at the documentation of polarplot and this is not explicitly treated, so I missed that one. Thank you. Best regards, Claus On Sun, Jan 21, 2018 at 1:08 PM, Rafael Guerra wrote: > Hi Claus, > > > > Regarding your problem of not being able to plot all curves in one go > preserving the scales, if I am not mistaken this can be solved by invoking > polarplot with a single call using array notation. > > See example here below with 2 curves for simplicity: > > > > *// START OF CODE* > > *clf* > > t = 0:0.01:2*%pi; > > t90 = %pi/2 - t; *//redefine angle-convention consistent with > loudspeaker plots* > > theta = t; *// keep Scilab angles for theta* > > rho1 = 1 + sin(t90).^2; *// use new angle mapping for rho1* > > rho2 = 1 + 2*cos(t90).^2; *// use new angle mapping for rho2* > > *polarplot*([theta,theta], [rho1,rho2]); > > a=*gca*(); > > set(a,'rotation_angles',[180,0]); *// rotate plot axes* > > *// END OF CODE* > > > > Regards, > > Rafael > > _______________________________________________ > 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 Jan 21 13:54:25 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Jan 2018 13:54:25 +0100 Subject: [Scilab-users] Polarplot help In-Reply-To: References: Message-ID: Hi Rafael, et al. I now see that - actually - example 2 of the documentation indeed does plot two graphs. There's no explanation to the example ... sometimes the documentation for Scilab functions is incredibly hard to read for someone who doesn't already know in advance. /Claus On Sun, Jan 21, 2018 at 1:41 PM, Claus Futtrup wrote: > Hi Rafael > > Array notation. After Reading your suggestion I looked at the > documentation of polarplot and this is not explicitly treated, so I missed > that one. Thank you. > > Best regards, > Claus > > On Sun, Jan 21, 2018 at 1:08 PM, Rafael Guerra > wrote: > >> Hi Claus, >> >> >> >> Regarding your problem of not being able to plot all curves in one go >> preserving the scales, if I am not mistaken this can be solved by invoking >> polarplot with a single call using array notation. >> >> See example here below with 2 curves for simplicity: >> >> >> >> *// START OF CODE* >> >> *clf* >> >> t = 0:0.01:2*%pi; >> >> t90 = %pi/2 - t; *//redefine angle-convention consistent with >> loudspeaker plots* >> >> theta = t; *// keep Scilab angles for theta* >> >> rho1 = 1 + sin(t90).^2; *// use new angle mapping for rho1* >> >> rho2 = 1 + 2*cos(t90).^2; *// use new angle mapping for rho2* >> >> *polarplot*([theta,theta], [rho1,rho2]); >> >> a=*gca*(); >> >> set(a,'rotation_angles',[180,0]); *// rotate plot axes* >> >> *// END OF CODE* >> >> >> >> Regards, >> >> Rafael >> >> _______________________________________________ >> 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 Jan 21 15:55:42 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Jan 2018 15:55:42 +0100 Subject: [Scilab-users] filled contour plot Message-ID: Dear Scilabers In my endeavours to plot radiation pattern for loudspeakers, besides polar plot, I'm also attemptning to view my data with a sonogram (2D contour plot). Here I ask for help to manage the colors of the plot. Here's the code (same reduced data as before): // Test data frequencies = [200 2000 20000]; // Hz angles = [0 30 60 90 120 150 180]; // degrees - convert to radians! mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response mag30 = [68.461357 90.569082 76.073549]; mag60 = [65.842262 90.745621 74.152067]; mag90 = [59.420658 80.893365 55.975304]; mag120 = [52.505173 80.795915 44.363582]; mag150 = [53.829987 59.793715 42.443964]; mag180 = [55.650341 73.457973 55.608187]; magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; // 3 freq x 7 angles = 21 data points, put into a matrix. // In the complete dataset there's 183 frequencies and 72 angles. negative_angles = -angles(2:7); neg_angle_magnitudes = magnitudes(:,2:7); angles = [angles negative_angles]; magnitudes = [magnitudes neg_angle_magnitudes]; [angles idx] = gsort(angles,'g','i'); magnitudes = magnitudes(:,idx); // Plot example: contourplt = scf(); xset("fpf"," "); // Floating Point Format contourplt.color_map=jetcolormap(5); // blue = cold, red = hot :-) contour2d(frequencies,angles,magnitudes,50:10:90,logflag="ln"); contourf(frequencies,angles,magnitudes); // FILL with color contour2d(frequencies,angles,magnitudes,50:10:90); legends(string(50:10:90),1:5,"lr"); P.S. "funny" - I'm plotting contour2d first, because then I can specify logflag and the numeric labels goes bye-bye. If I execute contourf first, I cannot use log-x-axis. contourf complains that Nax cannot work with log-x-axis data, but contourf fills the plot anyway. I then redo the contour2d to get my contourlines back (because contourf paints over them). Help how to get the right colors in the plot would be highly appreciated. In particular contourf complains: Colormap too small Can I manage colormap for contour2d and contourf separately? Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Jan 21 16:04:20 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Jan 2018 16:04:20 +0100 Subject: [Scilab-users] filled contour plot In-Reply-To: References: Message-ID: Hi Scilabers I can explain a bit more. If I double the number in the colormap (from 5 to 10), then contourf doesn't fail (in the previous code example). Then the contour lines only use the first half of the color map (from blue to green) ... maybe it would be better if contour-lines where white. Can I do that, somehow? Best regards, Claus On Sun, Jan 21, 2018 at 3:55 PM, Claus Futtrup wrote: > Dear Scilabers > > In my endeavours to plot radiation pattern for loudspeakers, besides polar > plot, I'm also attemptning to view my data with a sonogram (2D contour > plot). Here I ask for help to manage the colors of the plot. Here's the > code (same reduced data as before): > > // Test data > frequencies = [200 2000 20000]; // Hz > angles = [0 30 60 90 120 150 180]; // degrees - convert to radians! > mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response > mag30 = [68.461357 90.569082 76.073549]; > mag60 = [65.842262 90.745621 74.152067]; > mag90 = [59.420658 80.893365 55.975304]; > mag120 = [52.505173 80.795915 44.363582]; > mag150 = [53.829987 59.793715 42.443964]; > mag180 = [55.650341 73.457973 55.608187]; > magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; > // 3 freq x 7 angles = 21 data points, put into a matrix. > // In the complete dataset there's 183 frequencies and 72 angles. > > negative_angles = -angles(2:7); > neg_angle_magnitudes = magnitudes(:,2:7); > > angles = [angles negative_angles]; > magnitudes = [magnitudes neg_angle_magnitudes]; > [angles idx] = gsort(angles,'g','i'); > magnitudes = magnitudes(:,idx); > > // Plot example: > contourplt = scf(); > xset("fpf"," "); // Floating Point Format > contourplt.color_map=jetcolormap(5); // blue = cold, red = hot :-) > contour2d(frequencies,angles,magnitudes,50:10:90,logflag="ln"); > contourf(frequencies,angles,magnitudes); // FILL with color > contour2d(frequencies,angles,magnitudes,50:10:90); > legends(string(50:10:90),1:5,"lr"); > > P.S. "funny" - I'm plotting contour2d first, because then I can specify > logflag and the numeric labels goes bye-bye. If I execute contourf first, I > cannot use log-x-axis. contourf complains that Nax cannot work with > log-x-axis data, but contourf fills the plot anyway. I then redo the > contour2d to get my contourlines back (because contourf paints over them). > > Help how to get the right colors in the plot would be highly appreciated. > In particular contourf complains: Colormap too small > > Can I manage colormap for contour2d and contourf separately? > > Best regards, > Claus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Jan 21 17:01:00 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 21 Jan 2018 16:01:00 +0000 Subject: [Scilab-users] filled contour plot In-Reply-To: References: Message-ID: Hi Claus, Pls check if this solution is satisfactory: //START OF CODE frequencies = [200 2000 20000]; // Hz angles = [0 30 60 90 120 150 180]; // degrees - convert to radians! mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response mag30 = [68.461357 90.569082 76.073549]; mag60 = [65.842262 90.745621 74.152067]; mag90 = [59.420658 80.893365 55.975304]; mag120 = [52.505173 80.795915 44.363582]; mag150 = [53.829987 59.793715 42.443964]; mag180 = [55.650341 73.457973 55.608187]; magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; negative_angles = -angles(2:7); neg_angle_magnitudes = magnitudes(:,2:7); angles = [angles negative_angles]; magnitudes = [magnitudes neg_angle_magnitudes]; [angles idx] = gsort(angles,'g','i'); magnitudes = magnitudes(:,idx); clf; contourplt = scf(); contourplt.color_map=jetcolormap(6); // blue = cold, red = hot :-) nz = 40:10:90; contour2d(frequencies,angles,magnitudes,nz,logflag="ln"); contourf(frequencies,angles,magnitudes,nz); legends(string(nz),1:length(nz),"lr"); xlabel("frequency [Hz]"); ylabel("angle (deg)"); //END OF CODE Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Jan 21 17:59:34 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Jan 2018 17:59:34 +0100 Subject: [Scilab-users] filled contour plot In-Reply-To: References: Message-ID: Hi Rafale Thanks for your kind help. I see how a carefully selected nz controls the plot. Actually my data set is much larger. If we look at the magnitudes, they go from 42 to 92 (in the big data from 28 to 94) dB. If I could make a very beautiful color map of 94-28 = 66 different colors, that would be excellent. My experiments show that with jetcolormap it makes sense to have 10. So 10 it is. If the lines then only go from black to yellow, so be it ... but if they could be black (or better - white - which will show very clearly in the map), it would be better. I look at the examples in the contourf ... and the last example shows many gradients from yellow to red + some black dash-dotted contour lines. My only problem is that this example is not well documented (there's essentially no explanation at all). Looking at the parameters is cryptic. https://help.scilab.org/docs/6.0.0/en_US/contourf.html P.S. Yes, I add xlabel and ylabel. :-) ... Good idea. Best regards, Claus On Sun, Jan 21, 2018 at 5:01 PM, Rafael Guerra wrote: > Hi Claus, > > > > Pls check if this solution is satisfactory: > > > > *//START OF CODE* > > frequencies = [200 2000 20000]; *// Hz* > > angles = [0 30 60 90 120 150 180]; *// degrees - convert to radians!* > > mag00 = [69.253448 92.163385 87.414209]; *// on-axis freq-response* > > mag30 = [68.461357 90.569082 76.073549]; > > mag60 = [65.842262 90.745621 74.152067]; > > mag90 = [59.420658 80.893365 55.975304]; > > mag120 = [52.505173 80.795915 44.363582]; > > mag150 = [53.829987 59.793715 42.443964]; > > mag180 = [55.650341 73.457973 55.608187]; > > > > magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; > > > > negative_angles = -angles(2:7); > > neg_angle_magnitudes = magnitudes(:,2:7); > > angles = [angles negative_angles]; > > magnitudes = [magnitudes neg_angle_magnitudes]; > > [angles idx] = gsort(angles,'g','i'); > > magnitudes = magnitudes(:,idx); > > > > *clf*; > > contourplt = *scf*(); > > contourplt.color_map=*jetcolormap*(6); *// blue = cold, red = hot :-)* > > nz = 40:10:90; > > *contour2d*(frequencies,angles,magnitudes,nz,logflag="ln"); > > *contourf*(frequencies,angles,magnitudes,nz); > > *legends*(string(nz),1:length(nz),"lr"); > > *xlabel*("frequency [Hz]"); > > *ylabel*("angle (deg)"); > > *//END OF CODE* > > > > Regards, > > Rafael > > > > > > _______________________________________________ > 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 Jan 21 21:38:01 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 21 Jan 2018 13:38:01 -0700 (MST) Subject: [Scilab-users] filled contour plot In-Reply-To: References: Message-ID: <1516567081774-0.post@n3.nabble.com> Hi Claus, Please check code below which produces the plot herein. Optionally you can add contours to it. However the contour level labels do not seem to display on such log-plots. A possible contour2d bug? //START OF CODE frequencies = [200 2000 20000]; // Hz angles = [0 30 60 90 120 150 180]; // degrees - convert to radians! mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response mag30 = [68.461357 90.569082 76.073549]; mag60 = [65.842262 90.745621 74.152067]; mag90 = [59.420658 80.893365 55.975304]; mag120 = [52.505173 80.795915 44.363582]; mag150 = [53.829987 59.793715 42.443964]; mag180 = [55.650341 73.457973 55.608187]; magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; negative_angles = -angles(2:7); neg_angle_magnitudes = magnitudes(:,2:7); angles = [angles negative_angles]; magnitudes = [magnitudes neg_angle_magnitudes]; [angles idx] = gsort(angles,'g','i'); magnitudes = magnitudes(:,idx); clf; nz = 40:10:90; nz2 = 40:1:90; cplot = gcf(); cplot.color_map= jetcolormap(length(nz2)); // blue = cold, red = hot :-) contour2d(frequencies,angles,magnitudes,nz,logflag="ln"); contourf(frequencies,angles,magnitudes,nz2); cplot.children.data_bounds = [200,-180;2e4,180]; // contour2d(frequencies,angles,magnitudes,nz,logflag="ln"); // Optionally add contours // xset("fpf","%.0f"); // bug? not working for logarithmic axes... colorbar(min(magnitudes),max(magnitudes)) xlabel("frequency [Hz]"); ylabel("angle (deg)"); //END OF CODE Regards, Rafael -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From tim at wescottdesign.com Sun Jan 21 21:39:15 2018 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 21 Jan 2018 12:39:15 -0800 Subject: [Scilab-users] Both scilab 5.5.2 & 6.0 stopped working (java issue under linux) In-Reply-To: <1c68-5a256600-39-1d8dca20@131949825> References: <1c68-5a256600-39-1d8dca20@131949825> Message-ID: <1516567155.2749.2.camel@wescottdesign.com> FYI: https://askubuntu.com/questions/995093/after-latest-updates-scilab-5-5- 2-does-not-start-on-ubuntu-16-04-3-lts-amd64-a On Mon, 2017-12-04 at 16:12 +0100, Antoine Monmayrant wrote: > Hi everyone, > > It seems that some automatic update have broken scilab on my linux > station (16.04.3 64bits). > Any java related feature is broken and only scilab-cli is working. > As any of you any idea on how to investigate this issue? > > Thanks in advance, > > Antoine > > PS: Here is the crash log: > > > $ scilab > Could not create a Scilab main class. Error: > Exception in thread "main" java.lang.InternalError: XXX0 profile[1]: > GL3bc -> profileImpl GL4bc !!! not mapped? > ????????at > com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2071) > ????????at > com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.j > ava:1954) > ????????at > com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1875 > ) > ????????at > com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.j > ava:1842) > ????????at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) > ????????at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230) > ????????at java.security.AccessController.doPrivileged(Native Method) > ????????at > com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) > ????????at > com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297) > ????????at com.jogamp.opengl.GLProfile.get(GLProfile.java:988) > ????????at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:722) > ????????at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:733) > ????????at org.scilab.modules.gui.SwingView.(Unknown Source) > ????????at org.scilab.modules.gui.SwingView.registerSwingView(Unknown > Source) > ????????at org.scilab.modules.core.Scilab.(Unknown Source) > > Scilab cannot create Scilab Java Main-Class (we have not been able to > find the main Scilab class. Check if the Scilab and thirdparty > packages are available). > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From sgougeon at free.fr Sun Jan 21 21:41:47 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 21 Jan 2018 21:41:47 +0100 Subject: [Scilab-users] polarplot improvements (pre-SEP) <= Re: Polarplot help In-Reply-To: References: Message-ID: Hello Clauss, After a first polarplot upgrade in 2010, i started writting some other improvements in 2016, first about still improving angular and radial labels positionning. Yesterday, i took the opportunity of your message to post on the CodeReview the polarplot.sci in progress, and to go on a bit, mainly about proper labels for polar datatips. You can already use the scripts as is: https://codereview.scilab.org/#/c/19684/ Just click on the polarplot.sci link, and then you may download it, or copy/past the content. The trick with gca().rotation_angles reminded y Rafael is well known, but due to labels uncentered on their anchor, using it currently shifts labels (see the screenshot below). This is fixed in the CodeReview version. If you want to be fully back-compatible with this new polarplot.sci, you should simply comment lines performing some glue(). This won't prevent other improvements working. Other improvements can be proposed, as listed in the review header: * DONE: o centering of angular labels: Already allows shifting the 0? position and the angular direction (clockwise/trigo), using gca().rotation_angles o Optimized positionning of radial labels o Glue into 4 compounds lines of the radial frame lines of the circular frame angular labels radial labels (not backcompatible => To be discussed carefully). o polarplot() canceled external drawlater(): FIXED o Datatips: implement a convenient default display function * WIP: o Scilab Enhancement Proposal o http://bugzilla.scilab.org/5907: enable overplotting o http://bugzilla.scilab.org/5693: page to be overhauled * TO BE ANALYZED o Angular labels with a rect box disappear or are unclipped over neighbouting axes. o Enable specifying major values for the radial and angular frame (to be analyzed) o Enable radial logarithmic scale o Extend replot() to polar plots This may be seen as a "pre-SEP" :). A proper SEP will be required. To come. In my opinion, the trick with gca().rotation_angles is not fully convenient because * it may switch xlabel() and ylabel() positions, what could be disturbing * radial labels can be turned displayed along a row, what must be avoided to avoid overlays when labels are quite long. So, the final implementation won't use this trick. Later, with a priority clearly lower, the same job shall be done for graypolarplot(). Cheers Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plecolpiebjcpjop.png Type: image/png Size: 42055 bytes Desc: not available URL: From tim at wescottdesign.com Sun Jan 21 21:31:43 2018 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 21 Jan 2018 12:31:43 -0800 Subject: [Scilab-users] ?==?utf-8?q? Both scilab 5.5.2 & 6.0 stopped working (java issue under linux) In-Reply-To: <267f8c33-b083-c6da-9746-762a120f445a@laas.fr> References: <1512403509.17393.9.camel@esi-group.com> <267f8c33-b083-c6da-9746-762a120f445a@laas.fr> Message-ID: <1516566703.2749.0.camel@wescottdesign.com> There's a known bug, at least in Ubuntu's bug base. It appears to vary by hardware -- it doesn't work on this machine, but it works on at least one of my laptops. On Sat, 2018-01-20 at 08:45 +0100, antoine monmayrant wrote: > I just noticed that I did not fill a bug report for that. > I have 3 of my colleagues running Scilab on Ubuntu 17.04 /17.10 that > are? > also affected. > Should I fill a bug report or it corresponds to a known one? > > > Antoine > > > Le 04/12/2017 ? 17:05, Cl?ment David a ?crit?: > > > > Hi all, > > > > Nice catch Antoine ! From my understanding of the crash and > > depending on your graphic card, you > > could switch the actual GL implementation to a well supported one > > rather than relying on the latest > > GL. For example, using mesa on my Intel i965 system, I can tweak > > the used Profile through > > MESA_GL_VERSION_OVERRIDE and MESA_EXTENSION_OVERRIDE [https://www.m > > esa3d.org/envvars.html]. > > > > Regards, > > > > -- > > Cl?ment > > > > Le lundi 04 d?cembre 2017 ? 16:38 +0100, Antoine Monmayrant a ?crit > > : > > > > > > Hi all, > > > > > > Answering my own post: it was a graphic driver issue, as usual. > > > I switch to another driver and now scilab starts, but all the > > > graphics windows are empty! > > > > > > Antoine > > > ?? > > > ?? > > > On Monday, December 04, 2017 16:12 CET, "Antoine Monmayrant" > > nmayr at laas.fr> wrote: > > > ?? > > > > > > > > Hi everyone, > > > > > > > > It seems that some automatic update have broken scilab on my > > > > linux station (16.04.3 64bits). > > > > Any java related feature is broken and only scilab-cli is > > > > working. > > > > As any of you any idea on how to investigate this issue? > > > > > > > > Thanks in advance, > > > > > > > > Antoine > > > > > > > > PS: Here is the crash log: > > > > > > > > > > > > $ scilab > > > > Could not create a Scilab main class. Error: > > > > Exception in thread "main" java.lang.InternalError: XXX0 > > > > profile[1]: GL3bc -> profileImpl GL4bc > > > > !!! not mapped > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:20 > > > > 71) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLPro > > > > file.java:1954) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.jav > > > > a:1875) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLPro > > > > file.java:1842) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230) > > > > ?????????at java.security.AccessController.doPrivileged(Native > > > > Method) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297) > > > > ?????????at com.jogamp.opengl.GLProfile.get(GLProfile.java:988) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:722) > > > > ?????????at > > > > com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:733) > > > > ?????????at org.scilab.modules.gui.SwingView.(Unknown > > > > Source) > > > > ?????????at > > > > org.scilab.modules.gui.SwingView.registerSwingView(Unknown > > > > Source) > > > > ?????????at org.scilab.modules.core.Scilab.(Unknown > > > > Source) > > > > > > > > Scilab cannot create Scilab Java Main-Class (we have not been > > > > able to find the main Scilab > > > > class. Check if the Scilab and thirdparty packages are > > > > available). > > > > > > > > _______________________________________________ > > > > users mailing list > > > > users at lists.scilab.org > > > > http://lists.scilab.org/mailman/listinfo/users > > > > > > > _______________________________________________ > > > users mailing list > > > users at lists.scilab.org > > > http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From tim at wescottdesign.com Sun Jan 21 21:34:03 2018 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 21 Jan 2018 12:34:03 -0800 Subject: [Scilab-users] ?==?utf-8?q? Both scilab 5.5.2 & 6.0 stopped working (java issue under linux) In-Reply-To: <1512403509.17393.9.camel@esi-group.com> References: <1512403509.17393.9.camel@esi-group.com> Message-ID: <1516566843.2749.1.camel@wescottdesign.com> Yes, but how can I have a clue as to what to set them _to_? On Mon, 2017-12-04 at 16:05 +0000, Cl?ment David wrote: > Hi all, > > Nice catch Antoine ! From my understanding of the crash and depending > on your graphic card, you > could switch the actual GL implementation to a well supported one > rather than relying on the latest > GL. For example, using mesa on my Intel i965 system, I can tweak the > used Profile through > MESA_GL_VERSION_OVERRIDE and MESA_EXTENSION_OVERRIDE [https://www.mes > a3d.org/envvars.html]. > > Regards, > > -- > Cl?ment > > Le lundi 04 d?cembre 2017 ? 16:38 +0100, Antoine Monmayrant a ?crit : > > > > Hi all, > > > > Answering my own post: it was a graphic driver issue, as usual. > > I switch to another driver and now scilab starts, but all the > > graphics windows are empty! > > > > Antoine > > ? > > ? > > On Monday, December 04, 2017 16:12 CET, "Antoine Monmayrant" > ayr at laas.fr> wrote:? > > ? > > > > > > Hi everyone, > > > > > > It seems that some automatic update have broken scilab on my > > > linux station (16.04.3 64bits). > > > Any java related feature is broken and only scilab-cli is > > > working. > > > As any of you any idea on how to investigate this issue? > > > > > > Thanks in advance, > > > > > > Antoine > > > > > > PS: Here is the crash log: > > > > > > > > > $ scilab > > > Could not create a Scilab main class. Error: > > > Exception in thread "main" java.lang.InternalError: XXX0 > > > profile[1]: GL3bc -> profileImpl GL4bc > > > !!! not mapped? > > > ????????at > > > com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2071 > > > ) > > > ????????at > > > com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfi > > > le.java:1954) > > > ????????at > > > com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java: > > > 1875) > > > ????????at > > > com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfi > > > le.java:1842) > > > ????????at > > > com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) > > > ????????at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230) > > > ????????at java.security.AccessController.doPrivileged(Native > > > Method) > > > ????????at > > > com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) > > > ????????at > > > com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297) > > > ????????at com.jogamp.opengl.GLProfile.get(GLProfile.java:988) > > > ????????at > > > com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:722) > > > ????????at > > > com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:733) > > > ????????at org.scilab.modules.gui.SwingView.(Unknown > > > Source) > > > ????????at > > > org.scilab.modules.gui.SwingView.registerSwingView(Unknown > > > Source) > > > ????????at org.scilab.modules.core.Scilab.(Unknown Source) > > > > > > Scilab cannot create Scilab Java Main-Class (we have not been > > > able to find the main Scilab > > > class. Check if the Scilab and thirdparty packages are > > > available). > > > > > > _______________________________________________ > > > 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 -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From paul.carrico at esterline.com Mon Jan 22 15:08:48 2018 From: paul.carrico at esterline.com (Carrico, Paul) Date: Mon, 22 Jan 2018 14:08:48 +0000 Subject: [Scilab-users] string and excestr Message-ID: <3A6B7233274DB449A2A0053A47684F953F8F1A1E@BGS-EX01.auxitrol.ad> Dear All In the past, I used the following structure to develop my code on several lines (until the release 5.5.2) ; in the new one, the 3 dots do not work anymore. What's now the right sentence ? Thanks for your help Paul ################################ s = "... printf(""Hello !\n""), ... "; execstr(s) ################################ leads to s = "... ^^ Erreur : Unexpected end of line in a string. EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Jan 22 16:09:28 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 22 Jan 2018 15:09:28 +0000 Subject: [Scilab-users] string and excestr In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F8F1A1E@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F8F1A1E@BGS-EX01.auxitrol.ad> Message-ID: Hi Paul, I do not know why your Scilab 5 code does not work in Scilab 6. For long strings, the code might read more clearly by concatenating the different string with + sign as follows: s = "" + ... "printf(""Hello !\n""), " + ... ""; execstr(s) Another example: s = "printf(""command#1\n""); " + ... "printf(""Hello !\n""); " + ... "printf(""command#3\n""); "; execstr(s) Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Mon Jan 22 17:50:50 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 22 Jan 2018 17:50:50 +0100 Subject: [Scilab-users] filled contour plot In-Reply-To: <1516567081774-0.post@n3.nabble.com> References: <1516567081774-0.post@n3.nabble.com> Message-ID: Hi Rafael Thank you very much for your kind help. The very detailed contourf works now. Also thanks for the tip with the colorbar - it looks great. I see how re-painting with contour2d brings back the contour lines. With the many colours in the colormap, all lines are blue, which is OK. :-) I guess the answer is I cannot use a different colormap (or any specific color) for these lines. In the last example of contourf you see some black lines. The example shows how to remove the lines (the last few lines of code) and it appeasr that feeding a vector of zeros into contourf as the last input parameter turns these lines on. I wonder why the example uses 0*ones(m) and not simply zeros(m) ... there are so many strange things wtih example 3, and the learning curve is much too steep. Like I mentioned before, IMO example 3 is cryptic. Again, Rafael, thank you for your kind help. I believe the plot is now how it should be. Best regards, Claus On Sun, Jan 21, 2018 at 9:38 PM, Rafael Guerra wrote: > Hi Claus, > > Please check code below which produces the plot herein. > Optionally you can add contours to it. > However the contour level labels do not seem to display on such log-plots. > A > possible contour2d bug? > > > > //START OF CODE > frequencies = [200 2000 20000]; // Hz > angles = [0 30 60 90 120 150 180]; // degrees - convert to radians! > mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response > mag30 = [68.461357 90.569082 76.073549]; > mag60 = [65.842262 90.745621 74.152067]; > mag90 = [59.420658 80.893365 55.975304]; > mag120 = [52.505173 80.795915 44.363582]; > mag150 = [53.829987 59.793715 42.443964]; > mag180 = [55.650341 73.457973 55.608187]; > > magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; > > negative_angles = -angles(2:7); > neg_angle_magnitudes = magnitudes(:,2:7); > angles = [angles negative_angles]; > magnitudes = [magnitudes neg_angle_magnitudes]; > [angles idx] = gsort(angles,'g','i'); > magnitudes = magnitudes(:,idx); > > clf; > nz = 40:10:90; > nz2 = 40:1:90; > cplot = gcf(); > cplot.color_map= jetcolormap(length(nz2)); // blue = cold, red = hot :-) > contour2d(frequencies,angles,magnitudes,nz,logflag="ln"); > contourf(frequencies,angles,magnitudes,nz2); > cplot.children.data_bounds = [200,-180;2e4,180]; > // contour2d(frequencies,angles,magnitudes,nz,logflag="ln"); // > Optionally > add contours > // xset("fpf","%.0f"); // bug? not working for logarithmic axes... > colorbar(min(magnitudes),max(magnitudes)) > xlabel("frequency [Hz]"); > ylabel("angle (deg)"); > //END OF CODE > > Regards, > Rafael > > > > > -- > 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 Christophe.Dang at sidel.com Mon Jan 22 18:08:22 2018 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 22 Jan 2018 17:08:22 +0000 Subject: [Scilab-users] {EXT} string and excestr In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F8F1A1E@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F8F1A1E@BGS-EX01.auxitrol.ad> Message-ID: Hello Paul, > De la part de Carrico, Paul > Envoy? : lundi 22 janvier 2018 15:09 > > In the past, I used the following structure to develop my code on several lines (until the release 5.5.2) ; > in the new one, the 3 dots do not work anymore. I also noticed some changes with the continuation dots, see : http://mailinglists.scilab.org/Scilab-users-Weird-things-with-the-continuation-dots-td4037181.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 cfuttrup at gmail.com Mon Jan 22 18:43:17 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 22 Jan 2018 18:43:17 +0100 Subject: [Scilab-users] polarplot improvements (pre-SEP) <= Re: Polarplot help In-Reply-To: References: Message-ID: Hi Samuel It looks like excellent work. I checked my polar plot and the labels are indeed a little bit off (mostly visible with 3-digit numbers, i.e. 120, 150, 180 and so on degrees). It works OK for now. I think your upgraded polarplot should go into the main tree - the plots as seen on the picture you included looks excellent. If overplotting could be fixed, that would also be very nice. P.S. it reminds me that Scilab 6 was released about a year ago. Normally such a first release with such big changes will require some bug fixing, but surprisingly this seems not to be the case. Impressive how well 6.0.0 was executed (and it also took a couple of years ...). I could not execute my latest script (with the polar and contour plots) in Scilab 5 -- it ran out of memory. I wonder if anyone can say what's up in regard to Scilab releases? Best regards, Claus On Sun, Jan 21, 2018 at 9:41 PM, Samuel Gougeon wrote: > Hello Clauss, > > After a first polarplot upgrade in 2010, i started writting some other > improvements in 2016, first about still improving angular and radial labels > positionning. Yesterday, i took the opportunity of your message to post on > the CodeReview the polarplot.sci in progress, and to go on a bit, mainly > about proper labels for polar datatips. > You can already use the scripts as is: https://codereview.scilab.org/ > #/c/19684/ > Just click on the polarplot.sci link, and then you may download it, or > copy/past the content. > > The trick with gca().rotation_angles reminded y Rafael is well known, but > due to labels uncentered on their anchor, using it currently shifts labels > (see the screenshot below). This is fixed in the CodeReview version. > > If you want to be fully back-compatible with this new polarplot.sci, you > should simply comment lines > performing some glue(). This won't prevent other improvements working. > > Other improvements can be proposed, as listed in the review header: > > - DONE: > - centering of angular labels: Already allows shifting the 0? > position and the angular direction (clockwise/trigo), using > gca().rotation_angles > - Optimized positionning of radial labels > - Glue into 4 compounds lines of the radial frame lines of the > circular frame angular labels radial labels (not backcompatible => To be > discussed carefully). > - polarplot() canceled external drawlater(): FIXED > - Datatips: implement a convenient default display function > - WIP: > - Scilab Enhancement Proposal > - http://bugzilla.scilab.org/5907: enable overplotting > - http://bugzilla.scilab.org/5693: page to be overhauled > - TO BE ANALYZED > - Angular labels with a rect box disappear or are unclipped over > neighbouting axes. > - Enable specifying major values for the radial and angular frame > (to be analyzed) > - Enable radial logarithmic scale > - Extend replot() to polar plots > > This may be seen as a "pre-SEP" :). A proper SEP will be required. To come. > > In my opinion, the trick with gca().rotation_angles is not fully > convenient because > > - it may switch xlabel() and ylabel() positions, what could be > disturbing > - radial labels can be turned displayed along a row, what must be > avoided to avoid overlays when labels are quite long. > > So, the final implementation won't use this trick. > > Later, with a priority clearly lower, the same job shall be done for > graypolarplot(). > > Cheers > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plecolpiebjcpjop.png Type: image/png Size: 42055 bytes Desc: not available URL: From paul.carrico at free.fr Mon Jan 22 19:30:53 2018 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 22 Jan 2018 19:30:53 +0100 Subject: [Scilab-users] {EXT} string and excestr In-Reply-To: References: <3A6B7233274DB449A2A0053A47684F953F8F1A1E@BGS-EX01.auxitrol.ad> Message-ID: <17ed6905a1843295c10a95ffc3c2e424@free.fr> Thanks Christophe, It means that some codes I made last few years are not available now under Scilab6.0 :-( A personal reflexion is in progress consequently ... Paul Le 2018-01-22 18:08, Dang Ngoc Chan, Christophe a ?crit : > Hello Paul, > >> De la part de Carrico, Paul >> Envoy? : lundi 22 janvier 2018 15:09 >> >> In the past, I used the following structure to develop my code on several lines (until the release 5.5.2) ; >> in the new one, the 3 dots do not work anymore. > > I also noticed some changes with the continuation dots, see : > > http://mailinglists.scilab.org/Scilab-users-Weird-things-with-the-continuation-dots-td4037181.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. > _______________________________________________ > 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 Mon Jan 22 20:51:50 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 22 Jan 2018 12:51:50 -0700 (MST) Subject: [Scilab-users] filled contour plot In-Reply-To: References: <1516567081774-0.post@n3.nabble.com> Message-ID: <1516650710890-0.post@n3.nabble.com> Hi Claus, Yes, you can use different colors for the contours. See sample code here below which displays grey contours but could be adapted to display contours with different colors for each contour level. //START OF CODE frequencies = [200 2000 20000]; // Hz angles = [0 30 60 90 120 150 180]; // degrees - convert to radians! mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response mag30 = [68.461357 90.569082 76.073549]; mag60 = [65.842262 90.745621 74.152067]; mag90 = [59.420658 80.893365 55.975304]; mag120 = [52.505173 80.795915 44.363582]; mag150 = [53.829987 59.793715 42.443964]; mag180 = [55.650341 73.457973 55.608187]; magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; negative_angles = -angles(2:7); neg_angle_magnitudes = magnitudes(:,2:7); angles = [angles negative_angles]; magnitudes = [magnitudes neg_angle_magnitudes]; [angles idx] = gsort(angles,'g','i'); magnitudes = magnitudes(:,idx); clf; zn = 40:10:90; nz = length(zn); zn2 = 40:0.5:90; nz2 = length(zn2); f = gcf(); f.color_map= jetcolormap(nz2); contour2d(frequencies,angles,magnitudes,zn,logflag="ln"); contourf(frequencies,angles,magnitudes,zn2); f.children.data_bounds = [200,-180;2e4,180]; xset("fpf","%.0f"); // bug? not working for logarithmic axes... cntcolorname = "grey"; // define contour color cntcolor = color(cntcolorname); cntcolor = repmat(cntcolor, 1, nz); // define array with as many colors as contours f.color_map = [f.color_map; name2rgb(cntcolorname)]; contour2d(frequencies,angles,magnitudes,zn,style=cntcolor,logflag="ln"); e = gce(); N = length(e.children); for i = 1:nz-1 e.children(i).children.line_style = 2; // dashed contours end colorbar(min(magnitudes),max(magnitudes),[1 nz2]) xlabel("frequency [Hz]"); ylabel("angle (deg)"); //END OF CODE Regards, Rafael -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From herozigle at gmail.com Tue Jan 23 13:48:40 2018 From: herozigle at gmail.com (Hermes) Date: Tue, 23 Jan 2018 05:48:40 -0700 (MST) Subject: [Scilab-users] 'ode' returns constant values for the variables Message-ID: <1516711720466-0.post@n3.nabble.com> Hello, I try to solve the sisytema with the help of "ode". But I can not find where the error is; in the solution it returns constant values for the variables. I think the error is that I have not correctly declared the dependence of the variable variables "t". The expected solution should allow the graph to be reproduced: clear; funcprot(0); //Draghilev's Method timer(); function Sys=F(x) Sys=[]; x0=x(1);x1=x(2); Sys(1)=x1.^2+x0.^2 -8; Sys(2)=sin(x0.*x1).*sin(exp(x0.*x1)); endfunction function Sys=F0(x) Sys=[]; x00=x(1);x01=x(2); Sys(1)=x01.^2+x00.^2-8; Sys(2)=sin(x00.*x01).*sin(exp(x00.*x01)); endfunction function Sys=Mp(v) [Sys]=F(v(1:2))-v(3)*F0(ics(1:2)); endfunction //deff('Sys=Mp(v)','[Sys]=F(v(1:2))-v(3).*F0(ics([1:2]))') function Sys=NF(v) Sys=[]; [Sys]=numderivative(Mp,v); endfunction // //Z=NF // function D=ODEs(ZZ) A=ZZ(:,1:2);b=ZZ(:,$); A1=A;A1(:,1)=b; A2=A;A2(:,2)=b; D=-det(A); d(1)=det(A1) ; d(2)=det(A2); d(3)=D; [D]=-d; endfunction ics=[2;1]//[2.784;-0.5];[2;-0.5]; yint1=fsolve(ics,F) ics=[yint1]; disp(F(yint1),"x->f(x)=0",ics,"x f(x)=0") ics=[ics;1]; disp(ics) function [dxdt]=odes(t,x) [dxdt]=ODEs(NF(x)); endfunction N=200; smin=0.0; smax=15; h=0.000001; step=smax/N; t=smin:step:smax; t0=0; atol=h; LL= ode("fix",ics,t0,t,atol,odes) disp(timer(),"tiempo de ejecucion C"); clf(); subplot(1,2,1); a=get("current_axes")//get the handle of the newly created axes a.axes_visible="on"; // makes the axes visible a.font_size=3; //set the tics label font size a.x_location="middle"; //set the x axis position plot(t,LL(1,1:$),"-cya",t,LL(2,1:$),"-g",t,LL(3,1:$),"-r") Gracias -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From amonmayr at laas.fr Tue Jan 23 13:51:27 2018 From: amonmayr at laas.fr (amonmayr at laas.fr) Date: Tue, 23 Jan 2018 13:51:27 +0100 Subject: [Scilab-users] ?==?utf-8?q? Both scilab 5.5.2 & 6.0 stopped working (java issue under linux) In-Reply-To: <1516566703.2749.0.camel@wescottdesign.com> References: <1512403509.17393.9.camel@esi-group.com> <267f8c33-b083-c6da-9746-762a120f445a@laas.fr> <1516566703.2749.0.camel@wescottdesign.com> Message-ID: Le 21/01/2018 ? 21:31, Tim Wescott a ?crit?: > There's a known bug, at least in Ubuntu's bug base. OK, do you have the link to the Ubuntu bug page? It's maybe still a good idea to open a scilab bug report, pointing at the Ubuntu bug page and listing the workaround, no? Antoine > It appears to vary by hardware -- it doesn't work on this machine, but > it works on at least one of my laptops. > > On Sat, 2018-01-20 at 08:45 +0100, antoine monmayrant wrote: >> I just noticed that I did not fill a bug report for that. >> I have 3 of my colleagues running Scilab on Ubuntu 17.04 /17.10 that >> are >> also affected. >> Should I fill a bug report or it corresponds to a known one? >> >> >> Antoine >> >> >> Le 04/12/2017 ? 17:05, Cl?ment David a ?crit?: >>> Hi all, >>> >>> Nice catch Antoine ! From my understanding of the crash and >>> depending on your graphic card, you >>> could switch the actual GL implementation to a well supported one >>> rather than relying on the latest >>> GL. For example, using mesa on my Intel i965 system, I can tweak >>> the used Profile through >>> MESA_GL_VERSION_OVERRIDE and MESA_EXTENSION_OVERRIDE [https://www.m >>> esa3d.org/envvars.html]. >>> >>> Regards, >>> >>> -- >>> Cl?ment >>> >>> Le lundi 04 d?cembre 2017 ? 16:38 +0100, Antoine Monmayrant a ?crit >>> : >>>> Hi all, >>>> >>>> Answering my own post: it was a graphic driver issue, as usual. >>>> I switch to another driver and now scilab starts, but all the >>>> graphics windows are empty! >>>> >>>> Antoine >>>> >>>> >>>> On Monday, December 04, 2017 16:12 CET, "Antoine Monmayrant" >>> nmayr at laas.fr> wrote: >>>> >>>>> Hi everyone, >>>>> >>>>> It seems that some automatic update have broken scilab on my >>>>> linux station (16.04.3 64bits). >>>>> Any java related feature is broken and only scilab-cli is >>>>> working. >>>>> As any of you any idea on how to investigate this issue? >>>>> >>>>> Thanks in advance, >>>>> >>>>> Antoine >>>>> >>>>> PS: Here is the crash log: >>>>> >>>>> >>>>> $ scilab >>>>> Could not create a Scilab main class. Error: >>>>> Exception in thread "main" java.lang.InternalError: XXX0 >>>>> profile[1]: GL3bc -> profileImpl GL4bc >>>>> !!! not mapped >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:20 >>>>> 71) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLPro >>>>> file.java:1954) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.jav >>>>> a:1875) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLPro >>>>> file.java:1842) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230) >>>>> ?????????at java.security.AccessController.doPrivileged(Native >>>>> Method) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297) >>>>> ?????????at com.jogamp.opengl.GLProfile.get(GLProfile.java:988) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:722) >>>>> ?????????at >>>>> com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:733) >>>>> ?????????at org.scilab.modules.gui.SwingView.(Unknown >>>>> Source) >>>>> ?????????at >>>>> org.scilab.modules.gui.SwingView.registerSwingView(Unknown >>>>> Source) >>>>> ?????????at org.scilab.modules.core.Scilab.(Unknown >>>>> Source) >>>>> >>>>> Scilab cannot create Scilab Java Main-Class (we have not been >>>>> able to find the main Scilab >>>>> class. Check if the Scilab and thirdparty packages are >>>>> available). >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users >>>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Antoine Monmayrant LAAS - CNRS 7 avenue du Colonel Roche BP 54200 31031 TOULOUSE Cedex 4 FRANCE Tel:+33 5 61 33 64 59 email : antoine.monmayrant at laas.fr permanent email : antoine.monmayrant at polytechnique.org +++++++++++++++++++++++++++++++++++++++++++++++++++++++ From amonmayr at laas.fr Tue Jan 23 13:52:12 2018 From: amonmayr at laas.fr (amonmayr at laas.fr) Date: Tue, 23 Jan 2018 13:52:12 +0100 Subject: [Scilab-users] ?==?utf-8?q? Both scilab 5.5.2 & 6.0 stopped working (java issue under linux) In-Reply-To: <1516566843.2749.1.camel@wescottdesign.com> References: <1512403509.17393.9.camel@esi-group.com> <1516566843.2749.1.camel@wescottdesign.com> Message-ID: <70fa825d-d022-4c2e-8e02-0010a05af14f@laas.fr> Le 21/01/2018 ? 21:34, Tim Wescott a ?crit?: > Yes, but how can I have a clue as to what to set them _to_? Here is what worked for me (no idea why): #!/bin/bash export MESA_GL_VERSION_OVERRIDE=3.0 ; scilab $* Cheers, Antoine > > On Mon, 2017-12-04 at 16:05 +0000, Cl?ment David wrote: >> Hi all, >> >> Nice catch Antoine ! From my understanding of the crash and depending >> on your graphic card, you >> could switch the actual GL implementation to a well supported one >> rather than relying on the latest >> GL. For example, using mesa on my Intel i965 system, I can tweak the >> used Profile through >> MESA_GL_VERSION_OVERRIDE and MESA_EXTENSION_OVERRIDE [https://www.mes >> a3d.org/envvars.html]. >> >> Regards, >> >> -- >> Cl?ment >> >> Le lundi 04 d?cembre 2017 ? 16:38 +0100, Antoine Monmayrant a ?crit : >>> Hi all, >>> >>> Answering my own post: it was a graphic driver issue, as usual. >>> I switch to another driver and now scilab starts, but all the >>> graphics windows are empty! >>> >>> Antoine >>> >>> >>> On Monday, December 04, 2017 16:12 CET, "Antoine Monmayrant" >> ayr at laas.fr> wrote: >>> >>>> Hi everyone, >>>> >>>> It seems that some automatic update have broken scilab on my >>>> linux station (16.04.3 64bits). >>>> Any java related feature is broken and only scilab-cli is >>>> working. >>>> As any of you any idea on how to investigate this issue? >>>> >>>> Thanks in advance, >>>> >>>> Antoine >>>> >>>> PS: Here is the crash log: >>>> >>>> >>>> $ scilab >>>> Could not create a Scilab main class. Error: >>>> Exception in thread "main" java.lang.InternalError: XXX0 >>>> profile[1]: GL3bc -> profileImpl GL4bc >>>> !!! not mapped >>>> ????????at >>>> com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2071 >>>> ) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfi >>>> le.java:1954) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java: >>>> 1875) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfi >>>> le.java:1842) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80) >>>> ????????at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230) >>>> ????????at java.security.AccessController.doPrivileged(Native >>>> Method) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297) >>>> ????????at com.jogamp.opengl.GLProfile.get(GLProfile.java:988) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:722) >>>> ????????at >>>> com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:733) >>>> ????????at org.scilab.modules.gui.SwingView.(Unknown >>>> Source) >>>> ????????at >>>> org.scilab.modules.gui.SwingView.registerSwingView(Unknown >>>> Source) >>>> ????????at org.scilab.modules.core.Scilab.(Unknown Source) >>>> >>>> Scilab cannot create Scilab Java Main-Class (we have not been >>>> able to find the main Scilab >>>> class. Check if the Scilab and thirdparty packages are >>>> available). >>>> >>>> _______________________________________________ >>>> 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 -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Antoine Monmayrant LAAS - CNRS 7 avenue du Colonel Roche BP 54200 31031 TOULOUSE Cedex 4 FRANCE Tel:+33 5 61 33 64 59 email : antoine.monmayrant at laas.fr permanent email : antoine.monmayrant at polytechnique.org +++++++++++++++++++++++++++++++++++++++++++++++++++++++ From jrafaelbguerra at hotmail.com Tue Jan 23 15:57:28 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 23 Jan 2018 14:57:28 +0000 Subject: [Scilab-users] 'ode' returns constant values for the variables In-Reply-To: <1516711720466-0.post@n3.nabble.com> References: <1516711720466-0.post@n3.nabble.com> Message-ID: Hi Hermes, The right side of your differential equation does not seem to depend on 't' as it should. This does not seem to be a Scilab problem but a math problem and you should in that case point, to those interested, towards a reference describing the differential equations to be solved. Regards, Rafael From cfuttrup at gmail.com Tue Jan 23 20:43:13 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Tue, 23 Jan 2018 20:43:13 +0100 Subject: [Scilab-users] filled contour plot In-Reply-To: <1516650710890-0.post@n3.nabble.com> References: <1516567081774-0.post@n3.nabble.com> <1516650710890-0.post@n3.nabble.com> Message-ID: Hi Rafael These examples are an enormous help to me. I can say for sure, I would have never found out by reading the documentation. The "refmat" is new to me. I now see how you can "stack" several colormaps with the plot, simply f. color_map = [f.color_map; name2rgb(cntcolorname)]; ... the semicolon gives space to a new one. I see how you call contour2d with the style option the second time. Supposedly the default is the first one, but you invoke the second one with the style option. I see how you now define the length of the colorbar because if you don't, then the colorbar will paint both colormaps on the bar :-/ Thank you for suggesting the grey colors, it works excellent together with the jetcolors. Best regards, Claus On Mon, Jan 22, 2018 at 8:51 PM, Rafael Guerra wrote: > Hi Claus, > > Yes, you can use different colors for the contours. > See sample code here below which displays grey contours but could be > adapted > to display contours with different colors for each contour level. > > logscale_colorfiled_colored_contour.png> > > //START OF CODE > frequencies = [200 2000 20000]; // Hz > angles = [0 30 60 90 120 150 180]; // degrees - convert to radians! > mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response > mag30 = [68.461357 90.569082 76.073549]; > mag60 = [65.842262 90.745621 74.152067]; > mag90 = [59.420658 80.893365 55.975304]; > mag120 = [52.505173 80.795915 44.363582]; > mag150 = [53.829987 59.793715 42.443964]; > mag180 = [55.650341 73.457973 55.608187]; > > magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; > > negative_angles = -angles(2:7); > neg_angle_magnitudes = magnitudes(:,2:7); > angles = [angles negative_angles]; > magnitudes = [magnitudes neg_angle_magnitudes]; > [angles idx] = gsort(angles,'g','i'); > magnitudes = magnitudes(:,idx); > > clf; > zn = 40:10:90; > nz = length(zn); > zn2 = 40:0.5:90; > nz2 = length(zn2); > f = gcf(); > f.color_map= jetcolormap(nz2); > contour2d(frequencies,angles,magnitudes,zn,logflag="ln"); > contourf(frequencies,angles,magnitudes,zn2); > f.children.data_bounds = [200,-180;2e4,180]; > xset("fpf","%.0f"); // bug? not working for logarithmic axes... > cntcolorname = "grey"; // define contour color > cntcolor = color(cntcolorname); > cntcolor = repmat(cntcolor, 1, nz); // define array with as many colors as > contours > f.color_map = [f.color_map; name2rgb(cntcolorname)]; > contour2d(frequencies,angles,magnitudes,zn,style=cntcolor,logflag="ln"); > e = gce(); > N = length(e.children); > for i = 1:nz-1 > e.children(i).children.line_style = 2; // dashed contours > end > > colorbar(min(magnitudes),max(magnitudes),[1 nz2]) > xlabel("frequency [Hz]"); > ylabel("angle (deg)"); > //END OF CODE > > Regards, > Rafael > > > > -- > 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 Tue Jan 23 21:00:50 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 23 Jan 2018 20:00:50 +0000 Subject: [Scilab-users] filled contour plot In-Reply-To: References: <1516567081774-0.post@n3.nabble.com> <1516650710890-0.post@n3.nabble.com> Message-ID: Hi Claus, You are welcome. Herein some improved code to replace the section that sets dashed line contours: for i = 1:nz if e.children(i).type == "Compound" then e.children(i).children.line_style = 2; // dashed contours end end Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From okaforfranky at gmail.com Tue Jan 23 22:19:09 2018 From: okaforfranky at gmail.com (franky okafor) Date: Tue, 23 Jan 2018 21:19:09 +0000 Subject: [Scilab-users] (no subject) In-Reply-To: References: Message-ID: un subscribe me please -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Wed Jan 24 19:49:23 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 24 Jan 2018 19:49:23 +0100 Subject: [Scilab-users] GUI programming Message-ID: Hi Scilabers Is there a comprehensive manual or book (in English, or alt German) about programming GUI in Scilab? (or a comprehensive web-page) I've found the Openeering one (18 pages): http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf ... and I've looked at the help pages for uicontrol + run some of the GUI demos in Scilab. I have almost no background in GUI programming, nothing successful anyway, but it could be nice if I could at least get some basic GUI up running (e.g. a figure where one can manage some controls on the left side + see the polar plot etc on the right side). I think that what I need is not just examples. I need explanations, and preferably something coherent that I can combine and work with, into something that works. I've installed GUI builder from ATOMS. In the past I've never been happy with programming on a high level. I prefer to understand what goes on under the hood... so GUI builder is a bit of a desperate grasp on my part. Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.strelkov at gmail.com Wed Jan 24 21:09:33 2018 From: n.strelkov at gmail.com (Nikolay Strelkov) Date: Wed, 24 Jan 2018 23:09:33 +0300 Subject: [Scilab-users] GUI programming In-Reply-To: References: Message-ID: Dear Claus! It seems that Scilab GUI programming is not fully described nowadays. When I programmed my Mathieu Functions Toolbox version 4 with GUI I gathered information from whole internet. You can learn GUI programming by analyzing and breaking its main GUI file (see it's page on Forge ; demo is available from Scilab: *? -> Scilab Demonstrations -> Mathieu functions -> GUI for Mathieu Function Toolbox* ) :) I have bookmarked some pages: - http://atoms.scilab.org/categories/GUI - you can download and read source code of available ATOMS - https://wiki.scilab.org/howto/guicontrol - http://cgit.scilab.org/scilab/tree/scilab/modules/gui/demos/ uicontrol.dem.sce - uicontrols demo 1 (available from Scilab: *? -> Scilab Demonstrations -> GUI -> Uicontrols 1* ; locally as /usr/share/scilab/modules/gui/demos/uicontrol.dem.sce) - http://cgit.scilab.org/scilab/tree/scilab/modules/gui/demos/ cb_uicontrol_plot3d.dem.sci - uicontrols demo 2 (available from Scilab: *? -> Scilab Demonstrations -> GUI -> Uicontrols 2* ; locally as /usr/share/scilab/modules/gui/demos/cb_uicontrol_plot3d.dem.sci ) - *it's recommended starting point, I think* - http://cgit.scilab.org/scilab/tree/scilab/modules/signal_ processing/macros/wfir_gui.sci - wfir_gui() example (locally as /usr/share/scilab/modules/signal_processing/macros/wfir_gui.sci ) - http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf - you already know it - http://scilab.io/products/scilab/application-development/ - http://scilab.ninja/scilab-recipe-4-gui-basics/ - now offline, but cached on Google - http://tritytech.com/courses/scilab-courses/32-creating- innovative-gui-using-scilab.html - TrityTech present course "Creating Innovative GUI using Scilab" you can try to contact them for materials I have never seen comprehensive book about programming GUI in Scilab (in any language). So If I remember correctly I read some books about MATLAB's GUI (uicontrol) function and extrapolated this material to Scilab. -- *With best regards,Ph.D., * *associate professor at MPEI ,IEEE member,maintainer of Mathieu functions toolbox for Scilab ,Nikolay Strelkov.* 2018-01-24 21:49 GMT+03:00 Claus Futtrup : > Hi Scilabers > > Is there a comprehensive manual or book (in English, or alt German) about > programming GUI in Scilab? (or a comprehensive web-page) > > I've found the Openeering one (18 pages): > http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf > ... and I've looked at the help pages for uicontrol + run some of the GUI > demos in Scilab. > > I have almost no background in GUI programming, nothing successful anyway, > but it could be nice if I could at least get some basic GUI up running > (e.g. a figure where one can manage some controls on the left side + see > the polar plot etc on the right side). > > I think that what I need is not just examples. I need explanations, and > preferably something coherent that I can combine and work with, into > something that works. > > I've installed GUI builder from ATOMS. In the past I've never been happy > with programming on a high level. I prefer to understand what goes on under > the hood... so GUI builder is a bit of a desperate grasp on my part. > > 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 chinluh at tritytech.com Thu Jan 25 03:41:49 2018 From: chinluh at tritytech.com (Tan Chin Luh) Date: Thu, 25 Jan 2018 10:41:49 +0800 Subject: [Scilab-users] GUI programming In-Reply-To: References: Message-ID: <0ebbecdb-4352-d79a-9e4b-6497aa8f6954@tritytech.com> Hi, You might want to look into the video tutorials: https://www.youtube.com/watch?v=A6bMURCVfb0&list=PL1G9eUG4bZaJ7pvUOS568320w8GVHtGRs Hope this helps. Regards, Chin Luh On 25/1/2018 4:09 AM, Nikolay Strelkov wrote: > Dear Claus! > > It seems that Scilab GUI programming is not fully described nowadays. > > When I programmed my Mathieu Functions Toolbox version 4 with GUI > I gathered information > from whole internet. > You can learn GUI programming by analyzing and breaking its main GUI > file > > (see it's page on Forge > ; demo is > available from Scilab: /? -> Scilab Demonstrations -> Mathieu > functions -> GUI for Mathieu Function Toolbox/ ) :) > > I have bookmarked some pages: > > * http://atoms.scilab.org/categories/GUI > - you can download and > read source code of available ATOMS > * https://wiki.scilab.org/howto/guicontrol > > * http://cgit.scilab.org/scilab/tree/scilab/modules/gui/demos/uicontrol.dem.sce > > - uicontrols demo 1 (available from Scilab: /? -> Scilab > Demonstrations -> GUI -> Uicontrols 1/ ; locally as > /usr/share/scilab/modules/gui/demos/uicontrol.dem.sce) > * http://cgit.scilab.org/scilab/tree/scilab/modules/gui/demos/cb_uicontrol_plot3d.dem.sci > > - uicontrols demo 2 (available from Scilab: /? -> Scilab > Demonstrations -> GUI -> Uicontrols 2/ ; locally as > /usr/share/scilab/modules/gui/demos/cb_uicontrol_plot3d.dem.sci ) > - *it's recommended starting point, I think* > * http://cgit.scilab.org/scilab/tree/scilab/modules/signal_processing/macros/wfir_gui.sci > > - wfir_gui() example (locally as > /usr/share/scilab/modules/signal_processing/macros/wfir_gui.sci ) > * http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf > > - you already know it > * http://scilab.io/products/scilab/application-development/ > > * http://scilab.ninja/scilab-recipe-4-gui-basics/ > - now offline, > but cached on Google > > * http://tritytech.com/courses/scilab-courses/32-creating-innovative-gui-using-scilab.html > > - TrityTech present course "Creating Innovative GUI using Scilab" > you can try to contact them for materials > > > I have never seen comprehensive book > about > programming GUI in Scilab (in any language). > So If I remember correctly I read some books about MATLAB's GUI > (uicontrol) function and extrapolated this material to Scilab. > > > -- > /With best regards, > Ph.D., //associate professor at MPEI > , > IEEE member, > maintainer of Mathieu functions toolbox for Scilab > , > Nikolay Strelkov./ > > 2018-01-24 21:49 GMT+03:00 Claus Futtrup >: > > Hi Scilabers > > Is there a comprehensive manual or book (in English, or alt > German) about programming GUI in Scilab? (or a comprehensive web-page) > > I've found the Openeering one (18 pages): > http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf > > ... and I've looked at the help pages for uicontrol + run some of > the GUI demos in Scilab. > > I have almost no background in GUI programming, nothing successful > anyway, but it could be nice if I could at least get some basic > GUI up running (e.g. a figure where one can manage some controls > on the left side + see the polar plot etc on the right side). > > I think that what I need is not just examples. I need > explanations, and preferably something coherent that I can combine > and work with, into something that works. > > I've installed GUI builder from ATOMS. In the past I've never been > happy with programming on a high level. I prefer to understand > what goes on under the hood... so GUI builder is a bit of a > desperate grasp on my part. > > 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 cfuttrup at gmail.com Thu Jan 25 17:43:36 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 25 Jan 2018 17:43:36 +0100 Subject: [Scilab-users] File exist function? Message-ID: Dear Scilabers I wish to check for the existence of some files. For this I created a simple function: [out]=function file_exist(fname) [fd, err] = mopen(fname); // Try to open file, mode: 'br' (binary-reading) if err==0 then out=%t; mclose(fname); else out=%f endendfunction I didn't check, but presumably this would work. Is such a function already available? Which way is the "official" way to do this in Scilab? Maybe I'm searching for the wrong word, but I found some ways in Scilab. The "fileinfo" seems to be the closest one to what I wish to do. Matlab has a function "exist()" which can check for files too. Scilab has the function "exists()" - notice the function name is plural, not singluar - and this one AFAIK only works for Scilab variables (not files), although I didn't check. If fileinfo is the right way, maybe an example for the help could be to make a file_exist function, to show ... (?) ... when I search for Scilab file exist function, I'm not guided in any specific way/direction and find myself insecure whether I find the right help. Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Thu Jan 25 17:46:14 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 25 Jan 2018 17:46:14 +0100 Subject: [Scilab-users] GUI programming In-Reply-To: <0ebbecdb-4352-d79a-9e4b-6497aa8f6954@tritytech.com> References: <0ebbecdb-4352-d79a-9e4b-6497aa8f6954@tritytech.com> Message-ID: Hi Nikolay and Tan Thank you for your help. Tan, I tried to load guibuilder. My first thought was to pull the white area to the grid ... and it crashed, but then again, Scilab 6 seems to crash a lot on me. Good tip to view some YouTube videos. I'll try that, to see if I can get some overview of the matter. Best regards, Claus On Thu, Jan 25, 2018 at 3:41 AM, Tan Chin Luh wrote: > Hi, > > You might want to look into the video tutorials: > > https://www.youtube.com/watch?v=A6bMURCVfb0&list= > PL1G9eUG4bZaJ7pvUOS568320w8GVHtGRs > > Hope this helps. > > Regards, > Chin Luh > > > > > On 25/1/2018 4:09 AM, Nikolay Strelkov wrote: > > Dear Claus! > > It seems that Scilab GUI programming is not fully described nowadays. > > When I programmed my Mathieu Functions Toolbox version 4 with GUI > I gathered information from > whole internet. > You can learn GUI programming by analyzing and breaking its main GUI file > > (see it's page on Forge > ; demo is > available from Scilab: *? -> Scilab Demonstrations -> Mathieu functions > -> GUI for Mathieu Function Toolbox* ) :) > > I have bookmarked some pages: > > - http://atoms.scilab.org/categories/GUI - you can download and read > source code of available ATOMS > - https://wiki.scilab.org/howto/guicontrol > - http://cgit.scilab.org/scilab/tree/scilab/modules/gui/demos/ > uicontrol.dem.sce - uicontrols demo 1 (available from Scilab: *? -> > Scilab Demonstrations -> GUI -> Uicontrols 1* ; locally as > /usr/share/scilab/modules/gui/demos/uicontrol.dem.sce) > - http://cgit.scilab.org/scilab/tree/scilab/modules/gui/demos/ > cb_uicontrol_plot3d.dem.sci - uicontrols demo 2 (available from > Scilab: *? -> Scilab Demonstrations -> GUI -> Uicontrols 2* ; locally > as /usr/share/scilab/modules/gui/demos/cb_uicontrol_plot3d.dem.sci ) - *it's > recommended starting point, I think* > - http://cgit.scilab.org/scilab/tree/scilab/modules/signal_pro > cessing/macros/wfir_gui.sci - wfir_gui() example (locally as > /usr/share/scilab/modules/signal_processing/macros/wfir_gui.sci ) > - http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf - > you already know it > - http://scilab.io/products/scilab/application-development/ > - http://scilab.ninja/scilab-recipe-4-gui-basics/ - now offline, but > cached on Google > > - http://tritytech.com/courses/scilab-courses/32-creating-inno > vative-gui-using-scilab.html - TrityTech present course "Creating > Innovative GUI using Scilab" you can try to contact them for materials > > > I have never seen comprehensive book > about > programming GUI in Scilab (in any language). > So If I remember correctly I read some books about MATLAB's GUI > (uicontrol) function and extrapolated this material to Scilab. > > > -- > > *With best regards, Ph.D., * > > > *associate professor at MPEI , > IEEE member, maintainer of Mathieu functions toolbox for Scilab > , Nikolay Strelkov.* > > 2018-01-24 21:49 GMT+03:00 Claus Futtrup : > >> Hi Scilabers >> >> Is there a comprehensive manual or book (in English, or alt German) about >> programming GUI in Scilab? (or a comprehensive web-page) >> >> I've found the Openeering one (18 pages): >> http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf >> ... and I've looked at the help pages for uicontrol + run some of the GUI >> demos in Scilab. >> >> I have almost no background in GUI programming, nothing successful >> anyway, but it could be nice if I could at least get some basic GUI up >> running (e.g. a figure where one can manage some controls on the left side >> + see the polar plot etc on the right side). >> >> I think that what I need is not just examples. I need explanations, and >> preferably something coherent that I can combine and work with, into >> something that works. >> >> I've installed GUI builder from ATOMS. In the past I've never been happy >> with programming on a high level. I prefer to understand what goes on under >> the hood... so GUI builder is a bit of a desperate grasp on my part. >> >> Best regards, >> Claus >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> >> > > > _______________________________________________ > users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.elias at scilab-enterprises.com Thu Jan 25 19:40:15 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Thu, 25 Jan 2018 19:40:15 +0100 Subject: [Scilab-users] File exist function? In-Reply-To: References: Message-ID: <3de68924-f586-8543-c1cf-db63997d49b2@scilab-enterprises.com> Hello Claus, You can use "isfile" function to check existence if a file and "isdir" for folder. https://help.scilab.org/docs/6.0.0/en_US/isfile.html https://help.scilab.org/docs/6.0.0/en_US/isdir.html Regards, Antoine Le 25/01/2018 ? 17:43, Claus Futtrup a ?crit?: > Dear Scilabers > > I wish to check for the existence of some files. For this I created a > simple function: > > [out]=function file_exist(fname) > [fd, err] = mopen(fname); // Try to open file, mode: 'br'(binary-reading) > if err==0 then > out=%t; > mclose(fname); > else > out=%f > end > endfunction > > I didn't check, but presumably this would work. > > Is such a function already available? Which way is the "official" way > to do this in Scilab? > > Maybe I'm searching for the wrong word, but I found some ways in > Scilab. The "fileinfo" seems to be the closest one to what I wish to do. > > Matlab has a function "exist()" which can check for files too. Scilab > has the function "exists()"?- notice the function name is plural, not > singluar - and this one AFAIK only works for Scilab variables (not > files), although I didn't check. > > If fileinfo is the right way, maybe an example for the help could be > to make a file_exist function, to show ... (?) ...?when I search for > Scilab file exist function, I'm not guided in any > specific?way/direction and find myself insecure whether I find the > right help. > > 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 Jan 25 20:55:14 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 25 Jan 2018 20:55:14 +0100 Subject: [Scilab-users] File exist function? In-Reply-To: <3de68924-f586-8543-c1cf-db63997d49b2@scilab-enterprises.com> References: <3de68924-f586-8543-c1cf-db63997d49b2@scilab-enterprises.com> Message-ID: Hi Antoine isfile() looks like exactly what I wish for. I suppose then, this is the correct ("most official") way to do it in Scilab. Thanks! Best regards, Claus On Thu, Jan 25, 2018 at 7:40 PM, Antoine ELIAS < antoine.elias at scilab-enterprises.com> wrote: > Hello Claus, > > You can use "isfile" function to check existence if a file and "isdir" for > folder. > https://help.scilab.org/docs/6.0.0/en_US/isfile.html > https://help.scilab.org/docs/6.0.0/en_US/isdir.html > > > Regards, > Antoine > > Le 25/01/2018 ? 17:43, Claus Futtrup a ?crit : > > Dear Scilabers > > I wish to check for the existence of some files. For this I created a > simple function: > > [out]=function file_exist(fname) > [fd, err] = mopen(fname); // Try to open file, mode: 'br' (binary-reading) > if err==0 then > out=%t; > mclose(fname); > else > out=%f > endendfunction > > > I didn't check, but presumably this would work. > > Is such a function already available? Which way is the "official" way to > do this in Scilab? > > Maybe I'm searching for the wrong word, but I found some ways in Scilab. > The "fileinfo" seems to be the closest one to what I wish to do. > > Matlab has a function "exist()" which can check for files too. Scilab has > the function "exists()" - notice the function name is plural, not singluar > - and this one AFAIK only works for Scilab variables (not files), although > I didn't check. > > If fileinfo is the right way, maybe an example for the help could be to > make a file_exist function, to show ... (?) ... when I search for Scilab > file exist function, I'm not guided in any specific way/direction and find > myself insecure whether I find the right help. > > Best regards, > Claus > > > _______________________________________________ > users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Jan 25 21:16:08 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 25 Jan 2018 21:16:08 +0100 Subject: [Scilab-users] File exist function? In-Reply-To: References: Message-ID: <7ad042d7-c8e7-6b83-f9c2-4f77a2cecd2d@free.fr> Hello Claus, Le 25/01/2018 ? 17:43, Claus Futtrup a ?crit : > .../... > > Is such a function already available? Which way is the "official" way > to do this in Scilab? > > Maybe I'm searching for the wrong word, but I found some ways in > Scilab. The "fileinfo" seems to be the closest one to what I wish to do. "isfile" is now added to the /See also/ section of the "fileinfo" page. At least on the CodeReview. Looking forward a reviewer and merger Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Thu Jan 25 22:40:26 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 25 Jan 2018 22:40:26 +0100 Subject: [Scilab-users] File exist function? In-Reply-To: <7ad042d7-c8e7-6b83-f9c2-4f77a2cecd2d@free.fr> References: <7ad042d7-c8e7-6b83-f9c2-4f77a2cecd2d@free.fr> Message-ID: Hi Samuel Excellent :-) Cheers, Claus On Jan 25, 2018 21:16, "Samuel Gougeon" wrote: > Hello Claus, > > Le 25/01/2018 ? 17:43, Claus Futtrup a ?crit : > > .../... > > Is such a function already available? Which way is the "official" way to > do this in Scilab? > > Maybe I'm searching for the wrong word, but I found some ways in Scilab. > The "fileinfo" seems to be the closest one to what I wish to do. > > > "isfile" is now added to the *See also* section of the "fileinfo" page. > At least on the CodeReview. > > Looking forward a reviewer and merger > Regards > Samuel > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Fri Jan 26 16:38:19 2018 From: amonmayr at laas.fr (amonmayr at laas.fr) Date: Fri, 26 Jan 2018 16:38:19 +0100 Subject: [Scilab-users] GUI programming In-Reply-To: References: Message-ID: Hello, Last time I built GUI with Scilab, I did not find a comprehensive website or book on the subject and resorted to a bunch of separate sources (see Nikokay's answer). Here are a bunch of issues/tricks I learned by trial & error: - as for now, you cannot export uicontrols using the figure menu or the "xs2svg, xs2png, ..." functions. It means that for example if you put two frames side by side, one with buttons, the other one with a plot (an axis), you'll get a blank image if you export it. It's quite inconvenient when trying to build a documentation with visual examples. - the documentation for gridbag layout constraint is just useless ( https://help.scilab.org/docs/6.0.0/en_US/gridbag_constraints_properties.html ), but this layout is just the best in term of functionalities and flexibility. It took me a lot of time to half understand how it works, reading java documentations and trying to fill-in the gaps. - There is a nice trick to get a responsive GUI even if your callback functions take some time to execute. The idea is, from within the callback function, to first disable the callback function of the uicontrol, run the long calculation and then re-enable the callback. That way you avoid getting a huge amount of events and callbacks that accumulate and lag behind the actions of the user. As an example, imagine a slider where the callback function runs a 500ms-long calculation and plot the results on a graph. If you don't apply the trick described above, sliding the slider can generate 10's of events in a fraction of a second and then you have to wait for all the calculations and plotting to finish in order to get back to a usable GUI. Hope it helps, Antoine Le 24/01/2018 ? 19:49, Claus Futtrup a ?crit?: > Hi Scilabers > > Is there a comprehensive manual or book (in English, or alt German) > about programming GUI in Scilab? (or a comprehensive web-page) > > I've found the Openeering one (18 pages): > http://www.openeering.com/sites/default/files/LHY_Tutorial_Gui.pdf > ... and I've looked at the help pages for uicontrol + run some of the > GUI demos in Scilab. > > I have almost no background in GUI programming, nothing successful > anyway, but it could be nice if I could at least get some basic GUI up > running (e.g. a figure where one can manage some controls on the left > side + see the polar plot etc on the right side). > > I think that what I need is not just examples. I need explanations, > and preferably something coherent that I can combine and work with, > into something that works. > > I've installed GUI builder from ATOMS. In the past I've never been > happy with programming on a high level. I prefer to understand what > goes on under the hood... so GUI builder is a bit of a desperate grasp > on my part. > > Best regards, > Claus > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Antoine Monmayrant LAAS - CNRS 7 avenue du Colonel Roche BP 54200 31031 TOULOUSE Cedex 4 FRANCE Tel:+33 5 61 33 64 59 email : antoine.monmayrant at laas.fr permanent email : antoine.monmayrant at polytechnique.org +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Jan 27 19:20:25 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 27 Jan 2018 11:20:25 -0700 (MST) Subject: [Scilab-users] Running an .sce from the command line. In-Reply-To: References: <1459450444.2711.14.camel@Servo> Message-ID: <1517077225299-0.post@n3.nabble.com> Hello Adrian, Just to thank you for sharing this very useful solution which works great with Scilab 5.5.2 on Windows 7. Regards, Rafael -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From cfuttrup at gmail.com Sun Jan 28 12:11:49 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 28 Jan 2018 12:11:49 +0100 Subject: [Scilab-users] Scilab 6 crashes all the time Message-ID: Dear Scilabers I'm running Scilab 6 on a Win7 machine, 64 bit, 4 GB RAM. Scilab crashes all the time, randomly, many times every day. Sometimes when I have a fresh start and execute a script it happens first time + second time - then third time Scilab is started, the script runs fine. Sometimes Scilab crashes when I work in the console, it can be any command, even "help contourf" or something like that. Somtimes Scilab crashes when I am fiddling with a plot and e.g. changing axis properties. The response I get from Win7 everytime is: Scilab 6.0.0 (GUI) stopped working. Then the program can be closed. What is the problem / solution to the problem? Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Jan 28 12:24:59 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 28 Jan 2018 12:24:59 +0100 Subject: [Scilab-users] Stacked 2D plot in 3D Message-ID: Dear Scilabers I am trying to make a kind-of 3D plot, but with lines (in 2D). Attached a file that shows what I wish to do. Below some code that shows current state, but given the desired result (attached), I'm not happy with it. I'm "cheating" a bit to make plot3d accept my input data and I Wonder if I'm on the wrong track? Best regards, Claus // Test datafrequencies = [201 811 3183 12862 25113]; // Hzangles = [0 30 60 90]; // off-axis angles, degreesm_norm = [ 1.0 0.9945629 0.9643959 0.8756431; 1.0 0.9914442 1.0244046 0.9414654; 1.0 0.9910279 0.9670986 0.8932413; 1.0 0.9339808 0.8378147 0.7067978; 1.0 0.8985782 0.7536068 0.5074218]; s2d = scf();for i=1:length(angles) do plot(frequencies,m_norm(:,i),'-k');endsa2d = gca();sa2d.log_flags = "lnn"; // log x-axis // Instead of above "flat" 2D plot,// now stack the plots in a 3D plot stackplt = scf();sp = gca(); // Get current axis handlefor i=1:length(angles) do anglei = [angles(i)-0.1 angles(i)+0.1]; // make size of arguments = 2 mi = [m_norm(:,i) m_norm(:,i)]; // so that it becomes a small surface plot3d(frequencies,anglei,mi,alpha=85,theta=85,flag=[2,2,3]);// plot3d(frequencies,angles,m_norm(:,i)); // above command creates error plot3d: // Wrong size for input arguments #2 and #3: >= 2 expected.end// plot3d(frequencies,angles,m_norm,alpha=85,theta=85,flag=[2,2,3]); // This plot expects a "surface" - doesn't work for linessp.log_flags = "lnn"; // log x-axis (frequencies) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: YG%2520anat%2520off%2520axis.jpg Type: image/jpeg Size: 30221 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Sun Jan 28 13:53:28 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 28 Jan 2018 12:53:28 +0000 Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: References: Message-ID: Hi Claus, Try the following code using param3d: // START OF CODE frequencies = [201 811 3183 12862 25113]'; // Hz; row vector angles = [0 30 60 90]; // off-axis angles, degrees m_norm = [ 1.0 0.9945629 0.9643959 0.8756431; 1.0 0.9914442 1.0244046 0.9414654; 1.0 0.9910279 0.9670986 0.8932413; 1.0 0.9339808 0.8378147 0.7067978; 1.0 0.8985782 0.7536068 0.5074218]; clf(); sp = gca(); // Get current axis handle for i=1:length(angles) do anglei = angles(i) + zeros(m_norm(:,i)) mi = 20*log10(m_norm(:,i)); // dB scale param3d(frequencies,anglei,mi,alpha=50,theta=-110,flag=[2,4]); // e = gce() //the handle on the 3D polyline e.foreground = color('dark blue'); e.thickness = 2; end xgrid; sp.log_flags = "lnn"; // x-axis log scale (frequencies) sp.cube_scaling = "on"; xlabel("Frequency (Hz)"); ylabel("Angle (deg)"); zlabel("Mag (dB)"); // END OF CODE Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jan 28 16:13:23 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Jan 2018 16:13:23 +0100 Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: References: Message-ID: Hello Claus, plot3d3() may be used for this kind of plot. It is even its main asset, despites it is not highlighted in its documentation. Here is an enriched version of its example, and its rendering: u = linspace(-%pi/2, %pi/2, 30); v = linspace(0, 2*%pi, 30); X = cos(u)'*cos(v); Y = cos(u)'*sin(v); Z = sin(u)'*ones(v); clf subplot(1,3,1) plot3d3(X,Y,Z); subplot(1,3,2) plot3d3(X,Y,Z); ax = gca(); ax.children(1).visible = "off"; ax.children(2).children.foreground = color("grey70"); subplot(1,3,3) plot3d3(X,Y,Z); ax = gca(); ax.children(2).visible = "off"; ax.children(1).children.foreground = color("orange"); f = gcf(); isoview(f) f.children.rotation_angles = [50 20]; As you see, plot3d3() plots two independent sub-lattices that can be controlled independently. This may be easily applied to your case. If you don't need one of the sub-lattices, you may even delete it and keep only the other one. Cheers Samuel PS : i will propose an improved page for plot3d3. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ccjhpcnnigiimlbh.png Type: image/png Size: 25697 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Sun Jan 28 16:37:48 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 28 Jan 2018 08:37:48 -0700 (MST) Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: References: Message-ID: <1517153868898-0.post@n3.nabble.com> Claus,You can also try param3d1, which needs to be called only once:// START OF CODEfrequencies = [201 811 3183 12862 25113]; // Hz;angles = [0 30 60 90]; // degreesm_norm = [ 1.0 0.9945629 0.9643959 0.8756431; 1.0 0.9914442 1.0244046 0.9414654; 1.0 0.9910279 0.9670986 0.8932413; 1.0 0.9339808 0.8378147 0.7067978; 1.0 0.8985782 0.7536068 0.5074218];[nf na] = size(m_norm)A = (angles .*. ones(nf,1))';F = (frequencies .*. ones(na,1));M = 20*log10(m_norm'); // dB scaleclf();sp = gca();param3d1(F,A,M,alpha=50,theta=-110,flag=[2,4]);e = gce();for i=1:nf; e.children(i).foreground = color('dark blue'); e.children(i).thickness = 2;endxgrid;sp.log_flags = "lnn"; // x-axis log scale (frequencies)sp.cube_scaling = "on";xlabel("Frequency (Hz)");ylabel("Angle (deg)");zlabel("Mag (dB)");// END OF CODERegards,Rafael -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Jan 28 16:39:24 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 28 Jan 2018 15:39:24 +0000 Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: References: Message-ID: Claus, You can also try param3d1, which needs to be called only once: // START OF CODE frequencies = [201 811 3183 12862 25113]; // Hz; angles = [0 30 60 90]; // deg m_norm = [ 1.0 0.9945629 0.9643959 0.8756431; 1.0 0.9914442 1.0244046 0.9414654; 1.0 0.9910279 0.9670986 0.8932413; 1.0 0.9339808 0.8378147 0.7067978; 1.0 0.8985782 0.7536068 0.5074218]; [nf na] = size(m_norm) A = (angles .*. ones(nf,1))'; F = (frequencies .*. ones(na,1)); M = 20*log10(m_norm'); // dB scale clf(); sp = gca(); param3d1(F,A,M,alpha=50,theta=-110,flag=[2,4]); e = gce(); for i=1:nf; e.children(i).foreground = color('dark blue'); e.children(i).thickness = 2; end xgrid; sp.log_flags = "lnn"; // x-axis log scale (frequencies) sp.cube_scaling = "on"; xlabel("Frequency (Hz)"); ylabel("Angle (deg)"); zlabel("Mag (dB)"); // END OF CODE Regards, Rafael From sgougeon at free.fr Sun Jan 28 17:16:51 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Jan 2018 17:16:51 +0100 Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: References: Message-ID: <9a940d75-ca9b-f4ba-5fca-b8bbb92ed06c@free.fr> Hello Rafael, About param3d() and param3d1(): In 3 days, it will be the 10th birthday of this report: http://bugzilla.scilab.org/6155 Shall we make a present to other users? :) By the way, beyond their pages, don't you think the functions themselves should be merged? Le 28/01/2018 ? 16:39, Rafael Guerra a ?crit : > .../... > for i=1:nf; > e.children(i).foreground = color('dark blue'); > e.children(i).thickness = 2; > end Or more simply: e.children.foreground = color('dark blue'); e.children.thickness = 2; This kind of vectorized assignment (almost always) works. Cheers Samuel From jrafaelbguerra at hotmail.com Sun Jan 28 17:24:02 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 28 Jan 2018 16:24:02 +0000 Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: <9a940d75-ca9b-f4ba-5fca-b8bbb92ed06c@free.fr> References: <9a940d75-ca9b-f4ba-5fca-b8bbb92ed06c@free.fr> Message-ID: Hi Samuel, Absolutely, the two param3d functions should be merged. The vectorised assignment example should also be included in the helpfile. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Sunday, January 28, 2018 5:17 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Stacked 2D plot in 3D Hello Rafael, About param3d() and param3d1(): In 3 days, it will be the 10th birthday of this report: http://bugzilla.scilab.org/6155 Shall we make a present to other users? :) By the way, beyond their pages, don't you think the functions themselves should be merged? Le 28/01/2018 ? 16:39, Rafael Guerra a ?crit : > .../... > for i=1:nf; > e.children(i).foreground = color('dark blue'); > e.children(i).thickness = 2; > end Or more simply: e.children.foreground = color('dark blue'); e.children.thickness = 2; This kind of vectorized assignment (almost always) works. Cheers Samuel _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From antoine.monmayrant at laas.fr Sun Jan 28 18:58:55 2018 From: antoine.monmayrant at laas.fr (antoine monmayrant) Date: Sun, 28 Jan 2018 18:58:55 +0100 Subject: [Scilab-users] Scilab 6 crashes all the time In-Reply-To: References: Message-ID: <391d8e2d-515c-95ae-1762-7ae308a27a78@laas.fr> Hi Claus, It might be related to graphic drivers. Did you try to run scilab in console mode (scilab -nogui or something like that)? Can you for example take one of the scripts that randomly crashes and run it repeatedly in console mode? and see if it works reliably? If it works, your problem comes from graphic drivers and then you can try to update or downgrade your drivers. Hope it helps, Antoine ? For graphics, you can use "driver()" to plot everything directly to a file Le 28/01/2018 ? 12:11, Claus Futtrup a ?crit?: > Dear Scilabers > > I'm running Scilab 6 on a Win7 machine, 64 bit,?4 GB?RAM. > > Scilab crashes all the time, randomly, many times every day. Sometimes > when I have a fresh start and execute?a script it happens first time + > second time - then third time Scilab is started,?the script runs fine. > > Sometimes Scilab crashes when I work in the console, it can be any > command, even "help contourf" or something like that. > > Somtimes Scilab crashes when I am fiddling with a plot and > e.g.?changing axis properties. > > The response I get from Win7?everytime is: Scilab 6.0.0 (GUI) stopped > working. Then the program can be closed. > > What is the problem / solution to the problem? > > 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 Sun Jan 28 20:19:22 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 28 Jan 2018 20:19:22 +0100 Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: References: <9a940d75-ca9b-f4ba-5fca-b8bbb92ed06c@free.fr> Message-ID: Hi Rafael and Samuel Thank you both for great suggestions - and as I thought - I was on the wrong path. Indeed I looked at plot3d3 and didn't catch that this one is suitable for what I wish to do. I see clearly with the example by Samuel that it is quite a smart way. I initially made the mistake to feed vectors (frequencies + angles), and it complained (and it revealed, it seems, that plot3d3 is based on param3d1). I see it needs matrices. The example by Rafael made that clear to me. Thanks Rafael for a very good example to work with. Best regards, Claus On Sun, Jan 28, 2018 at 5:24 PM, Rafael Guerra wrote: > Hi Samuel, > > Absolutely, the two param3d functions should be merged. > > The vectorised assignment example should also be included in the helpfile. > > Regards, > Rafael > > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel > Gougeon > Sent: Sunday, January 28, 2018 5:17 PM > To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Stacked 2D plot in 3D > > Hello Rafael, > > About param3d() and param3d1(): > In 3 days, it will be the 10th birthday of this report: > http://bugzilla.scilab.org/6155 > Shall we make a present to other users? :) By the way, beyond their pages, > don't you think the functions themselves should be merged? > > Le 28/01/2018 ? 16:39, Rafael Guerra a ?crit : > > .../... > > for i=1:nf; > > e.children(i).foreground = color('dark blue'); > > e.children(i).thickness = 2; > > end > > Or more simply: > > e.children.foreground = color('dark blue'); e.children.thickness = 2; > > This kind of vectorized assignment (almost always) works. > > Cheers > 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 cfuttrup at gmail.com Sun Jan 28 20:58:53 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 28 Jan 2018 20:58:53 +0100 Subject: [Scilab-users] Scilab 6 crashes all the time In-Reply-To: <391d8e2d-515c-95ae-1762-7ae308a27a78@laas.fr> References: <391d8e2d-515c-95ae-1762-7ae308a27a78@laas.fr> Message-ID: Hi Antoine Thanks for reminding me. Thinking back in time, I realize this has been treated on the mailing list before, so you're probably right. I have only now started to use my work PC for working with Scilab, so that's why I have the problem now ... :-) Best regards, Claus On Sun, Jan 28, 2018 at 6:58 PM, antoine monmayrant < antoine.monmayrant at laas.fr> wrote: > Hi Claus, > > It might be related to graphic drivers. > Did you try to run scilab in console mode (scilab -nogui or something like > that)? > Can you for example take one of the scripts that randomly crashes and run > it repeatedly in console mode? and see if it works reliably? > If it works, your problem comes from graphic drivers and then you can try > to update or downgrade your drivers. > > Hope it helps, > > Antoine > > > ? For graphics, you can use "driver()" to plot everything directly to a > file > > > Le 28/01/2018 ? 12:11, Claus Futtrup a ?crit : > > Dear Scilabers > > I'm running Scilab 6 on a Win7 machine, 64 bit, 4 GB RAM. > > Scilab crashes all the time, randomly, many times every day. Sometimes > when I have a fresh start and execute a script it happens first time + > second time - then third time Scilab is started, the script runs fine. > > Sometimes Scilab crashes when I work in the console, it can be any > command, even "help contourf" or something like that. > > Somtimes Scilab crashes when I am fiddling with a plot and e.g. changing > axis properties. > > The response I get from Win7 everytime is: Scilab 6.0.0 (GUI) stopped > working. Then the program can be closed. > > What is the problem / solution to the problem? > > Best regards, > Claus > > > _______________________________________________ > users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Jan 28 22:11:20 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Jan 2018 22:11:20 +0100 Subject: [Scilab-users] Scilab 6 crashes all the time In-Reply-To: References: Message-ID: <91229a1f-2e4e-6386-4ec1-017140783175@free.fr> Hello Claus, Thank you for telling things as they are. I experiment the same situation now for 2 years, on Windows 7 64 bits. It got a bit better with the official 6.0.0 release than with the nightly built a few days before the release, but it is still very unstable. With the pending 6.0.1 as well (or bad). I noticed that crashes are somewhat systematic when a bunch of instructions are echoed in the console (copy/pasting, or exec with echo from Scinotes), while executing the same instructions in a script in silent mode more often passes without crashing. As far as i remember, after the awful 5.4.0 first version that yielded and sent an ocean of Java exceptions in the console, you succeeded in convincing the OP team to display exceptions elsewhere. In the hard meanwhile, i can say that Scilab was abandoned in some high schools of engineering for teaching, because it was just an unsustainable situation, and system administrators have many things to do out of testing how to overcome such aberration. This was an excellent publicity for Matlab (if it needed some), and a very efficient way to ruin efforts to highlight Scilab vs other comparable softwares. Let's bet that you will be heard again :) Regards Samuel Le 28/01/2018 ? 12:11, Claus Futtrup a ?crit : > Dear Scilabers > > I'm running Scilab 6 on a Win7 machine, 64 bit, 4 GB RAM. > > Scilab crashes all the time, randomly, many times every day. Sometimes > when I have a fresh start and execute a script it happens first time + > second time - then third time Scilab is started, the script runs fine. > > Sometimes Scilab crashes when I work in the console, it can be any > command, even "help contourf" or something like that. > > Somtimes Scilab crashes when I am fiddling with a plot and > e.g. changing axis properties. > > The response I get from Win7 everytime is: Scilab 6.0.0 (GUI) stopped > working. Then the program can be closed. > > What is the problem / solution to the problem? > > Best regards, > Claus From sgougeon at free.fr Sun Jan 28 22:23:17 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Jan 2018 22:23:17 +0100 Subject: [Scilab-users] Scilab 6 crashes all the time In-Reply-To: <391d8e2d-515c-95ae-1762-7ae308a27a78@laas.fr> References: <391d8e2d-515c-95ae-1762-7ae308a27a78@laas.fr> Message-ID: Le 28/01/2018 ? 18:58, antoine monmayrant a ?crit : > > It might be related to graphic drivers. On the same PC, after the excellent 5.5.2 release that still run in a very stable way, the only thing that changed is Scilab. However, i must notice that old Scilab version before 5.3.3 (except the 4.1.2, still stable) are now crashing on the same PC where they used to run correctly, as soon as a graphical instruction is used. And all that always with the same graphic driver. My 2 cents: I would rather think that changes in/with the JVM are likely involved. Samuel From cfuttrup at gmail.com Mon Jan 29 17:39:25 2018 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 29 Jan 2018 17:39:25 +0100 Subject: [Scilab-users] Scilab 6 crashes all the time In-Reply-To: References: <391d8e2d-515c-95ae-1762-7ae308a27a78@laas.fr> Message-ID: Hi Samuel I've used Scilab 5.5 for a long time on my private PC, a Lenovo W530 with 8 Gb RAM and NVidia Graphics (Optimus). Lately my old PC died, so I'm using a work-PC now, which is weak and basically designed for websurfing and Microsoft Word documents ... not power-use. You could be right it's not a Graphics driver ... I mean, how much Graphics is involved in an instruction in the Scilab console? ... Only a little bit. To me it happens suddenly and quite randomly, as if Scilab doesn't clean up, or the machine runs out of RAM (either DRAM or VRAM). My gut feeling is the crashing is worse if another program is running in parallel (e.g. a web browser). Best regards, Claus On Sun, Jan 28, 2018 at 10:23 PM, Samuel Gougeon wrote: > Le 28/01/2018 ? 18:58, antoine monmayrant a ?crit : > >> >> It might be related to graphic drivers. >> > > On the same PC, after the excellent 5.5.2 release that still run in a very > stable way, the only thing that changed is Scilab. > > However, i must notice that old Scilab version before 5.3.3 (except the > 4.1.2, still stable) are now crashing on the same PC where they used to run > correctly, as soon as a graphical instruction is used. And all that always > with the same graphic driver. > > My 2 cents: I would rather think that changes in/with the JVM are likely > involved. > > 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 arthur at bellacat.com Mon Jan 29 18:41:14 2018 From: arthur at bellacat.com (Arthur Quinn) Date: Mon, 29 Jan 2018 17:41:14 +0000 Subject: [Scilab-users] Scilab 6 on Macos 13 Message-ID: Hello all, Just downloaded and tried to run Scilab 6.0.0 on MacPro with Macos 10.13.2 (High Sierra). Refuses to run because "This version of Scilab will probably fail on this system (10.13.2): Scilab requires 10.8.3 (Mountain Lion) or newer system" Running manually in a terminal seems to reveal that various .dlibs are not as expected. Is there a solution not involving heroic effort? Arthur Quinn From rfabbri at gmail.com Tue Jan 30 13:18:19 2018 From: rfabbri at gmail.com (Ricardo Fabbri) Date: Tue, 30 Jan 2018 10:18:19 -0200 Subject: [Scilab-users] This version of Scilab will probably fail on this system (10.13) In-Reply-To: References: <1506194143801-0.post@n3.nabble.com> Message-ID: Hi, Just updating that Scilab 6.0.0 worked for me with Mac OS high sierra 10.13.2 by removing these files: /Applications/scilab-6.0.0.app/Contents/MacOS/lib/thirdparty/libBLAS.dylib /Applications/scilab-6.0.0.app/Contents/MacOS/lib/thirdparty/libz.* Best, -- Ricardo Fabbri Professor of Computer Engineering IPRJ/UERJ Nova Friburgo Graduate Program ? CAPES 6 rfabbri.github.io On Sat, Sep 23, 2017 at 9:15 PM, Paul Bignier wrote: > > 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 > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From heinznabielek at icloud.com Wed Jan 31 00:12:55 2018 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Tue, 30 Jan 2018 23:12:55 +0000 (GMT) Subject: [Scilab-users] need a more efficient and faster code: suggestions welcome Message-ID: Dear friends, problem [below] is solved, but I need a more efficient and faster code: this is a Monte-Carlo simulation of n random points in a 3d spherical volume of radius r. A typical case is n=20,000 and r=23 mm. And from this, I need the resulting probability distribution of nearest neighbours.? First attempt with doubly nested for-loops took 6 hours execution time. Version below with more vecctor operations is down to 6 minutes, but suggestions for further improvements would be welcome.? Greetings Heinz ? n=20000; r=23; radius = r*grand(n,1,'def').^(1/3); phi = 2*%pi*grand(n,1, 'def'); costheta = 1 - 2*grand(n,1, 'def'); radsintheta = radius.*sin(acos(costheta)); X = [radsintheta.*cos(phi),radsintheta.*sin(phi), radius.*costheta]; ONE=(ones(1:n-1))'; MinDist=[]; for i=1:n; ??? this=X(i,:);XX=X;XX(i,:)=[]; ??? DIFF=XX-ONE*this; ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; end; jj=-0.05:0.1:3.05;nj=length(jj); [0.05+jj(1:nj-1)' (histc(jj,MinDist))'] RESULTING OUTPUT DIST. PROBABILITY [mm] 0. 0.0003 0.1 0.0044 0.2 0.0202 0.3 0.0417 0.4 0.06735 0.5 0.0984 0.6 0.12555 0.7 0.13335 0.8 0.1357 0.9 0.1155 1. 0.09735 1.1 0.0684 1.2 0.0438 1.3 0.02495 1.4 0.01385 1.5 0.00535 1.6 0.0023 1.7 0.00095 1.8 0.0005 1.9 0.00005 2. 0.00005 2.1 0. ... .... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Wed Jan 31 09:36:27 2018 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Wed, 31 Jan 2018 08:36:27 +0000 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: References: Message-ID: Hello, The following suggestions will probably not have a drastic influence (I don't see how it could be more vectorised) but his a little thing I see: > De : users [mailto:users-bounces at lists.scilab.org] De la part de Heinz Nabielek > Envoy? : mercredi 31 janvier 2018 00:13 > > MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; Maybe you could concatenate the squares of the distance and then compute the square root of the whole vector in the end: sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; ? end ? MinDist = sqrt(sqMinDist) Hope this helps, 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 heinznabielek at me.com Wed Jan 31 09:49:35 2018 From: heinznabielek at me.com (Heinz) Date: Wed, 31 Jan 2018 09:49:35 +0100 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: References: Message-ID: <002001d39a70$6d086e00$47194a00$@me.com> Thanks Christophe- I should have thought of it myself... I have difficulties handling the SciLab timer: how do you do this exactly? Heinz PS: Had you noticed that the resulting probability had been predicted by Prof Paul Hertz in Heidelberg, Mathematische Annalen, Vol 67 (1909), 387ff as early as 20 December 1908? My 'real' materials problem is much more complex, but this part shown here would determine the time consuming part. -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Dang Ngoc Chan, Christophe Sent: 31 January 2018 09:36 To: Users mailing list for Scilab Subject: Re: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome Hello, The following suggestions will probably not have a drastic influence (I don't see how it could be more vectorised) but his a little thing I see: > De : users [mailto:users-bounces at lists.scilab.org] De la part de Heinz > Nabielek Envoy? : mercredi 31 janvier 2018 00:13 > > MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; Maybe you could concatenate the squares of the distance and then compute the square root of the whole vector in the end: sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; ? end ? MinDist = sqrt(sqMinDist) Hope this helps, 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 stephane.mottelet at utc.fr Wed Jan 31 10:53:25 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 31 Jan 2018 10:53:25 +0100 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: References: Message-ID: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> Replacing ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; by ??? MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; will be at least twice faster. Crunching elapsed time could be done by using parallel_run (with 5.5.2 version) if you have a multi-core processor. S. Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit?: > Hello, > > The following suggestions will probably not have a drastic influence > (I don't see how it could be more vectorised) > but his a little thing I see: > >> De : users [mailto:users-bounces at lists.scilab.org] De la part de Heinz Nabielek >> Envoy? : mercredi 31 janvier 2018 00:13 >> >> MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > Maybe you could concatenate the squares of the distance > and then compute the square root of the whole vector in the end: > > sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; > > ? > > end > > ? > > MinDist = sqrt(sqMinDist) > > Hope this helps, > > 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 -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From stephane.mottelet at utc.fr Wed Jan 31 11:07:56 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 31 Jan 2018 11:07:56 +0100 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> References: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> Message-ID: moreover, ??? MinDist=[MinDist sqrt(min((DIFF.*DIFF)*[1;1;1]))]; is even faster. S. Le 31/01/2018 ? 10:53, St?phane Mottelet a ?crit?: > Replacing > > ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > > by > > ??? MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; > > will be at least twice faster. Crunching elapsed time could be done by > using parallel_run (with 5.5.2 version) if you have a multi-core > processor. > > S. > > Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit?: >> Hello, >> >> The following suggestions will probably not have a drastic influence >> (I don't see how it could be more vectorised) >> but his a little thing I see: >> >>> De : users [mailto:users-bounces at lists.scilab.org] De la part de >>> Heinz Nabielek >>> Envoy? : mercredi 31 janvier 2018 00:13 >>> >>> ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >> Maybe you could concatenate the squares of the distance >> and then compute the square root of the whole vector in the end: >> >> sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; >> >> ? >> >> end >> >> ? >> >> MinDist = sqrt(sqMinDist) >> >> Hope this helps, >> >> 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 > > -- 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 amonmayr at laas.fr Wed Jan 31 11:22:39 2018 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Wed, 31 Jan 2018 11:22:39 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICB7RVhUfSBuZWVkIGEgbW9y?= =?utf-8?q?e_efficient_and_faster_code=3A_suggestions_welcome?= In-Reply-To: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> Message-ID: <4fab-5a719900-7f-2f538780@188437484> Hello St?phane, Sorry to hijack the discussion but I didn't know that there was such a difference between A.*A and A.^2. Could you tell us more about it? Why is is twice faster to use the A.*A form? Is this documented somewhere? Cheers, Antoine Le Mercredi, Janvier 31, 2018 10:53 CET, St?phane Mottelet a ?crit: > Replacing > > ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > > by > > ??? MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; > > will be at least twice faster. Crunching elapsed time could be done by > using parallel_run (with 5.5.2 version) if you have a multi-core processor. > > S. > > Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit?: > > Hello, > > > > The following suggestions will probably not have a drastic influence > > (I don't see how it could be more vectorised) > > but his a little thing I see: > > > >> De : users [mailto:users-bounces at lists.scilab.org] De la part de Heinz Nabielek > >> Envoy? : mercredi 31 janvier 2018 00:13 > >> > >> MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > > Maybe you could concatenate the squares of the distance > > and then compute the square root of the whole vector in the end: > > > > sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; > > > > ? > > > > end > > > > ? > > > > MinDist = sqrt(sqMinDist) > > > > Hope this helps, > > > > 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 > > > -- > St?phane Mottelet > Ing?nieur de recherche > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > D?partement G?nie des Proc?d?s Industriels > Sorbonne Universit?s - Universit? de Technologie de Compi?gne > CS 60319, 60203 Compi?gne cedex > Tel : +33(0)344234688 > http://www.utc.fr/~mottelet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From stephane.mottelet at utc.fr Wed Jan 31 11:30:23 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 31 Jan 2018 11:30:23 +0100 Subject: [Scilab-users] ?==?utf-8?q? {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: <4fab-5a719900-7f-2f538780@188437484> References: <4fab-5a719900-7f-2f538780@188437484> Message-ID: I am an old school guy and have learned scientific computing with Fortran... Using mutiplication instead of power elevation is an old trick which should not be necessary with a more clever interpreter (which should detect that 2 is actually a (small) integer and use multiplication instead) S. Le 31/01/2018 ? 11:22, Antoine Monmayrant a ?crit?: > Hello St?phane, > > Sorry to hijack the discussion but I didn't know that there was such a difference between A.*A and A.^2. > Could you tell us more about it? > Why is is twice faster to use the A.*A form? > Is this documented somewhere? > > Cheers, > > Antoine > > > Le Mercredi, Janvier 31, 2018 10:53 CET, St?phane Mottelet a ?crit: > >> Replacing >> >> ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >> >> by >> >> ??? MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; >> >> will be at least twice faster. Crunching elapsed time could be done by >> using parallel_run (with 5.5.2 version) if you have a multi-core processor. >> >> S. >> >> Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit?: >>> Hello, >>> >>> The following suggestions will probably not have a drastic influence >>> (I don't see how it could be more vectorised) >>> but his a little thing I see: >>> >>>> De : users [mailto:users-bounces at lists.scilab.org] De la part de Heinz Nabielek >>>> Envoy? : mercredi 31 janvier 2018 00:13 >>>> >>>> MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >>> Maybe you could concatenate the squares of the distance >>> and then compute the square root of the whole vector in the end: >>> >>> sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; >>> >>> ? >>> >>> end >>> >>> ? >>> >>> MinDist = sqrt(sqMinDist) >>> >>> Hope this helps, >>> >>> 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 >> >> -- >> St?phane Mottelet >> Ing?nieur de recherche >> EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable >> D?partement G?nie des Proc?d?s Industriels >> Sorbonne Universit?s - Universit? de Technologie de Compi?gne >> CS 60319, 60203 Compi?gne cedex >> Tel : +33(0)344234688 >> http://www.utc.fr/~mottelet >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- 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 amonmayr at laas.fr Wed Jan 31 11:45:54 2018 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Wed, 31 Jan 2018 11:45:54 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSB7?= =?utf-8?q?EXT=7D_need_a_more_efficient_and_faster_code=3A_suggestions_wel?= =?utf-8?q?com?= In-Reply-To: Message-ID: <2ebe-5a719e80-23-4d344f80@194102668> Argh, OK, I get it: scilab treats A.^2 exactly like A.^%pi and not like "square it". Makes sense, thank you for the info. I wonder how julia is performing with respect to A.^2 compared to A.*A... Antoine Le Mercredi, Janvier 31, 2018 11:30 CET, St?phane Mottelet a ?crit: > I am an old school guy and have learned scientific computing with > Fortran... Using mutiplication instead of power elevation is an old > trick which should not be necessary with a more clever interpreter > (which should detect that 2 is actually a (small) integer and use > multiplication instead) > > S. > > Le 31/01/2018 ? 11:22, Antoine Monmayrant a ?crit?: > > Hello St?phane, > > > > Sorry to hijack the discussion but I didn't know that there was such a difference between A.*A and A.^2. > > Could you tell us more about it? > > Why is is twice faster to use the A.*A form? > > Is this documented somewhere? > > > > Cheers, > > > > Antoine > > > > > > Le Mercredi, Janvier 31, 2018 10:53 CET, St?phane Mottelet a ?crit: > > > >> Replacing > >> > >> ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > >> > >> by > >> > >> ??? MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; > >> > >> will be at least twice faster. Crunching elapsed time could be done by > >> using parallel_run (with 5.5.2 version) if you have a multi-core processor. > >> > >> S. > >> > >> Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit?: > >>> Hello, > >>> > >>> The following suggestions will probably not have a drastic influence > >>> (I don't see how it could be more vectorised) > >>> but his a little thing I see: > >>> > >>>> De : users [mailto:users-bounces at lists.scilab.org] De la part de Heinz Nabielek > >>>> Envoy? : mercredi 31 janvier 2018 00:13 > >>>> > >>>> MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > >>> Maybe you could concatenate the squares of the distance > >>> and then compute the square root of the whole vector in the end: > >>> > >>> sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; > >>> > >>> ? > >>> > >>> end > >>> > >>> ? > >>> > >>> MinDist = sqrt(sqMinDist) > >>> > >>> Hope this helps, > >>> > >>> 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 > >> > >> -- > >> St?phane Mottelet > >> Ing?nieur de recherche > >> EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > >> D?partement G?nie des Proc?d?s Industriels > >> Sorbonne Universit?s - Universit? de Technologie de Compi?gne > >> CS 60319, 60203 Compi?gne cedex > >> Tel : +33(0)344234688 > >> http://www.utc.fr/~mottelet > >> > >> _______________________________________________ > >> users mailing list > >> users at lists.scilab.org > >> http://lists.scilab.org/mailman/listinfo/users > >> > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > -- > St?phane Mottelet > Ing?nieur de recherche > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > D?partement G?nie des Proc?d?s Industriels > Sorbonne Universit?s - Universit? de Technologie de Compi?gne > CS 60319, 60203 Compi?gne cedex > Tel : +33(0)344234688 > http://www.utc.fr/~mottelet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From jean-philippe.grivet at wanadoo.fr Wed Jan 31 12:07:50 2018 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Wed, 31 Jan 2018 12:07:50 +0100 Subject: [Scilab-users] Stacked 2D plot in 3D In-Reply-To: References: <9a940d75-ca9b-f4ba-5fca-b8bbb92ed06c@free.fr> Message-ID: <5A71A386.3020109@wanadoo.fr> Hi Claus, Rafeal and Samuel, Here is another method for stacked plots, which was suggested to me years ago by Serge Steer. I used it succssfully for about 12 individual curves. Cheers, JP Grivet Le 28/01/2018 20:19, Claus Futtrup a ?crit : > Hi Rafael and Samuel > > Thank you both for great suggestions - and as I thought - I was on the > wrong path. Indeed I looked at plot3d3 and didn't catch that this one > is suitable for what I wish to do. I see clearly with the example by > Samuel that it is quite a smart way. I initially made the mistake to > feed vectors (frequencies + angles), and it complained (and it > revealed, it seems, that plot3d3 is based on param3d1). I see it needs > matrices. The example by Rafael made that clear to me. Thanks Rafael > for a very good example to work with. > > Best regards, > Claus > > On Sun, Jan 28, 2018 at 5:24 PM, Rafael Guerra > > wrote: > > Hi Samuel, > > Absolutely, the two param3d functions should be merged. > > The vectorised assignment example should also be included in the > helpfile. > > Regards, > Rafael > > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org > ] On Behalf Of Samuel Gougeon > Sent: Sunday, January 28, 2018 5:17 PM > To: Users mailing list for Scilab > > Subject: Re: [Scilab-users] Stacked 2D plot in 3D > > Hello Rafael, > > About param3d() and param3d1(): > In 3 days, it will be the 10th birthday of this report: > http://bugzilla.scilab.org/6155 > Shall we make a present to other users? :) By the way, beyond > their pages, don't you think the functions themselves should be > merged? > > Le 28/01/2018 ? 16:39, Rafael Guerra a ?crit : > > .../... > > for i=1:nf; > > e.children(i).foreground = color('dark blue'); > > e.children(i).thickness = 2; > > end > > Or more simply: > > e.children.foreground = color('dark blue'); e.children.thickness = 2; > > This kind of vectorized assignment (almost always) works. > > Cheers > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- x=linspace(-10,10,500); clf;ax=gca(); ax.axes_visible='on'; xmin=-10; xmax=+10; ymin=-1; ymax=2 ax.data_bounds=[xmin,ymin;xmax ymax]; yshift=0.2; drawlater for xshift=5:-0.4:-5 xfpoly([xmin x xmax],[ymin yshift+sinc(x+xshift) ymin],1) e=gce();e.background=-2; yshift=yshift-0.02; end drawnow() From stephane.mottelet at utc.fr Wed Jan 31 16:11:51 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 31 Jan 2018 16:11:51 +0100 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> References: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> Message-ID: <8362a075-981c-226a-9a96-51a110c7d87f@utc.fr> Dear Heinz, Here is what can be done in Scilab-5.5.2 to accelerate your computations on a multi-core architecture under Linux : function out=distances(X) ??? function out=distance(k) ??????? this=X(k,:);XX=X;XX(k,:)=[]; ??????? DIFF=XX-ONE*this; ??????? out=sqrt(min((DIFF.*DIFF)*[1;1;1])); ??? endfunction ??? n=size(X,1); ??? ONE=ones(n-1,1); ??? out=parallel_run(1:n,distance); endfunction n=40000; r=23; radius = r*grand(n,1,'def').^(1/3); phi = 2*%pi*grand(n,1, 'def'); costheta = 1 - 2*grand(n,1, 'def'); radsintheta = radius.*sin(acos(costheta)); X = [radsintheta.*cos(phi),radsintheta.*sin(phi), radius.*costheta]; On a modest server (two 10-core/20-threads Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz = 40 threads), -->tic;distances(X);toc ?ans? = ??? 13.063 On a smarter server (sixteen 6-core/6-threads Intel(R) Xeon(R) CPU X7542 @ 2.67GHz = 96 threads) -->tic;d=distances(X);toc ?ans? = ??? 2.498 I hope that parallel_run will be available again in the next version of scilab. S. Le 31/01/2018 ? 10:53, St?phane Mottelet a ?crit?: > Replacing > > ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > > by > > ??? MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; > > will be at least twice faster. Crunching elapsed time could be done by > using parallel_run (with 5.5.2 version) if you have a multi-core > processor. > > S. > > Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit?: >> Hello, >> >> The following suggestions will probably not have a drastic influence >> (I don't see how it could be more vectorised) >> but his a little thing I see: >> >>> De : users [mailto:users-bounces at lists.scilab.org] De la part de >>> Heinz Nabielek >>> Envoy? : mercredi 31 janvier 2018 00:13 >>> >>> ??? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >> Maybe you could concatenate the squares of the distance >> and then compute the square root of the whole vector in the end: >> >> sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; >> >> ? >> >> end >> >> ? >> >> MinDist = sqrt(sqMinDist) >> >> Hope this helps, >> >> 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 > > -- 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 heinznabielek at me.com Wed Jan 31 19:41:26 2018 From: heinznabielek at me.com (Heinz) Date: Wed, 31 Jan 2018 19:41:26 +0100 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: <8362a075-981c-226a-9a96-51a110c7d87f@utc.fr> References: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> <8362a075-981c-226a-9a96-51a110c7d87f@utc.fr> Message-ID: <00fb01d39ac3$1b419760$51c4c620$@me.com> My latest tictoc is 366: would that be 6.1 minutes? I am away from my 2 iMacs at home and running Scilab on a lowly Intel Pentium CPU N3540 @ 2.16GHz Win10 laptop. Your "2.498" for 40,000 points are phenomenal regarding the fact that the running time increases with the square of the number of points. The later iMac has a Quad-Core-i7 at 3.2 GHz: can I run your code version there under the older Scilab? Not that I understand how parallel processing works... Heinz -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of St?phane Mottelet Sent: 31 January 2018 16:12 To: users at lists.scilab.org Subject: Re: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome Dear Heinz, Here is what can be done in Scilab-5.5.2 to accelerate your computations on a multi-core architecture under Linux : function out=distances(X) function out=distance(k) this=X(k,:);XX=X;XX(k,:)=[]; DIFF=XX-ONE*this; out=sqrt(min((DIFF.*DIFF)*[1;1;1])); endfunction n=size(X,1); ONE=ones(n-1,1); out=parallel_run(1:n,distance); endfunction n=40000; r=23; radius = r*grand(n,1,'def').^(1/3); phi = 2*%pi*grand(n,1, 'def'); costheta = 1 - 2*grand(n,1, 'def'); radsintheta = radius.*sin(acos(costheta)); X = [radsintheta.*cos(phi),radsintheta.*sin(phi), radius.*costheta]; On a modest server (two 10-core/20-threads Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz = 40 threads), -->tic;distances(X);toc ans = 13.063 On a smarter server (sixteen 6-core/6-threads Intel(R) Xeon(R) CPU X7542 @ 2.67GHz = 96 threads) -->tic;d=distances(X);toc ans = 2.498 I hope that parallel_run will be available again in the next version of scilab. S. Le 31/01/2018 ? 10:53, St?phane Mottelet a ?crit : > Replacing > > MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > > by > > MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; > > will be at least twice faster. Crunching elapsed time could be done by > using parallel_run (with 5.5.2 version) if you have a multi-core > processor. > > S. > > Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit : >> Hello, >> >> The following suggestions will probably not have a drastic influence >> (I don't see how it could be more vectorised) but his a little thing >> I see: >> >>> De : users [mailto:users-bounces at lists.scilab.org] De la part de >>> Heinz Nabielek Envoy? : mercredi 31 janvier 2018 00:13 >>> >>> MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >> Maybe you could concatenate the squares of the distance and then >> compute the square root of the whole vector in the end: >> >> sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; >> >> ? >> >> end >> >> ? >> >> MinDist = sqrt(sqMinDist) >> >> Hope this helps, >> >> 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 > > -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Wed Jan 31 21:47:19 2018 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Wed, 31 Jan 2018 20:47:19 +0000 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: <00fb01d39ac3$1b419760$51c4c620$@me.com> References: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> <8362a075-981c-226a-9a96-51a110c7d87f@utc.fr> <00fb01d39ac3$1b419760$51c4c620$@me.com> Message-ID: <20180131204719.Horde.Kt-tNMlTBuro6I6tnGkzOmN@webmail.utc.fr> Hello, Don't even think about using parallel_run under OSX. It used to work (with some tweaking) with scilab-5.5.1 under Mavericks, but since 5.5.2 version, it has become completely unstable. S. Heinz a ?crit?: > My latest tictoc is 366: would that be 6.1 minutes? > I am away from my 2 iMacs at home and running Scilab on a lowly > Intel Pentium CPU N3540 @ 2.16GHz Win10 laptop. Your "2.498" for > 40,000 points are phenomenal regarding the fact that the running > time increases with the square of the number of points. > > The later iMac has a Quad-Core-i7 at 3.2 GHz: can I run your code > version there under the older Scilab? Not that I understand how > parallel processing works... > Heinz > > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of > St?phane Mottelet > Sent: 31 January 2018 16:12 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] {EXT} need a more efficient and faster > code: suggestions welcome > > Dear Heinz, > > Here is what can be done in Scilab-5.5.2 to accelerate your > computations on a multi-core architecture under Linux : > > function out=distances(X) > ? ? function out=distance(k) > ? ? ? ? this=X(k,:);XX=X;XX(k,:)=[]; > ? ? ? ? DIFF=XX-ONE*this; > ? ? ? ? out=sqrt(min((DIFF.*DIFF)*[1;1;1])); > ? ? endfunction > ? ? n=size(X,1); > ? ? ONE=ones(n-1,1); > ? ? out=parallel_run(1:n,distance); > endfunction > > n=40000; > r=23; > radius = r*grand(n,1,'def').^(1/3); > phi = 2*%pi*grand(n,1, 'def'); > costheta = 1 - 2*grand(n,1, 'def'); > radsintheta = radius.*sin(acos(costheta)); X = > [radsintheta.*cos(phi),radsintheta.*sin(phi), radius.*costheta]; > > On a modest server (two 10-core/20-threads Intel(R) Xeon(R) CPU E5-2660 > v2 @ 2.20GHz = 40 threads), > > -->tic;distances(X);toc > ans? = > > ? ? 13.063 > > On a smarter server (sixteen 6-core/6-threads Intel(R) Xeon(R) CPU > X7542 @ 2.67GHz = 96 threads) > > -->tic;d=distances(X);toc > ans? = > > ? ? 2.498 > > I hope that parallel_run will be available again in the next version > of scilab. > > S. > > Le 31/01/2018 ? 10:53, St?phane Mottelet a ?crit : >> Replacing >> >> ? ? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >> >> by >> >> ? ? MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; >> >> will be at least twice faster. Crunching elapsed time could be done by >> using parallel_run (with 5.5.2 version) if you have a multi-core >> processor. >> >> S. >> >> Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit : >>> Hello, >>> >>> The following suggestions will probably not have a drastic influence >>> (I don't see how it could be more vectorised) but his a little thing >>> I see: >>> >>>> De : users [mailto:users-bounces at lists.scilab.org] De la part de >>>> Heinz Nabielek Envoy? : mercredi 31 janvier 2018 00:13 >>>> >>>> ? ? MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >>> >>> Maybe you could concatenate the squares of the distance and then >>> compute the square root of the whole vector in the end: >>> >>> sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; >>> >>> ? >>> >>> end >>> >>> ? >>> >>> MinDist = sqrt(sqMinDist) >>> >>> Hope this helps, >>> >>> 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 > > -- > St?phane Mottelet > Ing?nieur de recherche > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - > Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne > cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at me.com Wed Jan 31 22:44:45 2018 From: heinznabielek at me.com (Heinz) Date: Wed, 31 Jan 2018 22:44:45 +0100 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: <8362a075-981c-226a-9a96-51a110c7d87f@utc.fr> References: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> <8362a075-981c-226a-9a96-51a110c7d87f@utc.fr> Message-ID: <016f01d39adc$b7672830$26357890$@me.com> On my puny 250 Euro Win10 travel-laptop, I have achieved 66 tictocs for 20,000 random points with your code [not that I would understand it] in Scilab 5.5.2 and that is phenomenal and opens up new simulation possibilities..... Thanks so much.... Heinz -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of St?phane Mottelet Sent: 31 January 2018 16:12 To: users at lists.scilab.org Subject: Re: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome Dear Heinz, Here is what can be done in Scilab-5.5.2 to accelerate your computations on a multi-core architecture under Linux : function out=distances(X) function out=distance(k) this=X(k,:);XX=X;XX(k,:)=[]; DIFF=XX-ONE*this; out=sqrt(min((DIFF.*DIFF)*[1;1;1])); endfunction n=size(X,1); ONE=ones(n-1,1); out=parallel_run(1:n,distance); endfunction n=40000; r=23; radius = r*grand(n,1,'def').^(1/3); phi = 2*%pi*grand(n,1, 'def'); costheta = 1 - 2*grand(n,1, 'def'); radsintheta = radius.*sin(acos(costheta)); X = [radsintheta.*cos(phi),radsintheta.*sin(phi), radius.*costheta]; On a modest server (two 10-core/20-threads Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz = 40 threads), -->tic;distances(X);toc ans = 13.063 On a smarter server (sixteen 6-core/6-threads Intel(R) Xeon(R) CPU X7542 @ 2.67GHz = 96 threads) -->tic;d=distances(X);toc ans = 2.498 I hope that parallel_run will be available again in the next version of scilab. S. Le 31/01/2018 ? 10:53, St?phane Mottelet a ?crit : > Replacing > > MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; > > by > > MinDist=[MinDist sqrt(min(sum(DIFF.*DIFF,2)))]; > > will be at least twice faster. Crunching elapsed time could be done by > using parallel_run (with 5.5.2 version) if you have a multi-core > processor. > > S. > > Le 31/01/2018 ? 09:36, Dang Ngoc Chan, Christophe a ?crit : >> Hello, >> >> The following suggestions will probably not have a drastic influence >> (I don't see how it could be more vectorised) but his a little thing >> I see: >> >>> De : users [mailto:users-bounces at lists.scilab.org] De la part de >>> Heinz Nabielek Envoy? : mercredi 31 janvier 2018 00:13 >>> >>> MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))]; >> Maybe you could concatenate the squares of the distance and then >> compute the square root of the whole vector in the end: >> >> sqMinDist=[sqMinDist min(sum(DIFF.^2,2))]; >> >> ? >> >> end >> >> ? >> >> MinDist = sqrt(sqMinDist) >> >> Hope this helps, >> >> 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 > > -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From rouxph.22 at gmail.com Wed Jan 31 23:04:33 2018 From: rouxph.22 at gmail.com (philippe) Date: Wed, 31 Jan 2018 23:04:33 +0100 Subject: [Scilab-users] GUI programming In-Reply-To: References: Message-ID: Hi Le 24/01/2018 ? 19:49, Claus Futtrup a ?crit?: > Hi Scilabers > > Is there a comprehensive manual or book (in English, or alt German) > about programming GUI in Scilab? (or a comprehensive web-page) programming GUI in scilab relies on a good comprehension of graphics handles. The 4th chapter of my book is dedicated to graphics and contain few pages about GUI conception (part 23.4 pages 338 to 353) : https://www.d-booker.fr/scilab-book1/325-scilab-fundamentals.html You can find a simple example (with call-back inside) detailed : https://www.youtube.com/watch?v=zRXr22VZNJM It's sufficient to understand the basis of GUI. > I think that what I need is not just examples. I need explanations, and > preferably something coherent that I can combine and work with, into > something that works. That was the aim of my book : giving simple examples with detailed explanations, well ordered so that you can learn scilab with more efficiency than jumping from one help page to another. Philippe From jrafaelbguerra at hotmail.com Wed Jan 31 23:31:14 2018 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 31 Jan 2018 22:31:14 +0000 Subject: [Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome In-Reply-To: References: <70916bc8-6ff1-938c-46c9-0682d62eed02@utc.fr> <8362a075-981c-226a-9a96-51a110c7d87f@utc.fr> <016f01d39adc$b7672830$26357890$@me.com> Message-ID: Hi Heinz, Find herein a vectorised memory hog solution for Scilab 6, which is fast (~30 s for 20K points on Win7 laptop): // START OF CODE (Scilab 6) Clear n=20000; r=23; radius = r*grand(n,1,'def').^(1/3); phi = 2*%pi*grand(n,1, 'def'); costheta = 1 - 2*grand(n,1, 'def'); radsintheta = radius.*sin(acos(costheta)); X = [radsintheta.*cos(phi), radsintheta.*sin(phi), radius.*costheta]; tic; X2 = sum(X.*X, 'c'); X3 = X2.*.ones(n,1)'; X3 = X3 + X3'; D = abs(X3 - 2*(X*X'))'; D(1:n+1:$) = []; // remove diagonal 0's D = matrix(D,n-1,n); // reshape D to (n-1) x n size MinDist1 = sqrt(min(D,'r')); t1=toc(); disp(t1) jj=-0.05:0.1:3.05; H1 = histc(jj,MinDist1); disp([0.05+jj(1:$-1)' H1']); // END OF CODE Regards, Rafael