From jean-philippe.grivet at wanadoo.fr Mon Jun 3 12:07:48 2019 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Mon, 3 Jun 2019 12:07:48 +0200 Subject: [Scilab-users] How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: Hello everybody, Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines and arcs, within a region with irregular borders. The backround is white, all lines are black. Now I would like to count the number of black and white pixels. Any idea on how I could do that ? Thank you for your help JP Grivet --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From paul.carrico at auxitrolweston.com Mon Jun 3 12:21:34 2019 From: paul.carrico at auxitrolweston.com (Carrico, Paul) Date: Mon, 3 Jun 2019 10:21:34 +0000 Subject: [Scilab-users] [EXTERNAL] How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: <3A6B7233274DB449A2A0053A47684F953FF93192@BGS-EX01.auxitrol.ad> Hi Maybe using SIP toolbox and "imread" to convert your image into a matrix? Paul -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de Jean-Philippe Grivet Envoy??: lundi 3 juin 2019 12:08 ??: users at lists.scilab.org Objet?: [EXTERNAL] [Scilab-users] How to count pixels Hello everybody, Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines and arcs, within a region with irregular borders. The backround is white, all lines are black. Now I would like to count the number of black and white pixels. Any idea on how I could do that ? Thank you for your help JP Grivet --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://urldefense.proofpoint.com/v2/url?u=https-3A__www.avast.com_antivirus&d=DwIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k&m=fnhdow1R1g4ghBZVYqlZ-oWAMu6-rfvUuVAPggoe2K4&s=P96Vk81d-MbQNmiUYSYQz7XQrrkHJlFei0XhAvzFQA8&e= _______________________________________________ users mailing list users at lists.scilab.org https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DwIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k&m=fnhdow1R1g4ghBZVYqlZ-oWAMu6-rfvUuVAPggoe2K4&s=YltZFEFwlhpEXGIsF8--PjOTA3vikgSNudE5IKAlTh8&e= From stephane.mottelet at utc.fr Mon Jun 3 12:26:45 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 3 Jun 2019 12:26:45 +0200 Subject: [Scilab-users] How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: <2f74994c-68b3-1739-8f72-b6a8ff03ca06@utc.fr> Le 03/06/2019 ? 12:07, Jean-Philippe Grivet a ?crit?: > Hello everybody, > > Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines > and arcs, within a region with irregular borders. The backround is > white, all lines are black. Now I would like to count the number of > black and white pixels. Any idea on how I could do that ? Do you just need to compute the enclosed area ? Do you have a discretization of the border (successive segments) ? S. > > Thank you for your help > > JP Grivet > > > > --- > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From Christophe.Dang at sidel.com Mon Jun 3 12:47:14 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 3 Jun 2019 10:47:14 +0000 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: Hello, > De : Jean-Philippe Grivet > Envoy? : lundi 3 juin 2019 12:08 > > Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines and > arcs, within a region with irregular borders. What is the data structure of your picture? A matrix of dots? A Scilab figure containing polylines? -- Christophe Dang Ngoc Chan Mechanical calculation engineer General 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 jean-philippe.grivet at wanadoo.fr Mon Jun 3 14:56:17 2019 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Mon, 3 Jun 2019 14:56:17 +0200 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: My thanks to all respondants. The figure is in internal Scilab firmat made up of polylines., the border is a polygon. Le 03/06/2019 ? 12:47, Dang Ngoc Chan, Christophe a ?crit?: > Hello, > >> De : Jean-Philippe Grivet >> Envoy? : lundi 3 juin 2019 12:08 >> >> Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines and >> arcs, within a region with irregular borders. > What is the data structure of your picture? > A matrix of dots? > A Scilab figure containing polylines? > > -- > Christophe Dang Ngoc Chan > Mechanical calculation engineer > > General > 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From stephane.mottelet at utc.fr Mon Jun 3 15:21:24 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 3 Jun 2019 15:21:24 +0200 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: Le 03/06/2019 ? 14:56, Jean-Philippe Grivet a ?crit?: > My thanks to all respondants. > > The figure is in internal Scilab firmat made up of polylines., the > border is a polygon. you did not say if you want to compute a surface in current units or really compute a surface in pixels > > > Le 03/06/2019 ? 12:47, Dang Ngoc Chan, Christophe a ?crit?: >> Hello, >> >>> De : Jean-Philippe Grivet >>> Envoy? : lundi 3 juin 2019 12:08 >>> >>> Using Scilab (6.02/Win7), I have drawn a picure made up of thick >>> lines and >>> arcs, within a region with irregular borders. >> What is the data structure of your picture? >> A matrix of dots? >> A Scilab figure containing polylines? >> >> -- >> Christophe Dang Ngoc Chan >> Mechanical calculation engineer >> >> General >> 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 >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users >> > > --- > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From stephane.mottelet at utc.fr Tue Jun 4 17:05:04 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 4 Jun 2019 17:05:04 +0200 Subject: [Scilab-users] New build of Scilab 6.0.2 for OSX with Retina screen fix Message-ID: <4a359d5f-3174-f3b1-9f04-9af8a60e2541@utc.fr> Hello all, The bug (tiny font, broken zoom, ...) affecting all Apple machines with a Retina display has been fixed. I know that many Mac users were waiting for this fix so I prepared a new build, which is available from the Scilab www site at https://www.scilab.org/download/6.0.2 After launching Scilab you will be able to check that you are running the new build like this --> [version, opts] = getversion() ?opts? = !GCC? x64? modelicac? release? Jun? 4 2019? 16:02:53? ! ?version? = ?scilab-6.0.2 i.e. check that you have the "Jun? 4 2019" build. -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From yann.debray at scilab-enterprises.com Tue Jun 4 18:34:37 2019 From: yann.debray at scilab-enterprises.com (Yann Debray @ Scilab) Date: Tue, 4 Jun 2019 16:34:37 +0000 (UTC) Subject: [Scilab-users] New build of Scilab 6.0.2 for OSX with Retina screen fix In-Reply-To: <4a359d5f-3174-f3b1-9f04-9af8a60e2541@utc.fr> References: <4a359d5f-3174-f3b1-9f04-9af8a60e2541@utc.fr> Message-ID: <87CF7FFF6542B9AA.48969388-5AE2-4DBC-9649-6F170742B4B0@mail.outlook.com> Thanks Stephane, this is greatly appreciated ! --Yann DebrayScilab DirectorESI GroupCell: +33 6 88 20 67 01 Website: https://www.scilab.org On Tue, Jun 4, 2019 at 5:05 PM +0200, "St?phane Mottelet" wrote: Hello all, The bug (tiny font, broken zoom, ...) affecting all Apple machines with a Retina display has been fixed. I know that many Mac users were waiting for this fix so I prepared a new build, which is available from the Scilab www site at https://www.scilab.org/download/6.0.2 After launching Scilab you will be able to check that you are running the new build like this --> [version, opts] = getversion() ?opts? = !GCC? x64? modelicac? release? Jun? 4 2019? 16:02:53? ! ?version? = ?scilab-6.0.2 i.e. check that you have the "Jun? 4 2019" build. -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-philippe.grivet at wanadoo.fr Wed Jun 5 11:20:24 2019 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Wed, 5 Jun 2019 11:20:24 +0200 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: Hello, I am mainly interested in obtaining the ratio (number of white pixels)/(number of black pixels), so that units are not of primary interest. Le 03/06/2019 ? 15:21, St?phane Mottelet a ?crit?: > Le 03/06/2019 ? 14:56, Jean-Philippe Grivet a ?crit?: >> My thanks to all respondants. >> >> The figure is in internal Scilab firmat made up of polylines., the >> border is a polygon. > you did not say if you want to compute a surface in current units or > really compute a surface in pixels >> >> >> Le 03/06/2019 ? 12:47, Dang Ngoc Chan, Christophe a ?crit?: >>> Hello, >>> >>>> De : Jean-Philippe Grivet >>>> Envoy? : lundi 3 juin 2019 12:08 >>>> >>>> Using Scilab (6.02/Win7), I have drawn a picure made up of thick >>>> lines and >>>> arcs, within a region with irregular borders. >>> What is the data structure of your picture? >>> A matrix of dots? >>> A Scilab figure containing polylines? >>> >>> -- >>> Christophe Dang Ngoc Chan >>> Mechanical calculation engineer >>> >>> General >>> 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 >>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users >>> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par >> le logiciel antivirus Avast. >> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users >> > > --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From stephane.mottelet at utc.fr Wed Jun 5 11:25:01 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 5 Jun 2019 11:25:01 +0200 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> Message-ID: <97637565-daa4-5896-ef00-527f8f2ca906@utc.fr> Le 05/06/2019 ? 11:20, Jean-Philippe Grivet a ?crit?: > Hello, > > I am mainly interested in obtaining the ratio (number of white > pixels)/(number of black pixels), so that units are not of primary > interest. > Ok. So it is completely size/scale dependent and has to be done on the bitmap image. Besides exporting the figure then reloading with imread (present e.g. in IPCV Atoms module) I don't see other solutions. S. > Le 03/06/2019 ? 15:21, St?phane Mottelet a ?crit?: >> Le 03/06/2019 ? 14:56, Jean-Philippe Grivet a ?crit?: >>> My thanks to all respondants. >>> >>> The figure is in internal Scilab firmat made up of polylines., the >>> border is a polygon. >> you did not say if you want to compute a surface in current units or >> really compute a surface in pixels >>> >>> >>> Le 03/06/2019 ? 12:47, Dang Ngoc Chan, Christophe a ?crit?: >>>> Hello, >>>> >>>>> De : Jean-Philippe Grivet >>>>> Envoy? : lundi 3 juin 2019 12:08 >>>>> >>>>> Using Scilab (6.02/Win7), I have drawn a picure made up of thick >>>>> lines and >>>>> arcs, within a region with irregular borders. >>>> What is the data structure of your picture? >>>> A matrix of dots? >>>> A Scilab figure containing polylines? >>>> >>>> -- >>>> Christophe Dang Ngoc Chan >>>> Mechanical calculation engineer >>>> >>>> General >>>> 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 >>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users >>>> >>> >>> --- >>> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par >>> le logiciel antivirus Avast. >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users >>> >> >> > > --- > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From iwoj at il.pw.edu.pl Wed Jun 5 16:38:42 2019 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Wed, 05 Jun 2019 16:38:42 +0200 Subject: [Scilab-users] A possible bug with format(width) Message-ID: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> Hello, When Scilab 6.0.2 became available I reported a crash while running my program which worked fine on previous version: http://mailinglists.scilab.org/Scilab-users-Scilab-crash-on-a-Windows-server-td4039065.html#a4039120 I managed to find out that the problem was about "format" which was changed in the latest version of Scilab and wasn't working properly with some numbers imported from Excel. Fortunately I edited my program and now it works fine. But I am still wondering if it's fine that Scilab crashes when width of number in format is smaller than displayed number, for example: u=123.456; format(8) u = 123.456 format(7) u = 123.46 format(6) u = 123.5 format(5) u = 123. With format(4) and attempt to display a variable u Scilab stops working. Does everyone have such behaviour and isn't it a bug? Kind regards, Iza From stephane.mottelet at utc.fr Wed Jun 5 16:55:16 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 5 Jun 2019 16:55:16 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> Message-ID: <0a2689ac-f81f-f493-4393-ae41b601d81b@utc.fr> Le 05/06/2019 ? 16:38, Izabela W?jcik-Grz?ba a ?crit?: > Hello, > > When Scilab 6.0.2 became available I reported a crash while running my > program which worked fine on previous version: > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Scilab-crash-on-a-Windows-server-td4039065.html#a4039120 > > I managed to find out that the problem was about "format" which was > changed in the latest version of Scilab and wasn't working properly > with some numbers imported from Excel. Fortunately I edited my program > and now it works fine. > But I am still wondering if it's fine that Scilab crashes when width > of number in format is smaller than displayed number, for example: > > u=123.456; > format(8) > u? =? 123.456 > > format(7) > u? =? 123.46 > > format(6) > u? =? 123.5 > > format(5) > u? =? 123. > > With format(4) and attempt to display a variable u Scilab stops > working. Does everyone have such behaviour and isn't it a bug? > Under Scilab 6.0.2, MacOSX : --> u=123.456; --> format(4) --> u ?u? = ?? 1.D+02 > Kind regards, > Iza > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From iwoj at il.pw.edu.pl Wed Jun 5 17:19:15 2019 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Wed, 05 Jun 2019 17:19:15 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <0a2689ac-f81f-f493-4393-ae41b601d81b@utc.fr> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> <0a2689ac-f81f-f493-4393-ae41b601d81b@utc.fr> Message-ID: <1621ea70808de1b624b5a3c0e3753d92@il.pw.edu.pl> My computer works under Windows 7, 64bit. Iza W dniu 05.06.2019 16:55, St?phane Mottelet napisa?(a): > Le 05/06/2019 ? 16:38, Izabela W?jcik-Grz?ba a ?crit?: >> Hello, >> >> When Scilab 6.0.2 became available I reported a crash while running my >> program which worked fine on previous version: >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Scilab-crash-on-a-Windows-server-td4039065.html#a4039120 >> I managed to find out that the problem was about "format" which was >> changed in the latest version of Scilab and wasn't working properly >> with some numbers imported from Excel. Fortunately I edited my program >> and now it works fine. >> But I am still wondering if it's fine that Scilab crashes when width >> of number in format is smaller than displayed number, for example: >> >> u=123.456; >> format(8) >> u? =? 123.456 >> >> format(7) >> u? =? 123.46 >> >> format(6) >> u? =? 123.5 >> >> format(5) >> u? =? 123. >> >> With format(4) and attempt to display a variable u Scilab stops >> working. Does everyone have such behaviour and isn't it a bug? >> > Under Scilab 6.0.2, MacOSX : > > --> u=123.456; > > --> format(4) > > --> u > ?u? = > > ?? 1.D+02 > >> Kind regards, >> Iza >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Wed Jun 5 20:16:57 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 5 Jun 2019 20:16:57 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> Message-ID: <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> Hello Izabela, Le 05/06/2019 ? 16:38, Izabela W?jcik-Grz?ba a ?crit?: > .../... > With format(4) and attempt to display a variable u Scilab stops > working. Does everyone have such behaviour and isn't it a bug? Confirmed behavior on win7 64 bits. Sure it is a bug, a serious one. You would be kind to report it on bugzilla. Regards Samuel PS : the bug 14653 may also be considered. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Jun 5 21:57:09 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Wed, 05 Jun 2019 21:57:09 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> Message-ID: <20190605215709.Horde.-Ts_7pBtz5hU9hCEgjD3kWK@webmail.utc.fr> As MacOSX, Linux is not affected, this will help to solve this bug: Scilab 6.0.2 (Feb 14 2019, 10:11:47) ? --> OS_VERSION ?ans? = ? ?Linux 4.15.0-48-generic ? --> FORMAT(4); U=123.456 ?u? =? ? ?? 1.D+02 S. Quoting Samuel Gougeon : > Hello Izabela, > ? > Le 05/06/2019 ? 16:38, Izabela W?jcik-Grz?ba a ?crit?: > >> .../... >> With format(4) and attempt to display a variable u Scilab stops >> working. Does everyone have such behaviour and isn't it a bug? > > Confirmed behavior on win7 64 bits. Sure it is a bug, a serious one. > You would be kind to report it on bugzilla. > > Regards > Samuel > > PS : the bug 14653[1] may also be considered. > ? Links: ------ [1] https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/bugzilla.scilab.org/show_bug.cgi?id=14653 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Jun 5 22:19:43 2019 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 5 Jun 2019 22:19:43 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <20190605215709.Horde.-Ts_7pBtz5hU9hCEgjD3kWK@webmail.utc.fr> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> <20190605215709.Horde.-Ts_7pBtz5hU9hCEgjD3kWK@webmail.utc.fr> Message-ID: <35bea567-fd19-6c80-3570-280affd483a7@free.fr> Le 05/06/2019 ? 21:57, stephane.mottelet at utc.fr a ?crit?: > > As MacOSX, Linux is not affected, this will help to solve this bug: > > Scilab 6.0.2 (Feb 14 2019, 10:11:47) > > --> *OS_Version* > > ans= > > Linux 4.15.0-48-generic > > --> *format(4); u=123.456* > > u= > > 1.D+02 > Are you in "v" format? This result looks like to be in "e" one, and anyway it does not comply with the required width. On win7 with 5.5.2 we get in "v" format: -->format(4); u=123.456 ?u? = ?? 123. => it does not switch to "e" format. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Jun 5 23:46:30 2019 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Wed, 05 Jun 2019 23:46:30 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <35bea567-fd19-6c80-3570-280affd483a7@free.fr> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> <20190605215709.Horde.-Ts_7pBtz5hU9hCEgjD3kWK@webmail.utc.fr> <35bea567-fd19-6c80-3570-280affd483a7@free.fr> Message-ID: <20190605234630.Horde.MqXPJG47LXZzpDl_m4NQjnQ@webmail.utc.fr> Scilab 6.0.1 does it as follows: ? ?--> format(4); u=123.456 ? u? =? ?? ? ? 1.0? D+02 ? The display of Scilab 5.5.2 does not respect the format length either,? because " 123." has length 5 (blank sign +123 + dot) ? S. Quoting Samuel Gougeon : > Le 05/06/2019 ? 21:57, stephane.mottelet at utc.fr a ?crit?: > >> ? As MacOSX, Linux is not affected, this will help to solve this bug: Scilab 6.0.2 (Feb 14 2019, 10:11:47) --> OS_VERSION ?ans? = ?Linux 4.15.0-48-generic --> FORMAT(4); U=123.456 ?u? =? ?? 1.D+02 ? Are you in "v" format? This result looks like to be in "e" one, and anyway it does not comply with the required width. On win7 with 5.5.2 we get in "v" format: -->format(4); u=123.456 ?u? = ?? 123.? => it does not switch to "e" format. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Thu Jun 6 08:26:50 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 6 Jun 2019 08:26:50 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <20190605234630.Horde.MqXPJG47LXZzpDl_m4NQjnQ@webmail.utc.fr> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> <20190605215709.Horde.-Ts_7pBtz5hU9hCEgjD3kWK@webmail.utc.fr> <35bea567-fd19-6c80-3570-280affd483a7@free.fr> <20190605234630.Horde.MqXPJG47LXZzpDl_m4NQjnQ@webmail.utc.fr> Message-ID: This behavior (swith to "e") is logical. For example, with format("v",10), which is the default, 123456789 cannot be displayed in "v" mode with 10 characters. Hence, the only solution is to switch to "e" mode: --> format("v",10) --> 123456789 ?ans? = ?? 1.235D+08 Of course, you cannot use less than 7 characters (3 chars for the signed mantissa and the dot and 4 chars for the exponent): --> format("v",8) --> 123456789 ?ans? = ?? 1.2D+08 --> format("v",7) --> 123456789 ?ans? = ?? 1.D+08 --> format("v",6) --> 123456789 ?ans? = ?? 1.D+08 Le 05/06/2019 ? 23:46, stephane.mottelet at utc.fr a ?crit?: > Scilab 6.0.1 does it as follows: > ?--> format(4); u=123.456 > ? u? = > ? ? 1.0? D+02 > The display of Scilab 5.5.2 does not respect the format length > either,? because " 123." has length 5 (blank sign +123 + dot) > S. > > > Quoting Samuel Gougeon >: > >> Le 05/06/2019 ? 21:57, stephane.mottelet at utc.fr a ?crit?: >>> > As MacOSX, Linux is not affected, this will help to solve this bug: > > Scilab 6.0.2 (Feb 14 2019, 10:11:47) > > --> *OS_Version* > > ans= > > Linux 4.15.0-48-generic > > --> *format(4); u=123.456* > > u= > > 1.D+02 > > Are you in "v" format? This result looks like to be in "e" one, and > anyway it does not comply with the required width. > On win7 with 5.5.2 we get in "v" format: > -->format(4); u=123.456 > ?u? = > ?? 123. > => it does not switch to "e" format. > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From iwoj at il.pw.edu.pl Thu Jun 6 10:02:05 2019 From: iwoj at il.pw.edu.pl (=?UTF-8?Q?Izabela_W=C3=B3jcik-Grz=C4=85ba?=) Date: Thu, 06 Jun 2019 10:02:05 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> <20190605215709.Horde.-Ts_7pBtz5hU9hCEgjD3kWK@webmail.utc.fr> <35bea567-fd19-6c80-3570-280affd483a7@free.fr> <20190605234630.Horde.MqXPJG47LXZzpDl_m4NQjnQ@webmail.utc.fr> Message-ID: <3422bd04cdc3a5cc4e5e558605128b00@il.pw.edu.pl> > This behavior (swith to "e") is logical. Summing up: I should report a bug and suggest automatic switching to "e" in such situation? Iza From stephane.mottelet at utc.fr Thu Jun 6 10:06:45 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 6 Jun 2019 10:06:45 +0200 Subject: [Scilab-users] A possible bug with format(width) In-Reply-To: <3422bd04cdc3a5cc4e5e558605128b00@il.pw.edu.pl> References: <856f43ec4663c2e2f01fc21f1b424c51@il.pw.edu.pl> <4eb0cab2-6c78-2472-7822-5204eee1cfb6@free.fr> <20190605215709.Horde.-Ts_7pBtz5hU9hCEgjD3kWK@webmail.utc.fr> <35bea567-fd19-6c80-3570-280affd483a7@free.fr> <20190605234630.Horde.MqXPJG47LXZzpDl_m4NQjnQ@webmail.utc.fr> <3422bd04cdc3a5cc4e5e558605128b00@il.pw.edu.pl> Message-ID: Le 06/06/2019 ? 10:02, Izabela W?jcik-Grz?ba a ?crit?: >> This behavior (swith to "e") is logical. > > Summing up: I should report a bug and suggest automatic switching to > "e" in such situation? No. The switch is hard-coded independently of the platform and works under Linux and Mac OS. So just report the crash with your example > > Iza -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From p.muehlmann at gmail.com Thu Jun 6 13:02:03 2019 From: p.muehlmann at gmail.com (P M) Date: Thu, 6 Jun 2019 13:02:03 +0200 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: <97637565-daa4-5896-ef00-527f8f2ca906@utc.fr> References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> <97637565-daa4-5896-ef00-527f8f2ca906@utc.fr> Message-ID: ....do you mean something like this? See example attached It needs: Scilab Computer Vision Module But as mentioned before: The number of pixels you will find depend on how big you define image size / line width, etc. Best regards, Philipp Am Mi., 5. Juni 2019 um 11:25 Uhr schrieb St?phane Mottelet < stephane.mottelet at utc.fr>: > Le 05/06/2019 ? 11:20, Jean-Philippe Grivet a ?crit : > > Hello, > > > > I am mainly interested in obtaining the ratio (number of white > > pixels)/(number of black pixels), so that units are not of primary > > interest. > > > Ok. So it is completely size/scale dependent and has to be done on the > bitmap image. Besides exporting the figure then reloading with imread > (present e.g. in IPCV Atoms module) I don't see other solutions. > > S. > > > Le 03/06/2019 ? 15:21, St?phane Mottelet a ?crit : > >> Le 03/06/2019 ? 14:56, Jean-Philippe Grivet a ?crit : > >>> My thanks to all respondants. > >>> > >>> The figure is in internal Scilab firmat made up of polylines., the > >>> border is a polygon. > >> you did not say if you want to compute a surface in current units or > >> really compute a surface in pixels > >>> > >>> > >>> Le 03/06/2019 ? 12:47, Dang Ngoc Chan, Christophe a ?crit : > >>>> Hello, > >>>> > >>>>> De : Jean-Philippe Grivet > >>>>> Envoy? : lundi 3 juin 2019 12:08 > >>>>> > >>>>> Using Scilab (6.02/Win7), I have drawn a picure made up of thick > >>>>> lines and > >>>>> arcs, within a region with irregular borders. > >>>> What is the data structure of your picture? > >>>> A matrix of dots? > >>>> A Scilab figure containing polylines? > >>>> > >>>> -- > >>>> Christophe Dang Ngoc Chan > >>>> Mechanical calculation engineer > >>>> > >>>> General > >>>> 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 > >>>> > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > >>>> > >>> > >>> --- > >>> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par > >>> le logiciel antivirus Avast. > >>> > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus > >>> > >>> > >>> _______________________________________________ > >>> users mailing list > >>> users at lists.scilab.org > >>> > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > >>> > >> > >> > > > > --- > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > > logiciel antivirus Avast. > > > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus > > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > > > > > -- > St?phane Mottelet > Ing?nieur de recherche > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > D?partement G?nie des Proc?d?s Industriels > Sorbonne Universit?s - Universit? de Technologie de Compi?gne > CS 60319, 60203 Compi?gne cedex > Tel : +33(0)344234688 > http://www.utc.fr/~mottelet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test_countPixels.sce Type: application/octet-stream Size: 1712 bytes Desc: not available URL: From p.muehlmann at gmail.com Thu Jun 6 21:29:38 2019 From: p.muehlmann at gmail.com (P M) Date: Thu, 6 Jun 2019 21:29:38 +0200 Subject: [Scilab-users] cancelling a loop by key pressing Message-ID: Dear all, out of curiosity I made a small animation ... see code below. Note: The part of the sound section is from a example where I generate different tones within one sound file. Hence the intervalls.... To the topic: The animation runs in a while loop. It is possible to stop the loop, by just closing the figure that displays the animation. However this is kind of crashing the program. Question: Is it possible to have a function within the loop to check if a specific key is pressed? And if this key is pressed, the control variable of the loop changes and the loop stops? Thank you, Philipp Here the code (Scilab 6.0.2) clc;clear();xdel(); // define the sound//set bit ratebitRate = 22050;// At first we create 0.05 seconds of sound parameters.t=soundsec(0.05, bitRate);[nr,nc]=size(t);// decide how many tones we havenTones = 1;// get the intervall size..must be an integerintervall = nc / nTones;// Then we generate the sound.for(i = 1:nTones) si = sin(2*%pi*(i*700)*t((i-1)*intervall+1 : i*intervall)); s1((i-1)*intervall+1 : i*intervall) = si;endfor(i = 1:nTones) si = 0.5+sin(2*%pi*(i*800)*t((i-1)*intervall+1 : i*intervall)); s2((i-1)*intervall+1 : i*intervall) = si;endfor(i = 1:nTones) si = 0.5+sin(2*%pi*(i*400)*t((i-1)*intervall+1 : i*intervall)); s3((i-1)*intervall+1 : i*intervall) = si;endfor(i = 1:nTones) si = 0.5+sin(2*%pi*(i*600)*t((i-1)*intervall+1 : i*intervall)); s4((i-1)*intervall+1 : i*intervall) = si;end // create the scenexRange = linspace(0,99,100);yRange = linspace(0,49,100);xMin = min(xRange);xMax = max(xRange);yMin = min(yRange);yMax = max(yRange);rectW = xMax - xMin;rectH = yMax - yMin; //define the scene rectanglerectScene = [xMin,yMax, rectW, rectH]; // define a point center = start positionxc = rectW / 2;yc = rectH / 2; // plot the scenef = figure();f.background = 8; // plot the rectangle (scene field)xrect(rectScene); // plot the centerplot(xc,yc,'o');a = gca();e = gce(); a.axes_visible = ["off","off","off"];a.data_bounds = [xMin,yMin;xMax,yMax];a.margins = [0.01, 0.01, 0.01, 0.01];a.tight_limits = ["on","on","off"]; // animate the point as long as playGame = 1playGame = 1; xDir = 0.5; // xDir < 0 = to the left; xDir > 0 = to the rightyDir = -1; // yDir < 0 = falling; yDir >0 = raisingspeed = 1; while playGame == 1 if(xDir < 0) xc = xc-speed; else xc = xc+speed; end if(yDir < 0) yc = yc - speed; else yc = yc + speed; end e.children.data = [xc, yc]; // this is what happens when we reach left border if(xc<=xMin+1) playsnd(s1); xDir = 1; end // this is what happens when we reach right border if(xc>=xMax-1) playsnd(s2); xDir = -1; end // this is what happens when we reach lower border if(yc<=yMin+1) playsnd(s3); yDir = 1; end // this is what happens when we reach upper border if(yc>=yMax-1) playsnd(s4); yDir = -1; end sleep(1); // implement a event handle function ? // to check if (and if yes which) key has been pressed // eg.: if return value of event handle function = 0 // --> set playGame = 0; // --> thus stops the while - loop end -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Jun 7 09:06:16 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 7 Jun 2019 07:06:16 +0000 Subject: [Scilab-users] cancelling a loop by key pressing Message-ID: Hello, > De : P M > Envoy? : jeudi 6 juin 2019 21:30 > > Question: > Is it possible to have a function within the loop to check if a specific key is pressed? I don't know about a keystroke but you may use a mouse click. https://help.scilab.org/docs/6.0.2/en_US/xclick.html Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General 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 Jun 7 09:08:27 2019 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 7 Jun 2019 07:08:27 +0000 Subject: [Scilab-users] cancelling a loop by key pressing Message-ID: Correction: the function name is misleading, the xclick() function also takes keystroke into account. Regards > -----Message d'origine----- > De : users [mailto:users-bounces at lists.scilab.org] De la part de Dang Ngoc > Chan, Christophe > Envoy? : vendredi 7 juin 2019 09:06 > ? : Users mailing list for Scilab > Objet : {EXT} Re: [Scilab-users] cancelling a loop by key pressing > > Hello, > > > De : P M > > Envoy? : jeudi 6 juin 2019 21:30 > > > > Question: > > Is it possible to have a function within the loop to check if a specific key is > pressed? > > I don't know about a keystroke but you may use a mouse click. > > https://help.scilab.org/docs/6.0.2/en_US/xclick.html > > Regards > > -- > Christophe Dang Ngoc Chan > Mechanical calculation engineer > > General > 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 > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.sc > ilab.org%2Fmailman%2Flistinfo%2Fusers&data=02%7C01%7Cchristophe > .dang%40sidel.com%7C1916b3f039bf4329022308d6eb16b392%7C2390cbd1e6 > 634321bc93ba298637ce52%7C0%7C0%7C636954880069853058&sdata=Tx > a562IBIu8r1Jmy2vMKsFNFCXXpb%2BM%2ByNfVRUBK6PA%3D&reserve > d=0 This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From stephane.mottelet at utc.fr Fri Jun 7 09:25:19 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 7 Jun 2019 09:25:19 +0200 Subject: [Scilab-users] cancelling a loop by key pressing In-Reply-To: References: Message-ID: <4fa9c66b-c8fe-188f-5d0c-e64e259a453a@utc.fr> To stop animation when window is closed, don't use event_handler with ibut=-1000. Here is a simpler solution: h = gcf(); while %t if is_handle_valid(h) xtitle(msprintf("k = %d",k)) else break end k=k+1; end S. Le 06/06/2019 ? 21:29, P M a ?crit?: > Dear all, > > out of curiosity I made a small animation ... see code below. > > Note: > The part of the sound section is from a example where I generate > different tones within one sound file. > Hence the intervalls.... > > To the topic: > > The animation runs in a while loop. > It is possible to stop the loop, by just closing the figure that > displays the animation. > However this is kind of crashing the program. > > Question: > Is it possible to have a function within the loop to check if a > specific key is pressed? > And if this key is pressed, the control variable of the loop changes > and the loop stops? > > Thank you, > Philipp > > Here the code (Scilab 6.0.2) > > clc; > clear(); > xdel(); > > // define the sound > //set bit rate > bitRate = 22050; > // At first we create 0.05 seconds of sound parameters. > t=soundsec(0.05, bitRate); > [nr,nc]=size(t); > // decide how many tones we have > nTones = 1; > // get the intervall size..must be an integer > intervall = nc / nTones; > // Then we generate the sound. > for(i = 1:nTones) > si = sin(2*%pi*(i*700)*t((i-1)*intervall+1 : i*intervall)); > s1((i-1)*intervall+1 : i*intervall) = si; > end > for(i = 1:nTones) > si = 0.5+sin(2*%pi*(i*800)*t((i-1)*intervall+1 : i*intervall)); > s2((i-1)*intervall+1 : i*intervall) = si; > end > for(i = 1:nTones) > si = 0.5+sin(2*%pi*(i*400)*t((i-1)*intervall+1 : i*intervall)); > s3((i-1)*intervall+1 : i*intervall) = si; > end > for(i = 1:nTones) > si = 0.5+sin(2*%pi*(i*600)*t((i-1)*intervall+1 : i*intervall)); > s4((i-1)*intervall+1 : i*intervall) = si; > end > > // create the scene > xRange = linspace(0,99,100); > yRange = linspace(0,49,100); > xMin = min(xRange); > xMax = max(xRange); > yMin = min(yRange); > yMax = max(yRange); > rectW = xMax - xMin; > rectH = yMax - yMin; > > //define the scene rectangle > rectScene = [xMin,yMax, rectW, rectH]; > > // define a point center = start position > xc = rectW / 2; > yc = rectH / 2; > > // plot the scene > f = figure(); > f.background = 8; > > // plot the rectangle (scene field) > xrect(rectScene); > > // plot the center > plot(xc,yc,'o'); > a = gca(); > e = gce(); > > a.axes_visible = ["off","off","off"]; > a.data_bounds = [xMin,yMin;xMax,yMax]; > a.margins = [0.01, 0.01, 0.01, 0.01]; > a.tight_limits = ["on","on","off"]; > > // animate the point as long as playGame = 1 > playGame = 1; > > xDir = 0.5; // xDir <0 = to the left; xDir >0 = to the right > yDir = -1; // yDir <0 = falling; yDir >0 = raising > speed = 1; > > while playGame == 1 > > if(xDir < 0) > xc = xc-speed; > else > xc = xc+speed; > end > > if(yDir < 0) > yc = yc - speed; > else > yc = yc + speed; > end > > e.children.data = [xc, yc]; > > // this is what happens when we reach left border > if(xc<=xMin+1) > playsnd(s1); > xDir = 1; > end > // this is what happens when we reach right border > if(xc>=xMax-1) > playsnd(s2); > xDir = -1; > end > // this is what happens when we reach lower border > if(yc<=yMin+1) > playsnd(s3); > yDir = 1; > end > // this is what happens when we reach upper border > if(yc>=yMax-1) > playsnd(s4); > yDir = -1; > end > > sleep(1); > > // implement a event handle function ? > // to check if (and if yes which) key has been pressed > // eg.: if return value of event handle function = 0 > // -->set playGame = 0; > // -->thus stops the while - loop > > end > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-philippe.grivet at wanadoo.fr Fri Jun 7 12:16:14 2019 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Fri, 7 Jun 2019 12:16:14 +0200 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> <97637565-daa4-5896-ef00-527f8f2ca906@utc.fr> Message-ID: <456b80da-4c0b-70b1-4707-1041011229aa@wanadoo.fr> Hello Philipp, Thank you for your program, it looks like it would do exactly what I wanted. However (as I should have stressed before) I work under win7. In this environment, the only image processing toolbox is IPCV in which several functions are lacking, namely ??? scicv_Init(); matplot(); Mat_cols_get(); Mat_rows_get() Further, in my case, img appears as a matrix of booleans (?). I will try to download SIVP and determine the role of these functions. Thank you,again Jean-Philippe --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From p.muehlmann at gmail.com Fri Jun 7 13:03:48 2019 From: p.muehlmann at gmail.com (P M) Date: Fri, 7 Jun 2019 13:03:48 +0200 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: <456b80da-4c0b-70b1-4707-1041011229aa@wanadoo.fr> References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> <97637565-daa4-5896-ef00-527f8f2ca906@utc.fr> <456b80da-4c0b-70b1-4707-1041011229aa@wanadoo.fr> Message-ID: ... the code should work under win7 if you have the *scicv*-module installed via atoms. Note that you have to "activate" scicv to use its functions....hence the: scicv_Init(); at the beginning of the code. I wrote the code at win10, but I doubt that this has an influence. Good luck, Philipp Am Fr., 7. Juni 2019 um 12:16 Uhr schrieb Jean-Philippe Grivet < jean-philippe.grivet at wanadoo.fr>: > Hello Philipp, > > Thank you for your program, it looks like it would do exactly what I > wanted. However (as I should have stressed before) I work under win7. In > this environment, the only image processing toolbox is IPCV in which > several functions are lacking, namely > > scicv_Init(); matplot(); Mat_cols_get(); Mat_rows_get() > > Further, in my case, img appears as a matrix of booleans (?). > > I will try to download SIVP and determine the role of these functions. > > Thank you,again > > Jean-Philippe > > > --- > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > https://www.avast.com/antivirus > > _______________________________________________ > 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 Sun Jun 9 21:26:01 2019 From: p.muehlmann at gmail.com (P M) Date: Sun, 9 Jun 2019 21:26:01 +0200 Subject: [Scilab-users] xclick without waiting for event ? Message-ID: Dear Experts, is there a way to get the mouse position without waiting for an event? With xgetmouse and xclick it is possible to get the mouse position, but the functions return the position only if there was an event. So the functions wait until the mouse is moved/clicked etc. I'ld like to get the mouse position even when the mouse is not moved/clicked etc. Thank you, Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh at tritytech.com Mon Jun 10 06:25:32 2019 From: chinluh at tritytech.com (Tan Chin Luh) Date: Mon, 10 Jun 2019 12:25:32 +0800 Subject: [Scilab-users] {EXT} How to count pixels In-Reply-To: References: <633550b5-d57b-4c41-b050-289d7472b222@free.fr> <78b6dce2-9a54-5e0d-715b-4755a51ad332@free.fr> <97637565-daa4-5896-ef00-527f8f2ca906@utc.fr> <456b80da-4c0b-70b1-4707-1041011229aa@wanadoo.fr> Message-ID: <33b35ac1-67fe-e39e-fd76-dfb6e466197a@tritytech.com> Hi, sorry to interrupt, the following lines should work in IPCV to count the white and black pixels: 1. after imread, the image return as boolean as the image is an binary image. 2. assume that you have previous code and imread the image and the scilab variable for the image is "img" --> sum(img==%t)?? // total white pixels ?ans? = ?? 273370. --> sum(img==%f) // total black pixels ?ans? = ?? 7230. hope this helps. rgds, Chin Luh On 7/6/2019 7:03 PM, P M wrote: > ... the code should work under win7 if you have the *scicv*-module > installed via atoms. > Note that you have to "activate" scicv to use its functions....hence the: > scicv_Init(); > at the beginning of the code. > > I wrote the code at win10, but I doubt that this has an influence. > > Good luck, > Philipp > > > Am Fr., 7. Juni 2019 um 12:16?Uhr schrieb Jean-Philippe Grivet > >: > > Hello Philipp, > > Thank you for your program, it looks like it would do exactly what I > wanted. However (as I should have stressed before) I work under > win7. In > this environment, the only image processing toolbox is IPCV in which > several functions are lacking, namely > > ???? scicv_Init(); matplot(); Mat_cols_get(); Mat_rows_get() > > Further, in my case, img appears as a matrix of booleans (?). > > I will try to download SIVP and determine the role of these functions. > > Thank you,again > > Jean-Philippe > > > --- > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e > par le logiciel antivirus Avast. > https://www.avast.com/antivirus > > _______________________________________________ > 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 -- Tan Chin Luh Trity Technologies Sdn Bhd Tel : +603 80637737 HP : +6013 3691728 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Tue Jun 11 22:22:09 2019 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 11 Jun 2019 22:22:09 +0200 Subject: [Scilab-users] xclick without waiting for event ? In-Reply-To: References: Message-ID: <1af17fe3-0418-a92f-b5f6-81516e81d13b@utc.fr> Hello Philipp, You can do this this by using an event_handler function which updates two variables in the main workspace: function event_handler_function(h, x, y, ibut) if ibut == -1 [MOUSE_X,MOUSE_Y]=resume(x,y); end end gcf().event_handler = "event_handler_function"; gcf().event_handler_enable = "on"; MOUSE_X and MOUSE_Y will always contain the current coordinates of the mouse pointer S. Le 09/06/2019 ? 21:26, P M a ?crit?: > Dear Experts, > > is there a way to get the mouse position without waiting for an event? > > With xgetmouse and xclick it is possible to get the mouse position, > but the functions return the position only if there was an event. > So the functions wait until the mouse is moved/clicked etc. > > I'ld like to get the mouse position even when the mouse is not > moved/clicked etc. > > Thank you, > Philipp > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From cynthia.daniel at unn.edu.ng Tue Jun 18 15:30:11 2019 From: cynthia.daniel at unn.edu.ng (Cynthia Daniel) Date: Tue, 18 Jun 2019 14:30:11 +0100 Subject: [Scilab-users] (no subject) Message-ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From xwaang1976 at gmail.com Sun Jun 23 12:11:55 2019 From: xwaang1976 at gmail.com (Xwang) Date: Sun, 23 Jun 2019 03:11:55 -0700 (MST) Subject: [Scilab-users] Xcos and simulink like referenced models. Message-ID: <1561284715447-0.post@n3.nabble.com> Dear All, I am new to Scilab/Xcos and so I'm trying to discover how to do things that I once did with Simulink. One example is Model Referencing, where in Simulink I could develop a model then reuse it in new models. Ultimately what I would like is to develop sub-system models then be able to reuse them in any number of top level system models. However I would like to be able to manage each model individually. Thanks, Xwang -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From paul.carrico at auxitrolweston.com Thu Jun 27 10:46:26 2019 From: paul.carrico at auxitrolweston.com (Carrico, Paul) Date: Thu, 27 Jun 2019 08:46:26 +0000 Subject: [Scilab-users] plots remain white under CentOS (redhat based OS) and Scilab 6.0.2 Message-ID: <3A6B7233274DB449A2A0053A47684F953FFAF83B@BGS-EX01.auxitrol.ad> Dear All When I'm trying to use either plot2D or plot3D under CentOS, all the figures remains white ; I guess it's a library issue and I think it has ever been noticed in the past, but I do not remember what or I cannot find the workaround: what it is? Thanks for your help Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From adelson.oliveira at gmail.com Thu Jun 27 11:22:30 2019 From: adelson.oliveira at gmail.com (Adelson Oliveira) Date: Thu, 27 Jun 2019 06:22:30 -0300 Subject: [Scilab-users] plots remain white under CentOS (redhat based OS) and Scilab 6.0.2 In-Reply-To: <3A6B7233274DB449A2A0053A47684F953FFAF83B@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953FFAF83B@BGS-EX01.auxitrol.ad> Message-ID: Doesn't happen with Scilab 6.01 and Centos 6.9. I'll try with Scilab 6.02. Em qui, 27 de jun de 2019 5:46 AM, Carrico, Paul < paul.carrico at auxitrolweston.com> escreveu: > Dear All > > > > When I?m trying to use either plot2D or plot3D under CentOS, all the > figures remains white ; I guess it?s a library issue and I think it has > ever been noticed in the past, but I do not remember what or I cannot find > the workaround: what it is? > > > > Thanks for your help > > > > 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 paul.carrico at auxitrolweston.com Thu Jun 27 11:26:38 2019 From: paul.carrico at auxitrolweston.com (Carrico, Paul) Date: Thu, 27 Jun 2019 09:26:38 +0000 Subject: [Scilab-users] [EXTERNAL] Re: plots remain white under CentOS (redhat based OS) and Scilab 6.0.2 In-Reply-To: References: <3A6B7233274DB449A2A0053A47684F953FFAF83B@BGS-EX01.auxitrol.ad> Message-ID: <3A6B7233274DB449A2A0053A47684F953FFAF8BD@BGS-EX01.auxitrol.ad> I?m under CentOS Linux release 7.6.1810 (Core) where all the updates have been done ? issue with a graphical library? De : users [mailto:users-bounces at lists.scilab.org] De la part de Adelson Oliveira Envoy? : jeudi 27 juin 2019 11:23 ? : International users mailing list for Scilab. Objet : [EXTERNAL] Re: [Scilab-users] plots remain white under CentOS (redhat based OS) and Scilab 6.0.2 Doesn't happen with Scilab 6.01 and Centos 6.9. I'll try with Scilab 6.02. Em qui, 27 de jun de 2019 5:46 AM, Carrico, Paul > escreveu: Dear All When I?m trying to use either plot2D or plot3D under CentOS, all the figures remains white ; I guess it?s a library issue and I think it has ever been noticed in the past, but I do not remember what or I cannot find the workaround: what it is? Thanks for your help 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 jdb61858 at suoox.com Thu Jun 27 12:30:58 2019 From: jdb61858 at suoox.com (RolandB) Date: Thu, 27 Jun 2019 03:30:58 -0700 (MST) Subject: [Scilab-users] (no subject) In-Reply-To: References: Message-ID: <1561631458045-0.post@n3.nabble.com> This is a test. Please excuse me for hijacking this empty thread. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jdb61858 at suoox.com Thu Jun 27 12:38:37 2019 From: jdb61858 at suoox.com (RolandB) Date: Thu, 27 Jun 2019 03:38:37 -0700 (MST) Subject: [Scilab-users] question on graphic children order In-Reply-To: References: <042206a1-dc83-5c3f-45cf-679987ebf8c8@fceia.unr.edu.ar> <1471815f-4762-a3e0-da80-98ccffffc90c@utc.fr> <71df52e9-5634-9345-653e-98b4d833fcf8@utc.fr> <9d81a753-e448-2621-b7f5-683c5d0a03d4@fceia.unr.edu.ar> Message-ID: <1561631917962-0.post@n3.nabble.com> Hi, > After the first interesting St?phane's attempt, i am also afraid that > changing the order now would break a lot of code. It would definitely break a lot of my code. So if that behaviour would be changed, I would ask for an announcement loooong before it is taking effect. If you want to index the children in the order they have been created, you may use ($+1-creationindex). IMO also the order different children are drawn (polylines...) depends on their index. They are drawn from $ to 1 so that child 1, which is the most recent one, is drawn on top. Regards, Roland -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From paul.carrico at auxitrolweston.com Thu Jun 27 15:50:23 2019 From: paul.carrico at auxitrolweston.com (Carrico, Paul) Date: Thu, 27 Jun 2019 13:50:23 +0000 Subject: [Scilab-users] Scilab and gmsh to plot surfaces Message-ID: <3A6B7233274DB449A2A0053A47684F953FFAF91F@BGS-EX01.auxitrol.ad> Dear All After a tesselation using cgal library (delaunay_2), I used gmsh (http://gmsh.info/) to plot the triangles ... just an idea of sharing about 2 powerful tools :-) (useful with a huge amount of nodes) A basic "saddle" surface has been used to test it Hope it help Paul ############################################################################### clc, mode(0), clear PATH = get_absolute_file_path("saddle.sce"); fich = mopen(PATH + "/saddle.msh","w"); // saddle surface function [z]=saddle(x, y) z = x^2 - y^2 endfunction n = 100; x = linspace(-2,2,n)'; // (n,1) matrix y = linspace(-1,3,n)'; // (n,1) matrix i = (1:n)'; j = ones(n,1); X = x .*. j; Y = j .*. y; Z = saddle(X,Y); // ### plot in gmsh ### // Surface number SurfaceNumber = 1; //tri = delaunay_2(X,Y); triangles = delaunay_2(X',Y'); NumberOfTriangles = size(triangles,"r"); mfprintf(fich,"$MeshFormat\n"); mfprintf(fich,"2.2 0 8\n"); mfprintf(fich,"$EndMeshFormat\n"); // Nodes mfprintf(fich,"$Nodes\n"); mfprintf(fich,"%d\n",n*n); i = (1:n*n)'; mfprintf(fich,"%d %g %g %g\n",i,X(i),Y(i),Z(i)); mfprintf(fich,"$EndNodes\n"); // elements mfprintf(fich,"$Elements\n") mfprintf(fich,"%d\n",NumberOfTriangles); i = (1 : NumberOfTriangles)'; SurfaceNumber = SurfaceNumber*ones(NumberOfTriangles,1); mfprintf(fich,"%d 2 2 %d %d %d %d %d\n",i,SurfaceNumber,SurfaceNumber,triangles(i,1),triangles(i,2),triangles(i,3)); mfprintf(fich,"$EndElements\n") mclose(fich); // ### plot in scilab ### scf(0); drawlater(); f = gcf(); f.figure_size = [1000, 1000]; f.background = color(255,255,255); a = gca(); a.font_size = 2; a.x_label.text = '$X$'; a.x_label.font_size = 4; a.y_label.text = '$Y$'; a.Y_label.font_size = 4; a.z_label.text = "$\sigma$"; a.z_label.font_size = 4; plot3d(x, y, feval(x, y, saddle)); drawnow(); -------------- next part -------------- An HTML attachment was scrubbed... URL: