From christoph.knappe at gmail.com Thu Dec 1 18:25:54 2016 From: christoph.knappe at gmail.com (christophk) Date: Thu, 1 Dec 2016 10:25:54 -0700 (MST) Subject: [Scilab-users] How to use a string variable as a childname in a structure? Message-ID: <1480613154025-4035161.post@n3.nabble.com> Hi there, is there a way to use a string variable during a children-call in a scilab structure? Here is an example for what i want to do: function myvalue = getchild(myparent,mychild) //this function doesn't work and is just meant to show the idea of what I want to do: //"mychild" is a string to call for a childname of "myparent", which is a struct. Is this at all possible? myvalue = myparent.mychild; endfunction s = struct('a',[1 2 3],'b', [4 5 6]); //how do I change my getchlidren function for this to work x = getchild(s,'a'); // equivalent for x = s.a; y = getchild(s,'b'); // equivalent for y = s.b; Thanks all! -- View this message in context: http://mailinglists.scilab.org/How-to-use-a-string-variable-as-a-childname-in-a-structure-tp4035161.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Thu Dec 1 19:09:20 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 1 Dec 2016 18:09:20 +0000 Subject: [Scilab-users] How to use a string variable as a childname in a structure? In-Reply-To: <1480613154025-4035161.post@n3.nabble.com> References: <1480613154025-4035161.post@n3.nabble.com> Message-ID: Hi, Please check code: // START OF CODE function myvalue = getchild(myparent,mychild) execstr("myvalue=myparent"+"."+mychild); endfunction s = struct('a',[1 2 3],'b', [4 5 6]); x = getchild(s,'a'); // equivalent for x = s.a; y = getchild(s,'b'); // equivalent for y = s.b; // END OF CODE Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of christophk Sent: Thursday, December 01, 2016 6:26 PM To: users at lists.scilab.org Subject: [Scilab-users] How to use a string variable as a childname in a structure? Hi there, is there a way to use a string variable during a children-call in a scilab structure? Here is an example for what i want to do: function myvalue = getchild(myparent,mychild) //this function doesn't work and is just meant to show the idea of what I want to do: //"mychild" is a string to call for a childname of "myparent", which is a struct. Is this at all possible? myvalue = myparent.mychild; endfunction s = struct('a',[1 2 3],'b', [4 5 6]); //how do I change my getchlidren function for this to work x = getchild(s,'a'); // equivalent for x = s.a; y = getchild(s,'b'); // equivalent for y = s.b; Thanks all! -- View this message in context: http://mailinglists.scilab.org/How-to-use-a-string-variable-as-a-childname-in-a-structure-tp4035161.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Thu Dec 1 22:40:22 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 1 Dec 2016 22:40:22 +0100 Subject: [Scilab-users] How to use a string variable as a childname in a structure? In-Reply-To: <1480613154025-4035161.post@n3.nabble.com> References: <1480613154025-4035161.post@n3.nabble.com> Message-ID: <584098C6.1040501@free.fr> Hello Christoph, Le 01/12/2016 18:25, christophk a ?crit : > Hi there, > > is there a way to use a string variable during a children-call in a scilab > structure? > Here is an example for what i want to do: > > function myvalue = getchild(myparent,mychild) > //this function doesn't work and is just meant to show the idea of what > I want to do: > //"mychild" is a string to call for a childname of "myparent", which is a > struct. Is this at all possible? > myvalue = myparent.mychild; > endfunction > > s = struct('a',[1 2 3],'b', [4 5 6]); > //how do I change my getchlidren function for this to work > x = getchild(s,'a'); // equivalent for x = s.a; > y = getchild(s,'b'); // equivalent for y = s.b; What you name "children" is usually named a "field" of a structure or of another tlist or mlist type. You don't need any "getchild()" function to address / extract / feed the field of a structure. It is a built-in syntax. Just do myparent(mychild) And that's it. Examples: s.r = [%pi %e %i] // equivalent to s("r") s.t = ["Hi" "Hello"] // Now, myField = "r"; s(myField) // The syntax with ("..") allows using some fieldnames with spaces: s("big cities") = ["Mexico" "Paris" "Tokyo"] // s."big cities" does not work, but the following does: s("big cities") UTF-8 chararacters are forbidden in field names with Scilab 5, but Scilab 6 accepts them: -->getversion("scilab") ans = 5. 5. 2. 1.428D+09 -->s.r?el = %pi !--error 2 Invalid factor. // In another session: --> getversion("scilab") ans = 6. 0. 0. 1.477D+09 --> s.r?el = %pi s = r?el: [1x1 constant] Isn't this great ?! :) HTH Samuel Gougeon From christoph.knappe at gmail.com Fri Dec 2 13:04:43 2016 From: christoph.knappe at gmail.com (christophk) Date: Fri, 2 Dec 2016 05:04:43 -0700 (MST) Subject: [Scilab-users] How to use a string variable as a childname in a structure? In-Reply-To: <584098C6.1040501@free.fr> References: <1480613154025-4035161.post@n3.nabble.com> <584098C6.1040501@free.fr> Message-ID: <1480680283102-4035165.post@n3.nabble.com> Dear Rafael and Samuel, this is truly amazing! I never thought it would be that easy. I guess that this would allow even for dynamic variable allocation. Finally I can generalize some repetitive code into functions that do mostly the same thing but on different fieldnames! Thank you so much - this is really helpful. :-) -- View this message in context: http://mailinglists.scilab.org/How-to-use-a-string-variable-as-a-childname-in-a-structure-tp4035161p4035165.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Fri Dec 2 13:36:33 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 2 Dec 2016 12:36:33 +0000 Subject: [Scilab-users] How to use a string variable as a childname in a structure? In-Reply-To: <1480680283102-4035165.post@n3.nabble.com> References: <1480613154025-4035161.post@n3.nabble.com> <584098C6.1040501@free.fr> <1480680283102-4035165.post@n3.nabble.com> Message-ID: Hello Christophe, While on the subject, it is never enough to praise the outstanding reference: "Baudin, M. [2011] Programming in Scilab" and the chapter on Meta programming that covers this topic. Kind regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of christophk Sent: Friday, December 02, 2016 1:05 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] How to use a string variable as a childname in a structure? Dear Rafael and Samuel, this is truly amazing! I never thought it would be that easy. I guess that this would allow even for dynamic variable allocation. Finally I can generalize some repetitive code into functions that do mostly the same thing but on different fieldnames! Thank you so much - this is really helpful. :-) -- View this message in context: http://mailinglists.scilab.org/How-to-use-a-string-variable-as-a-childname-in-a-structure-tp4035161p4035165.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 paul.carrico at free.fr Mon Dec 5 12:06:07 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 05 Dec 2016 12:06:07 +0100 Subject: [Scilab-users] How to remove all the figure in a single instruction Message-ID: Hi All To remove all the figures in a single instruction, I'm using Xdel keyword; for example, "xdel(1:10)" for the figure 1 to 10. Nevertheless if I manually remove one of them in the meantime, it does not work anymore. Is there another way to proceed? Nota bene: I tried something like "xdel(1:$)" but it does not work -> would such way be interesting? Paul From denis.crete at thalesgroup.com Mon Dec 5 12:07:46 2016 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Mon, 5 Dec 2016 12:07:46 +0100 Subject: [Scilab-users] How to remove all the figure in a single instruction In-Reply-To: References: Message-ID: <8F1D40232A0E68409E3FC23A30C3266201744E1A0614@THSONEA01CMS04P.one.grp> Hello, xdel(winsid()) HTH Denis [@@ THALES GROUP INTERNAL @@] Unit? Mixte de Physique CNRS / THALES 1 Avenue Augustin Fresnel 91767 Palaiseau CEDEx - France Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 e-mail : denis.crete at thalesgroup.com http://www.trt.thalesgroup.com/ump-cnrs-thales http://www.research.thalesgroup.com -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de paul.carrico at free.fr Envoy??: lundi 5 d?cembre 2016 12:06 ??: users at lists.scilab.org Objet?: [Scilab-users] How to remove all the figure in a single instruction Hi All To remove all the figures in a single instruction, I'm using Xdel keyword; for example, "xdel(1:10)" for the figure 1 to 10. Nevertheless if I manually remove one of them in the meantime, it does not work anymore. Is there another way to proceed? Nota bene: I tried something like "xdel(1:$)" but it does not work -> would such way be interesting? Paul _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Mon Dec 5 12:08:14 2016 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 5 Dec 2016 12:08:14 +0100 Subject: [Scilab-users] How to remove all the figure in a single instruction In-Reply-To: References: Message-ID: <18cd3394-3145-874d-3ee7-8737c78d1bcd@utc.fr> xdel(winsid()) will do the trick ! S. Le 05/12/2016 ? 12:06, paul.carrico at free.fr a ?crit : > Hi All > > To remove all the figures in a single instruction, I'm using Xdel > keyword; for example, "xdel(1:10)" for the figure 1 to 10. > > Nevertheless if I manually remove one of them in the meantime, it does > not work anymore. > > Is there another way to proceed? > > > Nota bene: I tried something like "xdel(1:$)" but it does not work -> > would such way be interesting? > > Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex From paul.carrico at free.fr Mon Dec 5 12:11:11 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 05 Dec 2016 12:11:11 +0100 Subject: [Scilab-users] How to remove all the figure in a single instruction In-Reply-To: <8F1D40232A0E68409E3FC23A30C3266201744E1A0614@THSONEA01CMS04P.one.grp> References: <8F1D40232A0E68409E3FC23A30C3266201744E1A0614@THSONEA01CMS04P.one.grp> Message-ID: thanks all - works fine Paul Le 2016-12-05 12:07, CRETE Denis a ?crit?: > Hello, > xdel(winsid()) > > HTH > Denis > > [@@ THALES GROUP INTERNAL @@] > > Unit? Mixte de Physique CNRS / THALES > 1 Avenue Augustin Fresnel > 91767 Palaiseau CEDEx - France > Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 > e-mail : > denis.crete at thalesgroup.com > http://www.trt.thalesgroup.com/ump-cnrs-thales > http://www.research.thalesgroup.com > > > -----Message d'origine----- > De?: users [mailto:users-bounces at lists.scilab.org] De la part de > paul.carrico at free.fr > Envoy??: lundi 5 d?cembre 2016 12:06 > ??: users at lists.scilab.org > Objet?: [Scilab-users] How to remove all the figure in a single > instruction > > Hi All > > To remove all the figures in a single instruction, I'm using Xdel > keyword; for example, "xdel(1:10)" for the figure 1 to 10. > > Nevertheless if I manually remove one of them in the meantime, it does > not work anymore. > > Is there another way to proceed? > > > Nota bene: I tried something like "xdel(1:$)" but it does not work -> > would such way be interesting? > > Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Mon Dec 5 12:28:19 2016 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 5 Dec 2016 12:28:19 +0100 Subject: [Scilab-users] How to remove all the figure in a single instruction In-Reply-To: <8F1D40232A0E68409E3FC23A30C3266201744E1A0614@THSONEA01CMS04P.one.grp> References: <8F1D40232A0E68409E3FC23A30C3266201744E1A0614@THSONEA01CMS04P.one.grp> Message-ID: <5d40bcaa-f1db-7dc2-ae6c-36beb070ed59@utc.fr> Sorry, Denis was faster than me... Btw, the graphical objects hierachy is missing a root window object, i.e. something that would allow : -->rw=get("root_window") rw = Handle of type "Root" with properties: ======================================== children: ["Figure","Figure"] and later -->delete(get(rw,"children")) S. Le 05/12/2016 ? 12:07, CRETE Denis a ?crit : > Hello, > xdel(winsid()) > > HTH > Denis > > [@@ THALES GROUP INTERNAL @@] > > Unit? Mixte de Physique CNRS / THALES > 1 Avenue Augustin Fresnel > 91767 Palaiseau CEDEx - France > Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 > e-mail : > denis.crete at thalesgroup.com > http://www.trt.thalesgroup.com/ump-cnrs-thales > http://www.research.thalesgroup.com > > > -----Message d'origine----- > De : users [mailto:users-bounces at lists.scilab.org] De la part de paul.carrico at free.fr > Envoy? : lundi 5 d?cembre 2016 12:06 > ? : users at lists.scilab.org > Objet : [Scilab-users] How to remove all the figure in a single instruction > > Hi All > > To remove all the figures in a single instruction, I'm using Xdel keyword; for example, "xdel(1:10)" for the figure 1 to 10. > > Nevertheless if I manually remove one of them in the meantime, it does not work anymore. > > Is there another way to proceed? > > > Nota bene: I tried something like "xdel(1:$)" but it does not work -> would such way be interesting? > > Paul > _______________________________________________ > 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 -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex From sgougeon at free.fr Mon Dec 5 13:05:25 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 5 Dec 2016 13:05:25 +0100 Subject: [Scilab-users] root object: get(0) Message-ID: <58455805.1050501@free.fr> Hello St?phane, > > -------- Message transf?r? -------- > Sujet : Re: [Scilab-users] How to remove all the figure in a single > instruction > Date : Mon, 5 Dec 2016 12:28:19 +0100 > De : St?phane Mottelet > Pour : Users mailing list for Scilab > > > Sorry, Denis was faster than me... Btw, the graphical objects hierachy > is missing a root window object, i.e. something that would allow : > > -->rw=get("root_window") > rw = > > Handle of type "Root" with properties: > ======================================== > children: ["Figure","Figure"] > > and later > > -->delete(get(rw,"children")) I am sorry, but what would be the interest of such a syntax compared to the existing xdel(winsid())? *The root object already exists. It somehow represents the screen*: -->get(0) ans = Handle of type "Console" with properties: ========================================= Children: "uimenu" ShowHiddenHandles = "off" ShowHiddenProperties = "off" UseDeprecatedSkin = "off" -->uman root_properties al ===================================================================================== Scilab > GUI > root_properties .............................. root_properties - description of the root object properties. Description ----------- The root object is a virtual object used to get the computer screen properties. Use get function with 0 as first argument to access its properties. Root properties : screensize_px : The screen size in pixels. screensize_pt : The screen size in points. screensize_mm : The screen size in millimeters. screensize_cm : The screen size in centimeters. screensize_in : The screen size in inches. screensize_norm : The normalized screen size. screendepth : The number of bits used to encode colors. Examples -------- get(0, "screensize_px") get(0, "screendepth") See Also -------- get ? Retrieve a property value from a graphics entity or an User Interface object. *It is somewhat completed by the getsystemmetrics() function*: https://help.scilab.org/docs/6.0.0/en_US/getsystemmetrics.html Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Dec 5 13:15:11 2016 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Mon, 5 Dec 2016 13:15:11 +0100 Subject: [Scilab-users] root object: get(0) In-Reply-To: <58455805.1050501@free.fr> References: <58455805.1050501@free.fr> Message-ID: <1FBA30F0-9F73-4571-9542-03DCBD78BD58@utc.fr> I didn't know.. but using the same handle for the console and the root window is very misleading to me. Scilab is full of misleading stuff like this... S. > Le 5 d?c. 2016 ? 13:05, Samuel Gougeon a ?crit : > > Hello St?phane, > >> >> -------- Message transf?r? -------- >> Sujet : Re: [Scilab-users] How to remove all the figure in a single instruction >> Date : Mon, 5 Dec 2016 12:28:19 +0100 >> De : St?phane Mottelet >> Pour : Users mailing list for Scilab >> Sorry, Denis was faster than me... Btw, the graphical objects hierachy >> is missing a root window object, i.e. something that would allow : >> >> -->rw=get("root_window") >> rw = >> >> Handle of type "Root" with properties: >> ======================================== >> children: ["Figure","Figure"] >> >> and later >> >> -->delete(get(rw,"children")) > > I am sorry, but what would be the interest of such a syntax compared to the existing xdel(winsid())? > > The root object already exists. It somehow represents the screen: > > -->get(0) > ans = > > Handle of type "Console" with properties: > ========================================= > Children: "uimenu" > ShowHiddenHandles = "off" > ShowHiddenProperties = "off" > UseDeprecatedSkin = "off" > > -->uman root_properties al > ===================================================================================== > > Scilab > GUI > root_properties > .............................. > > root_properties - description of the root object properties. > > Description > ----------- > The root object is a virtual object used to get the computer screen properties. Use > get function with 0 as first argument to access its properties. > Root properties : > screensize_px : The screen size in pixels. > screensize_pt : The screen size in points. > screensize_mm : The screen size in millimeters. > screensize_cm : The screen size in centimeters. > screensize_in : The screen size in inches. > screensize_norm : The normalized screen size. > screendepth : The number of bits used to encode colors. > > Examples > -------- > get(0, "screensize_px") > get(0, "screendepth") > > See Also > -------- > get ? Retrieve a property value from a graphics entity or an User Interface object. > > It is somewhat completed by the getsystemmetrics() function: > https://help.scilab.org/docs/6.0.0/en_US/getsystemmetrics.html > > 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 Dec 5 13:50:25 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 5 Dec 2016 13:50:25 +0100 Subject: [Scilab-users] root object: get(0) In-Reply-To: <1FBA30F0-9F73-4571-9542-03DCBD78BD58@utc.fr> References: <58455805.1050501@free.fr> <1FBA30F0-9F73-4571-9542-03DCBD78BD58@utc.fr> Message-ID: <58456291.9040103@free.fr> Le 05/12/2016 13:15, St?phane Mottelet a ?crit : > I didn't know.. but using the same handle for the console and the root > window is very misleading to me. Scilab is full of misleading stuff > like this... Right. Already, this get(0) object is named "Console" while its available properties are all about the screen device ;) IMO, * the true root should rather be either the screen or the IDE or the "system" as addressed with getsystemmetrics(). In all cases, the "Console" would already be one of its children. * the true console properties would rather be: o its sizes : lines(), o its background color o its font_family o its font_color o its font_size o its menus o its toolbar status o its toolbar contents, one child per tool: + icon + callback o the text of its status bar o ... A short dream during the nap: * rename the get(0) object "System" (likely in %h_p()) * make all properties addressed with getsystemmetrics() properties of get(0) SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Dec 5 14:03:03 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 5 Dec 2016 14:03:03 +0100 Subject: [Scilab-users] root object: get(0) In-Reply-To: <58456291.9040103@free.fr> References: <58455805.1050501@free.fr> <1FBA30F0-9F73-4571-9542-03DCBD78BD58@utc.fr> <58456291.9040103@free.fr> Message-ID: <58456587.8060003@free.fr> Le 05/12/2016 13:50, Samuel Gougeon a ?crit : > Le 05/12/2016 13:15, St?phane Mottelet a ?crit : >> I didn't know.. but using the same handle for the console and the >> root window is very misleading to me. Scilab is full of misleading >> stuff like this... > > Right. Already, this get(0) object is named "Console" while its > available properties are all about the screen device ;) My fault: i am mixing "Console properties" with "Root properties" (=> screen parameters) But there are 2 different help pages for the same get(0) object... https://help.scilab.org/docs/6.0.0/en_US/console_properties.html https://help.scilab.org/docs/6.0.0/en_US/root_properties.html * The display of get(0) could be extended to read-only root_properties * The root_property page could be merged in the Console_properties one. SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Dec 5 14:04:15 2016 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 5 Dec 2016 14:04:15 +0100 Subject: [Scilab-users] root object: get(0) In-Reply-To: <58456291.9040103@free.fr> References: <58455805.1050501@free.fr> <1FBA30F0-9F73-4571-9542-03DCBD78BD58@utc.fr> <58456291.9040103@free.fr> Message-ID: Le 05/12/2016 ? 13:50, Samuel Gougeon a ?crit : > Le 05/12/2016 13:15, St?phane Mottelet a ?crit : >> I didn't know.. but using the same handle for the console and the >> root window is very misleading to me. Scilab is full of misleading >> stuff like this... > > Right. Already, this get(0) object is named "Console" while its > available properties are all about the screen device ;) > IMO, Thank you Samuel. This is necessary to be stringent about this kind of stuff. Scilab is suffering of this kind of approximative "modeling" since the migration old graphics->new graphics. But who cares ? Most of us are handymen and sometimes propose working-but-incoherent stuff which is nevertheless validated by SE. This is a pity... S. > * the true root should rather be either the screen or the IDE or the > "system" as addressed with getsystemmetrics(). In all cases, the > "Console" would already be one of its children. > * the true console properties would rather be: > o its sizes : lines(), > o its background color > o its font_family > o its font_color > o its font_size > o its menus > o its toolbar status > o its toolbar contents, one child per tool: > + icon > + callback > o the text of its status bar > o ... > > > A short dream during the nap: > > * rename the get(0) object "System" (likely in %h_p()) > * make all properties addressed with getsystemmetrics() properties > of get(0) > > SG > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.knappe at gmail.com Tue Dec 6 14:43:25 2016 From: christoph.knappe at gmail.com (christophk) Date: Tue, 6 Dec 2016 06:43:25 -0700 (MST) Subject: [Scilab-users] converting a variable name into a string Message-ID: <1481031804988-4035182.post@n3.nabble.com> Ok here is another question for the Scilab experts around. Is there a way to convert the name of a variable into a string in Scilab? Lets say, I have: //START OF CODE s = 2; //then: string(s) // returns "2" //is there a function f with f(s) == "s" ?? //END OF CODE Searched the web, but could only find a solution for Matlab: https://se.mathworks.com/matlabcentral/newsreader/view_thread/251347 -- View this message in context: http://mailinglists.scilab.org/converting-a-variable-name-into-a-string-tp4035182.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Maxi.bartels at gmail.com Tue Dec 6 14:55:22 2016 From: Maxi.bartels at gmail.com (Maxi041291) Date: Tue, 6 Dec 2016 06:55:22 -0700 (MST) Subject: [Scilab-users] more polarplots in one coordinate system In-Reply-To: <0828dabd-e706-6e96-56f9-9206c1dec6b3@inria.fr> References: <1480327923246-4035127.post@n3.nabble.com> <583C38AD.3020501@free.fr> <1480345297077-4035130.post@n3.nabble.com> <750558ca-e5d5-ed1f-eb6b-15b18e2f91b4@inria.fr> <1480490861874-4035146.post@n3.nabble.com> <0828dabd-e706-6e96-56f9-9206c1dec6b3@inria.fr> Message-ID: <1481032522509-4035183.post@n3.nabble.com> Hello again, how to plot a large legend, which is next to the polarplot? If I use legend_location="in_lower_right", it is hiding my plot. If I use -"- out_lower_right, i can't see it anymore [or just the line of the box] Thank you Maxi -- View this message in context: http://mailinglists.scilab.org/more-polarplots-in-one-coordinate-system-tp4035127p4035183.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Tue Dec 6 15:49:43 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 6 Dec 2016 15:49:43 +0100 Subject: [Scilab-users] more polarplots in one coordinate system In-Reply-To: <1481032522509-4035183.post@n3.nabble.com> References: <1480327923246-4035127.post@n3.nabble.com> <583C38AD.3020501@free.fr> <1480345297077-4035130.post@n3.nabble.com> <750558ca-e5d5-ed1f-eb6b-15b18e2f91b4@inria.fr> <1480490861874-4035146.post@n3.nabble.com> <0828dabd-e706-6e96-56f9-9206c1dec6b3@inria.fr> <1481032522509-4035183.post@n3.nabble.com> Message-ID: Le 06/12/2016 ? 14:55, Maxi041291 a ?crit : > Hello again, > > how to plot a large legend, which is next to the polarplot? > > If I use legend_location="in_lower_right", it is hiding my plot. > If I use -"- out_lower_right, i can't see it anymore [or just the line of > the box] if you put the legend out of the axes box uou may have to enlarge the corresponding margin ax=gca(); ax.margin(4)=0.25, //for the lower margin > Thank you > Maxi > > > > -- > View this message in context: http://mailinglists.scilab.org/more-polarplots-in-one-coordinate-system-tp4035127p4035183.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 Maxi.bartels at gmail.com Tue Dec 6 16:56:28 2016 From: Maxi.bartels at gmail.com (Maxi041291) Date: Tue, 6 Dec 2016 08:56:28 -0700 (MST) Subject: [Scilab-users] more polarplots in one coordinate system In-Reply-To: References: <1480327923246-4035127.post@n3.nabble.com> <583C38AD.3020501@free.fr> <1480345297077-4035130.post@n3.nabble.com> <750558ca-e5d5-ed1f-eb6b-15b18e2f91b4@inria.fr> <1480490861874-4035146.post@n3.nabble.com> <0828dabd-e706-6e96-56f9-9206c1dec6b3@inria.fr> <1481032522509-4035183.post@n3.nabble.com> Message-ID: <1481039788299-4035185.post@n3.nabble.com> Thank you, it works for me :) -- View this message in context: http://mailinglists.scilab.org/more-polarplots-in-one-coordinate-system-tp4035127p4035185.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Tue Dec 6 17:43:53 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 6 Dec 2016 16:43:53 +0000 Subject: [Scilab-users] converting a variable name into a string In-Reply-To: <1481031804988-4035182.post@n3.nabble.com> References: <1481031804988-4035182.post@n3.nabble.com> Message-ID: Hi Christopher, I do not know the Scilab equivalent but it would be interesting to know for what type of problem you need this feature. The question seems puzzling at first sight, coz if we know the variable 's' name in order to be able to call f(s), then we should also be able to compose a string "s" by writing it within quotes, shouldn't we? Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of christophk Sent: Tuesday, December 06, 2016 2:43 PM To: users at lists.scilab.org Subject: [Scilab-users] converting a variable name into a string Ok here is another question for the Scilab experts around. Is there a way to convert the name of a variable into a string in Scilab? Lets say, I have: //START OF CODE s = 2; //then: string(s) // returns "2" //is there a function f with f(s) == "s" ?? //END OF CODE Searched the web, but could only find a solution for Matlab: https://se.mathworks.com/matlabcentral/newsreader/view_thread/251347 From sgougeon at free.fr Tue Dec 6 20:36:23 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Tue, 6 Dec 2016 20:36:23 +0100 (CET) Subject: [Scilab-users] getting the name of a variable from its handle In-Reply-To: <1481031804988-4035182.post@n3.nabble.com> Message-ID: <1397540579.3077181.1481052983632.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello, >----- Mail original ----- >De: "christophk" >Envoy?: Mardi 6 D?cembre 2016 14:43:25 > >Ok here is another question for the Scilab experts around. >Is there a way to convert the name of a variable into a string in Scilab? > >Lets say, I have: >s = 2; > >//then: >string(s) // returns "2" >//is there a function f with f(s) == "s" ?? This is rather getting the variable name from the variable handle AFAIK, this is possible only if s is the handle of a Scilab function (so called "macro"), i.e. a function written in Scilab language and compiled. Example with the existing sind() function: t = macr2tree(sind); t.name // It works even with aliases: s = sind; // with no (): we copy the handle into s s(45) t = macr2tree(s); t.name -->t = macr2tree(sind); t.name ans = sind -->// It works even with aliases: -->s = sind; // with no (): we copy the handle into s -->s(45) ans = 0.7071068 -->t = macr2tree(s); t.name ans = s >Searched the web, but could only find a solution for Matlab: >https://se.mathworks.com/matlabcentral/newsreader/view_thread/251347 I do not clearly understand what is done there. No results are displayed.. I don't know any equivalence of inputname() in Scilab. HTH Samuel Gougeon From Maxi.bartels at gmail.com Wed Dec 7 08:48:29 2016 From: Maxi.bartels at gmail.com (Maxi041291) Date: Wed, 7 Dec 2016 00:48:29 -0700 (MST) Subject: [Scilab-users] more polarplots in one coordinate system In-Reply-To: References: <1480327923246-4035127.post@n3.nabble.com> <583C38AD.3020501@free.fr> <1480345297077-4035130.post@n3.nabble.com> <750558ca-e5d5-ed1f-eb6b-15b18e2f91b4@inria.fr> <1480490861874-4035146.post@n3.nabble.com> <0828dabd-e706-6e96-56f9-9206c1dec6b3@inria.fr> <1481032522509-4035183.post@n3.nabble.com> Message-ID: <1481096909051-4035188.post@n3.nabble.com> Hello, plot is getting smaller after margins. How to set the size of plot fixed? Tried to do it with zoom box, but this one depends on data size. Thank you :) -- View this message in context: http://mailinglists.scilab.org/more-polarplots-in-one-coordinate-system-tp4035127p4035188.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From p.muehlmann at gmail.com Wed Dec 7 08:55:05 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Wed, 7 Dec 2016 08:55:05 +0100 Subject: [Scilab-users] overlay data onto image Message-ID: Dear Experts, assuming an image (grayscale) , showing a cross section of a geometry. Assuming the geometry consits of several cavities, and each cavity has a dedicated pressure. Now I would like to print the pressure value into the cavity area. I guess following approach could work: Using Matplot to display the image. Using xstring to overlay the pressure value. But before I do this: Is there any better way to do such thing? Best regards, Philipp -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Wed Dec 7 09:16:41 2016 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Wed, 07 Dec 2016 09:16:41 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBvdmVybGF5IGRhdGEgb250?= =?utf-8?q?o_image?= In-Reply-To: Message-ID: <30ff-5847c580-f-1f817300@73033918> Hi Philipp, I sounds like a plan to me, I think I would do the same. Alternatively, you can plot the image inside a uicontrol, as a regular image, not a matrix and then overlay your data. But this alternative method would be less convenient, as it's unclear to me how you could reliably determine the coordinates of each cavity to place your overlays (which is not a problem if you plot inside an axis as you suggested). Cheers, Antoine Le Mercredi, D?cembre 07, 2016 08:55 CET, Philipp M?hlmann a ?crit: > Dear Experts, > > assuming an image (grayscale) , showing a cross section of a geometry. > > Assuming the geometry consits of several cavities, and each cavity has a > dedicated pressure. > > Now I would like to print the pressure value into the cavity area. > > I guess following approach could work: > > Using Matplot to display the image. > > Using xstring to overlay the pressure value. > > > But before I do this: > > Is there any better way to do such thing? > > Best regards, > Philipp > > > -- > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > There we have the salad. From sgougeon at free.fr Wed Dec 7 09:27:34 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 7 Dec 2016 09:27:34 +0100 Subject: [Scilab-users] overlay data onto image In-Reply-To: References: Message-ID: <5847C7F6.8080109@free.fr> Hello, Le 07/12/2016 08:55, Philipp M?hlmann a ?crit : > Dear Experts, > > assuming an image (grayscale) , showing a cross section of a geometry. > Assuming the geometry consits of several cavities, and each cavity has > a dedicated pressure. > Now I would like to print the pressure value into the cavity area. > I guess following approach could work: > Using Matplot to display the image. > Using xstring to overlay the pressure value. > > But before I do this: > Is there any better way to do such thing? What is unsatisfying with this approach? From jrafaelbguerra at hotmail.com Wed Dec 7 10:14:33 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 7 Dec 2016 09:14:33 +0000 Subject: [Scilab-users] overlay data onto image In-Reply-To: References: Message-ID: Hi Philipp, For that type of problem, the solution I prefer is to use the following Scilab functions: - Sgrayplot: to plot the image - plot2d: to plot symbols over the spots (your cavities) to be labelled - xstring: to display the labels (your pressure points) Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Philipp M?hlmann Sent: Wednesday, December 07, 2016 8:55 AM To: International users mailing list for Scilab. Subject: [Scilab-users] overlay data onto image Dear Experts, assuming an image (grayscale) , showing a cross section of a geometry. Assuming the geometry consits of several cavities, and each cavity has a dedicated pressure. Now I would like to print the pressure value into the cavity area. I guess following approach could work: Using Matplot to display the image. Using xstring to overlay the pressure value. But before I do this: Is there any better way to do such thing? Best regards, Philipp -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Wed Dec 7 11:16:21 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Wed, 7 Dec 2016 11:16:21 +0100 Subject: [Scilab-users] overlay data onto image In-Reply-To: References: Message-ID: Ok, thanks for your inputs. @ Samuel: Nothing unsatisfying, just wanted to learn if different approaches might be more convinient. Topic closed. 2016-12-07 10:14 GMT+01:00 Rafael Guerra : > Hi Philipp, > > > > For that type of problem, the solution I prefer is to use the following > Scilab functions: > > - *Sgrayplot*: to plot the image > > - *plot2d*: to plot symbols over the spots (your cavities) to > be labelled > > - *xstring*: to display the labels (your pressure points) > > > > Regards, > > Rafael > > > > > > *From:* users [mailto:users-bounces at lists.scilab.org] *On Behalf Of *Philipp > M?hlmann > *Sent:* Wednesday, December 07, 2016 8:55 AM > *To:* International users mailing list for Scilab. > > *Subject:* [Scilab-users] overlay data onto image > > > > Dear Experts, > > assuming an image (grayscale) , showing a cross section of a geometry. > > Assuming the geometry consits of several cavities, and each cavity has a > dedicated pressure. > > Now I would like to print the pressure value into the cavity area. > > I guess following approach could work: > > Using Matplot to display the image. > > Using xstring to overlay the pressure value. > > But before I do this: > > Is there any better way to do such thing? > > Best regards, > > Philipp > > > > -- > > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > > > There we have the salad. > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From contact at pierre-vuillemin.fr Wed Dec 7 10:04:51 2016 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Wed, 07 Dec 2016 10:04:51 +0100 Subject: [Scilab-users] Calling a java method in a Scilab function Message-ID: Hi all, I have to create unique IDs for some object in Scilab. For that purpose, someone kindly guided me towards the UUID class of java, which lead me to create this function in Scilab, function id = make_id() UUID = jimport("java.util.UUID", %f) tmp = jinvoke(UUID,"randomUUID") id = jinvoke(tmp,"toString") endfunction It works fine. An a priori similar function is function id = make_id_err() UUID = jimport("java.util.UUID", %f) tmp = UUID.randomUUID() id = tmp.toString() endfunction where the methods are called without jinvoke. While the instructions of the latter function work well in the terminal, they lead to an error when trying to exec the function 'make_id_err'. I was wondering if it is a normal behaviour? Best regards, Pierre From cfuttrup at gmail.com Sat Dec 10 11:22:38 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 10 Dec 2016 11:22:38 +0100 Subject: [Scilab-users] Help with reading data (csvRead) Message-ID: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> Hi I'm trying to read a datafile with csvRead, it might be the wrong function. Please help. The file itself looks like this (only showing select lines - the file contains 391 lines): **************************************************** * FILE:C:\Users\claus\example.zma * INFO: Arb1 * Data: Impedance (ohms), Phase (degrees) **************************************************** 10.000 +8.8488 +40.1693 10.199 +8.9648 +40.7994 11.949 +10.0946 +46.1555 12.188 +10.2827 +46.7923 141.879 +6.7485 -10.8804 144.715 +6.7473 -10.3382 147.608 +6.7438 -9.8380 150.559 +6.7377 -9.3570 389.346 +7.2282 +9.7230 397.129 +7.2456 +10.0717 987.112 +8.5967 +23.3368 1006.846 +8.6355 +23.7056 9807.309 +26.8760 +57.2720 10003.368 +27.2519 +57.4330 20000.000 +44.3153 +62.1741 csvRead complains because the column width is changing. I execute: localdir = "C:\Users\claus\"; filename = fullfile(localdir,"example.zma"); Mread = csvRead(filename,"",".","double",[],[],[],5); This is the error which csvRead gives (line 10 == line 3 in above shortened dataset): >Warning: Inconsistency found in the columns. At line 10, found 12 columns while the previous had 13. > !--error 999 >csvRead: can not read file C:\Users\claus\example.zma: Error in the column structure What is the recommended way to read the ZMA file? P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data. /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sat Dec 10 11:55:33 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sat, 10 Dec 2016 11:55:33 +0100 Subject: [Scilab-users] Untwinkle a sequence of graphics Message-ID: <584BDF25.5000202@hslmg.de> Hallo Scilab experts, How would you avoid the 'twinkling' when clicking for the next image? xdel(); cf=figure('position',[100 100 1200 800],'background',8); ca=gca(); x=[0 1 0]; y=[0 0 1]; z=[1 1 1]; for i=1:8 plot3d(x',y',z'*i/5) ca.box="off"; ca.axes_visible = ["off","off","off"]; caxl=ca.x_label; caxl.visible="off"; cayl=ca.y_label; cayl.visible="off"; cazl=ca.z_label; cazl.visible="off"; xtitle('Click into figure and watch twinkling.') ca.isoview='on'; xclick() end Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Dec 10 12:43:45 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 12:43:45 +0100 Subject: [Scilab-users] Help with reading data (csvRead) In-Reply-To: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> References: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> Message-ID: <584BEA71.1060203@free.fr> Hello Claus, Could you please post a true extract of your file, as a file /in attachement/, after that you checked than the issue occurs also with this extract file? It will be easier to test the issue, and it will lead to more reliable tests than copying/pasting a part of your message in a file. Regards SG Le 10/12/2016 11:22, Claus Futtrup a ?crit : > > Hi > > I'm trying to read a datafile with csvRead, it might be the wrong > function. Please help. The file itself looks like this (only showing > select lines - the file contains 391 lines): > > **************************************************** > * FILE:C:\Users\claus\example.zma > * INFO: Arb1 > * Data: Impedance (ohms), Phase (degrees) > **************************************************** > 10.000 +8.8488 +40.1693 > 10.199 +8.9648 +40.7994 > 11.949 +10.0946 +46.1555 > 12.188 +10.2827 +46.7923 > 141.879 +6.7485 -10.8804 > 144.715 +6.7473 -10.3382 > 147.608 +6.7438 -9.8380 > 150.559 +6.7377 -9.3570 > 389.346 +7.2282 +9.7230 > 397.129 +7.2456 +10.0717 > 987.112 +8.5967 +23.3368 > 1006.846 +8.6355 +23.7056 > 9807.309 +26.8760 +57.2720 > 10003.368 +27.2519 +57.4330 > 20000.000 +44.3153 +62.1741 > > csvRead complains because the column width is changing. I execute: > > localdir = "C:\Users\claus\"; > filename = fullfile(localdir,"example.zma"); > Mread = csvRead(filename,"",".","double",[],[],[],5); > > This is the error which csvRead gives (line 10 == line 3 in above > shortened dataset): > > >Warning: Inconsistency found in the columns. At line 10, found 12 > columns while the previous had 13. > > !--error 999 > >csvRead: can not read file C:\Users\claus\example.zma: Error in the > column structure > > What is the recommended way to read the ZMA file? > > P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data. > > /Claus > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Dec 10 14:46:04 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 14:46:04 +0100 Subject: [Scilab-users] Untwinkle a sequence of graphics In-Reply-To: <584BDF25.5000202@hslmg.de> References: <584BDF25.5000202@hslmg.de> Message-ID: <584C071C.4030906@free.fr> Hello Jens, Le 10/12/2016 11:55, Jens Simon Strom a ?crit : > Hallo Scilab experts, > How would you avoid the 'twinkling' when clicking for the next image? For instance by using plot3d() options: xdel(); figure('position',[100 100 1200 800],'background',-2); xtitle('Click into figure and watch twinkling.') x = [0 1 0]; y = [0 0 1]; z = [1 1 1]; for i = 1:8 plot3d(x',y', z'*i/5, flag=[2 4 0], leg="@@") xclick() end SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Dec 10 15:09:53 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 15:09:53 +0100 Subject: [Scilab-users] Calling a java method in a Scilab function In-Reply-To: References: Message-ID: <584C0CB1.3020800@free.fr> Hello Pierre, Le 07/12/2016 10:04, Pierre Vuillemin a ?crit : > Hi all, > > I have to create unique IDs for some object in Scilab. For that > purpose, someone kindly guided me towards the UUID class of java, > which lead me to create this function in Scilab, > > function id = make_id() > UUID = jimport("java.util.UUID", %f) > tmp = jinvoke(UUID,"randomUUID") > id = jinvoke(tmp,"toString") > endfunction > > It works fine. > > An a priori similar function is > > function id = make_id_err() > UUID = jimport("java.util.UUID", %f) > tmp = UUID.randomUUID() > id = tmp.toString() > endfunction > > where the methods are called without jinvoke. While the instructions > of the latter function work well in the terminal, they lead to an > error when trying to exec the function 'make_id_err'. > > I was wondering if it is a normal behaviour? No, but the bug is fixed in Scilab 6.0: In Scilab 5.5.2: -->endfunction UUID = jimport("java.util.UUID", %f) !--error 26 R?cursivit? trop complexe ! (Les tables de r?currence sont pleines) at line 2 of function make_id_err called by : tmp = UUID.randomUUID() at line 3 of function make_id_err called by : tmp = UUID.randomUUID() at line 3 of function make_id_err called by : ... etc In Scilab 6.0: --> getversion("scilab") ans = 6. 0. 0. 1.477D+09 --> function id = make_id_err() > UUID = jimport("java.util.UUID", %f) > tmp = UUID.randomUUID() > id = tmp.toString() > endfunction --> make_id_err() ans = 49e4f3f1-736a-435f-bc26-f7061f10de27 BR Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Dec 10 15:31:55 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 10 Dec 2016 14:31:55 +0000 Subject: [Scilab-users] Help with reading data (csvRead) In-Reply-To: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> References: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> Message-ID: Hi Claus, I do not know how to handle multiple spaces separators in csvRead, but you can use following code (adapted from recent post by Serge Steer): // START OF CODE: u=mopen("example.zma","r"); mgetl(u,5); // reads 5-line header r=mfscanf(-1,u,"%f %f %f\n"); mclose(u) // END OF CODE Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Saturday, December 10, 2016 11:23 AM To: International users mailing list for Scilab. Subject: [Scilab-users] Help with reading data (csvRead) Hi I'm trying to read a datafile with csvRead, it might be the wrong function. Please help. The file itself looks like this (only showing select lines - the file contains 391 lines): **************************************************** * FILE:C:\Users\claus\example.zma * INFO: Arb1 * Data: Impedance (ohms), Phase (degrees) **************************************************** 10.000 +8.8488 +40.1693 10.199 +8.9648 +40.7994 11.949 +10.0946 +46.1555 12.188 +10.2827 +46.7923 141.879 +6.7485 -10.8804 144.715 +6.7473 -10.3382 147.608 +6.7438 -9.8380 150.559 +6.7377 -9.3570 389.346 +7.2282 +9.7230 397.129 +7.2456 +10.0717 987.112 +8.5967 +23.3368 1006.846 +8.6355 +23.7056 9807.309 +26.8760 +57.2720 10003.368 +27.2519 +57.4330 20000.000 +44.3153 +62.1741 csvRead complains because the column width is changing. I execute: localdir = "C:\Users\claus\"; filename = fullfile(localdir,"example.zma"); Mread = csvRead(filename," ",".","double",[],[],[],5); This is the error which csvRead gives (line 10 == line 3 in above shortened dataset): >Warning: Inconsistency found in the columns. At line 10, found 12 columns while the previous had 13. > !--error 999 >csvRead: can not read file C:\Users\claus\example.zma: Error in the column structure What is the recommended way to read the ZMA file? P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data. /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sat Dec 10 15:52:57 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 10 Dec 2016 15:52:57 +0100 Subject: [Scilab-users] Help with reading data (csvRead) In-Reply-To: References: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> Message-ID: Hi Rafael So I gather that the separator has to be a single character, when using csvRead. Thanks for the tip, I'll use mfscanf instead, it seems to be tolerant ... /Claus On 10-12-2016 15:31, Rafael Guerra wrote: > > Hi Claus, > > I do not know how to handle multiple spaces separators in csvRead, but > you can use following code (adapted from recent post by Serge Steer): > > // START OF CODE: > > u=mopen("example.zma","r"); > > mgetl(u,5);// reads 5-line header > > r=mfscanf(-1,u,"%f %f %f\n"); > > mclose(u) > > // END OF CODE > > Regards, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Claus Futtrup > *Sent:* Saturday, December 10, 2016 11:23 AM > *To:* International users mailing list for Scilab. > > *Subject:* [Scilab-users] Help with reading data (csvRead) > > Hi > > I'm trying to read a datafile with csvRead, it might be the wrong > function. Please help. The file itself looks like this (only showing > select lines - the file contains 391 lines): > > **************************************************** > * FILE:C:\Users\claus\example.zma > * INFO: Arb1 > * Data: Impedance (ohms), Phase (degrees) > **************************************************** > 10.000 +8.8488 +40.1693 > 10.199 +8.9648 +40.7994 > 11.949 +10.0946 +46.1555 > 12.188 +10.2827 +46.7923 > 141.879 +6.7485 -10.8804 > 144.715 +6.7473 -10.3382 > 147.608 +6.7438 -9.8380 > 150.559 +6.7377 -9.3570 > 389.346 +7.2282 +9.7230 > 397.129 +7.2456 +10.0717 > 987.112 +8.5967 +23.3368 > 1006.846 +8.6355 +23.7056 > 9807.309 +26.8760 +57.2720 > 10003.368 +27.2519 +57.4330 > 20000.000 +44.3153 +62.1741 > > csvRead complains because the column width is changing. I execute: > > localdir = "C:\Users\claus\"; > filename = _fullfile_(localdir,"example.zma"); > Mread = csvRead(filename," ",".","double",[],[],[],5); > > This is the error which csvRead gives (line 10 == line 3 in above > shortened dataset): > > >Warning: Inconsistency found in the columns. At line 10, found 12 columns while the previous had 13. > > !--error 999 > >csvRead: can not read file C:\Users\claus\example.zma: Error in the > column structure > > What is the recommended way to read the ZMA file? > > P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data. > > /Claus > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Dec 10 15:54:55 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 15:54:55 +0100 Subject: [Scilab-users] Help with reading data (csvRead) In-Reply-To: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> References: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> Message-ID: <584C173F.1010601@free.fr> Claus, You may use simply [Mread, header] = fscanfMat(filename); tested on the file sent. There may be an equivalent with csvRead(), using the substitute option. To be confirmed. Anyway it would be more complicated than using fscanfMat(). BR Samuel Le 10/12/2016 15:26, Claus Futtrup a ?crit : > Hi Samuel > > I didn't mean for the Scilab Users list to design the script for me, > only hint at what to do about csvRead (or use another function). The > extracted few lines should be plenty to see my challenges. > > Attached is a complete ZMA file. > > Best regards, > Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.gulunay at gmail.com Sat Dec 10 16:03:51 2016 From: n.gulunay at gmail.com (n.gulunay) Date: Sat, 10 Dec 2016 09:03:51 -0600 Subject: [Scilab-users] Calling a java method in a Scilab function Message-ID: Hi, I thought I unsubscribed from this mailing list but I am still getting them.? I even deleted my user name at one point but still kept getting them.? Currently I appear to be unsubscribed as the system suggests I subscribe yet I am still getting many emails. I would rather sign on and look up what I need. ?Is there more than once place to unsubscribe or is the unsubscribe function not working? Could someone please let me know how to proceed.Nec Sent via the Samsung GALAXY S? 5, an AT&T 4G LTE smartphone -------- Original message -------- From: Samuel Gougeon Date: 12/10/16 8:09 AM (GMT-06:00) To: Users mailing list for Scilab Subject: Re: [Scilab-users] Calling a java method in a Scilab function Hello Pierre, Le 07/12/2016 10:04, Pierre Vuillemin a ?crit?: Hi all, I have to create unique IDs for some object in Scilab. For that purpose, someone kindly guided me towards the UUID class of java, which lead me to create this function in Scilab, function id = make_id() ?? UUID???? = jimport("java.util.UUID", %f) ?? tmp????? = jinvoke(UUID,"randomUUID") ?? id?????? = jinvoke(tmp,"toString") endfunction It works fine. An a priori similar function is function id = make_id_err() ?? UUID???? = jimport("java.util.UUID", %f) ?? tmp????? = UUID.randomUUID() ?? id?????? = tmp.toString() endfunction where the methods are called without jinvoke. While the instructions of the latter function work well in the terminal, they lead to an error when trying to exec the function 'make_id_err'. I was wondering if it is a normal behaviour? No, but the bug is fixed in Scilab 6.0: In Scilab 5.5.2: -->endfunction ?? UUID???? = jimport("java.util.UUID", %f) ??????????????? !--error 26 R?cursivit? trop complexe ! (Les tables de r?currence sont pleines) at line?????? 2 of function make_id_err called by :? ?? tmp????? = UUID.randomUUID() at line?????? 3 of function make_id_err called by :? ?? tmp????? = UUID.randomUUID() at line?????? 3 of function make_id_err called by :? ... etc In Scilab 6.0: --> getversion("scilab") ?ans? = ?? 6.?? 0.?? 0.?? 1.477D+09 --> function id = make_id_err() ? >??? UUID???? = jimport("java.util.UUID", %f) ? >??? tmp????? = UUID.randomUUID() ? >??? id?????? = tmp.toString() ? > endfunction --> make_id_err() ?ans? = ?49e4f3f1-736a-435f-bc26-f7061f10de27 BR Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sat Dec 10 16:18:44 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 10 Dec 2016 16:18:44 +0100 Subject: [Scilab-users] Help with reading data (csvRead) In-Reply-To: <584C173F.1010601@free.fr> References: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> <584C173F.1010601@free.fr> Message-ID: <5798a8e8-03f7-5d6e-86f6-0f46ada2416a@gmail.com> Hi Samuel Indeed it looks simpler than using csvRead, I will look into this function as well. It looks like it cuts off some of the decimals. Thanks for the tip. Best regards, Claus On 10-12-2016 15:54, Samuel Gougeon wrote: > Claus, > > You may use simply > [Mread, header] = fscanfMat(filename); > tested on the file sent. > There may be an equivalent with csvRead(), using the substitute option. > To be confirmed. Anyway it would be more complicated than using > fscanfMat(). > > BR > Samuel > > Le 10/12/2016 15:26, Claus Futtrup a ?crit : >> Hi Samuel >> >> I didn't mean for the Scilab Users list to design the script for me, >> only hint at what to do about csvRead (or use another function). The >> extracted few lines should be plenty to see my challenges. >> >> Attached is a complete ZMA file. >> >> Best regards, >> Claus > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Dec 10 16:41:36 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 16:41:36 +0100 Subject: [Scilab-users] Help with reading data (csvRead) In-Reply-To: <5798a8e8-03f7-5d6e-86f6-0f46ada2416a@gmail.com> References: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> <584C173F.1010601@free.fr> <5798a8e8-03f7-5d6e-86f6-0f46ada2416a@gmail.com> Message-ID: <584C2230.2090703@free.fr> Le 10/12/2016 16:18, Claus Futtrup a ?crit : > Hi Samuel > > Indeed it looks simpler than using csvRead, I will look into this > function as well. It looks like it cuts off some of the decimals. Very unlikely. At least not a single one for the full file you sent to me: f = mgetl(filename); f(1:5) = []; s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); and(f==s) -->f = mgetl(filename); -->f(1:5) = []; -->s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); -->and(f==s) ans = T Trailing zeros are not displayed in the console. This can be misleading (and is unconvenient), but actual values are ok. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Dec 10 16:44:30 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 16:44:30 +0100 Subject: [Scilab-users] Calling a java method in a Scilab function In-Reply-To: References: Message-ID: <584C22DE.2070801@free.fr> Le 10/12/2016 16:03, n.gulunay a ?crit : > Hi, > > I thought I unsubscribed from this mailing list but I am still getting > them. > > I even deleted my user name at one point but still kept getting them. > > Currently I appear to be unsubscribed as the system suggests I > subscribe yet I am still getting many emails. I would rather sign on > and look up what I need. > > Is there more than once place to unsubscribe or is the unsubscribe > function not working? Could someone please let me know how to proceed. > Nec See at the bottom of each received message: http://lists.scilab.org/mailman/listinfo/users SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sat Dec 10 17:05:16 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 10 Dec 2016 17:05:16 +0100 Subject: [Scilab-users] Help with reading data (csvRead) In-Reply-To: <584C2230.2090703@free.fr> References: <4be2ccab-096c-6f89-6b50-94c3e6cbe5c6@gmail.com> <584C173F.1010601@free.fr> <5798a8e8-03f7-5d6e-86f6-0f46ada2416a@gmail.com> <584C2230.2090703@free.fr> Message-ID: <637a7e60-7080-0e31-77fe-09afe81c20e0@gmail.com> Hi Samuel OK, I trust it's just a matter of how the Mread matrix is displayed. /Claus On 10-12-2016 16:41, Samuel Gougeon wrote: > Le 10/12/2016 16:18, Claus Futtrup a ?crit : >> Hi Samuel >> >> Indeed it looks simpler than using csvRead, I will look into this >> function as well. It looks like it cuts off some of the decimals. > > Very unlikely. At least not a single one for the full file you sent to me: > f = mgetl(filename); > f(1:5) = []; > s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); > and(f==s) > > -->f = mgetl(filename); > -->f(1:5) = []; > -->s = sprintf("%9.3f %+10.4f %+10.4f \n",Mread); > -->and(f==s) > ans = > T > > Trailing zeros are not displayed in the console. This can be > misleading (and is unconvenient), but actual values are ok. > > 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 j.s.strom at hslmg.de Sat Dec 10 17:48:38 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sat, 10 Dec 2016 17:48:38 +0100 Subject: [Scilab-users] Untwinkle a sequence of graphics In-Reply-To: <584C071C.4030906@free.fr> References: <584BDF25.5000202@hslmg.de> <584C071C.4030906@free.fr> Message-ID: <584C31E6.8010809@hslmg.de> Hallo Samuel, That works perfectly. Thanks a lot! Tuning graphics is always a big challenge - consuming more time than the mathematical part. Kind regards Jens ------------------------------------------------------------ Am 10.12.2016 14:46, schrieb Samuel Gougeon: > Hello Jens, > > Le 10/12/2016 11:55, Jens Simon Strom a ?crit : >> Hallo Scilab experts, >> How would you avoid the 'twinkling' when clicking for the next image? > > For instance by using plot3d() options: > xdel(); > figure('position',[100 100 1200 800],'background',-2); > xtitle('Click into figure and watch twinkling.') > x = [0 1 0]; > y = [0 0 1]; > z = [1 1 1]; > for i = 1:8 > plot3d(x', y',z'*i/5,flag=[2 4 0],leg="@@") > xclick() > end > SG > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.gulunay at gmail.com Sat Dec 10 18:36:43 2016 From: n.gulunay at gmail.com (n.gulunay) Date: Sat, 10 Dec 2016 11:36:43 -0600 Subject: [Scilab-users] Calling a java method in a Scilab function Message-ID: Thank you Samuel. Sent via the Samsung GALAXY S? 5, an AT&T 4G LTE smartphone -------- Original message -------- From: Samuel Gougeon Date: 12/10/16 9:44 AM (GMT-06:00) To: Users mailing list for Scilab Subject: Re: [Scilab-users] Calling a java method in a Scilab function Le 10/12/2016 16:03, n.gulunay a ?crit?: Hi, I thought I unsubscribed from this mailing list but I am still getting them.? I even deleted my user name at one point but still kept getting them.? Currently I appear to be unsubscribed as the system suggests I subscribe yet I am still getting many emails. I would rather sign on and look up what I need. ?Is there more than once place to unsubscribe or is the unsubscribe function not working? Could someone please let me know how to proceed. Nec See at the bottom of each received message: http://lists.scilab.org/mailman/listinfo/users SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sat Dec 10 21:00:09 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sat, 10 Dec 2016 21:00:09 +0100 Subject: [Scilab-users] Influencing the automatic rotation_angles setting in advance Message-ID: <584C5EC9.1090902@hslmg.de> Hallo Scilab experts, During execution of plot3d, param3d, surf, etc. Scilab *automatically* chooses the axes property *rotation_angles*. Is there a way to influence this automatic? I do not mean ca=gca(); ca.rotation_angles=[ang1 ang2]. The setting should be positioned in the script***before* the plot command und should be valid for further plots. This question is in context with the thread 'untwinkle a sequence of graphics'. Without setting ca.rotation_angles=[a1 a2] after the param3d there is no twinkle. If I set the appropriate aspect - twinkling occurs again. I have not been able to reduce this to a a minimal example. Perhaps my enquiry suffices. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Sat Dec 10 21:25:16 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Sat, 10 Dec 2016 21:25:16 +0100 Subject: [Scilab-users] Influencing the automatic rotation_angles setting in advance In-Reply-To: <584C5EC9.1090902@hslmg.de> References: <584C5EC9.1090902@hslmg.de> Message-ID: <66dfab16-b683-dfdc-4e39-5c30f004c659@inria.fr> Le 10/12/2016 ? 21:00, Jens Simon Strom a ?crit : > Hallo Scilab experts, > During execution of plot3d, param3d, surf, etc. Scilab > *automatically* chooses the axes property *rotation_angles*. Is there > a way to influence this automatic? I do not mean ca=gca(); > ca.rotation_angles=[ang1 ang2]. The setting should be positioned in > the script***before* the plot command und should be valid for further > plots. > > This question is in context with the thread 'untwinkle a sequence of > graphics'. Without setting ca.rotation_angles=[a1 a2] after the > param3d there is no twinkle. If I set the appropriate aspect - > twinkling occurs again. You can call drawlater() just before the sequence plot3d(...); ca.rotation_angle=.... this way the intermediate graphics will not be displayed and call drawnow() just after to show the final graphic > > I have not been able to reduce this to a a minimal example. Perhaps my > enquiry suffices. > > Kind regards > Jens > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From erhard.glueck.austria at gmail.com Sat Dec 10 21:34:16 2016 From: erhard.glueck.austria at gmail.com (Erhy) Date: Sat, 10 Dec 2016 13:34:16 -0700 (MST) Subject: [Scilab-users] image area mask for applying for filter Message-ID: <1481402056890-4035216.post@n3.nabble.com> Hello! My interest ist to image processing. Are there tools to mask an area of an image, that a filter is only applied for the masked area? Thank you for tips Erhy -- View this message in context: http://mailinglists.scilab.org/image-area-mask-for-applying-for-filter-tp4035216.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Dec 10 21:34:18 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 21:34:18 +0100 Subject: [Scilab-users] Influencing the automatic rotation_angles setting in advance In-Reply-To: <584C5EC9.1090902@hslmg.de> References: <584C5EC9.1090902@hslmg.de> Message-ID: <584C66CA.4050804@free.fr> Le 10/12/2016 21:00, Jens Simon Strom a ?crit : > Hallo Scilab experts, > During execution of plot3d, param3d, surf, etc. Scilab > *automatically* chooses the axes property *rotation_angles*. Is there > a way to influence this automatic? I do not mean ca=gca(); > ca.rotation_angles=[ang1 ang2]. The setting should be positioned in > the script***before* the plot command und should be valid for further > plots. Jens, I bet that you will become expert in documentation reading: Please see the theta and alpha plot3d() options: https://help.scilab.org/docs/6.0.0/en_US/plot3d.html Nevertheless, i agree that the present plot3d() behavior is bugged in 2 ways: 1. if the current axes has already some rotation_angles clearly set to a 3D view (= at least one of both azimuth and polar angles not being a multiple of 90), plot3d() should not reset them to some default rotation_angles values, but use the current axes without reorienting it. 2. plot3d() default rotation_angles values should be taken from gda(). It is presently not the case. There is no reason to use gda() / sda() only for 2D plots. BR -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Dec 10 22:30:43 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Dec 2016 22:30:43 +0100 Subject: [Scilab-users] Influencing the automatic rotation_angles setting in advance In-Reply-To: <584C66CA.4050804@free.fr> References: <584C5EC9.1090902@hslmg.de> <584C66CA.4050804@free.fr> Message-ID: <584C7403.3010608@free.fr> Le 10/12/2016 21:34, Samuel Gougeon a ?crit : > Le 10/12/2016 21:00, Jens Simon Strom a ?crit : >> Hallo Scilab experts, >> During execution of plot3d, param3d, surf, etc. Scilab >> *automatically* chooses the axes property *rotation_angles*. Is there >> a way to influence this automatic? I do not mean ca=gca(); >> ca.rotation_angles=[ang1 ang2]. The setting should be positioned in >> the script***before* the plot command und should be valid for further >> plots. > Jens, > > I bet that you will become expert in documentation reading: > Please see the theta and alpha plot3d() options: > https://help.scilab.org/docs/6.0.0/en_US/plot3d.html > > Nevertheless, i agree that the present plot3d() behavior is bugged in > 2 ways: > > 1. if the current axes has already some rotation_angles clearly set > to a 3D view (= at least one of both azimuth and polar angles not > being a multiple of 90), plot3d() should not reset them to some > default rotation_angles values, but use the current axes without > reorienting it. > > 2. plot3d() default rotation_angles values should be taken from > gda(). It is presently not the case. There is no reason to use > gda() / sda() only for 2D plots. > These issues are reported there: http://bugzilla.scilab.org/14890 SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sat Dec 10 22:47:52 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sat, 10 Dec 2016 22:47:52 +0100 Subject: [Scilab-users] Influencing the automatic rotation_angles setting in advance In-Reply-To: <66dfab16-b683-dfdc-4e39-5c30f004c659@inria.fr> References: <584C5EC9.1090902@hslmg.de> <66dfab16-b683-dfdc-4e39-5c30f004c659@inria.fr> Message-ID: <584C7808.8010106@hslmg.de> Hallo Serge, Perfect remedy! The twinkling has come to an end. Thanks a lot! Kind regards Jens -------------------------------------------------------------------------------------------------- Am 10.12.2016 21:25, schrieb Serge Steer: > Le 10/12/2016 ? 21:00, Jens Simon Strom a ?crit : >> Hallo Scilab experts, >> During execution of plot3d, param3d, surf, etc. Scilab >> *automatically* chooses the axes property *rotation_angles*. Is there >> a way to influence this automatic? I do not mean ca=gca(); >> ca.rotation_angles=[ang1 ang2]. The setting should be positioned in >> the script***before* the plot command und should be valid for further >> plots. >> >> This question is in context with the thread 'untwinkle a sequence >> of graphics'. Without setting ca.rotation_angles=[a1 a2] after the >> param3d there is no twinkle. If I set the appropriate aspect - >> twinkling occurs again. > You can call drawlater() just before the sequence plot3d(...); > ca.rotation_angle=.... > this way the intermediate graphics will not be displayed > and call drawnow() just after to show the final graphic >> >> I have not been able to reduce this to a a minimal example. Perhaps >> my enquiry suffices. >> >> Kind regards >> Jens >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Sat Dec 10 23:31:22 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Sat, 10 Dec 2016 23:31:22 +0100 Subject: [Scilab-users] image area mask for applying for filter In-Reply-To: <1481402056890-4035216.post@n3.nabble.com> References: <1481402056890-4035216.post@n3.nabble.com> Message-ID: Hi Erhy, please find a code snipplet for extrascting an area of interest from an image. Way 1: mask is extracted from original image and stored as a new variable. original_img = rand(100,100).*256; extract_img = original_img (25:74,25:74); Way 2: make a copy of the original image // to keep the original values...just in case directly process the copy original_img = rand(100,100).*256; filtered_img = original_img;filtered_img(25:75,25:74) = 0; Matplot(filtered_img) Of course this example is more grayscale related, but you can do this as well for RGB images. original_img_R = rand(100,100).*256;original_img_G = rand(100,100).*256;original_img_B = rand(100,100).*256; original_RGB(:,:,1) = original_img_R;original_RGB(:,:,2) = original_img_G;original_RGB(:,:,3) = original_img_B; filtered_RGB = original_RGB;filtered_RGB(25:75,25:75,:)=0; ShowColorImage(filtered_RGB,''); // Note: ShowColorImage is part of the IPD toolbox. HTH Philipp 2016-12-10 21:34 GMT+01:00 Erhy : > Hello! > My interest ist to image processing. > Are there tools to mask an area of an image, > that a filter is only applied for the masked area? > > Thank you for tips > Erhy > > > > -- > View this message in context: http://mailinglists.scilab. > org/image-area-mask-for-applying-for-filter-tp4035216.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 > -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dkajah at gmail.com Sun Dec 11 03:41:29 2016 From: dkajah at gmail.com (Daniel Penalva) Date: Sun, 11 Dec 2016 00:41:29 -0200 Subject: [Scilab-users] Influencing the automatic rotation_angles in advance Message-ID: On Dec 10, 2016 6:00 PM, "Jens Simon Strom" wrote: > > Hallo Scilab experts, > During execution of plot3d, param3d, surf, etc. Scilab automatically chooses the axes property rotation_angles. Is there a way to influence this automatic? I do not mean ca=gca(); ca.rotation_angles=[ang1 ang2]. The setting should be positioned in the script before the plot command und should be valid for further plots. > > This question is in context with the thread 'untwinkle a sequence of graphics'. Without setting ca.rotation_angles=[a1 a2] after the param3d there is no twinkle. If I set the appropriate aspect - twinkling occurs again. > > I have not been able to reduce this to a a minimal example. Perhaps my enquiry suffices. > > Kind regards > Jens > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Mon Dec 12 12:35:47 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Mon, 12 Dec 2016 12:35:47 +0100 Subject: [Scilab-users] Unexpected occurrence of identity matrix 'eye' Message-ID: <584E8B93.60301@hslmg.de> Hi Scilab experts, When executing a certain script I get the console output ans = eye * 1. However I do not find a line in the *.sce and called *.sci which - to my knowledge - could produce this result. What can trigger it? Where would you search? Apart from that the script functions as desired. Kind regards Jens From jrafaelbguerra at hotmail.com Mon Dec 12 13:40:27 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 12 Dec 2016 12:40:27 +0000 Subject: [Scilab-users] Unexpected occurrence of identity matrix 'eye' In-Reply-To: <584E8B93.60301@hslmg.de> References: <584E8B93.60301@hslmg.de> Message-ID: Hi, You need to do more work to track down which instruction/function is issuing that output. PS: Fyi, bug #3748 shows some issue that might or might not be related: -->int16(eye()) ans = (eye *) 1 Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom Sent: Monday, December 12, 2016 12:36 PM To: International users mailing list for Scilab. Subject: [Scilab-users] Unexpected occurrence of identity matrix 'eye' Hi Scilab experts, When executing a certain script I get the console output ans = eye * 1. However I do not find a line in the *.sce and called *.sci which - to my knowledge - could produce this result. What can trigger it? Where would you search? Apart from that the script functions as desired. Kind regards Jens _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From j.s.strom at hslmg.de Mon Dec 12 14:05:16 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Mon, 12 Dec 2016 14:05:16 +0100 Subject: [Scilab-users] Unexpected occurrence of identity matrix 'eye' In-Reply-To: References: <584E8B93.60301@hslmg.de> Message-ID: <584EA08C.4090208@hslmg.de> Hi Rafael, Thanks for responding! After more tracking work I found that I used while .... end: instead of while ... end The colon acted as bug. Kind regards Jens ---------------------------------------------------- Am 12.12.2016 13:40, schrieb Rafael Guerra: > Hi, > > You need to do more work to track down which instruction/function is issuing that output. > > PS: > Fyi, bug #3748 shows some issue that might or might not be related: > -->int16(eye()) > ans = > (eye *) > 1 > > Regards, > Rafael > > > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom > Sent: Monday, December 12, 2016 12:36 PM > To: International users mailing list for Scilab. > Subject: [Scilab-users] Unexpected occurrence of identity matrix 'eye' > > Hi Scilab experts, > When executing a certain script I get the console output > > ans = > > eye * > > 1. > > However I do not find a line in the *.sce and called *.sci which - to my > knowledge - could produce this result. What can trigger it? Where would > you search? Apart from that the script functions as desired. > > Kind regards > Jens > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From Christophe.Dang at sidel.com Mon Dec 12 16:52:23 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 12 Dec 2016 15:52:23 +0000 Subject: [Scilab-users] {EXT} image area mask for applying for filter In-Reply-To: <1481402056890-4035216.post@n3.nabble.com> References: <1481402056890-4035216.post@n3.nabble.com> Message-ID: Hello, > De : users [mailto:users-bounces at lists.scilab.org] De la part de Erhy > Envoy? : samedi 10 d?cembre 2016 21:34 > > My interest ist to image processing. > Are there tools to mask an area of an image, that a filter is only applied for the masked area? Tools for image processing are in dedicated toolboxes, see https://atoms.scilab.org/categories/image_processing but I don't know these so I can't advise you. Concerning a mask, you may extract a part of the image. Let us suppose your image is a matrix called mpict. If your mask is represented by a condition, then you can create a matrix of booleans, called e.g. mbool, in which the (m, n) boolean is true when the condition is true for the (m, n) element of the picture. You can then extract the zone with mpict(mbool) HTH -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From sgougeon at free.fr Thu Dec 15 22:14:31 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 15 Dec 2016 22:14:31 +0100 Subject: [Scilab-users] toolbox_skeleton.iss Message-ID: <585307B7.1020408@free.fr> Hello, The SCI/contrib/toolbox_skeleton directory used as template to create a toolbox embeds a toolbox_skeleton.iss file. The usage of this one is not documented, neither in the file, nor in the native Scilab help, nor on the dedicated wiki page https://wiki.scilab.org/howto/Create%20a%20toolbox What is this file for? Is it useful for a toolbox made only of macros? Thanks for any hints Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Fri Dec 16 10:32:47 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Fri, 16 Dec 2016 10:32:47 +0100 Subject: [Scilab-users] toolbox_skeleton.iss In-Reply-To: <585307B7.1020408@free.fr> References: <585307B7.1020408@free.fr> Message-ID: <000001d2577f$5d4287b0$17c79710$@wanadoo.fr> Dear, The answer interests me Sincerely Pierre De : users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon Envoy? : jeudi 15 d?cembre 2016 22:15 ? : International users mailing list for Scilab. Objet : [Scilab-users] toolbox_skeleton.iss Hello, The SCI/contrib/toolbox_skeleton directory used as template to create a toolbox embeds a toolbox_skeleton.iss file. The usage of this one is not documented, neither in the file, nor in the native Scilab help, nor on the dedicated wiki page https://wiki.scilab.org/howto/Create%20a%20toolbox What is this file for? Is it useful for a toolbox made only of macros? Thanks for any hints Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.knappe at gmail.com Fri Dec 16 15:24:33 2016 From: christoph.knappe at gmail.com (christophk) Date: Fri, 16 Dec 2016 07:24:33 -0700 (MST) Subject: [Scilab-users] tweaking the appearance of error bars created by errbar() Message-ID: <1481898273467-4035229.post@n3.nabble.com> So my question is simple, how do I change the appearance of error bars that are created with the errbar() command? I want to access its line thickness, its line color and most of all I want to add horizontal lines to the upper and lower end of the error bars to mark their end. I did not see that there are return parameters for the errbar() function that can be tweaked. Neither did I see anything hidden in within the figure parameters. Is this possible? Any help here would be appreciated - thank you guys! :-) -- View this message in context: http://mailinglists.scilab.org/tweaking-the-appearance-of-error-bars-created-by-errbar-tp4035229.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Fri Dec 16 15:45:53 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 16 Dec 2016 14:45:53 +0000 Subject: [Scilab-users] {EXT} tweaking the appearance of error bars created by errbar() In-Reply-To: <1481898273467-4035229.post@n3.nabble.com> References: <1481898273467-4035229.post@n3.nabble.com> Message-ID: Hello, > De : christophk > Envoy? : vendredi 16 d?cembre 2016 15:25 > > how do I change the appearance of error bars that are created with the > errbar() command? --> errbar() --> h=gce() h = Handle of type "Segs" with properties: ====================================== parent: Axes children: [] visible = "on" data = matrix 252x2 line_mode = "on" line_style = 1 thickness = 1 arrow_size = 0 segs_color = matrix 1x126 mark_mode = "off" mark_style = 0 mark_size_unit = "tabulated" mark_size = 0 mark_foreground = -1 mark_background = -2 clip_state = "clipgrf" clip_box = [] user_data = [] tag = --> h.thickness=2; For the mark_style and segs_color, see https://help.scilab.org/docs/6.0.0/en_US/polyline_properties.html Unfortunately, I do not see anything that looks like a "T" stop -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From Christophe.Dang at sidel.com Fri Dec 16 15:51:09 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 16 Dec 2016 14:51:09 +0000 Subject: [Scilab-users] {EXT} tweaking the appearance of error bars created by errbar() In-Reply-To: References: <1481898273467-4035229.post@n3.nabble.com> Message-ID: Oups, too fast: > De : Dang Ngoc Chan, Christophe > Envoy? : vendredi 16 d?cembre 2016 15:46 > > For the mark_style and segs_color, see Better have a look at https://help.scilab.org/docs/6.0.0/en_US/segs_properties.html to change the colour, you can use something like newcolour = 5; // or whatever h.segs_color = newcolour *ones(h.segs_color); HTH 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 christoph.knappe at gmail.com Fri Dec 16 16:31:35 2016 From: christoph.knappe at gmail.com (christophk) Date: Fri, 16 Dec 2016 08:31:35 -0700 (MST) Subject: [Scilab-users] {EXT} tweaking the appearance of error bars created by errbar() In-Reply-To: References: <1481898273467-4035229.post@n3.nabble.com> Message-ID: <1481902295400-4035232.post@n3.nabble.com> Awesome - thanks Christophe! :-) If anyone knows how I can add some T-stops to the errorbars please let me know. Perhaps there is an atoms package that takes care of this? Without the vertical bars on either side of the error bars - the graph looks kind of weird to me. -- View this message in context: http://mailinglists.scilab.org/tweaking-the-appearance-of-error-bars-created-by-errbar-tp4035229p4035232.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Fri Dec 16 19:31:19 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 16 Dec 2016 18:31:19 +0000 Subject: [Scilab-users] {EXT} tweaking the appearance of error bars created by errbar() Message-ID: Hi, Please check this: // START OF CODE clf(); x = 0:0.1:2*%pi; y = sin(x); em = rand(y)/10; ep = rand(y)/7; dx = (max(x)-min(x))/200; // T width xvp = [x - dx; x + dx]; yvp = [y+ep; y+ep]; yvm = [y-em; y-em]; plot(x,y) errbar(x, y, em, ep); xsegs(xvp,yvp) xsegs(xvp,yvm) // END OF CODE Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of christophk Sent: Friday, December 16, 2016 4:32 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] {EXT} tweaking the appearance of error bars created by errbar() Awesome - thanks Christophe! :-) If anyone knows how I can add some T-stops to the errorbars please let me know. Perhaps there is an atoms package that takes care of this? Without the vertical bars on either side of the error bars - the graph looks kind of weird to me. -- View this message in context: http://mailinglists.scilab.org/tweaking-the-appearance-of-error-bars-created-by-errbar-tp4035229p4035232.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 j.s.strom at hslmg.de Sun Dec 18 11:36:13 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 18 Dec 2016 11:36:13 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles Message-ID: <5856669D.9090301@hslmg.de> Hi, I try to use uimenue() in a minimal example to toggle the aspect of a 3D curve between two values - without succes. Here is my defective script. //BEGIN OF UNFUNCTIONAL CODE xdel() figure(1) param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); ce=gce(); ce.thickness=10; ca=gca(); alpha=ca.rotation_angles(1);//initial alpha uimenu('label', 'alpha=0', 'callback',"alpha=70"); uimenu('label', 'alpha=90', 'callback',"alpha=10"); uimenu('label', 'break', 'callback',"break"); while 1 xclick() //to interrupt script, enable click on label, and restart ca.rotation_angles(1)=alpha; disp(alpha) end //END OF UNFUNCTIONAL CODE Please give me a clue for a feasible route. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Dec 18 13:56:28 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 18 Dec 2016 12:56:28 +0000 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: <5856669D.9090301@hslmg.de> References: <5856669D.9090301@hslmg.de> Message-ID: Hi Jens, Sleep may help. Please check code: //START OF CODE f = figure(1) param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); ca=gca(); ce=gce(); ce.thickness=10; alpha=ca.rotation_angles(1);//initial alpha m1= uimenu(f,'label','alpha=90','callback','alpha=90'); m2= uimenu(f,'label','alpha=10','callback','alpha=10'); m3= uimenu(f,'label', 'quit', 'callback', "t=%f"); t=%t; while t==%t sleep(300); // Adjust to user speed printf("alpha=%i\r", alpha) ca.rotation_angles(1)= alpha; end close(f) //END OF CODE Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom Sent: Sunday, December 18, 2016 11:36 AM To: International users mailing list for Scilab. Subject: [Scilab-users] Using uimenue to change rotation_angles Hi, I try to use uimenue() in a minimal example to toggle the aspect of a 3D curve between two values - without succes. Here is my defective script. //BEGIN OF UNFUNCTIONAL CODE xdel() figure(1) param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); ce=gce(); ce.thickness=10; ca=gca(); alpha=ca.rotation_angles(1);//initial alpha uimenu('label', 'alpha=0', 'callback',"alpha=70"); uimenu('label', 'alpha=90', 'callback',"alpha=10"); uimenu('label', 'break', 'callback',"break"); while 1 xclick() //to interrupt script, enable click on label, and restart ca.rotation_angles(1)=alpha; disp(alpha) end //END OF UNFUNCTIONAL CODE Please give me a clue for a feasible route. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sun Dec 18 14:34:33 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 18 Dec 2016 14:34:33 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: References: <5856669D.9090301@hslmg.de> Message-ID: <58569069.30607@hslmg.de> Hi Rafael, The script is perfect. I can adapt it to my original problem. Sometimes a little nap/sleep can cause a wonder.:-) Kind regards Jens ----------------------------------------------------------------------------------- Am 18.12.2016 13:56, schrieb Rafael Guerra: > > Hi Jens, > > Sleep may help. Please check code: > > //START OF CODE > > f = figure(1) > > param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); > > ca=gca(); > > ce=gce(); > > ce.thickness=10; > > alpha=ca.rotation_angles(1);//initial alpha > > m1= uimenu(f,'label','alpha=90','callback','alpha=90'); > > m2= uimenu(f,'label','alpha=10','callback','alpha=10'); > > m3= uimenu(f,'label', 'quit', 'callback', "t=%f"); > > t=%t; > > whilet==%t > > sleep(300);// Adjust to user speed > > printf("alpha=%i\r", alpha) > > ca.rotation_angles(1)= alpha; > > end > > close(f) > > //END OF CODE > > Regards, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Jens Simon Strom > *Sent:* Sunday, December 18, 2016 11:36 AM > *To:* International users mailing list for Scilab. > > *Subject:* [Scilab-users] Using uimenue to change rotation_angles > > Hi, > I try to use uimenue() in a minimal example to toggle the aspect of a > 3D curve between two values - without succes. > Here is my defective script. > > //BEGIN OFUNFUNCTIONAL CODE > xdel() > figure(1) > param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]);ce=_gce_();ce.thickness=10; > ca=_gca_(); > alpha=ca.rotation_angles(1);///initial alpha/ > uimenu('label', 'alpha=0', 'callback',"alpha=70"); > uimenu('label', 'alpha=90', 'callback',"alpha=10"); > uimenu('label', 'break', 'callback',"break"); > while 1 > xclick() //to interrupt script, enable click on label, and restart > ca.rotation_angles(1)=alpha; > disp(alpha) > end > //END OFUNFUNCTIONAL CODE > > Please give me a clue for a feasible route. > > Kind regards > Jens > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Dec 18 15:31:38 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 18 Dec 2016 15:31:38 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: <5856669D.9090301@hslmg.de> References: <5856669D.9090301@hslmg.de> Message-ID: <58569DCA.2000009@free.fr> Hello Jens, Why do you use a while loop? You can use only the following. scf(); param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); ce = gce(); ce.thickness = 10; m1 = uimenu('label', 'alpha=50', 'callback',"ca=gca(); ca.rotation_angles(1)=50"); m2 = uimenu('label', 'alpha=80', 'callback',"ca=gca(); ca.rotation_angles(1)=80"); HTH Samuel Le 18/12/2016 11:36, Jens Simon Strom a ?crit : > Hi, > I try to use uimenue() in a minimal example to toggle the aspect of a > 3D curve between two values - without succes. > Here is my defective script. > > //BEGIN OF UNFUNCTIONAL CODE xdel() figure(1) param3d([0 1 1 1],[0 0 1 > 1],[0 0 0 1]); ce=gce(); ce.thickness=10; ca=gca(); > alpha=ca.rotation_angles(1);//initial alpha uimenu('label', 'alpha=0', > 'callback',"alpha=70"); uimenu('label', 'alpha=90', > 'callback',"alpha=10"); uimenu('label', 'break', 'callback',"break"); > while 1 xclick() //to interrupt script, enable click on label, and > restart ca.rotation_angles(1)=alpha; disp(alpha) end //END OF > UNFUNCTIONAL CODE Please give me a clue for a feasible route. Kind > regards Jens > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sun Dec 18 16:20:08 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 18 Dec 2016 16:20:08 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: <58569DCA.2000009@free.fr> References: <5856669D.9090301@hslmg.de> <58569DCA.2000009@free.fr> Message-ID: <5856A928.8070306@hslmg.de> Hi Samuel, Without the loop the script finishes and gives no chance to change anything. Please advise if you can get along without a loop. Kind regards Jens ---------------------------------------------------------- Am 18.12.2016 15:31, schrieb Samuel Gougeon: > Hello Jens, > > Why do you use a while loop? You can use only the following. > > scf(); > param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); > ce = gce(); > ce.thickness = 10; > m1 = uimenu('label', 'alpha=50', 'callback',"ca=gca(); > ca.rotation_angles(1)=50"); > m2 = uimenu('label', 'alpha=80', 'callback',"ca=gca(); > ca.rotation_angles(1)=80"); > > HTH > Samuel > > Le 18/12/2016 11:36, Jens Simon Strom a ?crit : >> Hi, >> I try to use uimenue() in a minimal example to toggle the aspect of a >> 3D curve between two values - without succes. >> Here is my defective script. >> >> //BEGIN OF UNFUNCTIONAL CODE >> xdel() >> figure(1) >> param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); ce=gce(); ce.thickness=10; >> ca=gca(); >> alpha=ca.rotation_angles(1);//initial alpha >> uimenu('label', 'alpha=0', 'callback',"alpha=70"); >> uimenu('label', 'alpha=90', 'callback',"alpha=10"); >> uimenu('label', 'break', 'callback',"break"); >> while 1 >> xclick() //to interrupt script, enable click on label, and restart >> ca.rotation_angles(1)=alpha; >> disp(alpha) >> end >> //END OF UNFUNCTIONAL CODE >> >> Please give me a clue for a feasible route. >> >> Kind regards >> Jens >> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Dec 18 16:36:33 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 18 Dec 2016 16:36:33 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: <5856A928.8070306@hslmg.de> References: <5856669D.9090301@hslmg.de> <58569DCA.2000009@free.fr> <5856A928.8070306@hslmg.de> Message-ID: <5856AD01.8060001@free.fr> Le 18/12/2016 16:20, Jens Simon Strom a ?crit : > Hi Samuel, > Without the loop the script finishes and gives no chance to change > anything. ? Have you tried? Since the figure and its menus are still here, you can still use them, even if the script having generating them is finished. A callback is an asynchronous independent script that is performed just when it is called, "at any time" (actually, its instructions are queued when it is called, and performed ASAP). You don't need to block the console with a loop to make changes or actions on existing graphics. But if you want to make it "modal", that is to say waiting for and compelling the user to do something, yes, a loop is required. BTW, the loop that you use is infinite: there is no way to escape it smoothly, since while 1 is always true. SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Dec 18 16:56:01 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 18 Dec 2016 16:56:01 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: <58569DCA.2000009@free.fr> References: <5856669D.9090301@hslmg.de> <58569DCA.2000009@free.fr> Message-ID: <5856B191.2040302@free.fr> Jens, Le 18/12/2016 15:31, Samuel Gougeon a ?crit : > > scf(); > param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]); > ce = gce(); > ce.thickness = 10; > m1 = uimenu('label', 'alpha=50', 'callback',"ca=gca(); > ca.rotation_angles(1)=50"); > m2 = uimenu('label', 'alpha=80', 'callback',"ca=gca(); > ca.rotation_angles(1)=80"); At the time the menu is clicked, the current axes may be no longer the one of the parent figure of the clicked component (menu). So instead of ca = gca(), the callback should use gcbo for a more robust implementation: https://help.scilab.org/docs/6.0.0/en_US/gcbo.html SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sun Dec 18 18:04:45 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 18 Dec 2016 18:04:45 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: <5856AD01.8060001@free.fr> References: <5856669D.9090301@hslmg.de> <58569DCA.2000009@free.fr> <5856A928.8070306@hslmg.de> <5856AD01.8060001@free.fr> Message-ID: <5856C1AD.6040704@hslmg.de> Hi Samuel, what I really do is this: xdel() figure_size=[1800 900]; cf=figure(1,'position',[0 0 figure_size],'background',8,'immediate_drawing','off','visible','off'); //... //plot3d and param3d commands // ... Rotation_Angles=[85 -64]; ca=gca(); ca.box='off'; xtitle('$\Huge{\text{Isometrisch}}$','','') cf.immediate_drawing='on'; cf.visible='on'; m1= uimenu(cf,'label','Himmelspol','callback','ra=[0,0],xtitle(''$\Huge{\text{Himmelspol}}$'','','')'); m2= uimenu(cf,'label','Ost','callback','ra=[90,90],xtitle(''$\Huge{\text{Ost}}$'','','')'); m3= uimenu(cf,'label','?quator','callback','ra=[90,0],xtitle(''$\Huge{\text{?quator}}$'','','')'); m4= uimenu(cf,'label','West','callback','ra=[90,-90],xtitle(''$\Huge{\text{West}}$'','','')'); m5= uimenu(cf,'label','Isometrisch','callback','ra=Rotation_Angles,xtitle(''$\Huge{\text{Isometrisch}}$'','','')'); m6= uimenu(cf,'label','Animation','callback','Case=1,xtitle(''$\Huge{\text{Rotierend}}$'','','')'); m7= uimenu(cf,'label', 'Aus', 'callback', "t=%f"); Case=0;//Initiierung f?r Anfangspassage, d.h.keine Animation ra=Rotation_Angles;//Initiierung f?r Anfangspassage t=%t; while t==%t if Case==1//m6 Case=0; rota=ca.rotation_angles; for k=[0:1:90 89:-1:0] drawlater() ca.rotation_angles=rota+[0 k]; sleep(10); drawnow() end//for k=[ .... ] else sleep(200) ca.rotation_angles=ra; end//if end//while This works satisfactorily. I could not get the result without the infinite loop. Kind regards Jens ----------------------------------------------------------------------- Am 18.12.2016 16:36, schrieb Samuel Gougeon: > Le 18/12/2016 16:20, Jens Simon Strom a ?crit : >> Hi Samuel, >> Without the loop the script finishes and gives no chance to change >> anything. > ? > Have you tried? Since the figure and its menus are still here, you can > still use them, even if the script having generating them is finished. > > A callback is an asynchronous independent script that is performed > just when it is called, "at any time" (actually, its instructions are > queued when it is called, and performed ASAP). > > You don't need to block the console with a loop to make changes or > actions on existing graphics. > But if you want to make it "modal", that is to say waiting for and > compelling the user to do something, yes, a loop is required. > BTW, the loop that you use is infinite: there is no way to escape it > smoothly, since > while 1 > is always true. > > SG > > > > _______________________________________________ > 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 Dec 19 08:41:20 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 19 Dec 2016 08:41:20 +0100 Subject: [Scilab-users] The overloading code for functions is changed in Scilab 6 Message-ID: <58578F20.9080202@free.fr> Hello all, It seems that the overloading code ascribed to the Scilab function type is not the same in Scilab 6 than in Scilab 5: *in Scilab 5:* [sind sind] function %mc_c_mc(a,b), disp("code is mc"), endfunction [sind sind] -->[sind sind] !--error 144 Undefined operation for the given operands. check or define function %*mc*_c_*mc* for overloading. -->function %*mc*_c_*mc*(a,b), disp("code is ""mc"""), endfunction -->[sind sind] code is ""mc"" *in Scilab 6:* --> [sind sind] Undefined operation for the given operands. check or define function %*function*_c_*function* for overloading. --> function %*mc*_c_*mc*(a,b), disp("code is mc"), endfunction --> [sind sind] // mc does not work. This is not just a bad error message: Undefined operation for the given operands. check or define function %function_c_function for overloading. --> function %function_c_function(a,b), disp("code is ""function"""), endfunction --> [sind sind] code is "function" ans = [] I have not tested all operators, but at least this is also the case for the vertical concatenation [;]. It this change intentional? It is not documented. I am wondering why -- if back-compatibility is not an issue -- other changes more expected are not done for Scilab 6 as well? Best regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From josep.95 at hotmail.com Thu Dec 15 19:14:43 2016 From: josep.95 at hotmail.com (josep maria carmona domingo) Date: Thu, 15 Dec 2016 18:14:43 +0000 Subject: [Scilab-users] Problem at startup. Message-ID: Hello, I have a critical problem in the startup of the program. It says "The configuration file has been corrupted and reset to the default one." Therefore I cannot continue working with it and it is such a problem as I will have to do an assignment in this program, and exams too. Thank you very much. Josep Maria Carmona. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jalonso at ut.edu.co Sun Dec 18 15:30:15 2016 From: jalonso at ut.edu.co (Jairo Alonso Tunjano) Date: Sun, 18 Dec 2016 09:30:15 -0500 Subject: [Scilab-users] Mac OS Sierra version 10.12.2 Message-ID: Few months before, I change my macOS to Sierra (version 10.12.2) , and now I cant open Scilab. I proof this versions : scilab-6.0.0-beta-2-x86_64 Scilab scilab-5.5.2.1-x86_64_yosemite scilab-5.5.2.1-x86_64 When I try to open the software Scilab I obtain this message: This version of Scilab will probably fail on this system (10.12.2): Scilab requires 10.6.5 (Snow Leopard) or newer system. Please explain me how to do to work with Scilab in my PC. I use Scilab in academic purpose -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bignier at scilab-enterprises.com Mon Dec 19 09:34:12 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 19 Dec 2016 09:34:12 +0100 Subject: [Scilab-users] Problem at startup. In-Reply-To: References: Message-ID: Hello Josep, Could you try typing SCIHOME in Scilab and delete the folder that it points to? It is your config folder so okay to delete it. If you don't have access to the Scilab console, on Windows it is located in C:/Users/Josep/AppData/Roaming/Scilab/ and on Linux it is in /home/josep/.Scilab/. Hope this helps, Regards, Paul On 12/15/2016 07:14 PM, josep maria carmona domingo wrote: > > Hello, > > I have a critical problem in the startup of the program. > > It says "The configuration file has been corrupted and reset to the > default one." > > Therefore I cannot continue working with it and it is such a problem > as I will have to do an assignment in this program, and exams too. > > > Thank you very much. > > Josep Maria Carmona. > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bignier at scilab-enterprises.com Mon Dec 19 09:40:01 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 19 Dec 2016 09:40:01 +0100 Subject: [Scilab-users] Mac OS Sierra version 10.12.2 In-Reply-To: References: Message-ID: Hello Jairo, Here is a clear workaround to run the 5.5.2 version: replace scilab/SuperCC/Dev-Tools/trunk/SE/Prerequirements/macosx/lib/thirdparty/libBLAS.dylib (here you can see that the 10.12 folder is missing, corresponding to Sierra) by /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib. We are currently packaging a binary version 6 containing that fix, we should release it soon. Have a look at http://www.scilab.org/en/development/nightly_builds/master every once in a while and try the binary. Have a good day, Paul On 12/18/2016 03:30 PM, Jairo Alonso Tunjano wrote: > Few months before, I change my macOS to Sierra (version 10.12.2) , and > now I cant open Scilab. > I proof this versions : > scilab-6.0.0-beta-2-x86_64 > Scilab scilab-5.5.2.1-x86_64_yosemite > scilab-5.5.2.1-x86_64 > When I try to open the software Scilab I obtain this message: > This version of Scilab will probably fail on this system (10.12.2): > Scilab requires 10.6.5 (Snow Leopard) or newer system. > > Please explain me how to do to work with Scilab in my PC. > I use Scilab in academic purpose > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Mon Dec 19 10:40:44 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 19 Dec 2016 10:40:44 +0100 Subject: [Scilab-users] The overloading code for functions is changed in Scilab 6 In-Reply-To: <58578F20.9080202@free.fr> References: <58578F20.9080202@free.fr> Message-ID: <1482140444.1973.1.camel@scilab-enterprises.com> Hi Samuel, This change is probably not intentional, could you post a bug on that please ? PS: even if the type "mc" as been clarified as "function", we can add a compatibility mode for overloading aliases. -- Cl?ment Le lundi 19 d?cembre 2016 ? 08:41 +0100, Samuel Gougeon a ?crit?: > Hello all, > > It seems that the overloading code ascribed to the Scilab function type is not the same in Scilab > 6 than in Scilab 5: > > in Scilab 5: > [sind sind] > function %mc_c_mc(a,b), disp("code is mc"), endfunction > [sind sind] > > -->[sind sind] > ??????? !--error 144? > Undefined operation for the given operands. > check or define function %mc_c_mc for overloading. > ? > -->function %mc_c_mc(a,b), disp("code is ""mc"""), endfunction > ? > -->[sind sind] > ?code is ""mc"" ?? > ?? > in Scilab 6: > --> [sind sind] > > Undefined operation for the given operands. > check or define function %function_c_function for overloading. > > --> function %mc_c_mc(a,b), disp("code is mc"), endfunction > > --> [sind sind]??? // mc does not work. This is not just a bad error message: > > Undefined operation for the given operands. > check or define function %function_c_function for overloading. > > --> function %function_c_function(a,b), disp("code is ""function"""), endfunction > > --> [sind sind] > > ?code is "function" > ?ans? = > ??? [] > > I have not tested all operators, but at least this is also the case for the vertical concatenation > [;]. > It this change intentional? It is not documented. > > I am wondering why -- if back-compatibility is not an issue -- other changes more expected are not > done for Scilab 6 as well? > > Best regards > Samuel Gougeon > > ?_______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From clement.david at scilab-enterprises.com Mon Dec 19 10:59:12 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 19 Dec 2016 10:59:12 +0100 Subject: [Scilab-users] toolbox_skeleton.iss In-Reply-To: <000001d2577f$5d4287b0$17c79710$@wanadoo.fr> References: <585307B7.1020408@free.fr> <000001d2577f$5d4287b0$17c79710$@wanadoo.fr> Message-ID: <1482141552.1973.3.camel@scilab-enterprises.com> Hello, This "SCI/contrib/toolbox_skeleton.iss" file comes from the Scilab source tree and is used on the Scilab installer to manage toolbox_skeleton and xcos_toolbox_skeleton files. It is not really useful out of Scilab. *AND* A "toolbox_skeleton_redist.iss" file is available on the "SCI/contrib/toolbox_skeleton" directory on the Scilab source tree and might have been renamed to "toolbox_skeleton.iss" on Scilab installation. It can be used as an example to build an installer for a toolbox by hard-coding the list of files and a specific Scilab installation path. It can be used for a macro based toolbox but also for a binary toolbox after some tweaking. Regards, -- Cl?ment Le vendredi 16 d?cembre 2016 ? 10:32 +0100, Perrichon a ?crit?: > Dear, > The answer interests me > Sincerely > Pierre > ? > De?: users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon > Envoy??: jeudi 15 d?cembre 2016 22:15 > ??: International users mailing list for Scilab. > Objet?: [Scilab-users] toolbox_skeleton.iss > ? > Hello, > > The SCI/contrib/toolbox_skeleton directory used as template to create a toolbox embeds a > toolbox_skeleton.iss file. The usage of this one is not documented, neither in the file, nor in > the native Scilab help, nor on the dedicated wiki page https://wiki.scilab.org/howto/Create%20a%20 > toolbox > > What is this file for? > > Is it useful for a toolbox made only of macros? > > Thanks for any hints > Samuel Gougeon > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From j.s.strom at hslmg.de Mon Dec 19 12:21:26 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Mon, 19 Dec 2016 12:21:26 +0100 Subject: [Scilab-users] xclick with output argument cdmenu Message-ID: <5857C2B6.6040003@hslmg.de> Hi Scilab experts, I am looking for an example where xclick is used with all 5 output arguments including cbmenu to see the interaction with a menu. The documentation only says cbmenu: String: callback associated to a menu if xclick returns due to a click on a menu. In this case, ibutton, xcoord, ycoord, and iwin take arbitrary values. I would like to study an example snippet for the the application of xclick with cbmenu. By recherche I did not find any. A relevant web link would suffice. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From contact at pierre-vuillemin.fr Mon Dec 19 15:51:54 2016 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Mon, 19 Dec 2016 15:51:54 +0100 Subject: [Scilab-users] Calling a java method in a Scilab function In-Reply-To: <584C0CB1.3020800@free.fr> References: <584C0CB1.3020800@free.fr> Message-ID: Glad to know that it has been fixed. Thank you for your answer. Best regards, Pierre Le 10.12.2016 15:09, Samuel Gougeon a ?crit : > Hello Pierre, > > Le 07/12/2016 10:04, Pierre Vuillemin a ?crit : > >> Hi all, >> >> I have to create unique IDs for some object in Scilab. For that purpose, someone kindly guided me towards the UUID class of java, which lead me to create this function in Scilab, >> >> function id = make_id() >> UUID = jimport("java.util.UUID", %f) >> tmp = jinvoke(UUID,"randomUUID") >> id = jinvoke(tmp,"toString") >> endfunction >> >> It works fine. >> >> An a priori similar function is >> >> function id = make_id_err() >> UUID = jimport("java.util.UUID", %f) >> tmp = UUID.randomUUID() >> id = tmp.toString() >> endfunction >> >> where the methods are called without jinvoke. While the instructions of the latter function work well in the terminal, they lead to an error when trying to exec the function 'make_id_err'. >> >> I was wondering if it is a normal behaviour? > No, but the bug is fixed in Scilab 6.0: > > In Scilab 5.5.2: > -->endfunction > UUID = jimport("java.util.UUID", %f) > !--error 26 > R?cursivit? trop complexe ! (Les tables de r?currence sont pleines) > at line 2 of function make_id_err called by : > tmp = UUID.randomUUID() > at line 3 of function make_id_err called by : > tmp = UUID.randomUUID() > at line 3 of function make_id_err called by : > ... etc > > In Scilab 6.0: > --> getversion("scilab") > ans = > 6. 0. 0. 1.477D+09 > > --> function id = make_id_err() >> UUID = jimport("java.util.UUID", %f) >> tmp = UUID.randomUUID() >> id = tmp.toString() >> endfunction > > --> make_id_err() > ans = > 49e4f3f1-736a-435f-bc26-f7061f10de27 > > BR > 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 Dec 19 18:31:57 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 19 Dec 2016 18:31:57 +0100 Subject: [Scilab-users] The overloading code for functions is changed in Scilab 6 In-Reply-To: <1482140444.1973.1.camel@scilab-enterprises.com> References: <58578F20.9080202@free.fr> <1482140444.1973.1.camel@scilab-enterprises.com> Message-ID: <5858198D.6090604@free.fr> Hi Cl?ment, Le 19/12/2016 10:40, Cl?ment David a ?crit : > Hi Samuel, > > This change is probably not intentional, could you post a bug on that please ? Done there: http://bugzilla.scilab.org/14900 > PS: even if the type "mc" as been clarified as "function" It is definitively clearer, indeed > , we can add a compatibility mode for overloading aliases. Great. If it is not too much work adding it, it is always better to handle changes smoothly. Thanks Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Dec 20 01:40:20 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 20 Dec 2016 00:40:20 +0000 Subject: [Scilab-users] xclick with output argument cdmenu In-Reply-To: <5857C2B6.6040003@hslmg.de> References: <5857C2B6.6040003@hslmg.de> Message-ID: Hi Jens, Together with Scilab 5 distribution, such "examples" may be found in the following functions: - plotprofile - edit_curv - getcolor Not sure how easy they are to understand but you may want to let us know. Rgds, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom Sent: Monday, December 19, 2016 12:21 PM To: International users mailing list for Scilab. Subject: [Scilab-users] xclick with output argument cdmenu Hi Scilab experts, I am looking for an example where xclick is used with all 5 output arguments including cbmenu to see the interaction with a menu. The documentation only says cbmenu: String: callback associated to a menu if xclick returns due to a click on a menu. In this case, ibutton, xcoord, ycoord, and iwin take arbitrary values. I would like to study an example snippet for the the application of xclick with cbmenu. By recherche I did not find any. A relevant web link would suffice. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Dec 20 01:44:40 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 20 Dec 2016 00:44:40 +0000 Subject: [Scilab-users] xclick with output argument cdmenu In-Reply-To: References: <5857C2B6.6040003@hslmg.de> Message-ID: To me more precise, pls look inside the *.sci function files (edit_curv.sci, etc.) ******** Hi Jens, Together with Scilab 5 distribution, such "examples" may be found in the following functions: - plotprofile - edit_curv - getcolor Not sure how easy they are to understand but you may want to let us know. Rgds, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom Sent: Monday, December 19, 2016 12:21 PM To: International users mailing list for Scilab. > Subject: [Scilab-users] xclick with output argument cdmenu Hi Scilab experts, I am looking for an example where xclick is used with all 5 output arguments including cbmenu to see the interaction with a menu. The documentation only says cbmenu: String: callback associated to a menu if xclick returns due to a click on a menu. In this case, ibutton, xcoord, ycoord, and iwin take arbitrary values. I would like to study an example snippet for the the application of xclick with cbmenu. By recherche I did not find any. A relevant web link would suffice. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Tue Dec 20 15:02:16 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Tue, 20 Dec 2016 15:02:16 +0100 Subject: [Scilab-users] Printf on console in a c file Message-ID: <001201d25ac9$ac5da3f0$0518ebd0$@wanadoo.fr> Hello, I'd like to print in a C file (inside a palette) on the console, but nothing appends. Have anybody an idea on how to proceed ? I've also try something like : fprintf(stderr,"\n Lower limiter greater then Upper one"); but I get errors at compile time, includind stdio.h Sincerely Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 906 bytes Desc: not available URL: From j.s.strom at hslmg.de Tue Dec 20 16:03:47 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Tue, 20 Dec 2016 16:03:47 +0100 Subject: [Scilab-users] xclick with output argument cdmenu In-Reply-To: References: <5857C2B6.6040003@hslmg.de> Message-ID: <58594853.6070903@hslmg.de> Hello Rafael, getcolor( ) was the best source. It led to xdel() x=[-1 +1]; winnum=1; win=string(winnum); cf=figure(winnum); plot(x,x) C=["Green" "Red" "Abort"];//case name strings addmenu(winnum, C(1)); C1="execstr("+C(1)+"_"+win+"(1))"; addmenu(winnum, C(2)); C2="execstr("+C(2)+"_"+win+"(1))"; addmenu(winnum, C(3)); C3="execstr("+C(3)+"_"+win+"(1))"; while %t [!,!,!,!,cbmenu]=xclick(); //Get the clicked option by cbmenu if cbmenu==C1, cf.background=3; end if cbmenu==C2, cf.background=5; end if cbmenu==C3, break, end end where the necessity of execstr( ) is quite unintuitive to me. Using uimenu( ) in the alternate script xdel() x=[-1 +1]; winnum=1; win=string(winnum); cf=figure(winnum); plot(x,x) C=["Green" "Red" "Abort"];//case name strings uimenu('label',C(1),'callback','t1=%t'); uimenu('label',C(2),'callback','t2=%t'); uimenu('label',C(3),'callback','t3=%t'); while 1 t1=%f;t2=%f;t3=%f; sleep(100) if t1, cf.background=3; end if t2, cf.background=5; end if t3==%t, break, end end does the same andis easier to understand. However it needs the sleep. I could not adapt the uimenu( ) approach to xclick in order to avoid the hectic loop. Kind regards Jens ----------------------------------------------------------------------------------------------------------------------------------------- Am 20.12.2016 01:44, schrieb Rafael Guerra: > > To me more precise, pls look inside the *.sci function files > (edit_curv.sci, etc.) > > ******** > > Hi Jens, > > Together with Scilab 5 distribution, such "examples" may be found in > the following functions: > > -plotprofile > > -edit_curv > > -getcolor > > Not sure how easy they are to understand but you may want to let us know. > > Rgds, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Jens Simon Strom > *Sent:* Monday, December 19, 2016 12:21 PM > *To:* International users mailing list for Scilab. > > > *Subject:* [Scilab-users] xclick with output argument cdmenu > > Hi Scilab experts, > I am looking for an example where xclickis used with all 5 output > arguments including cbmenuto see the interaction with a menu. > > The documentation only says /cbmenu//: / /String: callback associated > to a menu if xclick returns due to a click on a menu. In this case, > ibutton, xcoord, ycoord, and iwin take arbitrary values./ > > I would like to study an example snippet for the the application of > xclickwith cbmenu. By recherche I did not find any. A relevant web > link would suffice. > > Kind regards > Jens > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From martini_edu at yahoo.com.br Tue Dec 20 18:08:44 2016 From: martini_edu at yahoo.com.br (Eduardo Martini) Date: Tue, 20 Dec 2016 17:08:44 +0000 (UTC) Subject: [Scilab-users] Using "spec" with "parallel_run" References: <1192700220.2369867.1482253724368.ref@mail.yahoo.com> Message-ID: <1192700220.2369867.1482253724368@mail.yahoo.com> Hi, I am running several simulation in which I have to get eigenvalues several times: the process seems to be easy to paralelize as any calculation is independent from the others. How ever I am getting errors when using "parallel_run" :? I manage to create a simple example of the problem: "function output=ThisFunctionDoesWork(i) eig_values = spec(rand(10,10)); output = (1:10)'; endfunction function output=ThisFunctionDoesNOTWork(i) eig_values = spec(rand(10,10)); output = eig_values; endfunction ThisFunctionDoesWork(1) ThisFunctionDoesNOTWork(1) parallel_run(1:4,ThisFunctionDoesWork,10) parallel_run(1:4,ThisFunctionDoesNOTWork,10)" I get the following output: ">ThisFunctionDoesWork(1) ans = 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. -->ThisFunctionDoesNOTWork(1) ans = 4.6702874 0.5256414 + 0.5235705i 0.5256414 - 0.5235705i 0.1415384 + 0.6023968i 0.1415384 - 0.6023968i - 0.5172448 + 0.4635569i - 0.5172448 - 0.4635569i 0.1193317 - 0.3188852 + 0.0144623i - 0.3188852 - 0.0144623i -->parallel_run(1:4,ThisFunctionDoesWork,10) ans = 1. 1. 1. 1. 2. 2. 2. 2. 3. 3. 3. 3. 4. 4. 4. 4. 5. 5. 5. 5. 6. 6. 6. 6. 7. 7. 7. 7. 8. 8. 8. 8. 9. 9. 9. 9. 10. 10. 10. 10. ->parallel_run(1:4,ThisFunctionDoesNOTWork,10) !--error 42 A fatal error has been detected by Scilab. Your instance will probably quit unexpectedly soon. If a graphic feature has been used, this might be caused by the system graphic drivers. Please try to update them and run this feature again. You can report a bug on http://bugzilla.scilab.org/ with: * a sample code which reproduces the issue * the result of [a, b] = getdebuginfo() * the following information: [emartini-Dell-System-Inspiron-N4110:31486] Signal: Segmentation fault (11) [emartini-Dell-System-Inspiron-N4110:31486] Signal code: Address not mapped (1) [emartini-Dell-System-Inspiron-N4110:31486] Failing at address: (nil) Call stack: 1: 0x8bb2f9 (/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so) 2: 0x8af1f8 < > (/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so) 3: 0x11390 < > (/lib/x86_64-linux-gnu/libpthread.so.0) 4: 0x9ec90 < > (/lib/x86_64-linux-gnu/libc.so.6) 5: 0x2eba < > (/usr/lib/scilab/libsciparallel.so) 6: 0x495e (/usr/lib/scilab/libsciparallel.so) 7: 0x21ba (/usr/lib/scilab/libsciparallel.so) 8: 0x1586a2 (/usr/lib/scilab/libscilab-cli.so.0) 9: 0x15d26b (/usr/lib/scilab/libscilab-cli.so.0) 10: 0x158af8 (/usr/lib/scilab/libscilab-cli.so.0) 11: 0x16c266 (/usr/lib/scilab/libscilab-cli.so.0) 12: 0x1671aa (/usr/lib/scilab/libscilab-cli.so.0) 13: 0x14d5 < > (/usr/bin/scilab-bin) 14: 0x20830 <__libc_start_main> (/lib/x86_64-linux-gnu/libc.so.6) 15: 0x1829 < > (/usr/bin/scilab-bin) End of stack !--error 999 Aborting current computation " I am lost... I can even "disp" the eig_values, but no luck in having them as output variables.I am doing something wrong? Thanks a lot for any help! ;) -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Tue Dec 20 18:23:46 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Tue, 20 Dec 2016 18:23:46 +0100 Subject: [Scilab-users] Impossibility to generate C code with a basic sum example Message-ID: <000901d25ae5$d29c1260$77d43720$@wanadoo.fr> Dear Xcos team, I try to generate a C code with a basic super bloc containing only a sum with 2 inputs.(out = in1 + in2) The generator doesn't produce any code and signals 3 errors Error 1 : "Not enough information to find ports sizes. I try to find the problem" Error 2: "Impossible de g?n?rer une erreur dans un superbloc. Veuiller compiler le diagramme pour signler l'erreur" Error 3: "Probl?me avec la taille ou le type de port" Note : I have already generated C code using the C generator wihout any problem, and functions were more complicated See bug #14904 for attached files Sincerely Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 906 bytes Desc: not available URL: From tim at wescottdesign.com Tue Dec 20 19:48:20 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Tue, 20 Dec 2016 10:48:20 -0800 Subject: [Scilab-users] Printf on console in a c file In-Reply-To: <001201d25ac9$ac5da3f0$0518ebd0$@wanadoo.fr> References: <001201d25ac9$ac5da3f0$0518ebd0$@wanadoo.fr> Message-ID: <1482259700.2754.51.camel@wescottdesign.com> On Tue, 2016-12-20 at 15:02 +0100, Perrichon wrote: > Hello, > ? > I?d like to print in a C file (inside a palette) on the console, but > nothing appends. > Have anybody an idea on how to proceed?? > ? > I?ve also try something? like?: > fprintf(stderr,"\n Lower limiter greater then Upper one"); > but I get errors at compile time, includind stdio.h Are you trying to use the C standard library printf, or the Scilab printf? It's been a while since I've done combined C and Scilab code, but if I remember correctly you can call Scilab functions from C -- that's probably what you'll need to do. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From paul.carrico at free.fr Tue Dec 20 21:45:40 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 20 Dec 2016 21:45:40 +0100 Subject: [Scilab-users] uicontrol & wiki Message-ID: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> Hi I've been looking to the wiki and an interesting article speaking about GUI developments (https://fr.wikibooks.org/wiki/D?couvrir_Scilab/Cr?er_une_interface_graphique_GUI - in French language). I've a naive question on the code hereafter: why is it possible to implement several values? no loop is needed nor any breack condition ... surprising but I do not understand :-) (naive question I confess) Thanks Paul ps: implement a value in the bottom left box and click on the pushbutton x^2 ###############################################" mode(0) f = scf(0); e = uicontrol(f, "style", "edit", ... "position", [0 0 100 20]); t = uicontrol(f, "style", "text", ... "position", [200 0 100 20], ... "string", "..."); b = uicontrol(f, "style", "pushbutton", ... "string", "$x^2$",... "position", [100 0 100 20], ... "callback", "x = evstr(e.string);... y = x^2;... t.string = string(y);... plot2d(x, y, style = -1);"); -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Dec 20 22:10:26 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 20 Dec 2016 22:10:26 +0100 Subject: [Scilab-users] uicontrol & wiki In-Reply-To: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> References: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> Message-ID: <58599E42.8050005@free.fr> Hello Paul, Le 20/12/2016 21:45, paul.carrico at free.fr a ?crit : > > ###############################################" > mode(0) > > f = scf(0); > e = uicontrol(f, "style", "edit", ... > "position", [0 0 100 20]); > t = uicontrol(f, "style", "text", ... > "position", [200 0 100 20], ... > "string", "..."); > b = uicontrol(f, "style", "pushbutton", ... > "string", "$x^2$",... > "position", [100 0 100 20], ... > "callback", "x = evstr(e.string);... > y = x^2;... > t.string = string(y);... > plot2d(x, y, style = -1);"); > I get --> b = uicontrol(f, "style", "pushbutton", ... > "string", "$x^2$",... > "position", [100 0 100 20], ... > "callback", "x = evstr(e.string);... "callback", "x = evstr(e.string);... ^^ Error: Unexpected end of file in a string. You can't break a string in this way, but with "my string and "+.. "my text" -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Dec 20 22:19:17 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 20 Dec 2016 22:19:17 +0100 Subject: [Scilab-users] uicontrol & wiki In-Reply-To: <58599E42.8050005@free.fr> References: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> <58599E42.8050005@free.fr> Message-ID: hi Samuel .. I think there's a misunderstanding in my questioning... I'm wondering why this code works (under Scilab 5.5.2 at least) i.e. why I can plot several points Paul Le 2016-12-20 22:10, Samuel Gougeon a ?crit : > Hello Paul, > > Le 20/12/2016 21:45, paul.carrico at free.fr a ?crit : > >> ###############################################" >> >> mode(0) >> >> f = scf(0); >> e = uicontrol(f, "style", "edit", ... >> "position", [0 0 100 20]); >> t = uicontrol(f, "style", "text", ... >> "position", [200 0 100 20], ... >> "string", "..."); >> b = uicontrol(f, "style", "pushbutton", ... >> "string", "$x^2$",... >> "position", [100 0 100 20], ... >> "callback", "x = evstr(e.string);... >> y = x^2;... >> t.string = string(y);... >> plot2d(x, y, style = -1);"); > I get > --> b = uicontrol(f, "style", "pushbutton", ... >> "string", "$x^2$",... >> "position", [100 0 100 20], ... >> "callback", "x = evstr(e.string);... > "callback", "x = evstr(e.string);... > ^^ > Error: Unexpected end of file in a string. > > You can't break a string in this way, but with > "my string and "+.. > "my text" > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Dec 20 22:24:48 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 20 Dec 2016 22:24:48 +0100 Subject: [Scilab-users] uicontrol & wiki In-Reply-To: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> References: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> Message-ID: <5859A1A0.4040306@free.fr> Le 20/12/2016 21:45, paul.carrico at free.fr a ?crit : > Hi > > I've been looking to the wiki and an interesting article speaking > about GUI developments > (https://fr.wikibooks.org/wiki/D?couvrir_Scilab/Cr?er_une_interface_graphique_GUI > > - in French language). > I've a naive question on the code hereafter: why is it possible > to implement several values? no loop is needed nor any breack > condition ... surprising but I do not understand :-) (naive question I > confess) If i understand well your question -- rather the same than Jens's one, that likes loops too, mainly "while" ones embeding xclick() :) --, i would answer the same that i did to him: A callback is a local (asynchronous) script that is executed each time that the interactive component defining it is activated. So here, each time you press the x^2 button, each time its callback is executed. In the callback, the instruction x = evstr(e.string); is not robust, because at the moment the button is pressed, the variable "e" may no longer exist. Clearing it or overwriting it with something else in the meantime doesnot affect the graphic component. "e" is just a handle (while delete(e) would really delete the component). For a robust implementation, gcbo.stringis required instead. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Dec 20 22:51:08 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 20 Dec 2016 22:51:08 +0100 Subject: [Scilab-users] uicontrol & wiki In-Reply-To: <5859A1A0.4040306@free.fr> References: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> <5859A1A0.4040306@free.fr> Message-ID: <5859A7CC.5090306@free.fr> Le 20/12/2016 22:24, Samuel Gougeon a ?crit : > > If i understand well your question -- rather the same than Jens's one, > that likes loops too, mainly "while" ones embeding xclick() :) --, i > would answer the same that i did to him: > A callback is a local (asynchronous) script that is executed each time > that the interactive component defining it is activated. > So here, each time you press the x^2 button, each time its callback is > executed. > > In the callback, the instruction > x = evstr(e.string); > is not robust, because at the moment the button is pressed, the > variable "e" > may no longer exist. Clearing it or overwriting it with something else > in the meantime > doesnot affect the graphic component. "e" is just a handle (while > delete(e) would really > delete the component). > For a robust implementation, gcbo.stringis required instead. OK, here, the button should refer to the edit area. So gcbo is not the whole thing. When writing things, either the button should depend on the edit area, or at least should have a way to get its handle. .tag and findobj() can be used to do that : Here is a robust implementation: f = scf(); uicontrol(f, "style", "edit", ... "position", [0 0 100 20], .. "tag", "editArea"); uicontrol(f, "style", "text", ... "position", [200 0 100 20], .. "string", "", .. "tag", "dispArea"); uicontrol(f, "style", "pushbutton", ... "string", "$x^2$",... "position", [100 0 100 20], ... "callback", .. "e = findobj(""tag"",""editArea"");" + .. "t = findobj(""tag"",""dispArea"");" + .. "x = evstr(e.string);" + .. "y = x^2;" + .. "t.string = string(y);" + .. "plot2d(x, y, style = -1);"); HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Wed Dec 21 10:37:18 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 21 Dec 2016 10:37:18 +0100 Subject: [Scilab-users] Printf on console in a c file In-Reply-To: <1482259700.2754.51.camel@wescottdesign.com> References: <001201d25ac9$ac5da3f0$0518ebd0$@wanadoo.fr> <1482259700.2754.51.camel@wescottdesign.com> Message-ID: <000001d25b6d$d47117b0$7d534710$@wanadoo.fr> Hello I've finally found what I wanted in my C function, with Coserror instruction Coserror("Lower limiter greater than the Upper"); Thanks for your response Before printing, think about ENVIRONMENTAL responsabity -----Message d'origine----- De : users [mailto:users-bounces at lists.scilab.org] De la part de Tim Wescott Envoy? : mardi 20 d?cembre 2016 19:48 ? : Users mailing list for Scilab Objet : Re: [Scilab-users] Printf on console in a c file On Tue, 2016-12-20 at 15:02 +0100, Perrichon wrote: > Hello, > > I?d like to print in a C file (inside a palette) on the console, but > nothing appends. > Have anybody an idea on how to proceed ? > > I?ve also try something like : > fprintf(stderr,"\n Lower limiter greater then Upper one"); but I get > errors at compile time, includind stdio.h Are you trying to use the C standard library printf, or the Scilab printf? It's been a while since I've done combined C and Scilab code, but if I remember correctly you can call Scilab functions from C -- that's probably what you'll need to do. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From al_exquemelin at yahoo.com Wed Dec 21 14:36:18 2016 From: al_exquemelin at yahoo.com (Viktor Goryainov) Date: Wed, 21 Dec 2016 13:36:18 +0000 (UTC) Subject: [Scilab-users] Using lsqrsolve with a certain kind of function References: <75376466.207462.1482327378479.ref@mail.yahoo.com> Message-ID: <75376466.207462.1482327378479@mail.yahoo.com> Hello, I have a function that takes tabulated values from several arrays (a_w15, b_w15, etc.) and thus returns a vector: function r = vr3(C, mu) a = a_w15 + a_chl15 * C(1) + a_sm15 * C(2) + a_doc15 * C(3); bb = b_w15 + b_chl15 * C(1) + b_sm15 * C(2); dd = bb ./ a; if dd < 0.25 then r = 0.319 * dd / mu; else r = (0.267 * dd + 0.013) / mu; end endfunction Now I need to use it twice in my task: first to generate a vector for some C_inh, then to try and restore C_inh from an initial guess C_init using lsqrsolve. How should I modify the vr3 to achieve this? Best regards, Viktor From al_exquemelin at yahoo.com Wed Dec 21 16:43:28 2016 From: al_exquemelin at yahoo.com (Viktor Goryainov) Date: Wed, 21 Dec 2016 18:43:28 +0300 Subject: [Scilab-users] Using lsqrsolve with a certain kind of function In-Reply-To: <75376466.207462.1482327378479@mail.yahoo.com> References: <75376466.207462.1482327378479@mail.yahoo.com> Message-ID: <07ac9827-7f94-1358-9fd6-c97caf68a1be@yahoo.com> Hello, I have a function that takes tabulated values from several arrays (a_w15, b_w15, etc.) and thus returns a vector: function r = vr3(C, mu) a = a_w15 + a_chl15 * C(1) + a_sm15 * C(2) + a_doc15 * C(3); bb = b_w15 + b_chl15 * C(1) + b_sm15 * C(2); dd = bb ./ a; if dd < 0.25 then r = 0.319 * dd / mu; else r = (0.267 * dd + 0.013) / mu; end endfunction Now I need to use it twice in my task: first to generate a vector for some C_inh, then to try and restore C_inh from an initial guess C_init using lsqrsolve. How should I modify the vr3 to achieve this? Best regards, Viktor From ddslamdunk at gmail.com Wed Dec 21 16:50:17 2016 From: ddslamdunk at gmail.com (Daniele Tonelli) Date: Wed, 21 Dec 2016 10:50:17 -0500 Subject: [Scilab-users] uicontrol TABLE Message-ID: Hello, I don't understand how get the value handly modified from a uicontrol table. I modify the table in the GUI, but I can?t get the new values. Thanks, Daniele // Include an editable table into a figure: // Building a table of data: params = [" " "Country" "Population [Mh]" "Temp.[??C]" ]; towns = ["Mexico" "Paris" "Tokyo" "Singapour"]'; country = ["Mexico" "France" "Japan" "Singapour"]'; pop = string([22.41 11.77 33.41 4.24]'); temp = string([26 19 22 17]'); table = [params; [ towns country pop temp ]] f = gcf(); clf as = f.axes_size; // [width height] ut = uicontrol("style","table",.. "string",table,.. "position",[5 as(2)-100 300 87],.. // => @top left corner of figure "tooltipstring","Data from majors towns") // Modify by hand some values in the table. Then get them back from the ui: matrix(ut.string,size(table)) -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Dec 21 16:56:57 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 21 Dec 2016 16:56:57 +0100 Subject: [Scilab-users] uicontrol TABLE In-Reply-To: References: Message-ID: <585AA649.5090304@free.fr> Hello, This bug was fixed during the last summer, after the 6.0.0-b2 release. You may install (3mn. No need to uninstall your current Scilab) and use the nightly built release: http://www.scilab.org/fr/development/nightly_builds/master HTH Samuel Gougeon Le 21/12/2016 16:50, Daniele Tonelli a ?crit : > Hello, > > I don't understand how get the value handly modified from a uicontrol > table. I modify the table in the GUI, but I can?t get the new values. > > Thanks, > > Daniele > > // Include an editable table into a figure: > // Building a table of data: > params = [" " "Country" "Population [Mh]" "Temp.[??C]" ]; > towns = ["Mexico" "Paris" "Tokyo" "Singapour"]'; > country = ["Mexico" "France" "Japan" "Singapour"]'; > pop = string([22.41 11.77 33.41 4.24]'); > temp = string([26 19 22 17]'); > table = [params; [ towns country pop temp ]] > > f = gcf(); > clf > as = f.axes_size; // [width height] > ut = uicontrol("style","table",.. > "string",table,.. > "position",[5 as(2)-100 300 87],.. // => @top left corner of figure > "tooltipstring","Data from majors towns") > > // Modify by hand some values in the table. Then get them back from > the ui: > matrix(ut.string,size(table))/listinfo/users From ddslamdunk at gmail.com Wed Dec 21 17:24:41 2016 From: ddslamdunk at gmail.com (Daniele Tonelli) Date: Wed, 21 Dec 2016 11:24:41 -0500 Subject: [Scilab-users] uicontrol TABLE In-Reply-To: <585AA649.5090304@free.fr> References: <585AA649.5090304@free.fr> Message-ID: Thanks, I solved the problem. It was a program's bug. Thanks, Daniele 2016-12-21 10:56 GMT-05:00 Samuel Gougeon : > Hello, > > This bug was fixed during the last summer, after the 6.0.0-b2 release. > You may install (3mn. No need to uninstall your current Scilab) > and use the nightly built release: > http://www.scilab.org/fr/development/nightly_builds/master > > HTH > Samuel Gougeon > > > Le 21/12/2016 16:50, Daniele Tonelli a ?crit : > >> Hello, >> >> I don't understand how get the value handly modified from a uicontrol >> table. I modify the table in the GUI, but I can?t get the new values. >> >> Thanks, >> >> Daniele >> >> // Include an editable table into a figure: >> // Building a table of data: >> params = [" " "Country" "Population [Mh]" "Temp.[??C]" ]; >> towns = ["Mexico" "Paris" "Tokyo" "Singapour"]'; >> country = ["Mexico" "France" "Japan" "Singapour"]'; >> pop = string([22.41 11.77 33.41 4.24]'); >> temp = string([26 19 22 17]'); >> table = [params; [ towns country pop temp ]] >> >> f = gcf(); >> clf >> as = f.axes_size; // [width height] >> ut = uicontrol("style","table",.. >> "string",table,.. >> "position",[5 as(2)-100 300 87],.. // => @top left corner of figure >> "tooltipstring","Data from majors towns") >> >> // Modify by hand some values in the table. Then get them back from the >> ui: >> matrix(ut.string,size(table))/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 ddslamdunk at gmail.com Wed Dec 21 23:38:30 2016 From: ddslamdunk at gmail.com (Daniele Tonelli) Date: Wed, 21 Dec 2016 17:38:30 -0500 Subject: [Scilab-users] parameters GUI Message-ID: Good afternoon, I created a GUI (vcr file) for a function of the englib-NSR-10 file. I throw the same function with the default parameters (see paramDefault). I get different results. You can see the result Mn. Why? Thank you very much, Daniele -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: englib-NSR-10.sci Type: application/octet-stream Size: 7529 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: paramDefault.sce Type: application/octet-stream Size: 187 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vcr.sce Type: application/octet-stream Size: 5271 bytes Desc: not available URL: From Christophe.Dang at sidel.com Thu Dec 22 09:21:40 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 22 Dec 2016 08:21:40 +0000 Subject: [Scilab-users] {EXT} Re: uicontrol & wiki In-Reply-To: <5859A1A0.4040306@free.fr> References: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> <5859A1A0.4040306@free.fr> Message-ID: Hello, > De : De la part de Samuel Gougeon > Envoy? : mardi 20 d?cembre 2016 22:25 > >> Le 20/12/2016 21:45, paul.carrico at free.fr a ?crit : >> >> (https://fr.wikibooks.org/wiki/D?couvrir_Scilab/Cr?er_une_interface_graphique_GUI - in French language). > > In the callback, the instruction > x = evstr(e.string); > is not robust [...] > For a robust implementation, gcbo.string is required instead. I'm the one who committed this page so you can blame me (-: The gcbo thing is explained a bit later in the page. My aim is to introduce the notions one by one, step by step, for a better understanding. Nevertheless, if you think this method is not adapted to the topic, feel free to propose modifications (or to do them by yourself). Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From Christophe.Dang at sidel.com Thu Dec 22 09:33:02 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 22 Dec 2016 08:33:02 +0000 Subject: [Scilab-users] {EXT} Using lsqrsolve with a certain kind of function In-Reply-To: <07ac9827-7f94-1358-9fd6-c97caf68a1be@yahoo.com> References: <75376466.207462.1482327378479@mail.yahoo.com> <07ac9827-7f94-1358-9fd6-c97caf68a1be@yahoo.com> Message-ID: Hello, > De : Viktor Goryainov > Envoy? : mercredi 21 d?cembre 2016 16:43 > > I have a function that takes tabulated values from several arrays (a_w15, b_w15, etc.) and thus returns a vector: > [...] > Now I need to [...] generate a vector I'm not sure I understand well your problem with lsqrsolve(), but if you want to generate a vector, you should replace the if test by something like ---------- r = zeroes (dd); // initialization, not necessary but imho good practice ddboolean = (dd<0.25); r(ddboolean) = 0.319 * dd(ddboolean) / mu; r(~ddboolean) = (0.267 * dd(~ddboolean) + 0.013) / mu; ---------- So the whole function may look like: ---------- function r = vr3(C, mu) a = a_w15 + a_chl15 * C(1) + a_sm15 * C(2) + a_doc15 * C(3); bb = b_w15 + b_chl15 * C(1) + b_sm15 * C(2); dd = bb ./ a; r = zeroes (dd); ddboolean = (dd<0.25); r(ddboolean) = 0.319 * dd(ddboolean) / mu; r(~ddboolean) = (0.267 * dd(~ddboolean) + 0.013) / mu; endfunction ---------- Hope this helps -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From paul.carrico at free.fr Thu Dec 22 10:17:01 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 22 Dec 2016 10:17:01 +0100 Subject: [Scilab-users] {EXT} Re: uicontrol & wiki In-Reply-To: References: <8ce8d033ed5c8392dbfbe8be957a887b@free.fr> <5859A1A0.4040306@free.fr> Message-ID: blame you ... oh no :-) Good starting point, so thanks for your contrinution Paul Le 2016-12-22 09:21, Dang Ngoc Chan, Christophe a ?crit : > Hello, > > De : De la part de Samuel Gougeon > Envoy? : mardi 20 d?cembre 2016 22:25 > > Le 20/12/2016 21:45, paul.carrico at free.fr a ?crit : > > (https://fr.wikibooks.org/wiki/D?couvrir_Scilab/Cr?er_une_interface_graphique_GUI - in French language). > In the callback, the instruction > x = evstr(e.string); > is not robust [...] > For a robust implementation, gcbo.string is required instead. I'm the one who committed this page so you can blame me (-: The gcbo thing is explained a bit later in the page. My aim is to introduce the notions one by one, step by step, for a better understanding. Nevertheless, if you think this method is not adapted to the topic, feel free to propose modifications (or to do them by yourself). Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Thu Dec 22 11:38:03 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 22 Dec 2016 11:38:03 +0100 Subject: [Scilab-users] Using uimenue to change rotation_angles In-Reply-To: <5856C1AD.6040704@hslmg.de> References: <5856669D.9090301@hslmg.de> <58569DCA.2000009@free.fr> <5856A928.8070306@hslmg.de> <5856AD01.8060001@free.fr> <5856C1AD.6040704@hslmg.de> Message-ID: <585BAD0B.3060009@hslmg.de> Hi Samuel, In the meantime I have realized what you meant with 'You don't need to block the console with a loop to make changes or actions on existing graphics.' The following script is loopless. I share it with those who perhaps can use it in presentations demonstrating a curve under different aspects. //show a 3D curve under selectable aspects x=[1 1 0 0 0]; y=[0 0 0 0.5 1]; z=[1 0 0 1 0]; xdel() param3d(x,y,z,-90,90,"$\huge x$@$\huge y$@$\huge z$",[4 3]), ce=gce(); ce.thickness=5; ca=gca(); // function !cb(c,C,cax)//callback for uimenu() if c==C(1), cax.rotation_angles=[90 -90]; elseif c==C(2), cax.rotation_angles=[90, 0]; elseif c==C(3), cax.rotation_angles=[ 0,-90]; elseif c==C(4), cax.rotation_angles=[35, 45]; elseif c==C(5), cax.rotation_angles=cax.rotation_angles+[0 -10]; elseif c==C(6), cax.rotation_angles=cax.rotation_angles+[0 +10]; elseif c==C(7) ca0=cax.rotation_angles; for k=[0:100 99:-1: 0] cax.rotation_angles=ca0+[-0.25*k k]; sleep(15) end elseif c==C(8), xdel(), abort end endfunction // C=["xz" "yz" "xy" "Perspec" "Turn10?Left" "Turn10?right" "Rotate" "Finish"];//case name strings for i=1:size(C,2), uimenu('label',C(i),'callback','!cb(C('+string(i)+'),C,ca)'); end Thanks again for your consultation. Regards Jens -------------------------------------------------------------------------------------------------- Am 18.12.2016 18:04, schrieb Jens Simon Strom: > Hi Samuel, > what I really do is this: > > xdel() > figure_size=[1800 900]; > cf=figure(1,'position',[0 0 figure_size],'background',8,'immediate_drawing','off','visible','off'); > //... > //plot3d and param3d commands > // ... > Rotation_Angles=[85 -64]; > ca=gca(); > ca.box='off'; > xtitle('$\Huge{\text{Isometrisch}}$','','') > cf.immediate_drawing='on'; cf.visible='on'; > > m1= uimenu(cf,'label','Himmelspol','callback','ra=[0,0],xtitle(''$\Huge{\text{Himmelspol}}$'','','')'); > m2= uimenu(cf,'label','Ost','callback','ra=[90,90],xtitle(''$\Huge{\text{Ost}}$'','','')'); > m3= uimenu(cf,'label','?quator','callback','ra=[90,0],xtitle(''$\Huge{\text{?quator}}$'','','')'); > m4= uimenu(cf,'label','West','callback','ra=[90,-90],xtitle(''$\Huge{\text{West}}$'','','')'); > m5= uimenu(cf,'label','Isometrisch','callback','ra=Rotation_Angles,xtitle(''$\Huge{\text{Isometrisch}}$'','','')'); > m6= uimenu(cf,'label','Animation','callback','Case=1,xtitle(''$\Huge{\text{Rotierend}}$'','','')'); > m7= uimenu(cf,'label', 'Aus', 'callback', "t=%f"); > > Case=0;//Initiierung f?r Anfangspassage, d.h.keine Animation > ra=Rotation_Angles;//Initiierung f?r Anfangspassage > t=%t; > while t==%t > if Case==1//m6 > Case=0; > rota=ca.rotation_angles; > for k=[0:1:90 89:-1:0] > drawlater() > ca.rotation_angles=rota+[0 k]; > sleep(10); > drawnow() > end//for k=[ .... ] > else > sleep(200) > ca.rotation_angles=ra; > end//if > end//while > > This works satisfactorily. I could not get the result without the > infinite loop. > > Kind regards > Jens > ----------------------------------------------------------------------- > > > Am 18.12.2016 16:36, schrieb Samuel Gougeon: >> Le 18/12/2016 16:20, Jens Simon Strom a ?crit : >>> Hi Samuel, >>> Without the loop the script finishes and gives no chance to change >>> anything. >> ? >> Have you tried? Since the figure and its menus are still here, you >> can still use them, even if the script having generating them is >> finished. >> >> A callback is an asynchronous independent script that is performed >> just when it is called, "at any time" (actually, its instructions are >> queued when it is called, and performed ASAP). >> >> You don't need to block the console with a loop to make changes or >> actions on existing graphics. >> But if you want to make it "modal", that is to say waiting for and >> compelling the user to do something, yes, a loop is required. >> BTW, the loop that you use is infinite: there is no way to escape it >> smoothly, since >> while 1 >> is always true. >> >> SG >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From al_exquemelin at yahoo.com Fri Dec 23 22:51:11 2016 From: al_exquemelin at yahoo.com (Viktor Goryainov) Date: Sat, 24 Dec 2016 00:51:11 +0300 Subject: [Scilab-users] {EXT} Using lsqrsolve with a certain kind of function In-Reply-To: References: <75376466.207462.1482327378479@mail.yahoo.com> <07ac9827-7f94-1358-9fd6-c97caf68a1be@yahoo.com> Message-ID: Thank you for the reply, but that's not exactly what I needed. Perhaps I didn't make myself clear. My vr3() function already does return a 15x1 vector (or maybe, I should call it a column), because a_w15 (b_w15 and so on) are all 15x1 matrices. Suppose for clarity I make mu and everything else global, and leave vr3(C) with the same lines inside that I wrote earlier. I can use it on some C_inh, like this for example: C_inh = [0.5 0.5 0.8]; s = vr3(C_inh); Then, I take some other values as an initial guess, say C_init = [1 1 1], and try to restore C_inh using lsqrsolve(). As far as I can see from its help page, I need a function of the following kind: function e = err(C2) e = s - vr3(C2); endfunction But it wouldn't work: [C, v] = lsqrsolve(C_init, err, 15) gives me error 58: Function has no input argument. Seems either vr3() must be modified to work with individual values, or I'm doing something wrong. Best regards, Viktor 22.12.2016 11:33, Dang Ngoc Chan, Christophe ?????: > Hello, > >> De : Viktor Goryainov >> Envoy? : mercredi 21 d?cembre 2016 16:43 >> >> I have a function that takes tabulated values from several arrays (a_w15, b_w15, etc.) and thus returns a vector: >> [...] >> Now I need to [...] generate a vector > > I'm not sure I understand well your problem with lsqrsolve(), > but if you want to generate a vector, > you should replace the if test by something like > > ---------- > r = zeroes (dd); // initialization, not necessary but imho good practice > ddboolean = (dd<0.25); > r(ddboolean) = 0.319 * dd(ddboolean) / mu; > r(~ddboolean) = (0.267 * dd(~ddboolean) + 0.013) / mu; > ---------- > > So the whole function may look like: > > ---------- > function r = vr3(C, mu) > a = a_w15 + a_chl15 * C(1) + a_sm15 * C(2) + a_doc15 * C(3); > bb = b_w15 + b_chl15 * C(1) + b_sm15 * C(2); > dd = bb ./ a; > > r = zeroes (dd); > ddboolean = (dd<0.25); > r(ddboolean) = 0.319 * dd(ddboolean) / mu; > r(~ddboolean) = (0.267 * dd(~ddboolean) + 0.013) / mu; > endfunction > ---------- > > Hope this helps > > -- > Christophe Dang Ngoc Chan > Mechanical calculation engineer > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From paul.carrico at free.fr Fri Dec 23 23:42:58 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Fri, 23 Dec 2016 23:42:58 +0100 Subject: [Scilab-users] Surface calculation Message-ID: <464c39a566f71727495d17338bc4009c@free.fr> Hi All I'm wondering how I can calculate (with accuracy) the value of any closed surface composed of edges; these ones come from a mesh and the surface is no more than a hole. In a first step I'm thinking in Delaunay triangulation based on the edges to mesh the surface (triangles), but maybe there are simpliest ways (to avoid to reivent the wheel)? does somebody can advice? Obviously the surface can be highly irregular, such as a daisy flower (to illustrate the shape). Merry Christmas to all the community Paul From lucianoandino.ar at gmail.com Sat Dec 24 02:35:17 2016 From: lucianoandino.ar at gmail.com (Luciano Andino) Date: Sat, 24 Dec 2016 04:35:17 +0300 Subject: [Scilab-users] colors in console Message-ID: Hello, this is my first message and I have a question: Is it possible to print text in color when using console? I saw in matlab you can use red. thanks -- Luciano Andino Ing. en Sistemas de Informaci?n BMSTU -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Sat Dec 24 09:53:37 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Sat, 24 Dec 2016 09:53:37 +0100 Subject: [Scilab-users] Surface calculation In-Reply-To: <464c39a566f71727495d17338bc4009c@free.fr> References: <464c39a566f71727495d17338bc4009c@free.fr> Message-ID: Hi The topic remains open (one never knows), but I think I found an interesting way to answer to my needs: the "ear clipping method"; then based on the triangles it becomes easy to calculate the surface. Paul Le 2016-12-23 23:42, paul.carrico at free.fr a ?crit : > Hi All > > I'm wondering how I can calculate (with accuracy) the value of any > closed surface composed of edges; these ones come from a mesh and the > surface is no more than a hole. > > In a first step I'm thinking in Delaunay triangulation based on the > edges to mesh the surface (triangles), but maybe there are simpliest > ways (to avoid to reivent the wheel)? does somebody can advice? > > Obviously the surface can be highly irregular, such as a daisy flower > (to illustrate the shape). > > Merry Christmas to all the community > > Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Dec 24 10:16:34 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 24 Dec 2016 09:16:34 +0000 Subject: [Scilab-users] Surface calculation In-Reply-To: References: <464c39a566f71727495d17338bc4009c@free.fr> Message-ID: Hi Paul, Season?s Greetings. Could you provide one representative example of your input mesh files? Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of paul.carrico at free.fr Sent: Saturday, December 24, 2016 9:54 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Surface calculation Hi The topic remains open (one never knows), but I think I found an interesting way to answer to my needs: the "ear clipping method"; then based on the triangles it becomes easy to calculate the surface. Paul Le 2016-12-23 23:42, paul.carrico at free.fr a ?crit : Hi All I'm wondering how I can calculate (with accuracy) the value of any closed surface composed of edges; these ones come from a mesh and the surface is no more than a hole. In a first step I'm thinking in Delaunay triangulation based on the edges to mesh the surface (triangles), but maybe there are simpliest ways (to avoid to reivent the wheel)? does somebody can advice? Obviously the surface can be highly irregular, such as a daisy flower (to illustrate the shape). Merry Christmas to all the community Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Dec 24 13:48:56 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 24 Dec 2016 12:48:56 +0000 Subject: [Scilab-users] parameters GUI In-Reply-To: References: Message-ID: Hi, Attenzione with what you throw. The GUI does not have the same 3 input lines as in the paramDefault.sce test file provided: 0 230 540 0 -230 540 0 -230 540 Also, ?fy? did not have the same value in both files (fy=420). Finally, one should compare le mele alle mele and convert the result in the test file to kNm (using: 0.9*Mn/1000^2) Saluti da Francia, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Daniele Tonelli Sent: Wednesday, December 21, 2016 11:39 PM To: Users mailing list for Scilab Subject: [Scilab-users] parameters GUI Good afternoon, I created a GUI (vcr file) for a function of the englib-NSR-10 file. I throw the same function with the default parameters (see paramDefault). I get different results. You can see the result Mn. Why? Thank you very much, Daniele -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Mon Dec 26 11:50:59 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 26 Dec 2016 11:50:59 +0100 Subject: [Scilab-users] Surface calculation In-Reply-To: References: <464c39a566f71727495d17338bc4009c@free.fr> Message-ID: <079ea87c27704f88f2b1929b9175fbcd@free.fr> Hi I finally found how to proceed in a simpler way ... http://paulbourke.net/geometry/polygonmesh/ Many interesting thinks on these pages Paul Le 2016-12-24 10:16, Rafael Guerra a ?crit : > Hi Paul, > > Season's Greetings. > > Could you provide one representative example of your input mesh files? > > Regards, > > Rafael > > FROM: users [mailto:users-bounces at lists.scilab.org] ON BEHALF OF > paul.carrico at free.fr > SENT: Saturday, December 24, 2016 9:54 AM > TO: Users mailing list for Scilab > SUBJECT: Re: [Scilab-users] Surface calculation > > Hi > > The topic remains open (one never knows), but I think I found an > interesting way to answer to my needs: the "ear clipping method"; then > based on the triangles it becomes easy to calculate the surface. > > Paul > > Le 2016-12-23 23:42, paul.carrico at free.fr a ?crit : > >> Hi All >> >> I'm wondering how I can calculate (with accuracy) the value of any >> closed surface composed of edges; these ones come from a mesh and >> the >> surface is no more than a hole. >> >> In a first step I'm thinking in Delaunay triangulation based on the >> edges to mesh the surface (triangles), but maybe there are simpliest >> ways (to avoid to reivent the wheel)? does somebody can advice? >> >> Obviously the surface can be highly irregular, such as a daisy >> flower >> (to illustrate the shape). >> >> Merry Christmas to all the community >> >> Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Dec 26 12:30:52 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 26 Dec 2016 11:30:52 +0000 Subject: [Scilab-users] Surface calculation In-Reply-To: <079ea87c27704f88f2b1929b9175fbcd@free.fr> References: <464c39a566f71727495d17338bc4009c@free.fr> <079ea87c27704f88f2b1929b9175fbcd@free.fr> Message-ID: Hi Paul, Would Scilab?s cshep2d work fine on your data/problem? Regards, Rafael From: paul.carrico at free.fr [mailto:paul.carrico at free.fr] Sent: Monday, December 26, 2016 11:51 AM To: Users mailing list for Scilab Cc: Rafael Guerra Subject: Re: [Scilab-users] Surface calculation Hi I finally found how to proceed in a simpler way ... http://paulbourke.net/geometry/polygonmesh/ Many interesting thinks on these pages Paul Le 2016-12-24 10:16, Rafael Guerra a ?crit : Hi Paul, Season?s Greetings. Could you provide one representative example of your input mesh files? Regards, Rafael FROM: users [mailto:users-bounces at lists.scilab.org] ON BEHALF OF paul.carrico at free.fr SENT: Saturday, December 24, 2016 9:54 AM TO: Users mailing list for Scilab > SUBJECT: Re: [Scilab-users] Surface calculation Hi The topic remains open (one never knows), but I think I found an interesting way to answer to my needs: the "ear clipping method"; then based on the triangles it becomes easy to calculate the surface. Paul Le 2016-12-23 23:42, paul.carrico at free.fr a ?crit : Hi All I'm wondering how I can calculate (with accuracy) the value of any closed surface composed of edges; these ones come from a mesh and the surface is no more than a hole. In a first step I'm thinking in Delaunay triangulation based on the edges to mesh the surface (triangles), but maybe there are simpliest ways (to avoid to reivent the wheel)? does somebody can advice? Obviously the surface can be highly irregular, such as a daisy flower (to illustrate the shape). Merry Christmas to all the community Paul _______________________________________________ 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 Dec 26 14:20:02 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 26 Dec 2016 14:20:02 +0100 Subject: [Scilab-users] colors in console In-Reply-To: References: Message-ID: <58611902.5060408@free.fr> Hello, Le 24/12/2016 02:35, Luciano Andino a ?crit : > Hello, this is my first message and I have a question: Is it possible > to print text in color when using console? I saw in matlab you can use > red. Welcome to this mailing list. Yes it is possible: * enter: preferences() (or click on in the Console toolbar) * Choose: Colors => Desktop color * Uncheck "Use system color" * Click on the "Text" color to change it thanks to a color picker * Press the "Apply" button on the bottom right, and then OK That's it Regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 414 bytes Desc: not available URL: From al_exquemelin at yahoo.com Mon Dec 26 17:41:37 2016 From: al_exquemelin at yahoo.com (Viktor Goryainov) Date: Mon, 26 Dec 2016 19:41:37 +0300 Subject: [Scilab-users] colors in console In-Reply-To: <58611902.5060408@free.fr> References: <58611902.5060408@free.fr> Message-ID: I guess the original message was about setting the text color to print some specific words and/or numbers (like error messages printed in red in Matlab, for example). If this is the case, there was some discussion on the mailing list not long ago -- see this link: http://mailinglists.scilab.org/Scilab-users-Colours-in-Scilab-terminal-td4033025.html Best regards, Viktor 26.12.2016 16:20, Samuel Gougeon ?????: > Hello, > > Le 24/12/2016 02:35, Luciano Andino a ?crit : >> Hello, this is my first message and I have a question: Is it possible >> to print text in color when using console? I saw in matlab you can use >> red. > > Welcome to this mailing list. > Yes it is possible: > > * enter: preferences() (or click on in the Console toolbar) > * Choose: Colors => Desktop color > * Uncheck "Use system color" > * Click on the "Text" color to change it thanks to a color picker > * Press the "Apply" button on the bottom right, and then OK > > That's it > > Regards > Samuel Gougeon > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Mon Dec 26 18:29:34 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 26 Dec 2016 18:29:34 +0100 Subject: [Scilab-users] colors in console In-Reply-To: References: <58611902.5060408@free.fr> Message-ID: <5861537E.9050007@free.fr> Le 26/12/2016 17:41, Viktor Goryainov a ?crit : > I guess the original message was about setting the text color to print > some specific words and/or numbers (like error messages printed in red > in Matlab, for example). If this is the case, there was some > discussion on the mailing list not long ago -- see this link: > http://mailinglists.scilab.org/Scilab-users-Colours-in-Scilab-terminal-td4033025.html > Thanks for clarification, if it was actually the original meaning and aims. Yes, we already answered to this question earlier. We do not necessarily use Scilab because we have despaired of Matlab ;) So all Scilabers have not necessarily used Matlab and not necessarily know its behavior. I tried colors with its official clone Octave, no more finding a way to do that. The first trial to implement this feature have stopped, i guess because it is not so easy to implement. If any, the output buffer of the console is also used for the diary(). But the diary() file must be kept clean of any formating instruction... If someone has time to go on implementing this feature, yes it would be useful, improving Scilab's ergonomy. Best regards Samuel From ddslamdunk at gmail.com Tue Dec 27 16:42:15 2016 From: ddslamdunk at gmail.com (Daniele Tonelli) Date: Tue, 27 Dec 2016 10:42:15 -0500 Subject: [Scilab-users] parameters GUI In-Reply-To: References: Message-ID: Thanks, I solved this problem. Sorry for this question. Have an happy day, Daniele El 24 dic. 2016 7:49, "Rafael Guerra" escribi?: > Hi, > > > > Attenzione with what you throw. > > > > The GUI does not have the same 3 input lines as in the paramDefault.sce > test file provided: > > 0 230 540 > > 0 -230 540 > > 0 -230 540 > > > > Also, ?fy? did not have the same value in both files (fy=420). > > > > Finally, one should compare le mele alle mele and convert the result in > the test file to kNm (using: 0.9*Mn/1000^2) > > > > Saluti da Francia, > > Rafael > > > > *From:* users [mailto:users-bounces at lists.scilab.org] *On Behalf Of *Daniele > Tonelli > *Sent:* Wednesday, December 21, 2016 11:39 PM > *To:* Users mailing list for Scilab > *Subject:* [Scilab-users] parameters GUI > > > > Good afternoon, > > I created a GUI (vcr file) for a function of the englib-NSR-10 file. I > throw the same function with the default parameters (see paramDefault). > > I get different results. You can see the result Mn. > > Why? > > Thank you very much, > > Daniele > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Wed Dec 28 09:16:28 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Wed, 28 Dec 2016 09:16:28 +0100 Subject: [Scilab-users] find & vectorization In-Reply-To: <630799eec2f350b0d28ac71c245f391d@free.fr> References: <630799eec2f350b0d28ac71c245f391d@free.fr> Message-ID: <037f8fecbcad92365dcad6a1c041e492@free.fr> Hi all I do not understand why the following code does not work when I try to use vectorization (many trials)? What am I doing wrong ? Thanks Paul ################################################################ mode(0) A = [ 1 2 9 0 10 6 ; 5 3 8 8 0 9 ; 5 9 1 0 3 9]' v = [2 9 6]' index = zeros(3,1); for i = 1 : 3 index(i) = find(A(:,1) == v(i)); end disp(index) i = [1 : 3]'; index2 = zeros(3,1); //pause index2(i,1) = find(A(:,1) == v(i,1)); disp(index2) -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Dec 28 12:55:21 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 28 Dec 2016 12:55:21 +0100 Subject: [Scilab-users] find & vectorization In-Reply-To: <037f8fecbcad92365dcad6a1c041e492@free.fr> References: <630799eec2f350b0d28ac71c245f391d@free.fr> <037f8fecbcad92365dcad6a1c041e492@free.fr> Message-ID: <5863A829.7070604@free.fr> Hello, Le 28/12/2016 09:16, paul.carrico at free.fr a ?crit : > Hi all > > I do not understand why the following code does not work when I try to > use vectorization (many trials)? > > What am I doing wrong ? > > Thanks > > Paul > ################################################################ > > mode(0) > > A = [ 1 2 9 0 10 6 ; 5 3 8 8 0 9 ; 5 9 1 0 3 9]' > v = [2 9 6]' > > index = zeros(3,1); > for i = 1 : 3 > index(i) = find(A(:,1) == v(i)); > end > disp(index) > > i = [1 : 3]'; > index2 = zeros(3,1); //pause > index2(i,1) = find(A(:,1) == v(i,1)); When with "==" you compare a matrix A to a scalar, the result is a matrix with the sizes of A, and find() works well (it just returns the indices of true components). When with "==" you compare a matrix A to another one B having the same sizes, then "==" works element-wise: the result is a matrix with the sizes of A, and find() still works well. When with "==" you compare a matrix A to another one B NOT having the same sizes, then "==" returns simply %F, and find(%F) returns [] https://help.scilab.org/docs/6.0.0/en_US/comparison.html What you try to do is achieved with members(). Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Dec 28 13:07:09 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 28 Dec 2016 13:07:09 +0100 Subject: [Scilab-users] find & vectorization In-Reply-To: <5863A829.7070604@free.fr> References: <630799eec2f350b0d28ac71c245f391d@free.fr> <037f8fecbcad92365dcad6a1c041e492@free.fr> <5863A829.7070604@free.fr> Message-ID: <5863AAED.2000107@free.fr> Le 28/12/2016 12:55, Samuel Gougeon a ?crit : > Hello, > > Le 28/12/2016 09:16, paul.carrico at free.fr a ?crit : >> Hi all >> .../... > .../... > What you try to do is achieved with members(). By the way, if like me you think that members() should rather be in the "Find and search" section of the help, then you can support this commit https://codereview.scilab.org/#/c/18448/ pending for 5 months. Maybe after 5 months, this will let mergers taking just 1 minute to review and merge these 3 files with no modifications. After all, Scilab is an open software, isn't it? ;) SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Dec 28 14:43:46 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 28 Dec 2016 14:43:46 +0100 Subject: [Scilab-users] find & vectorization In-Reply-To: <037f8fecbcad92365dcad6a1c041e492@free.fr> References: <630799eec2f350b0d28ac71c245f391d@free.fr> <037f8fecbcad92365dcad6a1c041e492@free.fr> Message-ID: <5863C192.8010405@free.fr> Le 28/12/2016 09:16, paul.carrico at free.fr a ?crit : > Hi all > > I do not understand why the following code does not work when I try to > use vectorization (many trials)? > > What am I doing wrong ? > > Thanks > > Paul > ################################################################ > > mode(0) > > A = [ 1 2 9 0 10 6 ; 5 3 8 8 0 9 ; 5 9 1 0 3 9]' > v = [2 9 6]' > > index = zeros(3,1); > for i = 1 : 3 > index(i) = find(A(:,1) == v(i)); > end > disp(index) > > i = [1 : 3]'; > index2 = zeros(3,1); //pause > index2(i,1) = find(A(:,1) == v(i,1)); Actually, what you want and try to do is unclear. Even members() could be not appropriate. You can easily get an error even with your unvectorized version, as soon as one of the v components will appears several times in A(:,1) SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Wed Dec 28 14:59:01 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Wed, 28 Dec 2016 14:59:01 +0100 Subject: [Scilab-users] find & vectorization In-Reply-To: <5863C192.8010405@free.fr> References: <630799eec2f350b0d28ac71c245f391d@free.fr> <037f8fecbcad92365dcad6a1c041e492@free.fr> <5863C192.8010405@free.fr> Message-ID: <70b8881f34d02a1669be2b768304d0ec@free.fr> Thanks for your help. Well I wanted to get the position of each scalar, as the loop does; I'll be content to use a loop Thanks for your time. Paul Le 2016-12-28 14:43, Samuel Gougeon a ?crit : > Le 28/12/2016 09:16, paul.carrico at free.fr a ?crit : > >> Hi all >> >> I do not understand why the following code does not work when I try >> to >> use vectorization (many trials)? >> >> What am I doing wrong ? >> >> Thanks >> >> Paul >> ################################################################ >> >> mode(0) >> >> A = [ 1 2 9 0 10 6 ; 5 3 8 8 0 9 ; 5 9 1 0 3 9]' >> v = [2 9 6]' >> >> index = zeros(3,1); >> for i = 1 : 3 >> index(i) = find(A(:,1) == v(i)); >> end >> disp(index) >> >> i = [1 : 3]'; >> index2 = zeros(3,1); //pause >> index2(i,1) = find(A(:,1) == v(i,1)); > > Actually, what you want and try to do is unclear. Even members() could > be not appropriate. > You can easily get an error even with your unvectorized version, as > soon as one of the v components will appears several times in A(:,1) > > SG > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Wed Dec 28 21:51:51 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 28 Dec 2016 20:51:51 +0000 Subject: [Scilab-users] find & vectorization In-Reply-To: <70b8881f34d02a1669be2b768304d0ec@free.fr> References: <630799eec2f350b0d28ac71c245f391d@free.fr> <037f8fecbcad92365dcad6a1c041e492@free.fr> <5863C192.8010405@free.fr> <70b8881f34d02a1669be2b768304d0ec@free.fr> Message-ID: Hi, Check out this solution: [vs,k] = gsort(v,'g','i'); [aux,ka,kb] = intersect(vs,A(:,1)); index = kb(k) index = 2. 3. 6. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of paul.carrico at free.fr Sent: Wednesday, December 28, 2016 2:59 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] find & vectorization Thanks for your help. Well I wanted to get the position of each scalar, as the loop does; I'll be content to use a loop Thanks for your time. Paul Le 2016-12-28 14:43, Samuel Gougeon a ?crit : Le 28/12/2016 09:16, paul.carrico at free.fr a ?crit : Hi all I do not understand why the following code does not work when I try to use vectorization (many trials)? What am I doing wrong ? Thanks Paul ################################################################ mode(0) A = [ 1 2 9 0 10 6 ; 5 3 8 8 0 9 ; 5 9 1 0 3 9]' v = [2 9 6]' index = zeros(3,1); for i = 1 : 3 index(i) = find(A(:,1) == v(i)); end disp(index) i = [1 : 3]'; index2 = zeros(3,1); //pause index2(i,1) = find(A(:,1) == v(i,1)); Actually, what you want and try to do is unclear. Even members() could be not appropriate. You can easily get an error even with your unvectorized version, as soon as one of the v components will appears several times in A(:,1) SG _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Dec 28 22:13:00 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 28 Dec 2016 22:13:00 +0100 Subject: [Scilab-users] find & vectorization In-Reply-To: <70b8881f34d02a1669be2b768304d0ec@free.fr> References: <630799eec2f350b0d28ac71c245f391d@free.fr> <037f8fecbcad92365dcad6a1c041e492@free.fr> <5863C192.8010405@free.fr> <70b8881f34d02a1669be2b768304d0ec@free.fr> Message-ID: <58642ADC.80702@free.fr> Le 28/12/2016 14:59, paul.carrico at free.fr a ?crit : > Thanks for your help. > Well I wanted to get the position of each scalar, as the loop does; > I'll be content to use a loop > -->// Where in A: -->i = find(members(A,v)) i = 2. 3. 6. 12. 14. 18. -->// Which v value: -->A(i)' ans = 2. 9. 6. 9. 9. 9. SG -------------- next part -------------- An HTML attachment was scrubbed... URL: