From acj119 at nifty.com Fri Jul 3 09:42:14 2015 From: acj119 at nifty.com (jaipur) Date: Fri, 3 Jul 2015 00:42:14 -0700 (MST) Subject: [Scilab-users] How to speed up making big structure? Message-ID: <1435909334253-4032530.post@n3.nabble.com> I'm making a big structure (about 110,000 items) by reading data from Hipparcos star catalog text file. My procedure is as follows. MyStruct = struct(); Index = 0; while ~meof(Fd) do ........ ........ Index = Index + 1; MyStruct(Index).Field1 = ...; MyStruct(Index).Field2 = ...; MyStruct(Index).Field3 = ...; end But this procedure takes huge time!! The number of items is known. Could you teach me speedy way to make big structure? For example, keep memory for structure before starting like MyVector = ones(110000,1); -- View this message in context: http://mailinglists.scilab.org/How-to-speed-up-making-big-structure-tp4032530.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Fri Jul 3 09:58:12 2015 From: Serge.Steer at inria.fr (Serge Steer) Date: Fri, 03 Jul 2015 09:58:12 +0200 Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <1435909334253-4032530.post@n3.nabble.com> References: <1435909334253-4032530.post@n3.nabble.com> Message-ID: <55964094.6020708@inria.fr> What are the types ans dimensions of Field1, Field2, Field3 values? This can help writing a efficient procedure. Le 03/07/2015 09:42, jaipur a ?crit : > I'm making a big structure (about 110,000 items) by reading data from > Hipparcos star catalog text file. > My procedure is as follows. > > MyStruct = struct(); Index = 0; > while ~meof(Fd) do > ........ > ........ > Index = Index + 1; > MyStruct(Index). = ...; > MyStruct(Index).Field2 = ...; > MyStruct(Index).Field3 = ...; > end > > But this procedure takes huge time!! > The number of items is known. Could you teach me speedy way to make big > structure? > For example, keep memory for structure before starting like > > MyVector = ones(110000,1); > > > > > > -- > View this message in context: http://mailinglists.scilab.org/How-to-speed-up-making-big-structure-tp4032530.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Fri Jul 3 10:32:14 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 03 Jul 2015 10:32:14 +0200 Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <1435909334253-4032530.post@n3.nabble.com> References: <1435909334253-4032530.post@n3.nabble.com> Message-ID: <5596488E.7050205@free.fr> Hello, Le 03/07/2015 09:42, jaipur a ?crit : > I'm making a big structure (about 110,000 items) by reading data from > Hipparcos star catalog text file. > My procedure is as follows. > > MyStruct = struct(); Index = 0; > while ~meof(Fd) do > ........ > ........ > Index = Index + 1; > MyStruct(Index).Field1 = ...; > MyStruct(Index).Field2 = ...; > MyStruct(Index).Field3 = ...; > end > > But this procedure takes huge time!! > The number of items is known. Could you teach me speedy way to make big > structure? > For example, keep memory for structure before starting like > > MyVector = ones(110000,1); When creating new components of a structures array elements with an *increasing* index, the time spent to create each one increases, and the total time increases in a parabolic way: -->clear s, tic; t=[]; for i=1:1000, s(i).n=%pi; if pmodulo(i,10)==0, t(i/10)=toc(); end, end, toc() ans = 52.603 -->plot(t) Now, if components are created with a decreasing index, the time spent to create each one is constant, and the total time varies in a linear way: -->clear s, tic; t=[]; for i=1000:-1:1, s(i).n=%pi; if pmodulo(i,10)==0, t(i/10)=toc(); end, end, toc() ans = 5.553 -->plot(t) Finally, initializing the array to its final size, and then filling its components at increasing index is also fast and linear in time: -->clear s, tic; t=[]; s(1000).n=0; for i=1:1000, s(i).n=%pi; if pmodulo(i,10)==0, t(i/10)=toc(); end, end, toc() ans = 5.696 Therefore, in your case, you may initialize: MyStruct(110000).Field1 = 0; MyStruct(110000).Field2 = 0; MyStruct(110000).Field3 = 0; and then assign the components as you did, at increasing index. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: diiibeji.png Type: image/png Size: 3954 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: beefafbe.png Type: image/png Size: 3467 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bedfjjhj.png Type: image/png Size: 3376 bytes Desc: not available URL: From sgougeon at free.fr Fri Jul 3 11:01:48 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 03 Jul 2015 11:01:48 +0200 Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <1435909334253-4032530.post@n3.nabble.com> References: <1435909334253-4032530.post@n3.nabble.com> Message-ID: <55964F7C.9090405@free.fr> Le 03/07/2015 09:42, jaipur a ?crit : > I'm making a big structure (about 110,000 items) by reading data from > Hipparcos star catalog text file. > My procedure is as follows. > > MyStruct = struct(); Index = 0; > while ~meof(Fd) do > ........ > ........ > Index = Index + 1; > MyStruct(Index).Field1 = ...; > MyStruct(Index).Field2 = ...; > MyStruct(Index).Field3 = ...; > end > > But this procedure takes huge time!! > The number of items is known. Could you teach me speedy way to make big > structure? > For example, keep memory for structure before starting like > > MyVector = ones(110000,1); *You must use Scilab 6*. Handling of structures is much faster and optimized with it: // at increasing index: -->clear s, tic; t=[]; for i=1:1000, s(i).n=%pi; if pmodulo(i,10)==0, t(i/10)=toc(); end, end, toc() ans = 0.7841965 // at decreasing index: -->clear s, tic; t=[]; for i=1000:-1:1, s(i).n=%pi; if pmodulo(i,10)==0, t(i/10)=toc(); end, end, toc() ans = 0.391459 // at increasing index after initial sizing: -->clear s, tic; t=[]; s(1000).n="abc"; for i=1:1000, s(i).n="abc"; if pmodulo(i,10)==0, t(i/10)=toc(); end, end, toc() ans = 0.413913 *Conclusion*: for structures arrays, - Scilab 6 (aka YaSp) is ~12 times faster than the best of Scilab 5.5.2 - initializing the array size still makes things faster. It decreases by a factor ~2 the time to fill the array -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Jul 3 11:23:34 2015 From: stephane.mottelet at utc.fr (=?windows-1252?Q?St=E9phane_Mottelet?=) Date: Fri, 03 Jul 2015 11:23:34 +0200 Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <55964F7C.9090405@free.fr> References: <1435909334253-4032530.post@n3.nabble.com> <55964F7C.9090405@free.fr> Message-ID: <55965496.4010303@utc.fr> Le 03/07/2015 11:01, Samuel Gougeon a ?crit : > Le 03/07/2015 09:42, jaipur a ?crit : > [...] > > *Conclusion*: for structures arrays, > - Scilab 6 (aka YaSp) is ~12 times faster than the best of Scilab 5.5.2 > - initializing the array size still makes things faster. It decreases > by a factor ~2 the time to fill the array > Samuel, Is there a list of all accelerated features in Scilab 6 ? S. -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 3 11:44:04 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 03 Jul 2015 11:44:04 +0200 Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <55965496.4010303@utc.fr> References: <1435909334253-4032530.post@n3.nabble.com> <55964F7C.9090405@free.fr> <55965496.4010303@utc.fr> Message-ID: <55965964.7070400@free.fr> Le 03/07/2015 11:23, St?phane Mottelet a ?crit : > Is there a list of all accelerated features in Scilab 6 ? None that i know. From fujimoto2005 at gmail.com Fri Jul 3 12:22:20 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Fri, 3 Jul 2015 03:22:20 -0700 (MST) Subject: [Scilab-users] =?utf-8?q?scilab=E3=80=806?= Message-ID: <1435918940054-4032536.post@n3.nabble.com> 1. My script can run with the scilab 5.5.2 but doesn't run with scilab 6. I have the error message at some line of the script and it stops. But I can't find any error at that line because that line is just 'toc()'. Any error can't happen . 2. scilab 6 does't accepts interrupt command. Can those who know about scilab 6 well teach me why such phenomenon happen? Best regards -- View this message in context: http://mailinglists.scilab.org/scilab-6-tp4032536.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Fri Jul 3 15:07:27 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 03 Jul 2015 15:07:27 +0200 Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <55965496.4010303@utc.fr> References: <1435909334253-4032530.post@n3.nabble.com> <55964F7C.9090405@free.fr> <55965496.4010303@utc.fr> Message-ID: <5596890F.1040100@free.fr> Le 03/07/2015 11:23, St?phane Mottelet a ?crit : > > Is there a list of all accelerated features in Scilab 6 ? St?phane, You may run bench_run for any Scilab version, and compare results vs the version. Unfortunately, the comparison can only be visual, since results are displayed without being returned. Samuel From fujimoto2005 at gmail.com Sat Jul 4 11:39:11 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sat, 4 Jul 2015 02:39:11 -0700 (MST) Subject: [Scilab-users] =?utf-8?q?scilab=E3=80=806?= In-Reply-To: <1435918940054-4032536.post@n3.nabble.com> References: <1435918940054-4032536.post@n3.nabble.com> Message-ID: <1436002751598-4032540.post@n3.nabble.com> I found the cause of error. grand("setsd",S) does't work in scilab 6. This work in scilab 5.5.2 without any problem. Please try the following script in the two environments. ****************** global S; S=grand("getsd"); size(S) //the next line exists in a local area in an actual script grand("setsd",S); *************** Best regards. -- View this message in context: http://mailinglists.scilab.org/scilab-6-tp4032536p4032540.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From acj119 at nifty.com Sat Jul 4 15:17:51 2015 From: acj119 at nifty.com (jaipur) Date: Sat, 4 Jul 2015 06:17:51 -0700 (MST) Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <5596890F.1040100@free.fr> References: <1435909334253-4032530.post@n3.nabble.com> <55964F7C.9090405@free.fr> <55965496.4010303@utc.fr> <5596890F.1040100@free.fr> Message-ID: <1436015871340-4032542.post@n3.nabble.com> Thanks, Samuel. My making structures become much and much faster by using Scilab 6.0. Comparing executing speed between 5.2.2 and 6.0 by bench_run indicated 2 ~ 10 times faster according to test items. Unfortunately, bench_run on 6.0 stopped at 39/69 th test because 'code2str' command was obsolete...... -- View this message in context: http://mailinglists.scilab.org/How-to-speed-up-making-big-structure-tp4032530p4032542.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From vincent.couvert at scilab-enterprises.com Mon Jul 6 09:59:03 2015 From: vincent.couvert at scilab-enterprises.com (Vincent COUVERT) Date: Mon, 06 Jul 2015 09:59:03 +0200 Subject: [Scilab-users] =?utf-8?q?scilab=E3=80=806?= In-Reply-To: <1436002751598-4032540.post@n3.nabble.com> References: <1435918940054-4032536.post@n3.nabble.com> <1436002751598-4032540.post@n3.nabble.com> Message-ID: <559A3547.70707@scilab-enterprises.com> Hello, This issue has just been fixed: http://gitweb.scilab.org/?p=scilab.git;a=commit;h=8f80224111ae69368ff2e2134b186c1d4ac184b2 Regards. On 07/04/2015 11:39 AM, fujimoto2005 wrote: > I found the cause of error. > grand("setsd",S) does't work in scilab 6. > This work in scilab 5.5.2 without any problem. > Please try the following script in the two environments. > > ****************** > global S; > S=grand("getsd"); > size(S) > //the next line exists in a local area in an actual script > grand("setsd",S); > > *************** > > Best regards. > > > > > -- > View this message in context: http://mailinglists.scilab.org/scilab-6-tp4032536p4032540.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Christophe.Dang at sidel.com Mon Jul 6 10:10:53 2015 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 6 Jul 2015 08:10:53 +0000 Subject: [Scilab-users] How to speed up making big structure? In-Reply-To: <1436015871340-4032542.post@n3.nabble.com> References: <1435909334253-4032530.post@n3.nabble.com> <55964F7C.9090405@free.fr> <55965496.4010303@utc.fr> <5596890F.1040100@free.fr> <1436015871340-4032542.post@n3.nabble.com> Message-ID: Hello, > De : jaipur > Envoy? : samedi 4 juillet 2015 15:18 > > Unfortunately, bench_run on 6.0 stopped at 39/69 th test > because 'code2str' command was obsolete... It was indeed labeled as obsolete since 5.4.0 (oct. 2012), and to be removed in 6.0, see http://help.scilab.org/docs/5.4.1/en_US/code2str.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 fujimoto2005 at gmail.com Mon Jul 6 17:22:12 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Mon, 6 Jul 2015 08:22:12 -0700 (MST) Subject: [Scilab-users] =?utf-8?q?scilab=E3=80=806?= In-Reply-To: <559A3547.70707@scilab-enterprises.com> References: <1435918940054-4032536.post@n3.nabble.com> <1436002751598-4032540.post@n3.nabble.com> <559A3547.70707@scilab-enterprises.com> Message-ID: <1436196132276-4032546.post@n3.nabble.com> Hi Vincent Thanks for reply. I reinstalled the Scilab 6 from the following address. http://www.scilab.org/development/nightly_builds/yasp But same error happens. Probably I am wrong where I can get the module which is fixed. Could you teach me where the bug fixed version I can get? Best regards -- View this message in context: http://mailinglists.scilab.org/scilab-6-tp4032536p4032546.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From vincent.couvert at scilab-enterprises.com Tue Jul 7 08:52:49 2015 From: vincent.couvert at scilab-enterprises.com (Vincent COUVERT) Date: Tue, 07 Jul 2015 08:52:49 +0200 Subject: [Scilab-users] =?utf-8?q?scilab=E3=80=806?= In-Reply-To: <1436196132276-4032546.post@n3.nabble.com> References: <1435918940054-4032536.post@n3.nabble.com> <1436002751598-4032540.post@n3.nabble.com> <559A3547.70707@scilab-enterprises.com> <1436196132276-4032546.post@n3.nabble.com> Message-ID: <559B7741.8020907@scilab-enterprises.com> Hello, You have to download the version of this morning (UTC). Vincent Le 06/07/2015 17:22, fujimoto2005 a ?crit : > Hi Vincent > > Thanks for reply. > I reinstalled the Scilab 6 from the following address. > > http://www.scilab.org/development/nightly_builds/yasp > > But same error happens. > Probably I am wrong where I can get the module which is fixed. > Could you teach me where the bug fixed version I can get? > > Best regards > > > > -- > View this message in context: http://mailinglists.scilab.org/scilab-6-tp4032536p4032546.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From fujimoto2005 at gmail.com Tue Jul 7 09:04:23 2015 From: fujimoto2005 at gmail.com (Masahiro Fujimoto) Date: Tue, 7 Jul 2015 16:04:23 +0900 Subject: [Scilab-users] scilab 6 In-Reply-To: <559B7741.8020907@scilab-enterprises.com> References: <1435918940054-4032536.post@n3.nabble.com> <1436002751598-4032540.post@n3.nabble.com> <559A3547.70707@scilab-enterprises.com> <1436196132276-4032546.post@n3.nabble.com> <559B7741.8020907@scilab-enterprises.com> Message-ID: Hello, Thanks a lot. By the way, the interrupt command and CTRL +X don't work in my environment. I can't stop the run of script. Is this a bug or just the problem of my environment? In your environment, doe's interrupt command work? Regards 2015-07-07 15:52 GMT+09:00 Vincent COUVERT < vincent.couvert at scilab-enterprises.com>: > Hello, > > You have to download the version of this morning (UTC). > > Vincent > > > Le 06/07/2015 17:22, fujimoto2005 a ?crit : > >> Hi Vincent >> >> Thanks for reply. >> I reinstalled the Scilab 6 from the following address. >> >> http://www.scilab.org/development/nightly_builds/yasp >> >> But same error happens. >> Probably I am wrong where I can get the module which is fixed. >> Could you teach me where the bug fixed version I can get? >> >> Best regards >> >> >> >> -- >> View this message in context: >> http://mailinglists.scilab.org/scilab-6-tp4032536p4032546.html >> Sent from the Scilab users - Mailing Lists Archives mailing list archive >> at Nabble.com. >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From contact at pierre-vuillemin.fr Wed Jul 8 15:07:27 2015 From: contact at pierre-vuillemin.fr (contact at pierre-vuillemin.fr) Date: Wed, 08 Jul 2015 15:07:27 +0200 Subject: [Scilab-users] Colored point over a black and white mesh Message-ID: <5e06b3c42cedea7b1d91a9b2feeaa98d@pierre-vuillemin.fr> Hello I would like to display one single colored point over a black and white mesh, and I cannot find a way to do it. So far, I have tried this code : mesh([1,2],[1,2]',[1,2;3,4]) set(gca(),"auto_clear","off") param3d(1, 1, 2); e = gce(); e.foreground = color("red"); e.mark_mode = "on"; e.mark_size = 3; a = gca(); a.rotation_angles = [65 168]; yet as "e.foreground" should be a color index of the current color map, it does not do what I would like. Any ideas? From sgougeon at free.fr Thu Jul 9 08:07:23 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 09 Jul 2015 08:07:23 +0200 Subject: [Scilab-users] Colored point over a black and white mesh In-Reply-To: <5e06b3c42cedea7b1d91a9b2feeaa98d@pierre-vuillemin.fr> References: <5e06b3c42cedea7b1d91a9b2feeaa98d@pierre-vuillemin.fr> Message-ID: <559E0F9B.4030201@free.fr> Hello, Le 08/07/2015 15:07, contact at pierre-vuillemin.fr a ?crit : > > e.foreground = color("red"); e.foreground // is for the line e.mark_foreground // is for the mark Samuel From contact at pierre-vuillemin.fr Thu Jul 9 08:34:10 2015 From: contact at pierre-vuillemin.fr (contact at pierre-vuillemin.fr) Date: Thu, 09 Jul 2015 08:34:10 +0200 Subject: [Scilab-users] Colored point over a black and white mesh In-Reply-To: <559E0F9B.4030201@free.fr> References: <5e06b3c42cedea7b1d91a9b2feeaa98d@pierre-vuillemin.fr> <559E0F9B.4030201@free.fr> Message-ID: Well, it was right under my nose... Thank you for the help :). Le 09.07.2015 08:07, Samuel Gougeon a ?crit?: > Hello, > > Le 08/07/2015 15:07, contact at pierre-vuillemin.fr a ?crit : >> >> e.foreground = color("red"); > e.foreground // is for the line > e.mark_foreground // is for the mark > > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From S.Thonhofer at gmail.com Thu Jul 9 14:43:15 2015 From: S.Thonhofer at gmail.com (StefanT) Date: Thu, 9 Jul 2015 05:43:15 -0700 (MST) Subject: [Scilab-users] XCos: custom block, error 'Undefined Function Type' Message-ID: <1436445795050-4032554.post@n3.nabble.com> hi, I am trying to introduce a new custom block for interfacing our simulation tool. the communication will be done via a Dll. the computational function of my block is a Scilab (Type 5) function which will exchange the data with the Dll. I am using Scilab 5.5.2 32bit. For writing the interface function and computational function I followed mainly the book "Modeling and Simulation in Scilab/Scicos". If anybody knows of an equally detailled but more recent manual please let me know. I wrote an interface function, where the computational function is referenced via model.sim = list('myComputationalFunction',5); in the 'define' section. myComputationalFunction is loaded to Scilab already in the startup file. when trying to run a model consisting of my blocks I get (at debug level 2) the following output in Scilab: block 1 is called with flag 4 at time 0.000000 Undefined Function type block 2 is called with flag 4 at time 0.000000 Undefined Function type block 1 is called with flag 5 at time 0.000000 Undefined Function type block 2 is called with flag 5 at time 0.000000 Undefined Function type I know that the computational function isn't even entered because I placed there some disp() statements. Is this a bug in Scilab/XCos? Or is function type 5 not supported in the current version? thanks in advance, stefan -- View this message in context: http://mailinglists.scilab.org/XCos-custom-block-error-Undefined-Function-Type-tp4032554.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From saynisana at gmail.com Thu Jul 9 15:22:32 2015 From: saynisana at gmail.com (Sayni Sana) Date: Thu, 9 Jul 2015 06:22:32 -0700 Subject: [Scilab-users] Auto tuning in xcos Message-ID: Hi I am sayni. I am trying to do pid tuning of a system of inverted pendulum in xcos platform. But the problem that is arriving is unlike auto tuning which can be done in simulink platform in matlab it cannot be done here. The values of kp, kd, ki does not come automatically on choosing the block of pid and the there is no option of tuning the plant. Does anyone has or knows a solution to this? I am actually doing a thesis for which this is required. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Thu Jul 9 20:09:57 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 09 Jul 2015 11:09:57 -0700 Subject: [Scilab-users] Auto tuning in xcos In-Reply-To: References: Message-ID: <1436465397.7899.1.camel@Servo> On Thu, 2015-07-09 at 06:22 -0700, Sayni Sana wrote: > Hi I am sayni. I am trying to do pid tuning of a system of inverted > pendulum in xcos platform. But the problem that is arriving is unlike > auto tuning which can be done in simulink platform in matlab it cannot > be done here. The values of kp, kd, ki does not come automatically on > choosing the block of pid and the there is no option of tuning the > plant. Does anyone has or knows a solution to this? I am actually > doing a thesis for which this is required. I'm not clear on what you're looking for here -- do you want a block that does auto-tuning, or are you unable to figure out how to enter the gains into the PID block that's there? -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From saynisana at gmail.com Thu Jul 9 20:40:45 2015 From: saynisana at gmail.com (Sayni Sana) Date: Thu, 9 Jul 2015 11:40:45 -0700 Subject: [Scilab-users] Auto tuning in xcos In-Reply-To: <1436465397.7899.1.camel@Servo> References: <1436465397.7899.1.camel@Servo> Message-ID: Yes I am basically looking for a block in xcos where pid auto tuning can be done. Similar to a pid block in simulink where pid auto tuning is possible. On 9 Jul 2015 23:42, "Tim Wescott" wrote: > On Thu, 2015-07-09 at 06:22 -0700, Sayni Sana wrote: > > Hi I am sayni. I am trying to do pid tuning of a system of inverted > > pendulum in xcos platform. But the problem that is arriving is unlike > > auto tuning which can be done in simulink platform in matlab it cannot > > be done here. The values of kp, kd, ki does not come automatically on > > choosing the block of pid and the there is no option of tuning the > > plant. Does anyone has or knows a solution to this? I am actually > > doing a thesis for which this is required. > > I'm not clear on what you're looking for here -- do you want a block > that does auto-tuning, or are you unable to figure out how to enter the > gains into the PID block that's there? > > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: 503.349.8432 > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Fri Jul 10 15:53:08 2015 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Fri, 10 Jul 2015 15:53:08 +0200 Subject: [Scilab-users] XCos: custom block, error 'Undefined Function Type' In-Reply-To: <1436445795050-4032554.post@n3.nabble.com> References: <1436445795050-4032554.post@n3.nabble.com> Message-ID: <1436536388.3444.38.camel@scilab-enterprises.com> Hello Stefan, First of all to call a DLL is strongly suggest you to use the C API instead of the Scilab one for performance reason : we have to copy all the data before calling the Scilab simulation function and copy them back after the call whereas in C we just pass pointers to the data. The Scilab function type is supported as some blocks use it (BPLATFORM, PENDULUM_ANIM, BARXY, TKSCALE). You can also directly check the "xcos_toolbox_skeleton" that implement a sum block in Scilab. If you are unable to found the issue by yourself, post a dummy test case that I can use. Regards, -- Cl?ment Le jeudi 09 juillet 2015 ? 05:43 -0700, StefanT a ?crit : > hi, > > I am trying to introduce a new custom block for interfacing our > simulation > tool. the communication will be done via a Dll. the computational > function > of my block is a Scilab (Type 5) function which will exchange the > data with > the Dll. I am using Scilab 5.5.2 32bit. > For writing the interface function and computational function I > followed > mainly the book "Modeling and Simulation in Scilab/Scicos". If > anybody knows > of an equally detailled but more recent manual please let me know. > > I wrote an interface function, where the computational function is > referenced via > model.sim = list('myComputationalFunction',5); > in the 'define' section. > myComputationalFunction is loaded to Scilab already in the startup > file. > > when trying to run a model consisting of my blocks I get (at debug > level 2) > the following output in Scilab: > block 1 is called with flag 4 at time 0.000000 > Undefined Function type > block 2 is called with flag 4 at time 0.000000 > Undefined Function type > block 1 is called with flag 5 at time 0.000000 > Undefined Function type > block 2 is called with flag 5 at time 0.000000 > Undefined Function type > > I know that the computational function isn't even entered because I > placed > there some disp() statements. > > Is this a bug in Scilab/XCos? Or is function type 5 not supported in > the > current version? > > thanks in advance, stefan > > > > -- > View this message in context: http://mailinglists.scilab.org/XCos > -custom-block-error-Undefined-Function-Type-tp4032554.html > Sent from the Scilab users - Mailing Lists Archives mailing list > archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From acj119 at nifty.com Sat Jul 11 13:41:17 2015 From: acj119 at nifty.com (jaipur) Date: Sat, 11 Jul 2015 04:41:17 -0700 (MST) Subject: [Scilab-users] How to assign column data to mlist? Message-ID: <1436614877330-4032561.post@n3.nabble.com> When I already have column data, how shall I collect these data into a mlist? For example, I have 2 column data, data1=[11:20]'; data2=[21:30]'; I create a mlist, MyMlist = mlist(['M', 'field1', 'field2', 'field3']); I'd like to assign data1, data2 to field1, field2, and access them as MyMlist(3).field1 and so on. And size(MyMlist) or length(MyMlist) should be 10. I tried MyMlist.field1= data1; MyMlist.field2= data2; The result is size(MyMlist) does not work. length(MyMlist) is 3. And MyMlist(1) indicate !M field1 field2 field3 ! MyMlist(2) indicate the values of data1 MyMlist(3) indicate the values of data2 I understand these results as the definition of mlist. But I'd like to assign column data into one compact mlist. Someone could give me a suggestion? -- View this message in context: http://mailinglists.scilab.org/How-to-assign-column-data-to-mlist-tp4032561.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Jul 11 20:17:48 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 11 Jul 2015 20:17:48 +0200 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: <1436614877330-4032561.post@n3.nabble.com> References: <1436614877330-4032561.post@n3.nabble.com> Message-ID: <55A15DCC.5070603@free.fr> Hello, Le 11/07/2015 13:41, jaipur a ?crit : > When I already have column data, how shall I collect these data into a mlist? > > For example, I have 2 column data, > data1=[11:20]'; data2=[21:30]'; > I create a mlist, > MyMlist = mlist(['M', 'field1', 'field2', 'field3']); > I'd like to assign data1, data2 to field1, field2, and access them as > MyMlist(3).field1 and so on. . What do you expect from MyMlist(3).field1 ? and from MyMlist.field1 ? and from MyMlist.field1(3)? Extractions must be defined for the M type. > And size(MyMlist) or length(MyMlist) should be > 10. > > I tried > MyMlist.field1= data1; MyMlist.field2= data2; > The result is > size(MyMlist) does not work. . This is normal: when a new typed list is defined, all operations for it must be explicitely defined: here, %M_size() for size(), extraction, insertion, etc > length(MyMlist) is 3. define %M_length() > And > MyMlist(1) indicate !M field1 field2 field3 ! > MyMlist(2) indicate the values of data1 > MyMlist(3) indicate the values of data2 Really? For these extractions, i get an error (for each). HTH Samuel From acj119 at nifty.com Sun Jul 12 06:21:06 2015 From: acj119 at nifty.com (jaipur) Date: Sat, 11 Jul 2015 21:21:06 -0700 (MST) Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: <55A15DCC.5070603@free.fr> References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> Message-ID: <1436674866237-4032563.post@n3.nabble.com> Thanks for your suggestion. Each element of data1 and data2 has, for example, individual's property like his height and weight. So, I want to treat as one element of mlist like MyMlist(3), MyMlist(3).field1, MyMlist(3).field2 when notice as individual. On the other hand, when I want to calculate mean value etc. of property, I'd like to treat as MyMlist.field1, MyMlist.field2(3:6) and so on. I understand overloading is the right way concerning mlist. But, is there simple way to create one structure without overloading fulfilling my wish above, when I have each property data, data1 and data2? -- View this message in context: http://mailinglists.scilab.org/How-to-assign-column-data-to-mlist-tp4032561p4032563.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sun Jul 12 10:50:06 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 12 Jul 2015 10:50:06 +0200 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: <1436674866237-4032563.post@n3.nabble.com> References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> Message-ID: <55A22A3E.5050402@free.fr> Le 12/07/2015 06:21, jaipur a ?crit : > Thanks for your suggestion. > > Each element of data1 and data2 has, for example, individual's property like > his height and weight. So, I want to treat as one element of mlist like > MyMlist(3), MyMlist(3).field1, MyMlist(3).field2 when notice as individual. > > On the other hand, when I want to calculate mean value etc. of property, I'd > like to treat as MyMlist.field1, MyMlist.field2(3:6) and so on. > > I understand overloading is the right way concerning mlist. > But, is there simple way to create one structure without overloading > fulfilling my wish above, when I have each property data, data1 and data2? You may use a structures array instead, together with list2vec(..) after extraction of values of any scalar field. As well, do not hesitate to comment this thread http://bugzilla.scilab.org/11888, that claims for your request. Presently, it is not possible to do element-wise assignment on structures array. Free overloadable operators can't work with operands passed by reference, so can't be used for overloading some new types of assignment. Regards Samuel From acj119 at nifty.com Mon Jul 13 03:13:23 2015 From: acj119 at nifty.com (jaipur) Date: Sun, 12 Jul 2015 18:13:23 -0700 (MST) Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: <55A22A3E.5050402@free.fr> References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> <55A22A3E.5050402@free.fr> Message-ID: <1436750003994-4032566.post@n3.nabble.com> Thank you for your suggestion. I posted to http://bugzilla.scilab.org/11888. -- View this message in context: http://mailinglists.scilab.org/How-to-assign-column-data-to-mlist-tp4032561p4032566.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From S.Thonhofer at gmail.com Mon Jul 13 14:47:24 2015 From: S.Thonhofer at gmail.com (StefanT) Date: Mon, 13 Jul 2015 05:47:24 -0700 (MST) Subject: [Scilab-users] XCos: custom block, error 'Undefined Function Type' In-Reply-To: <1436536388.3444.38.camel@scilab-enterprises.com> References: <1436445795050-4032554.post@n3.nabble.com> <1436536388.3444.38.camel@scilab-enterprises.com> Message-ID: <1436791644572-4032567.post@n3.nabble.com> Hi Cl?ment, thanks for your advice. I'm now trying to do it using a type 4 function type. Cheers, Stefan Cl?ment David-2 wrote > Hello Stefan, > > First of all to call a DLL is strongly suggest you to use the C API > instead of the Scilab one for performance reason : we have to copy all > the data before calling the Scilab simulation function and copy them > back after the call whereas in C we just pass pointers to the data. > > The Scilab function type is supported as some blocks use it (BPLATFORM, > PENDULUM_ANIM, BARXY, TKSCALE). You can also directly check the > "xcos_toolbox_skeleton" that implement a sum block in Scilab. > > If you are unable to found the issue by yourself, post a dummy test > case that I can use. > > Regards, > > -- > Cl?ment > > Le jeudi 09 juillet 2015 ? 05:43 -0700, StefanT a ?crit : >> hi, >> >> I am trying to introduce a new custom block for interfacing our >> simulation >> tool. the communication will be done via a Dll. the computational >> function >> of my block is a Scilab (Type 5) function which will exchange the >> data with >> the Dll. I am using Scilab 5.5.2 32bit. >> For writing the interface function and computational function I >> followed >> mainly the book "Modeling and Simulation in Scilab/Scicos". If >> anybody knows >> of an equally detailled but more recent manual please let me know. >> >> I wrote an interface function, where the computational function is >> referenced via >> model.sim = list('myComputationalFunction',5); >> in the 'define' section. >> myComputationalFunction is loaded to Scilab already in the startup >> file. >> >> when trying to run a model consisting of my blocks I get (at debug >> level 2) >> the following output in Scilab: >> block 1 is called with flag 4 at time 0.000000 >> Undefined Function type >> block 2 is called with flag 4 at time 0.000000 >> Undefined Function type >> block 1 is called with flag 5 at time 0.000000 >> Undefined Function type >> block 2 is called with flag 5 at time 0.000000 >> Undefined Function type >> >> I know that the computational function isn't even entered because I >> placed >> there some disp() statements. >> >> Is this a bug in Scilab/XCos? Or is function type 5 not supported in >> the >> current version? >> >> thanks in advance, stefan >> >> >> >> -- >> View this message in context: http://mailinglists.scilab.org/XCos >> -custom-block-error-Undefined-Function-Type-tp4032554.html >> Sent from the Scilab users - Mailing Lists Archives mailing list >> archive at Nabble.com. >> _______________________________________________ >> users mailing list >> > users at .scilab >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at .scilab > http://lists.scilab.org/mailman/listinfo/users -- View this message in context: http://mailinglists.scilab.org/XCos-custom-block-error-Undefined-Function-Type-tp4032554p4032567.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Mon Jul 13 22:18:29 2015 From: jrafaelbguerra at hotmail.com (Rafael Guera) Date: Mon, 13 Jul 2015 21:18:29 +0100 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: <55A22A3E.5050402@free.fr> References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> <55A22A3E.5050402@free.fr> Message-ID: Hello, I am trying to understand what Jaipur/Tachihara aims to achieve and wondering why simple code such as shown below cannot meet his requirements: data1=[11:20]'; data2=[21:30]'; M = mlist(['V', 'field1', 'field2']); M.field1 = data1; M.field2 = data2; disp(M) printf("\n\n"); M.field1(2) = %e; // individual element assignment M.field2(3:6) = %pi; // sub-array assignment printf("%10.3f %10.3f\n", M.field1, M.field2); Also could someone explain why command ?M(3)? produces errors and overloading is required? (using Scilab 5.5.2 in Win7) Thanks and regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Sunday, July 12, 2015 9:50 AM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] How to assign column data to mlist? Le 12/07/2015 06:21, jaipur a ?crit : > Thanks for your suggestion. > > Each element of data1 and data2 has, for example, individual's property like > his height and weight. So, I want to treat as one element of mlist like > MyMlist(3), MyMlist(3).field1, MyMlist(3).field2 when notice as individual. > > On the other hand, when I want to calculate mean value etc. of property, I'd > like to treat as MyMlist.field1, MyMlist.field2(3:6) and so on. > > I understand overloading is the right way concerning mlist. > But, is there simple way to create one structure without overloading > fulfilling my wish above, when I have each property data, data1 and data2? You may use a structures array instead, together with list2vec(..) after extraction of values of any scalar field. As well, do not hesitate to comment this thread http://bugzilla.scilab.org/11888, that claims for your request. Presently, it is not possible to do element-wise assignment on structures array. Free overloadable operators can't work with operands passed by reference, so can't be used for overloading some new types of assignment. 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 sgougeon at free.fr Mon Jul 13 22:37:15 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 13 Jul 2015 22:37:15 +0200 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> <55A22A3E.5050402@free.fr> Message-ID: <55A4217B.1030404@free.fr> Hello Rafael, Le 13/07/2015 22:18, Rafael Guera a ?crit : > .../... > > data1=[11:20]'; > > data2=[21:30]'; > > M= mlist(['V', 'field1', 'field2']); > > M.field1= data1; > > M.field2= data2; > > disp(M) > > printf("\n\n"); > > M.field1(2)= %e; /// individual element assignment/ > > M.field2(3:6)= %pi; /// sub-array assignment/ > > printf("%10.3f %10.3f\n",M.field1, M.field2); > > Also could someone explain why command "M(3)" produces errors and > overloading is required? (using Scilab 5.5.2 in Win7) > . M being a M-list, M(3) should extract the third component of M table(s), so data1(3) and data2(3). But you have to specify how you wish to display it: * like [data1(3) data2(3) ] ? * like [data1(3) ; data2(3) ] ? Then beware that the format of M(3:4)... must be managed. * like list(data1(3), data2(3)) ? Then what would return M(3:4)? * like a struct s.data1 = data1(3) ; s.data2 = data2(3) ? etc. The same questions must be answered for insertion and extraction: M(3) = [ %pi %e] // should distribute and assign %pi data1(3) and %e to data2(3) When you insert content, you must check that .data1 and .data2 keep the same size.. M(3:5) could return either a structure array, or a cell array, or a matrix... The developper must choose according to the purpose that is followed... HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Jul 13 23:53:44 2015 From: jrafaelbguerra at hotmail.com (Rafael Guera) Date: Mon, 13 Jul 2015 22:53:44 +0100 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: <55A4217B.1030404@free.fr> References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> <55A22A3E.5050402@free.fr> <55A4217B.1030404@free.fr> Message-ID: Samuel, Thanks for the detailed explanation. Not sure of what M(i) should mean in a situation where the matrices have different sizes: data1= ones(10,4); data2= zeros(5,3); M = mlist(['V', 'field1', 'field2']); M.field1 = data1; M.field2 = data2; or when the mlist fields are N-dimensional with different dimensions and/or sizes. PS: why not defining M(i) = M.field#i ? Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Monday, July 13, 2015 9:37 PM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] How to assign column data to mlist? Hello Rafael, Le 13/07/2015 22:18, Rafael Guera a ?crit : .../... data1=[11:20]'; data2=[21:30]'; M = mlist(['V', 'field1', 'field2']); M.field1 = data1; M.field2 = data2; disp(M) printf("\n\n"); M.field1(2) = %e; // individual element assignment M.field2(3:6) = %pi; // sub-array assignment printf("%10.3f %10.3f\n", M.field1, M.field2); Also could someone explain why command ?M(3)? produces errors and overloading is required? (using Scilab 5.5.2 in Win7) . M being a M-list, M(3) should extract the third component of M table(s), so data1(3) and data2(3). But you have to specify how you wish to display it: * like [data1(3) data2(3) ] ? * like [data1(3) ; data2(3) ] ? Then beware that the format of M(3:4)... must be managed. * like list(data1(3), data2(3)) ? Then what would return M(3:4)? * like a struct s.data1 = data1(3) ; s.data2 = data2(3) ? etc. The same questions must be answered for insertion and extraction: M(3) = [ %pi %e] // should distribute and assign %pi data1(3) and %e to data2(3) When you insert content, you must check that .data1 and .data2 keep the same size.. M(3:5) could return either a structure array, or a cell array, or a matrix... The developper must choose according to the purpose that is followed... HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Jul 14 12:21:10 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 14 Jul 2015 12:21:10 +0200 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> <55A22A3E.5050402@free.fr> <55A4217B.1030404@free.fr> Message-ID: <55A4E296.1040504@free.fr> Le 13/07/2015 23:53, Rafael Guera a ?crit : > > Samuel, > > Thanks for the detailed explanation. > > Not sure of what M(i) should mean in a situation where the matrices > have different sizes: > > data1=ones(10,4); > > data2=zeros(5,3); > > M=mlist(['V','field1','field2']); > > M.field1=data1; > > M.field2=data2; > > or when the mlist fields are N-dimensional with different dimensions > and/or sizes. > > PS: > > why not defining M(i) = M.field#i ? > Do you mean the ith field? Why not. But mlists are designed to be array-oriented, as cells and structures are: From help mlist: " mlist object is very similar to tlist object. The only difference concerns the extraction and insertion syntax: if M is an mlist, for any index i which is not a field name, M(i) is no more the i-th field of the list." If you wish (i) selecting a field, how will you select a component of the M array? I mean, using i to select a field puts two way for the same purpose (selecting a field, either by its name, or by its index), and removes a way to select a component from the array. What you wish looks like a simple tlist, with index just shifted by one to ignore the identification vector: -->t = tlist(["test" "r" "b" "p"], %pi, %f, %z) t = t(1) !test r b p ! t(2) 3.1415927 t(3) F t(4) z -->t(3) ans = F -->t.b ans = F Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Jul 14 12:33:20 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 14 Jul 2015 12:33:20 +0200 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> <55A22A3E.5050402@free.fr> <55A4217B.1030404@free.fr> Message-ID: <55A4E570.7030706@free.fr> Le 13/07/2015 23:53, Rafael Guera a ?crit : > > Not sure of what M(i) should mean in a situation where the matrices > have different sizes: > The developer is responsible for his/her mlist design: * when initializing or assigning data, their respective sizes may be checked * if data with distinct sizes are allowed, extraction may - either foresee default values when some data are missing for some fields - or manage undefined values, as allowed in list and tlist Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Jul 14 15:49:46 2015 From: jrafaelbguerra at hotmail.com (jrafaelbguerra at hotmail.com) Date: Tue, 14 Jul 2015 13:49:46 +0000 Subject: [Scilab-users] How to assign column data to mlist? In-Reply-To: <55A4E296.1040504@free.fr> References: <1436614877330-4032561.post@n3.nabble.com> <55A15DCC.5070603@free.fr> <1436674866237-4032563.post@n3.nabble.com> <55A22A3E.5050402@free.fr> <55A4217B.1030404@free.fr> <55A4E296.1040504@free.fr> Message-ID: Hi Samuel, Thanks for shedding light about these less well documented yet advanced features of the Scilab language. Best regards Rafael Sent by Outlook for Android From: Samuel Gougeon Sent: Tuesday 14 July 13:22 Subject: Re: [Scilab-users] How to assign column data to mlist? To: International users mailing list for Scilab. Le 13/07/2015 23:53, Rafael Guera a ?crit : Samuel, Thanks for the detailed explanation. Not sure of what M(i) should mean in a situation where the matrices have different sizes: data1= ones(10,4); data2= zeros(5,3); M = mlist(['V', 'field1', 'field2']); M.field1 = data1; M.field2 = data2; or when the mlist fields are N-dimensional with different dimensions and/or sizes. PS: why not defining M(i) = M.field#i ? Do you mean the ith field? Why not. But mlists are designed to be array-oriented, as cells and structures are: >From help mlist: " mlist object is very similar to tlist object. The only difference concerns the extraction and insertion syntax: if M is an mlist, for any index i which is not a field name, M(i) is no more the i-th field of the list." If you wish (i) selecting a field, how will you select a component of the M array? I mean, using i to select a field puts two way for the same purpose (selecting a field, either by its name, or by its index), and removes a way to select a component from the array. What you wish looks like a simple tlist, with index just shifted by one to ignore the identification vector: -->t = tlist(["test" "r" "b" "p"], %pi, %f, %z) t = t(1) !test r b p ! t(2) 3.1415927 t(3) F t(4) z -->t(3) ans = F -->t.b ans = F Samuel On Tue, Jul 14, 2015 at 3:22 AM -0700, "Samuel Gougeon" wrote: Le 13/07/2015 23:53, Rafael Guera a ?crit : > > Samuel, > > Thanks for the detailed explanation. > > Not sure of what M(i) should mean in a situation where the matrices > have different sizes: > > data1=ones(10,4); > > data2=zeros(5,3); > > M=mlist(['V','field1','field2']); > > M.field1=data1; > > M.field2=data2; > > or when the mlist fields are N-dimensional with different dimensions > and/or sizes. > > PS: > > why not defining M(i) = M.field#i ? > Do you mean the ith field? Why not. But mlists are designed to be array-oriented, as cells and structures are: From help mlist: " mlist object is very similar to tlist object. The only difference concerns the extraction and insertion syntax: if M is an mlist, for any index i which is not a field name, M(i) is no more the i-th field of the list." If you wish (i) selecting a field, how will you select a component of the M array? I mean, using i to select a field puts two way for the same purpose (selecting a field, either by its name, or by its index), and removes a way to select a component from the array. What you wish looks like a simple tlist, with index just shifted by one to ignore the identification vector: -->t = tlist(["test" "r" "b" "p"], %pi, %f, %z) t = t(1) !test r b p ! t(2) 3.1415927 t(3) F t(4) z -->t(3) ans = F -->t.b ans = F Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From acj119 at nifty.com Thu Jul 16 04:53:54 2015 From: acj119 at nifty.com (jaipur) Date: Wed, 15 Jul 2015 19:53:54 -0700 (MST) Subject: [Scilab-users] Collecting zero points of x, y, z-axes to one point Message-ID: <1437015234851-4032585.post@n3.nabble.com> I'm creating a picture of a vector to demonstrate vector rotation for study. I have made the picture below by the following code. I'd like to make 3D picture in which zero points of x, y, z-axes are always fixed to one point indicated as red circle (the origin of axes), while rotating a picture by mouse's right button down and moving. How shall I do it? xarrows([0 1],[0 1],[0 1]); h1=gca(); h1.axes_visible='on'; h1.grid=[1 1 1]; h1.box='on'; h1.x_location='origin'; h1.y_location='origin'; xlabel('X'); ylabel('Y'); zlabel('Z'); There is not 'z_location' in axes properties. Is that influence this problem? -- View this message in context: http://mailinglists.scilab.org/Collecting-zero-points-of-x-y-z-axes-to-one-point-tp4032585.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From acj119 at nifty.com Thu Jul 16 04:55:30 2015 From: acj119 at nifty.com (jaipur) Date: Wed, 15 Jul 2015 19:55:30 -0700 (MST) Subject: [Scilab-users] Collecting zero points of x, y, z-axes to one point In-Reply-To: <1437015234851-4032585.post@n3.nabble.com> References: <1437015234851-4032585.post@n3.nabble.com> Message-ID: <1437015330932-4032586.post@n3.nabble.com> Sorry. I send a bigger picture. -- View this message in context: http://mailinglists.scilab.org/Collecting-zero-points-of-x-y-z-axes-to-one-point-tp4032585p4032586.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Thu Jul 16 14:42:24 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 16 Jul 2015 14:42:24 +0200 Subject: [Scilab-users] Collecting zero points of x, y, z-axes to one point In-Reply-To: <1437015234851-4032585.post@n3.nabble.com> References: <1437015234851-4032585.post@n3.nabble.com> Message-ID: <55A7A6B0.1090209@free.fr> Le 16/07/2015 04:53, jaipur a ?crit : > I'm creating a picture of a vector to demonstrate vector rotation for study. > > I have made the picture below by the following code. > I'd like to make 3D picture in which zero points of x, y, z-axes are always > fixed to one point indicated as red circle (the origin of axes), while > rotating a picture by mouse's right button down and moving. > How shall I do it? > > xarrows([0 1],[0 1],[0 1]); > h1=gca(); > h1.axes_visible='on'; > h1.grid=[1 1 1]; > h1.box='on'; > h1.x_location='origin'; > h1.y_location='origin'; > xlabel('X'); ylabel('Y'); zlabel('Z'); > > There is not 'z_location' in axes properties. Is that influence this > problem? . Yes, there are actually 2 issues here: 1) indeed, a .z_location is missing. Here (Z) goes through (1,1,.) and there is no way to force it passing through (0,0,.) 2) .x_location='origin' forces (X) to pass through (.,0,.) instead of (., 0, 0), i.e.: it should pass through z=0, not only through y=0. Same thing for .y_location="origin", that should pass through (0,.,0) instead of (0,.,.) This bug and missing features are not yet reported in Bugzilla. However, Adrien made a nice proposal http://bugzilla.scilab.org/13433 in order to generalize the "origin" possibility: /"i wish the option y_location = "origin" is replaced for one that gives the opportunity to place the y_axes at an arbitrate coordinate on the x (and z) axis//"/ I would definitively vote for this replacement. Unfortunately, neither centering data_bounds, nor wondering about drawaxis() (not supporting 3D), nor using "axis origin" from the pltlib ATOMS, are able to answer to your need that is -- yet -- a quite simple situation... Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Fri Jul 17 04:25:01 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Thu, 16 Jul 2015 19:25:01 -0700 (MST) Subject: [Scilab-users] Saving all variables Message-ID: <1437099901394-4032590.post@n3.nabble.com> I want to save all variables in oreder to re-use them. I use 'save(filename)' and 'load(filename)'. But if I use the user defined function, ?scilab5.52 can save them but fail to load the file on accoutn of the existence of a user-defined-function name, ?scilab6 can load it but fail to save on accoutn of the existence of a user-defined-function name with the error message 'Undefined variable: macr2lst at line 14 of function fun2string ( C:\PROGRA~1\SCILAB~1\modules\functions\macros\fun2string.sci line 24 ) at line 2 of function extractMacro at line 1055 of function %_save ( C:\PROGRA~1\SCILAB~1\modules\io\macros\%_save.sci line 1067 ) in builtin save ' Now I must save them by Scilab 5.52 and load it by Scilab 6. are there any ways to avoid this situation? -- View this message in context: http://mailinglists.scilab.org/Saving-all-variables-tp4032590.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Fri Jul 17 10:55:09 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 17 Jul 2015 10:55:09 +0200 Subject: [Scilab-users] Saving all variables In-Reply-To: <1437099901394-4032590.post@n3.nabble.com> References: <1437099901394-4032590.post@n3.nabble.com> Message-ID: <55A8C2ED.90808@free.fr> Hello, Le 17/07/2015 04:25, fujimoto2005 a ?crit : > I want to save all variables in oreder to re-use them. > I use 'save(filename)' and 'load(filename)'. > But if I use the user defined function, > ?scilab5.52 can save them but fail to load the file on accoutn of the > existence of a user-defined-function name, > ?scilab6 can load it but fail to save on accoutn of the existence of a > user-defined-function name with the error message > 'Undefined variable: macr2lst > > at line 14 of function fun2string ( > C:\PROGRA~1\SCILAB~1\modules\functions\macros\fun2string.sci line 24 ) > at line 2 of function extractMacro > at line 1055 of function %_save ( > C:\PROGRA~1\SCILAB~1\modules\io\macros\%_save.sci line 1067 ) > in builtin save ' > > Now I must save them by Scilab 5.52 and load it by Scilab 6. > are there any ways to avoid this situation? No stable nor alpha nor beta of Scilab 6 have been released yet. The pre-alpha is very active and you might have a frequent look at the Scilab codereview page. There were some recent works about fun2string (removed), macr2lst, macr2tree, etc. You should try with the nightly built YaSp. Regards From fujimoto2005 at gmail.com Fri Jul 17 16:18:25 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Fri, 17 Jul 2015 07:18:25 -0700 (MST) Subject: [Scilab-users] Saving all variables In-Reply-To: <55A8C2ED.90808@free.fr> References: <1437099901394-4032590.post@n3.nabble.com> <55A8C2ED.90808@free.fr> Message-ID: <1437142705465-4032592.post@n3.nabble.com> Hi, Samuel Thanks a lot for reply. I installed the latest build of Scilab 6. The latest build does't accept command save('filename') with the error message as follows 'save: Wrong number of input argument(s): at least 2 expected.' Are there any way to write the second input as all vaiables in Scilab 6 ? Best regards -- View this message in context: http://mailinglists.scilab.org/Saving-all-variables-tp4032590p4032592.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From antoine.elias at scilab-enterprises.com Fri Jul 17 16:54:03 2015 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Fri, 17 Jul 2015 16:54:03 +0200 Subject: [Scilab-users] Saving all variables In-Reply-To: <1437142705465-4032592.post@n3.nabble.com> References: <1437099901394-4032590.post@n3.nabble.com> <55A8C2ED.90808@free.fr> <1437142705465-4032592.post@n3.nabble.com> Message-ID: <55A9170B.8070605@scilab-enterprises.com> Hi, Last weeks, we worked on save/load functions. But I missed the save 'all' case. I just pushed a fix about that. But there is some validation steps before it arrive in a nightly build. Be patient ;) Antoine have a nice week end. Le 17/07/2015 16:18, fujimoto2005 a ?crit : > Hi, Samuel > > Thanks a lot for reply. > > I installed the latest build of Scilab 6. > The latest build does't accept command save('filename') with the error > message as follows > 'save: Wrong number of input argument(s): at least 2 expected.' > Are there any way to write the second input as all vaiables in Scilab 6 ? > > Best regards > > > > > -- > View this message in context: http://mailinglists.scilab.org/Saving-all-variables-tp4032590p4032592.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Antoine ELIAS Software developer ----------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles Phone: 01.80.77.04.70 http://www.scilab-enterprises.com From sgougeon at free.fr Fri Jul 17 17:03:55 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 17 Jul 2015 17:03:55 +0200 Subject: [Scilab-users] Saving all variables In-Reply-To: <55A9170B.8070605@scilab-enterprises.com> References: <1437099901394-4032590.post@n3.nabble.com> <55A8C2ED.90808@free.fr> <1437142705465-4032592.post@n3.nabble.com> <55A9170B.8070605@scilab-enterprises.com> Message-ID: <55A9195B.6090507@free.fr> Le 17/07/2015 16:54, Antoine ELIAS a ?crit : > Hi, > > Last weeks, we worked on save/load functions. > But I missed the save 'all' case. Actually, this case is missing in the list of documented calling sequences. It is just given in the description part of the doc, with a poor visibility. The doc could also be fixed. Cheers Samuel From sgougeon at free.fr Fri Jul 17 17:07:42 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 17 Jul 2015 17:07:42 +0200 Subject: [Scilab-users] Saving all variables In-Reply-To: <55A9195B.6090507@free.fr> References: <1437099901394-4032590.post@n3.nabble.com> <55A8C2ED.90808@free.fr> <1437142705465-4032592.post@n3.nabble.com> <55A9170B.8070605@scilab-enterprises.com> <55A9195B.6090507@free.fr> Message-ID: <55A91A3E.7010100@free.fr> Le 17/07/2015 17:03, Samuel Gougeon a ?crit : > Le 17/07/2015 16:54, Antoine ELIAS a ?crit : >> Hi, >> >> Last weeks, we worked on save/load functions. >> But I missed the save 'all' case. > Actually, this case is missing in the list of documented calling > sequences. It is just given in the description part of the doc, with a > poor visibility. The doc could also be fixed. I meant: save(filename [,x1,x2,...,xn]) could be split in two lines: save filename save(filename ,x1,x2,...,xn) The "fd" case will disappear. From fujimoto2005 at gmail.com Fri Jul 17 23:35:16 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Fri, 17 Jul 2015 14:35:16 -0700 (MST) Subject: [Scilab-users] Saving all variables In-Reply-To: <55A9170B.8070605@scilab-enterprises.com> References: <1437099901394-4032590.post@n3.nabble.com> <55A8C2ED.90808@free.fr> <1437142705465-4032592.post@n3.nabble.com> <55A9170B.8070605@scilab-enterprises.com> Message-ID: <1437168916097-4032596.post@n3.nabble.com> Hi,Samuel and Antoine Thanks for replies. I'm looking forward a new build. Best regards. -- View this message in context: http://mailinglists.scilab.org/Saving-all-variables-tp4032590p4032596.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From acj119 at nifty.com Sun Jul 19 14:04:53 2015 From: acj119 at nifty.com (jaipur) Date: Sun, 19 Jul 2015 05:04:53 -0700 (MST) Subject: [Scilab-users] Collecting zero points of x, y, z-axes to one point In-Reply-To: <55A7A6B0.1090209@free.fr> References: <1437015234851-4032585.post@n3.nabble.com> <55A7A6B0.1090209@free.fr> Message-ID: <1437307493515-4032597.post@n3.nabble.com> Thank you. I understand the present situation. -- View this message in context: http://mailinglists.scilab.org/Collecting-zero-points-of-x-y-z-axes-to-one-point-tp4032585p4032597.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From siddheshwani.iitb at gmail.com Fri Jul 24 11:16:28 2015 From: siddheshwani.iitb at gmail.com (Siddhesh) Date: Fri, 24 Jul 2015 02:16:28 -0700 (MST) Subject: [Scilab-users] Developement of scilab extension 'Scilab2C' to add support for scilab functions Message-ID: <1437729388572-4032612.post@n3.nabble.com> Dear all, I am trying to add support for some commonly used scilab functions in ' Scilab2C ' extension. This extension is useful for converting scilab code to C code. But support for scilab functions is very limited. It mainly supports those functions which are available in c compiler like trignometric functions, log etc. I want to extend support for other scilab functions like cumprod, cumsum etc which are not available in c. My question is - to add support for these functions, writing these functions in c is the only way, or is there any other way like compiling scilab fuctions in certain format or library, which can be directly called from c and easily compiled together with c code. Waiting for early reply. -- View this message in context: http://mailinglists.scilab.org/Developement-of-scilab-extension-Scilab2C-to-add-support-for-scilab-functions-tp4032612.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From fujimoto2005 at gmail.com Sat Jul 25 05:42:01 2015 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Fri, 24 Jul 2015 20:42:01 -0700 (MST) Subject: [Scilab-users] Saving all variables In-Reply-To: <55A9170B.8070605@scilab-enterprises.com> References: <1437099901394-4032590.post@n3.nabble.com> <55A8C2ED.90808@free.fr> <1437142705465-4032592.post@n3.nabble.com> <55A9170B.8070605@scilab-enterprises.com> Message-ID: <1437795721364-4032615.post@n3.nabble.com> I found the new build of "Jul 23, 2015 15:54". Is this build that fix saving all variable problem? -- View this message in context: http://mailinglists.scilab.org/Saving-all-variables-tp4032590p4032615.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Jul 25 11:44:25 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 25 Jul 2015 11:44:25 +0200 Subject: [Scilab-users] Saving all variables In-Reply-To: <1437795721364-4032615.post@n3.nabble.com> References: <1437099901394-4032590.post@n3.nabble.com> <55A8C2ED.90808@free.fr> <1437142705465-4032592.post@n3.nabble.com> <55A9170B.8070605@scilab-enterprises.com> <1437795721364-4032615.post@n3.nabble.com> Message-ID: <55B35A79.9080502@free.fr> Le 25/07/2015 05:42, fujimoto2005 a ?crit : > I found the new build of "Jul 23, 2015 15:54". > Is this build that fix saving all variable problem? Yes, it has been reviewed and merged on 2015-07-21: https://codereview.scilab.org/16857 From jrafaelbguerra at hotmail.com Mon Jul 27 18:28:50 2015 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 27 Jul 2015 18:28:50 +0200 Subject: [Scilab-users] Scilab slowing down computer heavilly In-Reply-To: References: <1432134976222-4032312.post@n3.nabble.com> <1bd1-555ca900-3-5a9a2e00@144309838>, Message-ID: In case this may help someone, one thing that I have just tested and fixed on the spot my issue of "PC heavilly slowed down" by Scilab was to do: Scilab 5.5.2 menu > Edit > Preferences > Desktop Layout > Selected "Simple" Layout (it was set as "Integrated" before), while keeping the box "Save layout on exit" checked > restarted Scilab and voila. Thanks and regards, Rafael From: jrafaelbguerra at hotmail.com To: users at lists.scilab.org Subject: Re: [Scilab-users] Scilab slowing down computer heavilly Date: Thu, 21 May 2015 18:45:20 +0100 Hi Antoine, Thanks for your reply and I am sorry but I provided misleading information. I have launched Scilab with no other programs running except Outlook, and laptop performance was good. There should be interference with some other program that I need to identify (may be VMWare or other heavy duty program) My Display Adapters are: - Intel HD Graphics 4600 - NVIDIA Quadro K4100M - VNC Mirror Driver There are so many variables ... If I found something in a systematic/reproducible way I will bother you again. My apologies and thanks. Rafael Date: Thu, 21 May 2015 00:02:20 -0700 From: [hidden email] To: [hidden email] Subject: Re: Scilab slowing down computer heavilly Hi Rafael, Did you try to dock your laptop, without plugging the screens? Is the problem still there? It might be some graphic driver issues. Is your laptop equipped with an hybrid graphic card (ie integrated small one for the main screen and a discrete one for the external screens)? Could you give us the exact model to see whether one of us can reproduce the issue? Cheers, Antoine Le Mercredi 20 Mai 2015 17:16 CEST, Rafael Guerra <[hidden email]> a ?crit: > Hello Scilab'ers, > > When I ran Scilab in the following configuration my laptop slows down > extremely: > - Win 7, 32 GB RAM laptop, intel 3.2 GHz processor, Dell laptop and docking > station, 2 extra-large screens > > Need to restart computer to get performance back. > > Without using the docking station there is no issue. > > Does anyone experience similar problems and found a fix? > > Thanks and regards, > > Rafael > > > > > -- > View this message in context: http://mailinglists.scilab.org/Scilab-slowing-down-computer-heavilly-tp4032312.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users If you reply to this email, your message will be added to the discussion below: http://mailinglists.scilab.org/Scilab-slowing-down-computer-heavilly-tp4032312p4032313.html To unsubscribe from Scilab slowing down computer heavilly, click here. NAML View this message in context: RE: Scilab slowing down computer heavilly Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From yann.debray at scilab-enterprises.com Thu Jul 30 16:09:52 2015 From: yann.debray at scilab-enterprises.com (Scilab communications) Date: Thu, 30 Jul 2015 16:09:52 +0200 Subject: [Scilab-users] Scilab 6.0.0-alpha-1 Release In-Reply-To: <551BAD43.6030205@scilab-enterprises.com> References: <551BAD43.6030205@scilab-enterprises.com> Message-ID: <55BA3030.1060408@scilab-enterprises.com> Dear Scilab users, Scilab team is happy to announce the release of the first alpha version of Scilab 6.0. Scilab 6.0.0 will be a major new release of Scilab, the open source platform for numerical computation. This 6.0.0-alpha-1 release, is a preview for *developers*, *partners *and *community evaluation*. As an alpha, this release is not yet ready for production usage. If you are new to Scilab, or if you are simply a user of Scilab, you should probably continue using the 5.5.2 release, and wait for a beta version before trying the 6 family. However, if you have already developed code on Scilab, or if you are an experienced user, then you should start looking at this release. Please try the work you have done on earlier releases of Scilab with this version: checking for compatibility may save you time later. If you find bugs or incompatibilities, please report them on our Bug Tracker: this will help get a better product, faster, which ultimately will be benefit you too. Sincerely yours -- Communication Department, Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles (France) http://www.scilab-enterprises.com - http://www.scilab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo_f_7 at hotmail.com Fri Jul 31 01:30:28 2015 From: pablo_f_7 at hotmail.com (PabloF) Date: Thu, 30 Jul 2015 16:30:28 -0700 (MST) Subject: [Scilab-users] Reading Gerber files and exporting g-code for cnc Message-ID: <1438299028448-4032628.post@n3.nabble.com> Hi: I want to read a gerber file with scilab, process it and export a gcode file for using with a custom cnc we build in our university, for manufacturing PCB's with isolation method.. But i'm looking for advice. By now, i've meade a script to read each line from a gerber file, and i use select-case to parse them... i can handle basic appertures (circles and rectangles) and do linnear interpolations by the momment.. The main idea is to draw a binary image with the information of the gerber file and then do some image processing to get the edges of the image (with a sobel's filter or something). The gerber specifications states that for tracks, i need to stroke or paint the arc or line with the selected apperture.. so i made a function that "paints" the shape of the apperture with center in a given coordinate of a matrix. For stroking a line for example, i should call this function for each coordinate of the interpolated line... I've done this but the process is too slow... Is there any simpler aproach? Then, once i have the edges of the image, i don't know how to select the coonvinient coordinates of the detected edges so that i can export a g-code with them... for example, if i have to do a circle, i should give many points of the circle and form lots of tiny lines as an approximation, but if i have to do a line, i should only use 2 points.. I think this points can be detected with a corner filter, and then i should reorder them... any ideas of this? I want to do the circles with little lines so i get a simpler g-code for our custom cnc Any ideas would be welcome! thanks -- View this message in context: http://mailinglists.scilab.org/Reading-Gerber-files-and-exporting-g-code-for-cnc-tp4032628.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From tim at wescottdesign.com Fri Jul 31 04:13:38 2015 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 30 Jul 2015 19:13:38 -0700 Subject: [Scilab-users] Reading Gerber files and exporting g-code for cnc In-Reply-To: <1438299028448-4032628.post@n3.nabble.com> References: <1438299028448-4032628.post@n3.nabble.com> Message-ID: <1438308818.2716.51.camel@Servo> On Thu, 2015-07-30 at 16:30 -0700, PabloF wrote: > Hi: > I want to read a gerber file with scilab, process it and export a gcode file > for using with a custom cnc we build in our university, for manufacturing > PCB's with isolation method.. But i'm looking for advice. > > By now, i've meade a script to read each line from a gerber file, and i use > select-case to parse them... i can handle basic appertures (circles and > rectangles) and do linnear interpolations by the momment.. > The main idea is to draw a binary image with the information of the gerber > file and then do some image processing to get the edges of the image (with a > sobel's filter or something). > > The gerber specifications states that for tracks, i need to stroke or paint > the arc or line with the selected apperture.. so i made a function that > "paints" the shape of the apperture with center in a given coordinate of a > matrix. For stroking a line for example, i should call this function for > each coordinate of the interpolated line... I've done this but the process > is too slow... Is there any simpler aproach? > > Then, once i have the edges of the image, i don't know how to select the > coonvinient coordinates of the detected edges so that i can export a g-code > with them... for example, if i have to do a circle, i should give many > points of the circle and form lots of tiny lines as an approximation, but if > i have to do a line, i should only use 2 points.. I think this points can be > detected with a corner filter, and then i should reorder them... any ideas > of this? I want to do the circles with little lines so i get a simpler > g-code for our custom cnc > > Any ideas would be welcome! thanks Before I did anything else, I'd look around to see if there were a board aggregator in my economic zone from whom I could buy boards. In the US there's OshPark who'll sell you three N-square inch boards for N*$5, and there's a number of shops in China that do this, possibly for less. If I were bound and determined to route out boards, rather than trying to make an image and then do image processing on that, I'd make an algorithm that can tell if your router bit is in some copper, in the clear, or on the boundary of some copper. Then I'd either make it follow that boundary (without, of course, cutting into any other bits of copper), or I'd just scan the bit across the board, only cutting when I'm free of copper. The first way will be prettier, the second way will be easier. Finally, in spite of the fact that this is a Scilab group -- don't do it in Scilab. Scilab is great for things that use it's built-in matrix handling capabilities, but when you step outside of that you'll be much better off programming in C or some such. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From jrafaelbguerra at hotmail.com Fri Jul 31 10:28:25 2015 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 31 Jul 2015 10:28:25 +0200 Subject: [Scilab-users] Scilab 6.0.0 alpha1: Carriage return's ascii code <> 32 In-Reply-To: <1438308818.2716.51.camel@Servo> References: <1438299028448-4032628.post@n3.nabble.com>, <1438308818.2716.51.camel@Servo> Message-ID: Dear Scilabers, I have filled a bug report Bug# 14020, to indicate different behavior compared to previous version: // In Scilab 6.0.0 alpha1, carriage return's ascii code is not defined: str=input("(Hit Enter):",'string'); ascii(str) ans = (empty) // While in Scilab 5.2.2, carriage return return in input returned space with ascii code (32): str=input("(Hit Enter):",'string'); ascii(str) ans = 32. (If I am not mistaken, the ascii code of Carriage Return is 13) How should we write code to detect carriage return in Scilab 6.0? Shall we use from now on: isempty(str)? Thanks and regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From guylaine.collewet at irstea.fr Fri Jul 31 11:46:09 2015 From: guylaine.collewet at irstea.fr (Collewet Guylaine) Date: Fri, 31 Jul 2015 11:46:09 +0200 (CEST) Subject: [Scilab-users] (no subject) Message-ID: <002601d0cb75$ba412cb0$2ec38610$@irstea.fr> Hello, I want to use together two atoms modules that have some functions with the same names. Is there a way to indicate the name of the module I want to use when I call one function ? Thank you Guylaine Collewet -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 31 14:13:12 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jul 2015 14:13:12 +0200 Subject: [Scilab-users] Resolving libraries <= (no subject) In-Reply-To: <002601d0cb75$ba412cb0$2ec38610$@irstea.fr> References: <002601d0cb75$ba412cb0$2ec38610$@irstea.fr> Message-ID: <55BB6658.8050500@free.fr> Hello Guylaine, Le 31/07/2015 11:46, Collewet Guylaine a ?crit : > > Hello, > > I want to use together two atoms modules that have some functions with > the same names. > > Is there a way to indicate the name of the module I want to use when I > call one function ? > If both functions -- say fun() -- are functions written in Scilab language -- i mean none of them is a built-in function --, then in dictinct ATOMS modules they should belong to two distinct libraries, say atoms1_lib and atoms2_lib. As far as i remember, the default foo() that will be called by foo() is the one belonging to the library that has been the most recently loaded. Anyway, to force using a instanciation rather than the other, you can use either atoms1_lib.foo() or atoms2_lib.foo() syntax. This forces Scilab to use the specified library. In case of conflict between a built-in and a function (aka "macro") : if you define a macro with the name of a previously loaded built-in, the macro crushes the built-in. I do not know whether it is possible to still call the built-in as is. But you can clone it before overwritting its first name -- say atoms1_foo = foo (*), and then use atoms1_foo() when required -- before crushing it with the forthcoming foo(). Humm, "you can" do that in an absolute way ; but if both ATOMS modules are autoloaded, you cannot introduce such a cloning instruction in the autoloading stack. In such a case, you may cancel autoloading for both modules, and add loading and cloning instructions in the your personal startup file. HTH Samuel (*) this way of doing becomes the only one possible in Scilab 6, because newfun() and funptr() are being removed from SCilab 6. But i met some cases for which this kind of cloning failed, while it was OK when cloning with newfun("atoms1_foo", funptr("foo")). I did not clearly caught from where and when it occurred -- may be when foo is used recursively.. --, but after some investigations i found that (still in scilab 5.5.2): // after -->funptr("disp") ans = 33004. -->d = disp d = -->funptr("d") ans = 0. -->clear d -->newfun("d", funptr("disp")) -->funptr("d") ans = 33004. It is somewhat reported there: http://bugzilla.scilab.org/12965 About effects of cloning built-in:=, see also http://bugzilla.scilab.org/8281 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 31 14:33:02 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jul 2015 14:33:02 +0200 Subject: [Scilab-users] Scilab 6.0.0 alpha1: Carriage return's ascii code <> 32 In-Reply-To: References: <1438299028448-4032628.post@n3.nabble.com>, <1438308818.2716.51.camel@Servo> Message-ID: <55BB6AFE.2090407@free.fr> Hi Rafael, Le 31/07/2015 10:28, Rafael Guerra a ?crit : > Dear Scilabers, > > I have filled a bug report Bug# 14020, to indicate different behavior > compared to previous version: > > // In Scilab 6.0.0 alpha1, carriage return's ascii code is not defined: > str=input("(Hit Enter):",'string'); > ascii(str) > ans = (empty) > > // While in Scilab 5.2.2, carriage return return in input returned space with ascii code (32): > str=input("(Hit Enter):",'string'); > ascii(str) > ans = 32. You are right. It was an unreported bug. str should ahve been "" instead of " ": -->str=="" ans = F -->str==" " ans = T In Scilab 6, you are right as well: this bug has been fixed, but 2 others appear. imo, * in string mode, should return str=="" with ascii(str)==[] * in numerical mode, should return str==[]. It was the case with Scilab<6. Now: --> str=input("(Hit Enter):"); (Hit Enter): --> ascii([]) ans = The bug report may be completed. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 31 14:44:05 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jul 2015 14:44:05 +0200 Subject: [Scilab-users] Resolving libraries <= (no subject) In-Reply-To: <55BB6658.8050500@free.fr> References: <002601d0cb75$ba412cb0$2ec38610$@irstea.fr> <55BB6658.8050500@free.fr> Message-ID: <55BB6D95.9080804@free.fr> Le 31/07/2015 14:13, Samuel Gougeon a ?crit : > (*) this way of doing becomes the only one possible in Scilab 6, > because newfun() and funptr() are being > removed from SCilab 6. But i met some cases for which this kind of > cloning failed, I meant: using myclone1(..) after cloning with myclone1 = the_builtin failed in some cases, while using myclone2(..) after cloning with newfun("myclone2", funptr("the_builtin")) always worked. Then i saw that the id of both clones were not the same, while making several clones with newfun() always ascribed the same id to all of them. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From guylaine.collewet at irstea.fr Fri Jul 31 14:40:14 2015 From: guylaine.collewet at irstea.fr (Collewet Guylaine) Date: Fri, 31 Jul 2015 14:40:14 +0200 (CEST) Subject: [Scilab-users] Resolving libraries <= (no subject) In-Reply-To: <55BB6658.8050500@free.fr> References: <002601d0cb75$ba412cb0$2ec38610$@irstea.fr> <55BB6658.8050500@free.fr> Message-ID: <006301d0cb8e$0ba1ebe0$22e5c3a0$@irstea.fr> Thank you for your answer I am in the first case I guess (in fact the two librairies are one atoms module and one home-made scilab contribution) When I try to call atoms1_lib.foo() I get the error message (sorry it is in French on my computer) : L'extraction r?cursive n'est pas valide dans ce contexte. Guylaine De : users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon Envoy? : vendredi 31 juillet 2015 14:13 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] Resolving libraries <= (no subject) Hello Guylaine, Le 31/07/2015 11:46, Collewet Guylaine a ?crit : Hello, I want to use together two atoms modules that have some functions with the same names. Is there a way to indicate the name of the module I want to use when I call one function ? If both functions -- say fun() -- are functions written in Scilab language -- i mean none of them is a built-in function --, then in dictinct ATOMS modules they should belong to two distinct libraries, say atoms1_lib and atoms2_lib. As far as i remember, the default foo() that will be called by foo() is the one belonging to the library that has been the most recently loaded. Anyway, to force using a instanciation rather than the other, you can use either atoms1_lib.foo() or atoms2_lib.foo() syntax. This forces Scilab to use the specified library. In case of conflict between a built-in and a function (aka "macro") : if you define a macro with the name of a previously loaded built-in, the macro crushes the built-in. I do not know whether it is possible to still call the built-in as is. But you can clone it before overwritting its first name -- say atoms1_foo = foo (*), and then use atoms1_foo() when required -- before crushing it with the forthcoming foo(). Humm, "you can" do that in an absolute way ; but if both ATOMS modules are autoloaded, you cannot introduce such a cloning instruction in the autoloading stack. In such a case, you may cancel autoloading for both modules, and add loading and cloning instructions in the your personal startup file. HTH Samuel (*) this way of doing becomes the only one possible in Scilab 6, because newfun() and funptr() are being removed from SCilab 6. But i met some cases for which this kind of cloning failed, while it was OK when cloning with newfun("atoms1_foo", funptr("foo")). I did not clearly caught from where and when it occurred -- may be when foo is used recursively.. --, but after some investigations i found that (still in scilab 5.5.2): // after -->funptr("disp") ans = 33004. -->d = disp d = -->funptr("d") ans = 0. -->clear d -->newfun("d", funptr("disp")) -->funptr("d") ans = 33004. It is somewhat reported there: http://bugzilla.scilab.org/12965 About effects of cloning built-in:=, see also http://bugzilla.scilab.org/8281 -------------- next part -------------- An HTML attachment was scrubbed... URL: From harpreet.mertia at gmail.com Fri Jul 31 15:16:32 2015 From: harpreet.mertia at gmail.com (Harpreet Singh Rathore) Date: Fri, 31 Jul 2015 18:46:32 +0530 Subject: [Scilab-users] Repository in scilab Message-ID: Dear Scilabers I have been trying to download a module from atoms in Scilab 6 alpha but I think in that they have updated the repository i.e. https://atoms.scilab.org/6.0 which is actually not there on the website. I think it is kind of bug. -- Thanks and Regards Harpreet Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 31 15:22:47 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jul 2015 15:22:47 +0200 Subject: [Scilab-users] Resolving libraries <= (no subject) In-Reply-To: <006301d0cb8e$0ba1ebe0$22e5c3a0$@irstea.fr> References: <002601d0cb75$ba412cb0$2ec38610$@irstea.fr> <55BB6658.8050500@free.fr> <006301d0cb8e$0ba1ebe0$22e5c3a0$@irstea.fr> Message-ID: <55BB76A7.70401@free.fr> Le 31/07/2015 14:40, Collewet Guylaine a ?crit : > > Thank you for your answer > > I am in the first case I guess (in fact the two librairies are one > atoms module and one home-made scilab contribution) > > When I try to call atoms1_lib.foo() I get the error message (sorry it > is in French on my computer): L'extraction r?cursive n'est pas valide > dans ce contexte. > Actually, after testing with a*locally defined function*, i get as well some issues (not this one, others). Let's try with linspace() that is a Scilab macro defined in elementary_functionslib: // Scilab 5.5.2, without never previously run linspace() -->function linspace(a,b,c) --> disp("this is my linspace()") -->endfunction Warning : redefining function: linspace . Use funcprot(0) to avoid this message -->linspace() this is my linspace() // OK -->linspace(0,1,5) this is my linspace() // OK -->elementary_functionslib.linspace(0,1,5) !--error 10000 linspace: Wrong number of input argument(s): 2 expected. at line 9 of function linspace called by : // KO: This syntax is accepted by Scilab's linspace. It should work here. = Scilab 5' bug // If such a bug occurs for Scilab macros, it will likely occur also for ATOMS ones. // Not really encouraging... -->linspace(0,1,5) ans = 0. 0.25 0.5 0.75 1. // Note : the previous call loaded the elementary_functionslib definition. It became and stands // the current one. Since our locally redefined linspace() does not belong to a library, it no // longer can be called... Results of this tests are the same with Scilab 6-alpha1. You may try building a library with your home-made local function. An example of HowTo is given there, using genlib() and lib() : http://fileexchange.scilab.org/toolboxes/365000/1.0#files Then, you could use library-resolved calls. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 31 15:46:54 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jul 2015 15:46:54 +0200 Subject: [Scilab-users] Resolving libraries <= (no subject) In-Reply-To: <55BB76A7.70401@free.fr> References: <002601d0cb75$ba412cb0$2ec38610$@irstea.fr> <55BB6658.8050500@free.fr> <006301d0cb8e$0ba1ebe0$22e5c3a0$@irstea.fr> <55BB76A7.70401@free.fr> Message-ID: <55BB7C4E.5000201@free.fr> Le 31/07/2015 15:22, Samuel Gougeon a ?crit : > -->elementary_functionslib.linspace(0,1,5) > !--error 10000 > linspace: Wrong number of input argument(s): 2 expected. > at line 9 of function linspace called by : > // KO: This syntax is accepted by Scilab's linspace. It should work > here. = Scilab 5' bug > // If such a bug occurs for Scilab macros, it will likely occur also > for ATOMS ones. > // Not really encouraging... > > .../... > > You may try building a library with your home-made local function. > An example of HowTo is given there, using genlib() and lib() : > http://fileexchange.scilab.org/toolboxes/365000/1.0#files > > Then, you could use library-resolved calls. After checking with a home-made function set as member of a proper library: * Same bug with Scilab 5. BUT * *Scilab 6 is OK ! :))***: --> genlib("mylinspacelib",".",%t) ans = T --> mylinspacelib = lib(".") mylinspacelib = Functions files location : .. // here, "." should be displayed instead of "..". Never mind... linspace --> linspace() This is my linspace --> elementary_functionslib.linspace(0,1,5) ans = 0. 0.25 0.5 0.75 1. --> mylinspacelib.linspace() This is my linspace :) There are a lot of bugs like this one, reported or not, that are fixed in Scilab 6. Really a pleasure! Even better when it will be with all its components and polished. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascal.buehler at ch.sauter-bc.com Fri Jul 31 16:00:07 2015 From: pascal.buehler at ch.sauter-bc.com (Pascal Buehler) Date: Fri, 31 Jul 2015 16:00:07 +0200 Subject: [Scilab-users] Spider Chart Message-ID: Is there any way to make a spiderweb chart for Scilab 6? with best regards / mit freundlichen Gr?ssen / cordialement Pascal B?hler Qualit?t-Hardware / Pr?fingenieur SAUTER HeadOffice Fr. Sauter AG Im Surinam 55, CH-4016 Basel Telefon +41 (0)61 695 5646 Telefax +41 (0)61 695 5619 http://www.sauter-controls.com DISCLAIMER: This communication, and the information it contains is for the sole use of the intended recipient. It is confidential, may be legally privileged and protected by law. Unauthorized use, copying or disclosure of any part thereof may be unlawful. If you have received this communication in error, please destroy all copies and kindly notify the sender. Before printing out this e-mail or its attachments, please consider whether it is really necessary to do so. Using less paper helps the environment. -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.strelkov at gmail.com Fri Jul 31 17:16:08 2015 From: n.strelkov at gmail.com (Nikolay Strelkov) Date: Fri, 31 Jul 2015 18:16:08 +0300 Subject: [Scilab-users] Strange behaviour of char(?) function in scilab-6.0.0-alpha-1 Message-ID: Dear Scilab community and developers! In my project I have the following code (simplified for clarity): vals = [cellstr('aaa'),cellstr('bbb'),cellstr('ccc'),cellstr('ddd')]; for n = 1:size(vals,"*") val = char(vals(n)); printf("\n%s",val); if val == "aaa" then disp('got aaa'); end end; It works as expected in Scilab 5.2.2, 5.3.0, 5.3.2, 5.3.3, 5.4.0, 5.4.1, 5.5.0, 5.5.1, 5.5.2 and in ScicosLab 4.4.1. But it does not work in Scilab 6.0.0-alpha1. Here I get error: exec('/tmp/cell_problem.sci', -1) char: Wrong type for input argument: Cell expected. at line 95 of function char ( /home/norbert/Downloads/scilab-6.0.0-alpha-1/share/scilab/modules/compatibility_functions/macros/char.sci line 104 ) at line 5 of executed file /tmp/cell_problem.sci So my questions are: 1. Did you change something in char function in Scilab 6? 2. How should I change my code to make it working in Scilab 5.x and 6 with the same functionality? 3. Do I need to report bug? With best regards, maintainer and developer of Mathieu functions toolbox for Scilab, IEEE member, Ph.D., Nikolay Strelkov. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cell_problem.sci Type: application/x-scilab Size: 211 bytes Desc: not available URL: From sgougeon at free.fr Fri Jul 31 17:56:22 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jul 2015 17:56:22 +0200 Subject: [Scilab-users] Strange behaviour of char(?) function in scilab-6.0.0-alpha-1 In-Reply-To: References: Message-ID: <55BB9AA6.1000103@free.fr> Le 31/07/2015 17:16, Nikolay Strelkov a ?crit : > .../.. > So my questions are: > 1. Did you change something in char function in Scilab 6? > 2. How should I change my code to make it working in Scilab 5.x and 6 > with the same functionality? > Release notes announce changes with cells: cell.entries and cell.dims have been removed. But cellstr.sci has not been updated (and may be other macros?): edit cellstr // line #29, replace c(i,1).entries = strcat(s(i,:)); // with c(i,1) = strcat(s(i,:)); // the your script works. > 3. Do I need to report bug? Yes Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.strelkov at gmail.com Fri Jul 31 18:15:35 2015 From: n.strelkov at gmail.com (Nikolay Strelkov) Date: Fri, 31 Jul 2015 19:15:35 +0300 Subject: [Scilab-users] Strange behaviour of char(?) function in scilab-6.0.0-alpha-1 In-Reply-To: <55BB9AA6.1000103@free.fr> References: <55BB9AA6.1000103@free.fr> Message-ID: I reported bug 14023 on Scilab 6.0.0-alpha1 and added link to this discussion. edit cellstr // line #29, replace c(i,1).entries = strcat(s(i,:)); // with c(i,1) = strcat(s(i,:)); // the your script works. Editing cellstr function helps. Thank you, Samuel! With best regards. Nikolay. 2015-07-31 18:56 GMT+03:00 Samuel Gougeon : > Le 31/07/2015 17:16, Nikolay Strelkov a ?crit : > > .../.. > So my questions are: > 1. Did you change something in char function in Scilab 6? > 2. How should I change my code to make it working in Scilab 5.x and 6 with > the same functionality? > > > Release notes announce changes with cells: cell.entries and cell.dims have > been removed. > But cellstr.sci has not been updated (and may be other macros?): > > edit cellstr > // line #29, replace > c(i,1).entries = strcat(s(i,:)); > // with > c(i,1) = strcat(s(i,:)); > // the your script works. > > 3. Do I need to report bug? > > Yes > > 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 jasper at amsterchem.com Fri Jul 31 18:35:50 2015 From: jasper at amsterchem.com (jasper van baten) Date: Fri, 31 Jul 2015 18:35:50 +0200 Subject: [Scilab-users] threading model in Scilab 6 (alpha) Message-ID: <55BBA3E6.4080903@amsterchem.com> All, What's the story with threading in Scilab 6? Whereas previous versions appeared to be single threaded from an external DLL point of view, I see that the DLLmain function gets called by a one thread, whereas interface routines get called from another thread. Worse, looks like each interface routine call is made from a new thread. What is the threading model?? Is there a limited number of threads, or are threads created on the fly? Thanks, best wishes, Jasper -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jul 31 22:12:16 2015 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jul 2015 22:12:16 +0200 Subject: [Scilab-users] exec() modification ? Message-ID: <55BBD6A0.6070101@free.fr> Hello Scilab Team, Congratulations to the whole team of developers for releasing Scilab 6! After more than 6 years of work, this is a great result, even if the baby is still in an incubator! In the 6-alpha1 release notes, you write, in the /Modified functions/ section: *exec*: exec of macro executes the body in the current scope but the prototype must have zero input and output arguments Would it be possible to know more about that? exec() is used everywhere, but i am afraid to not catch what this means exactly. Thanks Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: