From Christophe.Dang at sidel.com Fri Mar 1 08:32:44 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 1 Mar 2013 08:32:44 +0100 Subject: [Scilab-users] Unclear description of Sgrayplot and Matplot In-Reply-To: <1362066015554-4026091.post@n3.nabble.com> References: <1362066015554-4026091.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1069A162A@301EX00100.sidel.com> Hello, De la part de Stanislav Envoy? : jeudi 28 f?vrier 2013 16:40 > I want to know how to use optional argument strf > in functions Sgrayplot and Matplot. [...] > Sgrayplot and Matplot work even 'x' is any character: > Sgrayplot(x,y,m, strf="q11", rect=[-20,-20,20,20] I personally never used these functions, but according to the help, it seems that strf is a string of numerical characters. There should not be any letter in it. I think they could have written << strf is a string of length 3 "abc" (by default strf= "081") >> (which may be less misleading as x, y and z are strongly related to coordinates). -- 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 arnaud.miege at gmail.com Fri Mar 1 10:47:59 2013 From: arnaud.miege at gmail.com (amiege) Date: Fri, 1 Mar 2013 01:47:59 -0800 (PST) Subject: [Scilab-users] Array of struct In-Reply-To: <1726010321.189644476.1362064000795.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <1362052331531-4026086.post@n3.nabble.com> <1726010321.189644476.1362064000795.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <1362131279534-4026096.post@n3.nabble.com> Samuel GOUGEON wrote > It looks to works as expected. It is hard to help you without > knowning more about the structure that you use. Could you post > some lines of code that fail and that could be copied/pasted > for test? > > Samuel Thank you all for your answers and suggestions. I can't give away all of the code but the following should be enough to replicate the issue: You will see that it only takes the first element of temp in pts as opposed to the whole of the struct. In practice the size of temp will vary depending on the file being read, but each element will always have the same fields (partnumber, P and C), and the size of the matrices P and C doesn't change either. The size of pts will depend on the number of files in the directory being read (these operations are done in a loop, going through each file in a directory). Maybe "pts($+1) = temp" is not the correct way to append the whole of the struct in an existing struct, but I haven't found a way to do this so far. Update: just realised that "pts($+1,:) = temp". Is that the correct way to do it? Thanks, Arnaud -- View this message in context: http://mailinglists.scilab.org/Array-of-struct-tp4026086p4026096.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Fri Mar 1 10:58:03 2013 From: sgougeon at free.fr (sgougeon at free.fr) Date: Fri, 1 Mar 2013 10:58:03 +0100 (CET) Subject: [Scilab-users] Array of struct In-Reply-To: <1362131279534-4026096.post@n3.nabble.com> Message-ID: <1614045388.2015620.1362131883698.JavaMail.root@zimbra75-e12.priv.proxad.net> >Maybe "pts($+1) = temp" is not the correct way to append the whole of the >struct in an existing struct, but I haven't found a way to do this so far. >Update: just realised that "pts($+1,:) = temp". Is that the correct way to do it? //a : is actually needed, but here: pts($+1) = temp(:) Samuel From sgougeon at free.fr Fri Mar 1 11:35:48 2013 From: sgougeon at free.fr (sgougeon at free.fr) Date: Fri, 1 Mar 2013 11:35:48 +0100 (CET) Subject: [Scilab-users] Array of struct In-Reply-To: <1614045388.2015620.1362131883698.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <1935422919.2136290.1362134148478.JavaMail.root@zimbra75-e12.priv.proxad.net> >//a : is actually needed, but here: >pts($+1) = temp(:) Sorry amiege, i have forgotten clearing pts before issuing this command, and its result is not the expected one. By the way, what's the expected result? Do you wish a) to add temp(1:$) as a whole, as a _single_ new element of pts(), or b) to add each element temp(i) as a new corresponding element in pts($+i), in a "distributive" way? In the latter case, the (whole) following does the job: pts = struct(); temp(1).partnumber = 1; temp(1).P = zeros(8,3); temp(1).C = zeros(96,5); temp(2).partnumber = 2; temp(2).C = zeros(96,5); temp(2).P = zeros(8,3); s = size(pts,"*"); st = size(temp,"*"); pts(s+1:s+st) = temp(:) // pts($+1:$+st) can't be used Samuel From sgougeon at free.fr Fri Mar 1 11:44:13 2013 From: sgougeon at free.fr (sgougeon at free.fr) Date: Fri, 1 Mar 2013 11:44:13 +0100 (CET) Subject: [Scilab-users] Array of struct In-Reply-To: <1935422919.2136290.1362134148478.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <1939638289.2164149.1362134653015.JavaMail.root@zimbra75-e12.priv.proxad.net> >pts(s+1:s+st) = temp(:) // pts($+1:$+st) can't be used, even with parentheses ($+1):($+st) // but pts($+(1:st)) can! : pts = struct(); temp(1).partnumber = 1; temp(1).P = zeros(8,3); temp(1).C = zeros(96,5); temp(2).partnumber = 2; temp(2).C = zeros(96,5); temp(2).P = zeros(8,3); st = size(temp,"*"); pts($+(1:st)) = temp(:) // works From arnaud.miege at gmail.com Fri Mar 1 12:21:59 2013 From: arnaud.miege at gmail.com (amiege) Date: Fri, 1 Mar 2013 03:21:59 -0800 (PST) Subject: [Scilab-users] Array of struct In-Reply-To: <1935422919.2136290.1362134148478.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <1362052331531-4026086.post@n3.nabble.com> <1726010321.189644476.1362064000795.JavaMail.root@zimbra75-e12.priv.proxad.net> <1362131279534-4026096.post@n3.nabble.com> <1614045388.2015620.1362131883698.JavaMail.root@zimbra75-e12.priv.proxad.net> <1935422919.2136290.1362134148478.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <1362136919374-4026104.post@n3.nabble.com> Samuel GOUGEON wrote >>//a : is actually needed, but here: >>pts($+1) = temp(:) > > Sorry amiege, i have forgotten clearing pts before issuing this command, > and its result is not the expected one. By the way, what's the expected > result? Do you wish > a) to add temp(1:$) as a whole, as a _single_ new element of pts(), or > b) to add each element temp(i) as a new corresponding element in pts($+i), > in a "distributive" way? I would prefer to have the whole of the struct temp to be pts($+1), so that pts(i) contains all the information related to the data file that has been parsed, so I think that's a). pts(i) would then be a struct which would match what temp is or was when it was constructed. I will try the various solutions suggested and report back which one works best. Thanks, Arnaud -- View this message in context: http://mailinglists.scilab.org/Array-of-struct-tp4026086p4026104.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From arnaud.miege at gmail.com Fri Mar 1 12:30:45 2013 From: arnaud.miege at gmail.com (amiege) Date: Fri, 1 Mar 2013 03:30:45 -0800 (PST) Subject: [Scilab-users] Array of struct In-Reply-To: <1362136919374-4026104.post@n3.nabble.com> References: <1362052331531-4026086.post@n3.nabble.com> <1726010321.189644476.1362064000795.JavaMail.root@zimbra75-e12.priv.proxad.net> <1362131279534-4026096.post@n3.nabble.com> <1614045388.2015620.1362131883698.JavaMail.root@zimbra75-e12.priv.proxad.net> <1935422919.2136290.1362134148478.JavaMail.root@zimbra75-e12.priv.proxad.net> <1362136919374-4026104.post@n3.nabble.com> Message-ID: <1362137445958-4026105.post@n3.nabble.com> amiege wrote > I would prefer to have the whole of the struct temp to be pts($+1), so > that pts(i) contains all the information related to the data file that has > been parsed, so I think that's a). pts(i) would then be a struct which > would match what temp is or was when it was constructed. > > I will try the various solutions suggested and report back which one works > best. > > Thanks, > > Arnaud seems to work. I then need to index into pts using pts(i,j) where i is the "file number" and j is the jth element of the original temp. I think that solves that question, unless someone tells me otherwise. Thanks again, Arnaud -- View this message in context: http://mailinglists.scilab.org/Array-of-struct-tp4026086p4026105.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Fri Mar 1 12:46:13 2013 From: sgougeon at free.fr (sgougeon at free.fr) Date: Fri, 1 Mar 2013 12:46:13 +0100 (CET) Subject: [Scilab-users] Array of struct In-Reply-To: <1362137445958-4026105.post@n3.nabble.com> Message-ID: <796852122.2342783.1362138373542.JavaMail.root@zimbra75-e12.priv.proxad.net> >>amiege wrote: >> I would prefer to have the whole of the struct temp to be pts($+1), so >> that pts(i) contains all the information related to the data file that has >> been parsed, so I think that's a). pts(i) would then be a struct which >> would match what temp is or was when it was constructed. >> >> I will try the various solutions suggested and report back which one works best. >>amiege wrote: >seems to work. Not as a). For this, since you do not need that pts has some fields, a cell would be preferable (by the way, i did not know nor find any way to do it with pts as a struct). This will give: pts = cell() // A cell instead of a struct temp(1).partnumber = 1; temp(1).P = zeros(8,3); temp(1).C = zeros(96,5); temp(2).partnumber = 2; temp(2).C = zeros(96,5); temp(2).P = zeros(8,3); pts(size(pts,"*")+1).entries = temp // pts($+1).entries addressing fails pts(size(pts,"*")+1).entries = temp pts(2).entries Samuel From arnaud.miege at gmail.com Fri Mar 1 14:35:53 2013 From: arnaud.miege at gmail.com (amiege) Date: Fri, 1 Mar 2013 05:35:53 -0800 (PST) Subject: [Scilab-users] Array of struct In-Reply-To: <796852122.2342783.1362138373542.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <1362052331531-4026086.post@n3.nabble.com> <1726010321.189644476.1362064000795.JavaMail.root@zimbra75-e12.priv.proxad.net> <1362131279534-4026096.post@n3.nabble.com> <1614045388.2015620.1362131883698.JavaMail.root@zimbra75-e12.priv.proxad.net> <1935422919.2136290.1362134148478.JavaMail.root@zimbra75-e12.priv.proxad.net> <1362136919374-4026104.post@n3.nabble.com> <1362137445958-4026105.post@n3.nabble.com> <796852122.2342783.1362138373542.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <1362144953493-4026108.post@n3.nabble.com> Samuel GOUGEON wrote > Not as a). For this, since you do not need that pts has some fields, > a cell would be preferable (by the way, i did not know nor find any > way to do it with pts as a struct). This will give: > > pts = cell() // A cell instead of a struct > > temp(1).partnumber = 1; > temp(1).P = zeros(8,3); > temp(1).C = zeros(96,5); > temp(2).partnumber = 2; > temp(2).C = zeros(96,5); > temp(2).P = zeros(8,3); > > > pts(size(pts,"*")+1).entries = temp // pts($+1).entries addressing fails > pts(size(pts,"*")+1).entries = temp > pts(2).entries > > > Samuel Thanks. -- View this message in context: http://mailinglists.scilab.org/Array-of-struct-tp4026086p4026108.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grivet at cnrs-orleans.fr Fri Mar 1 14:47:38 2013 From: grivet at cnrs-orleans.fr (grivet) Date: Fri, 01 Mar 2013 14:47:38 +0100 Subject: [Scilab-users] vatying color along a curve In-Reply-To: <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> Message-ID: <5130B17A.8080207@cnrs-orleans.fr> Hello, I am trying to plot a curve using varying colors (or saturations) along the way. The curve is computed as a series of segments. To plot a segment beginning at (xd,yd) and ending at (xf,yf), I have tried the following plot([xd,xf],[yd,yf],"foreground",3); This works, but, at each call of plot (thousands in my case) Scilab emits the following message: AVERTISSEMENT : Incorrect input : Color vector should be a 3x1 or 1x3 vector Further, I would like to use colors which do not belong to the default color table. If I do plot([xd,xf],[yd,yf],"foreground",[3,3,3]); the program stops on the first call to plot with the following error message: addcolor : Type erron? de l'argument d'entr?e n?1 : Une structure de donn?es de type color_map attendue I then tried plot([xd,xf],[yd,yf],"foreground",color_map(3)); the program stops on the first call to plot with the following error message: Variable non d?finie : color_map What is the correct syntax? I would like to choose a different color vector for each call of plot. Further, the help sometimes states that color vector elements must be integers from 0 to 256, sometimes reals between 0 and 1; which is correct ? Thank you in advance for your time and help. JP Grivet From krotersv at gmail.com Fri Mar 1 15:23:48 2013 From: krotersv at gmail.com (Stanislav) Date: Fri, 1 Mar 2013 06:23:48 -0800 (PST) Subject: [Scilab-users] vatying color along a curve In-Reply-To: <5130B17A.8080207@cnrs-orleans.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> Message-ID: <1362147828008-4026110.post@n3.nabble.com> Hi. About colors see help color_list. You can set your own color with help of name2rgb or provide color directly: plot(cos(1:100),"foreground",name2rgb('green')/255); or plot(cos(1:100),"foreground",[0.8 0.75 0.75]); // I don't know the name of this color Stanislav -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Format-legends-of-a-graph-as-a-2D-table-tp4025997p4026110.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Fri Mar 1 16:00:59 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Fri, 01 Mar 2013 16:00:59 +0100 Subject: [Scilab-users] vatying color along a curve In-Reply-To: <5130B17A.8080207@cnrs-orleans.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> Message-ID: <5130C2AB.7000903@inria.fr> Le 01/03/2013 14:47, grivet a ?crit : > Hello, > I am trying to plot a curve using varying colors (or saturations) > along the way. The curve is computed as a series of segments. > To plot a segment beginning at (xd,yd) and ending at (xf,yf), I have > tried the following > > plot([xd,xf],[yd,yf],"foreground",3); > It is better to use the xsegs function to do that. This function allows to draw a set of colored segments using a single command > This works, but, at each call of plot (thousands in my case) Scilab > emits the following message: > > AVERTISSEMENT : Incorrect input : Color vector should be a 3x1 or 1x3 > vector > Further, I would like to use colors which do not belong to the default > color table. If I do > > plot([xd,xf],[yd,yf],"foreground",[3,3,3]); > > the program stops on the first call to plot with the following error > message: > > addcolor : Type erron? de l'argument d'entr?e n?1 : Une structure de > donn?es de type color_map attendue > > I then tried > > plot([xd,xf],[yd,yf],"foreground",color_map(3)); > > the program stops on the first call to plot with the following error > message: > Variable non d?finie : color_map > > What is the correct syntax? I would like to choose a different color > vector for each call of plot. Further, the help > sometimes states that color vector elements must be integers from 0 to > 256, sometimes reals between > 0 and 1; which is correct ? > > Thank you in advance for your time and help. > JP Grivet > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From grivet at cnrs-orleans.fr Fri Mar 1 16:25:38 2013 From: grivet at cnrs-orleans.fr (grivet) Date: Fri, 01 Mar 2013 16:25:38 +0100 Subject: [Scilab-users] vatying color along a curve In-Reply-To: <5130C2AB.7000903@inria.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> Message-ID: <5130C872.4020105@cnrs-orleans.fr> Le 01/03/2013 16:00, Serge Steer a ?crit : > > Le 01/03/2013 14:47, grivet a ?crit : >> Hello, >> I am trying to plot a curve using varying colors (or saturations) >> along the way. The curve is computed as a series of segments. >> To plot a segment beginning at (xd,yd) and ending at (xf,yf), I have >> tried the following >> >> plot([xd,xf],[yd,yf],"foreground",3); >> > It is better to use the xsegs function to do that. This function > allows to draw a set of colored segments using a single command Thank you serge; a further question: how can I define my own color map ? From jrafaelbguerra at hotmail.com Mon Mar 4 04:36:31 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 3 Mar 2013 19:36:31 -0800 (PST) Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers Message-ID: <1362368191627-4026119.post@n3.nabble.com> Hello, Does somebody know if there are Scilab functions capable of replacing outliers via some local robust fitting in 2D, i.e., that smooths experimental data z=f(x,y) and is immune to strong outliers. PS: CASCI in Atoms has a lowess function which does this via local robust linear fitting but for functions of one variable only. Thanks and regards, Rafael Guerra -- View this message in context: http://mailinglists.scilab.org/Surface-smoothing-in-Scilab-immune-to-outliers-tp4026119.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Mon Mar 4 04:50:58 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 04 Mar 2013 04:50:58 +0100 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <1362368191627-4026119.post@n3.nabble.com> References: <1362368191627-4026119.post@n3.nabble.com> Message-ID: <51341A22.2010406@free.fr> Hello Rafael, Le 04/03/2013 04:36, Rafael Guerra a ?crit : > .../... > Does somebody know if there are Scilab functions capable of replacing > outliers via some local robust fitting in 2D, i.e., that smooths > experimental data z=f(x,y) and is immune to strong outliers. 2D smoothing is frequently performed by convoluting data with a 2D kernel. You may have a look at conv2() and convol2d() HTH Samuel From Christophe.Dang at sidel.com Mon Mar 4 09:00:18 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 4 Mar 2013 09:00:18 +0100 Subject: [Scilab-users] vatying color along a curve In-Reply-To: <5130C872.4020105@cnrs-orleans.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> Hello, De la part de grivet Envoy? : vendredi 1 mars 2013 16:26 > a further question: how can I define my own color map ? As an error message was in French, I assume you're a native speaker. For the color map, maybe you coud have a look at : http://fr.wikibooks.org/wiki/D%C3%A9couvrir_Scilab/Graphiques_et_sons#Cartographie_couleur 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 Christophe.Dang at sidel.com Mon Mar 4 13:23:13 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 4 Mar 2013 13:23:13 +0100 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <1362368191627-4026119.post@n3.nabble.com> References: <1362368191627-4026119.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> Hello, De la part de Rafael Guerra Envoy? : lundi 4 mars 2013 04:37 > Does somebody know if there are Scilab functions > [...] that smooths > experimental data z=f(x,y) and is immune to strong outliers. imho, the problem with smoothing and outliers is that the definition of a outlier depends on the field. How can Scilab know what a "strong outlier" is? I personally would try Fourier filtering: a strong outlier means a steep slope and therefore correspond to a high frequency. Thus fft2, set high frequencies to 0 (with possibly a smooth transition), then inverse fft2 -- ifft2 does not exist, I never used 2-dimension Fourier transform so I don't know if the inverse is easy to perform... -- 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 Mon Mar 4 13:59:49 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 04 Mar 2013 13:59:49 +0100 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> References: <1362368191627-4026119.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> Message-ID: <51349AC5.1060701@free.fr> Le 04/03/2013 13:23, Dang, Christophe a ?crit : > .../... > > I personally would try Fourier filtering: > a strong outlier means a steep slope > and therefore correspond to a high frequency. > > Thus fft2, set high frequencies to 0 > (with possibly a smooth transition), > then inverse fft2 -- ifft2 does not exist, I never used 2-dimension > Fourier transform so I don't know if the inverse is easy to perform... frequency-wise multiplication of 2 spectra is equivalent to convoluting both respectives functions (in the direct spaces). Samuel From stephane.mottelet at utc.fr Mon Mar 4 14:13:51 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Mon, 04 Mar 2013 14:13:51 +0100 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> References: <1362368191627-4026119.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> Message-ID: <51349E0F.8000700@utc.fr> Hello, Replacing the squared L2 norm by the L1 norm in the linear regression gives a good robustness to outliers (cf. Donoho and al. papers). The problem is then non differentiable but you can implement it by iteratively reweighting the classical L2 method (IRLS method), or by writing an equivalent linear program. S. Le 04/03/13 13:23, Dang, Christophe a ?crit : > Hello, > > De la part de Rafael Guerra > Envoy? : lundi 4 mars 2013 04:37 > >> Does somebody know if there are Scilab functions >> [...] that smooths >> experimental data z=f(x,y) and is immune to strong outliers. > imho, the problem with smoothing and outliers is that > the definition of a outlier depends on the field. > > How can Scilab know what a "strong outlier" is? > > I personally would try Fourier filtering: > a strong outlier means a steep slope > and therefore correspond to a high frequency. > > Thus fft2, set high frequencies to 0 > (with possibly a smooth transition), > then inverse fft2 -- ifft2 does not exist, I never used 2-dimension > Fourier transform so I don't know if the inverse is easy to perform... > From haasejos at web.de Mon Mar 4 16:05:00 2013 From: haasejos at web.de (haasejos) Date: Mon, 4 Mar 2013 07:05:00 -0800 (PST) Subject: [Scilab-users] error 26 Too complex recursion! Message-ID: <1362409500410-4026126.post@n3.nabble.com> hello, I would like to run a type of script as shown below. Scilab prints the errormessage "error 26 Too complex recursion!" What should be changed to succeed? best regards Josef * function [gg2]=g2(xi); gg2=f(xi)*exp(imult(-2*nn*%pi*xi/L)); endfunction; function y=f(x); y = sin(x); endfunction; nn=1; c0=0; L = 2*%pi; x = (0 : %pi/4 : 2*%pi); y=[]; for j =1:length(x); y=[y f(x(j))]; end; b=(2/L)*intc(c0,c0+L,g2); disp('b = ' +string(b));* -- View this message in context: http://mailinglists.scilab.org/error-26-Too-complex-recursion-tp4026126.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Mon Mar 4 17:04:35 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 4 Mar 2013 17:04:35 +0100 Subject: [Scilab-users] error 26 Too complex recursion! In-Reply-To: <1362409500410-4026126.post@n3.nabble.com> References: <1362409500410-4026126.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106A28FFB@301EX00100.sidel.com> Hello, De la part de haasejos Envoy? : lundi 4 mars 2013 16:05 > Scilab prints the errormessage "error 26 Too complex recursion!" > What should be changed to succeed? After a few tries, I have the feeling that f is redefined -->disp(f) [gg2]=f(xi) if you replace f by sin in g2, this solevs the problem (but then you have a problem of convergence). Note that you should place f before g2 (as g2 calls f), and you can simplify you code with f = sin (but this does not improve the behaviour...) -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From jrafaelbguerra at hotmail.com Mon Mar 4 18:51:00 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 4 Mar 2013 14:51:00 -0300 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <51349E0F.8000700@utc.fr> References: <1362368191627-4026119.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> <51349E0F.8000700@utc.fr> Message-ID: Thanks St?phane for the useful L1-references and for the insight on iterative L2 methods and to the others for their repplies. PS: Strong outliers or spikes have infinite bandwidth and therefore bandpass filtering/convolution does not seem, a priori, to be the most effective method to remove them. Regards, Rafael -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of St?phane Mottelet Sent: Monday, March 04, 2013 10:14 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] Surface smoothing in Scilab, immune to outliers Hello, Replacing the squared L2 norm by the L1 norm in the linear regression gives a good robustness to outliers (cf. Donoho and al. papers). The problem is then non differentiable but you can implement it by iteratively reweighting the classical L2 method (IRLS method), or by writing an equivalent linear program. S. Le 04/03/13 13:23, Dang, Christophe a ?crit : > Hello, > > De la part de Rafael Guerra > Envoy? : lundi 4 mars 2013 04:37 > >> Does somebody know if there are Scilab functions [...] that smooths >> experimental data z=f(x,y) and is immune to strong outliers. > imho, the problem with smoothing and outliers is that the definition > of a outlier depends on the field. > > How can Scilab know what a "strong outlier" is? > > I personally would try Fourier filtering: > a strong outlier means a steep slope > and therefore correspond to a high frequency. > > Thus fft2, set high frequencies to 0 > (with possibly a smooth transition), > then inverse fft2 -- ifft2 does not exist, I never used 2-dimension > Fourier transform so I don't know if the inverse is easy to perform... > _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Mon Mar 4 19:05:50 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Mon, 04 Mar 2013 19:05:50 +0100 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: References: <1362368191627-4026119.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> <51349E0F.8000700@utc.fr> Message-ID: <5134E27E.80108@utc.fr> Hello, I have written a little script making the comparison between L1 and L2 norm. For the L1 case, I have used leastsq and cheated by returning the square root of the abs of the residue and the 'nd' option. function r=resid(coef,x,y,z) r=sqrt(abs(z-(coef(1)+coef(2)*x+coef(3)*y))); r=r(:); endfunction n=10; [x,y]=meshgrid(linspace(-1,1,n)); z=1+x+y+rand(x,'normal')/10; z(n,n)=20; // outlier // L2 case A=[x(:)^0 x(:) y(:)]; coefl2=A\z(:); disp(coefl2); // L1 case [l1norm,coefl1]=leastsq(list(resid,x,y,z),coefl2,'nd'); disp(coefl1); Things are not supposed to work so well because 'nd' is only meaning that the function to minimize in non-differentiable at the optimum (and only there....). However, it seems to work well (true value is [1,1,1]') : L2 case : 1.165072 1.4380897 1.398408 L1 case : 0.9954939 1.0441875 0.9939874 S. Le 04/03/13 18:51, Rafael Guerra a ?crit : > Thanks St?phane for the useful L1-references and for the insight on > iterative L2 methods and to the others for their repplies. > > PS: > Strong outliers or spikes have infinite bandwidth and therefore bandpass > filtering/convolution does not seem, a priori, to be the most effective > method to remove them. > > Regards, > Rafael > > -----Original Message----- > From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] > On Behalf Of St?phane Mottelet > Sent: Monday, March 04, 2013 10:14 AM > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Surface smoothing in Scilab, immune to outliers > > Hello, > > Replacing the squared L2 norm by the L1 norm in the linear regression gives > a good robustness to outliers (cf. Donoho and al. papers). The problem is > then non differentiable but you can implement it by iteratively reweighting > the classical L2 method (IRLS method), or by writing an equivalent linear > program. > > S. > > > Le 04/03/13 13:23, Dang, Christophe a ?crit : >> Hello, >> >> De la part de Rafael Guerra >> Envoy? : lundi 4 mars 2013 04:37 >> >>> Does somebody know if there are Scilab functions [...] that smooths >>> experimental data z=f(x,y) and is immune to strong outliers. >> imho, the problem with smoothing and outliers is that the definition >> of a outlier depends on the field. >> >> How can Scilab know what a "strong outlier" is? >> >> I personally would try Fourier filtering: >> a strong outlier means a steep slope >> and therefore correspond to a high frequency. >> >> Thus fft2, set high frequencies to 0 >> (with possibly a smooth transition), >> then inverse fft2 -- ifft2 does not exist, I never used 2-dimension >> Fourier transform so I don't know if the inverse is easy to perform... >> > _______________________________________________ > 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 calixte.denizet at scilab-enterprises.com Mon Mar 4 20:01:02 2013 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Mon, 04 Mar 2013 20:01:02 +0100 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <1362368191627-4026119.post@n3.nabble.com> References: <1362368191627-4026119.post@n3.nabble.com> Message-ID: <5134EF6E.7090404@scilab-enterprises.com> Hi Rafael, You can try to use lsq_splin along the axes x and y. It seems to work on the following example: x = %pi * [-1:0.05:1]'; z = sin(x)*cos(x)'; f = gcf(); f.color_map = jetcolormap(32); subplot(131); xtitle("Exact values"); plot3d(x, x, z, 70, 70); e=gce(); e.color_flag = 1; z = z + 0.5*rand(z); z(10,10)=5; z(30,20)=5; z(10,40)=5; subplot(132); xtitle("Perturbated values"); plot3d(x, x, z, 70, 70); e=gce(); e.color_flag = 1; zz=zeros(z); w=linspace(-%pi,%pi,5)'; for i=1:size(z,'r') [y,d]=lsq_splin(x', z(i,:), w); zz(i,:)=interp(x', w, y, d); end for i=1:size(zz,'c') [y,d]=lsq_splin(x, zz(:,i), w); zz(:,i)=interp(x, w, y, d); end subplot(133); xtitle("Smoothed values"); plot3d(x, x, zz, 70, 70); e=gce(); e.color_flag = 1; Best regards Calixte On 04/03/2013 04:36, Rafael Guerra wrote: > Hello, > > Does somebody know if there are Scilab functions capable of replacing > outliers via some local robust fitting in 2D, i.e., that smooths > experimental data z=f(x,y) and is immune to strong outliers. > > PS: CASCI in Atoms has a lowess function which does this via local robust > linear fitting but for functions of one variable only. > > Thanks and regards, > Rafael Guerra > > > > > -- > View this message in context: http://mailinglists.scilab.org/Surface-smoothing-in-Scilab-immune-to-outliers-tp4026119.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 -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com From samuel.enibe at unn.edu.ng Mon Mar 4 21:40:56 2013 From: samuel.enibe at unn.edu.ng (Samuel Enibe) Date: Mon, 4 Mar 2013 21:40:56 +0100 Subject: [Scilab-users] Vectorial form of fprintf Function Message-ID: Dear Sir, I would like to print a given column in a matrix with a specific number of decimal places. The *format* function does not give the same number of decimal places for columns containing data of varying length. On the other hand, *fprintf* and the like appear suitable for single float at a time. Is there a version of *fprintf* and co that can be used directly for a matrix? -- Samuel Ogbonna Enibe University of Nigeria, Nsukka, Nigeria Tel: +2348063646798 -------------- next part -------------- An HTML attachment was scrubbed... URL: From calixte.denizet at scilab-enterprises.com Mon Mar 4 22:12:06 2013 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Mon, 04 Mar 2013 22:12:06 +0100 Subject: [Scilab-users] Vectorial form of fprintf Function In-Reply-To: References: Message-ID: <51350E26.7060501@scilab-enterprises.com> Hi Samuel, You could try something like: c = (1:10)'; fd=mopen("/tmp/foo.bar"); mfprintf(fd, "%5.3f\n", c); mclose(fd); If you need to print a matrix you can do A=rand(3,4); fd=mopen("/tmp/bar.foo","wt"); mfprintf(fd, "%5.3f %5.3f %5.3f %5.3f\n",A) mclose(fd); Best regards Calixte On 04/03/2013 21:40, Samuel Enibe wrote: > Dear Sir, > > I would like to print a given column in a matrix with a specific > number of decimal places. The *format* function does not give the > same number of decimal places for columns containing data of varying > length. On the other hand, *fprintf* and the like appear suitable for > single float at a time. Is there a version of *fprintf* and co that > can be used directly for a matrix? > > -- > Samuel Ogbonna Enibe > University of Nigeria, Nsukka, Nigeria > Tel: +2348063646798 > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From calixte.denizet at scilab-enterprises.com Mon Mar 4 22:22:59 2013 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Mon, 04 Mar 2013 22:22:59 +0100 Subject: [Scilab-users] error 26 Too complex recursion! In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106A28FFB@301EX00100.sidel.com> References: <1362409500410-4026126.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106A28FFB@301EX00100.sidel.com> Message-ID: <513510B3.6070907@scilab-enterprises.com> Hi, It works in changing f in something else, e.g. foo or toto. It is a bug in intc macro: please report it on bugzilla.scilab.org. Thanks Calixte On 04/03/2013 17:04, Dang, Christophe wrote: > Hello, > > De la part de haasejos > Envoy? : lundi 4 mars 2013 16:05 > >> Scilab prints the errormessage "error 26 Too complex recursion!" >> What should be changed to succeed? > After a few tries, > I have the feeling that f is redefined > > -->disp(f) > > [gg2]=f(xi) > > if you replace f by sin in g2, this solevs the problem > (but then you have a problem of convergence). > > Note that you should place f before g2 (as g2 calls f), > > and you can simplify you code with > > f = sin > > (but this does not improve the behaviour...) > -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com From jrafaelbguerra at hotmail.com Tue Mar 5 01:45:37 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 4 Mar 2013 21:45:37 -0300 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <5134E27E.80108@utc.fr> References: <1362368191627-4026119.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106A28AA5@301EX00100.sidel.com> <51349E0F.8000700@utc.fr> <5134E27E.80108@utc.fr> Message-ID: Hello St?phane, Tried optim using a true L1-norm on your script. It seems to work but results are not necessarily better than your previous srqt trick: function r=resid(coef, x, y, z) r = sum(abs(z-(coef(1)+coef(2)*x+coef(3)*y))); endfunction n=10; [x,y]=meshgrid(linspace(-1,1,n)); z=1+x+y+rand(x,'normal')/10; z(n,n)= 100; // outlier z(5,5)= -200; // outlier // L2 case A=[x(:)^0 x(:) y(:)]; coefl2=A\z(:); disp(coefl2); // L1 case coef0= [0; 0; 0]; [r,coefl1]= optim(list(NDcost,resid,x,y,z),coef0) disp(coefl1); Rgds Rafael From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of St?phane Mottelet Sent: Monday, March 04, 2013 3:06 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Surface smoothing in Scilab, immune to outliers Hello, I have written a little script making the comparison between L1 and L2 norm. For the L1 case, I have used leastsq and cheated by returning the square root of the abs of the residue and the 'nd' option. function r=resid(coef, x, y, z) r=sqrt(abs(z-(coef(1)+coef(2)*x+coef(3)*y))); r=r(:); endfunction n=10; [x,y]=meshgrid(linspace(-1,1,n)); z=1+x+y+rand(x,'normal')/10; z(n,n)=20; // outlier // L2 case A=[x(:)^0 x(:) y(:)]; coefl2=A\z(:); disp(coefl2); // L1 case [l1norm,coefl1]=leastsq(list(resid,x,y,z),coefl2,' nd'); disp(coefl1); Things are not supposed to work so well because 'nd' is only meaning that the function to minimize in non-differentiable at the optimum (and only there....). However, it seems to work well (true value is [1,1,1]') : L2 case : 1.165072 1.4380897 1.398408 L1 case : 0.9954939 1.0441875 0.9939874 S. Le 04/03/13 18:51, Rafael Guerra a ?crit : Thanks St?phane for the useful L1-references and for the insight on iterative L2 methods and to the others for their repplies. PS: Strong outliers or spikes have infinite bandwidth and therefore bandpass filtering/convolution does not seem, a priori, to be the most effective method to remove them. Regards, Rafael -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of St?phane Mottelet Sent: Monday, March 04, 2013 10:14 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] Surface smoothing in Scilab, immune to outliers Hello, Replacing the squared L2 norm by the L1 norm in the linear regression gives a good robustness to outliers (cf. Donoho and al. papers). The problem is then non differentiable but you can implement it by iteratively reweighting the classical L2 method (IRLS method), or by writing an equivalent linear program. S. Le 04/03/13 13:23, Dang, Christophe a ?crit : Hello, De la part de Rafael Guerra Envoy? : lundi 4 mars 2013 04:37 Does somebody know if there are Scilab functions [...] that smooths experimental data z=f(x,y) and is immune to strong outliers. imho, the problem with smoothing and outliers is that the definition of a outlier depends on the field. How can Scilab know what a "strong outlier" is? I personally would try Fourier filtering: a strong outlier means a steep slope and therefore correspond to a high frequency. Thus fft2, set high frequencies to 0 (with possibly a smooth transition), then inverse fft2 -- ifft2 does not exist, I never used 2-dimension Fourier transform so I don't know if the inverse is easy to perform... _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Mar 5 04:15:55 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 5 Mar 2013 00:15:55 -0300 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: <5134EF6E.7090404@scilab-enterprises.com> References: <1362368191627-4026119.post@n3.nabble.com> <5134EF6E.7090404@scilab-enterprises.com> Message-ID: Hi Calixte, Thanks for your feedback, the beatiful example and very useful script. The weighted least squares cubic spline fitting function (lsq_splin) seems to work very well for outliers of moderate magnitude. However, it seems to fail for larger outliers: // Replace for instance the three outliers defined in your script by: z(10,10)=50; z(30,20)=50; z(10,40)=50; Sinha and Schunck (1992) address this problem using a two-stage procedure, where a robust local algorithm MLMS (moving least median of squares of error) is run first to get rid of the outliers. Thereafter, weighted least squares cubic splines are used. MLMS seems very computationally intensive. A different approach is the Loess method - see for instance W.G. Jacoby (2000). Best regards, Rafael G. -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of Calixte Denizet Sent: Monday, March 04, 2013 4:01 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Surface smoothing in Scilab, immune to outliers Hi Rafael, You can try to use lsq_splin along the axes x and y. It seems to work on the following example: x = %pi * [-1:0.05:1]'; z = sin(x)*cos(x)'; f = gcf(); f.color_map = jetcolormap(32); subplot(131); xtitle("Exact values"); plot3d(x, x, z, 70, 70); e=gce(); e.color_flag = 1; z = z + 0.5*rand(z); z(10,10)=5; z(30,20)=5; z(10,40)=5; subplot(132); xtitle("Perturbated values"); plot3d(x, x, z, 70, 70); e=gce(); e.color_flag = 1; zz=zeros(z); w=linspace(-%pi,%pi,5)'; for i=1:size(z,'r') [y,d]=lsq_splin(x', z(i,:), w); zz(i,:)=interp(x', w, y, d); end for i=1:size(zz,'c') [y,d]=lsq_splin(x, zz(:,i), w); zz(:,i)=interp(x, w, y, d); end subplot(133); xtitle("Smoothed values"); plot3d(x, x, zz, 70, 70); e=gce(); e.color_flag = 1; Best regards Calixte On 04/03/2013 04:36, Rafael Guerra wrote: > Hello, > > Does somebody know if there are Scilab functions capable of replacing > outliers via some local robust fitting in 2D, i.e., that smooths > experimental data z=f(x,y) and is immune to strong outliers. > > PS: CASCI in Atoms has a lowess function which does this via local > robust linear fitting but for functions of one variable only. > > Thanks and regards, > Rafael Guerra > > > > > -- > View this message in context: > http://mailinglists.scilab.org/Surface-smoothing-in-Scilab-immune-to-o > utliers-tp4026119.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 -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From samuel.enibe at unn.edu.ng Tue Mar 5 05:14:09 2013 From: samuel.enibe at unn.edu.ng (samuel.enibe at unn.edu.ng) Date: Tue, 05 Mar 2013 04:14:09 +0000 Subject: [Scilab-users] Vectorial form of fprintf Message-ID: <5135719e.e661b40a.3f3a.ffffddf8@mx.google.com> Dear sirs, Is there a vectorial form of any variant of fprintf function?I would like to print a matrix of numbers to a specific numbwr of decimal palces. Thanks for your kind assistance. Sent from my Nokia phone From samuel.enibe at unn.edu.ng Tue Mar 5 04:55:09 2013 From: samuel.enibe at unn.edu.ng (samuel.enibe at unn.edu.ng) Date: Tue, 05 Mar 2013 03:55:09 +0000 Subject: [Scilab-users] Vectorial form of fprintf Message-ID: <513571a0.6164b40a.0981.ffffef39@mx.google.com> Dear sirs, Is there a vectorial form of any variant of fprintf function?I would like to print a matrix of numbers to a specific numbwr of decimal palces. Thanks for your kind assistance. Sent from my Nokia phone From paul.carrico at esterline.com Tue Mar 5 08:34:23 2013 From: paul.carrico at esterline.com (Carrico, Paul) Date: Tue, 5 Mar 2013 08:34:23 +0100 Subject: [Scilab-users] Converting a matrix of string into real Message-ID: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788A@exchsrv.auxitrol.ad> Dear All After reading a text file (mgetl), removing the comments, I've finally a matrix of string containing only numbers... what is the fastest way to convert those string into reals (I don't remember)? using "eval" function is quite slow Thanks Paul -------------------------------------------------------------------------------- Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From haasejos at web.de Tue Mar 5 09:17:25 2013 From: haasejos at web.de (haasejos) Date: Tue, 5 Mar 2013 00:17:25 -0800 (PST) Subject: [Scilab-users] error 26 Too complex recursion! In-Reply-To: <1362409500410-4026126.post@n3.nabble.com> References: <1362409500410-4026126.post@n3.nabble.com> Message-ID: <1362471445736-4026140.post@n3.nabble.com> thanks to both of you! is there any experience how to solve the problem of convergence in 'intc'? -- View this message in context: http://mailinglists.scilab.org/error-26-Too-complex-recursion-tp4026126p4026140.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From vogt at centre-cired.fr Tue Mar 5 10:11:56 2013 From: vogt at centre-cired.fr (A. Vogt-Schilb) Date: Tue, 05 Mar 2013 10:11:56 +0100 Subject: [Scilab-users] Converting a matrix of string into real Message-ID: Hi csvStringtodouble Sent from my phone "Carrico, Paul" wrote: >Dear All > >After reading a text file (mgetl), removing the comments, I've finally a >matrix of string containing only numbers... what is the fastest way to >convert those string into reals (I don't remember)? > >using "eval" function is quite slow > >Thanks > >Paul > >-------------------------------------------------------------------------------- > > >Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. > >This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. > >_______________________________________________ >users mailing list >users at lists.scilab.org >http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt at centre-cired.fr Tue Mar 5 10:13:31 2013 From: vogt at centre-cired.fr (A. Vogt-Schilb) Date: Tue, 05 Mar 2013 10:13:31 +0100 Subject: [Scilab-users] Vectorial form of fprintf Message-ID: <5kym0ybkk2t80ptpmabvg59w.1362474811325@email.android.com> Hi, Try csvWrite and its options. Sent from my phone samuel.enibe at unn.edu.ng wrote: >Dear sirs, > >Is there a vectorial form of any variant of fprintf function?I would like to print a matrix of numbers to a specific numbwr of decimal palces. > >Thanks for your kind assistance. > >Sent from my Nokia phone >_______________________________________________ >users mailing list >users at lists.scilab.org >http://lists.scilab.org/mailman/listinfo/users From calixte.denizet at scilab-enterprises.com Tue Mar 5 10:25:43 2013 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Tue, 05 Mar 2013 10:25:43 +0100 Subject: [Scilab-users] Surface smoothing in Scilab, immune to outliers In-Reply-To: References: <1362368191627-4026119.post@n3.nabble.com> <5134EF6E.7090404@scilab-enterprises.com> Message-ID: <5135BA17.2090800@scilab-enterprises.com> Hi Rafael, you are right: when the magnitude of the outliers is too large, lsq_splin is not always good. But if you increase the number of points, you could have something better (with the same example (ie 50 rather than 5) replace x by x = %pi * [-1:0.01:1]'). Best regards Calixte On 05/03/2013 04:15, Rafael Guerra wrote: > > Hi Calixte, > > Thanks for your feedback, the beatiful example and very useful script. > > The weighted least squares cubic spline fitting function (lsq_splin) > seems to work very well for outliers of moderate magnitude. However, > it seems to fail for larger outliers: > > // Replace for instance the three outliers defined in your script by: > > z(10,10)=50; > > z(30,20)=50; > > z(10,40)=50; > > Sinha and Schunck (1992) address this problem using a two-stage > procedure, where a robust local algorithm MLMS (moving least median of > squares of error) is run first to get rid of the outliers. Thereafter, > weighted least squares cubic splines are used. MLMS seems very > computationally intensive. > > A different approach is the Loess method - see for instance W.G. > Jacoby (2000). > > Best regards, > > Rafael G. > > -----Original Message----- > From: users-bounces at lists.scilab.org > [mailto:users-bounces at lists.scilab.org] On Behalf Of Calixte Denizet > Sent: Monday, March 04, 2013 4:01 PM > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Surface smoothing in Scilab, immune to > outliers > > Hi Rafael, > > You can try to use lsq_splin along the axes x and y. > > It seems to work on the following example: > > x = %pi * [-1:0.05:1]'; > > z = sin(x)*cos(x)'; > > f = gcf(); > > f.color_map = jetcolormap(32); > > subplot(131); > > xtitle("Exact values"); > > plot3d(x, x, z, 70, 70); > > e=gce(); > > e.color_flag = 1; > > z = z + 0.5*rand(z); > > z(10,10)=5; > > z(30,20)=5; > > z(10,40)=5; > > subplot(132); > > xtitle("Perturbated values"); > > plot3d(x, x, z, 70, 70); > > e=gce(); > > e.color_flag = 1; > > zz=zeros(z); > > w=linspace(-%pi,%pi,5)'; > > for i=1:size(z,'r') > > [y,d]=lsq_splin(x', z(i,:), w); > > zz(i,:)=interp(x', w, y, d); > > end > > for i=1:size(zz,'c') > > [y,d]=lsq_splin(x, zz(:,i), w); > > zz(:,i)=interp(x, w, y, d); > > end > > subplot(133); > > xtitle("Smoothed values"); > > plot3d(x, x, zz, 70, 70); > > e=gce(); > > e.color_flag = 1; > > Best regards > > Calixte > > On 04/03/2013 04:36, Rafael Guerra wrote: > > > Hello, > > > > > > Does somebody know if there are Scilab functions capable of replacing > > > outliers via some local robust fitting in 2D, i.e., that smooths > > > experimental data z=f(x,y) and is immune to strong outliers. > > > > > > PS: CASCI in Atoms has a lowess function which does this via local > > > robust linear fitting but for functions of one variable only. > > > > > > Thanks and regards, > > > Rafael Guerra > > > > > > > > > > > > > > > -- > > > View this message in context: > > > http://mailinglists.scilab.org/Surface-smoothing-in-Scilab-immune-to-o > > > utliers-tp4026119.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 > > -- > > Calixte Denizet > > Software Development Engineer > > ----------------------------------------------------------- > > Scilab Enterprises > > 143bis rue Yves Le Coz - 78000 Versailles, France > http://www.scilab-enterprises.com > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Tue Mar 5 11:06:41 2013 From: paul.carrico at esterline.com (Carrico, Paul) Date: Tue, 5 Mar 2013 11:06:41 +0100 Subject: [Scilab-users] Converting a matrix of string into real In-Reply-To: References: Message-ID: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788E@exchsrv.auxitrol.ad> Thanks .. but is it in an Atoms package ? I failed in finding it on the web site and the function seems not to be defined in Scilab (5.4.0) Paul ________________________________ De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de A. Vogt-Schilb Envoy? : mardi 5 mars 2013 10:12 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] Converting a matrix of string into real Hi csvStringtodouble Sent from my phone "Carrico, Paul" wrote: Dear All After reading a text file (mgetl), removing the comments, I've finally a matrix of string containing only numbers... what is the fastest way to convert those string into reals (I don't remember)? using "eval" function is quite slow Thanks Paul -------------------------------------------------------------------------------- Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt at centre-cired.fr Tue Mar 5 11:09:36 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Tue, 05 Mar 2013 11:09:36 +0100 Subject: [Scilab-users] Converting a matrix of string into real In-Reply-To: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788E@exchsrv.auxitrol.ad> References: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788E@exchsrv.auxitrol.ad> Message-ID: <5135C460.3010508@centre-cired.fr> hi my mistake the function name is csvTextScan http://help.scilab.org/docs/5.4.0/en_US/csvTextScan.html On 05/03/2013 11:06, Carrico, Paul wrote: > Thanks .. but is it in an Atoms package ? I failed in finding it on > the web site and the function seems not to be defined in Scilab (5.4.0) > Paul > > ------------------------------------------------------------------------ > *De :* users-bounces at lists.scilab.org > [mailto:users-bounces at lists.scilab.org] *De la part de* A. Vogt-Schilb > *Envoy? :* mardi 5 mars 2013 10:12 > *? :* International users mailing list for Scilab. > *Objet :* Re: [Scilab-users] Converting a matrix of string into real > > Hi > > csvStringtodouble > > Sent from my phone > > "Carrico, Paul" wrote: > > Dear All > After reading a text file (mgetl), removing the comments, I've finally > a matrix of string containing only numbers... what is the fastest way > to convert those string into reals (I don't remember)? > using "eval" function is quite slow > Thanks > Paul > -------------------------------------------------------------------------------- > > > Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. > > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.elias at scilab-enterprises.com Tue Mar 5 11:18:19 2013 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Tue, 05 Mar 2013 11:18:19 +0100 Subject: [Scilab-users] Converting a matrix of string into real In-Reply-To: <5135C460.3010508@centre-cired.fr> References: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788E@exchsrv.auxitrol.ad> <5135C460.3010508@centre-cired.fr> Message-ID: <5135C66B.1070805@scilab-enterprises.com> You can use msscanf function too http://help.scilab.org/docs/5.4.0/en_US/mfscanf.html sample : //your data dataIn = string(rand(500,500)); typeof(dataIn) size(dataIn) //convert to double tic(); dataOut = matrix(msscanf(-1, dataIn, "%f"), size(dataIn)); disp("convertion time : " + string(toc())); typeof(dataOut) size(dataOut) Antoine Le 05/03/2013 11:09, Adrien Vogt-Schilb a ?crit : > hi > > my mistake > > the function name is csvTextScan > > http://help.scilab.org/docs/5.4.0/en_US/csvTextScan.html > > On 05/03/2013 11:06, Carrico, Paul wrote: >> Thanks .. but is it in an Atoms package ? I failed in finding it on the web site and the function seems not to be defined in Scilab (5.4.0) >> >> Paul >> >> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >> *De :* users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] *De la part de* A. Vogt-Schilb >> *Envoy? :* mardi 5 mars 2013 10:12 >> *? :* International users mailing list for Scilab. >> *Objet :* Re: [Scilab-users] Converting a matrix of string into real >> >> Hi >> >> csvStringtodouble >> >> Sent from my phone >> >> "Carrico, Paul" wrote: >> >> Dear All >> >> After reading a text file (mgetl), removing the comments, I've finally a matrix of string containing only numbers... what is the fastest way to convert those string into reals (I don't remember)? >> >> using "eval" function is quite slow >> >> Thanks >> >> Paul >> -------------------------------------------------------------------------------- >> >> >> Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. >> >> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. >> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> >> > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Antoine ELIAS Software developer ----------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles Phone: 01.80.77.04.70 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Tue Mar 5 11:38:28 2013 From: paul.carrico at esterline.com (Carrico, Paul) Date: Tue, 5 Mar 2013 11:38:28 +0100 Subject: [Scilab-users] Converting a matrix of string into real In-Reply-To: <5135C460.3010508@centre-cired.fr> References: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788E@exchsrv.auxitrol.ad> <5135C460.3010508@centre-cired.fr> Message-ID: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788F@exchsrv.auxitrol.ad> it works fine ... thanks ________________________________ De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Adrien Vogt-Schilb Envoy? : mardi 5 mars 2013 11:10 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] Converting a matrix of string into real hi my mistake the function name is csvTextScan http://help.scilab.org/docs/5.4.0/en_US/csvTextScan.html On 05/03/2013 11:06, Carrico, Paul wrote: Thanks .. but is it in an Atoms package ? I failed in finding it on the web site and the function seems not to be defined in Scilab (5.4.0) Paul ________________________________ De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de A. Vogt-Schilb Envoy? : mardi 5 mars 2013 10:12 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] Converting a matrix of string into real Hi csvStringtodouble Sent from my phone "Carrico, Paul" wrote: Dear All After reading a text file (mgetl), removing the comments, I've finally a matrix of string containing only numbers... what is the fastest way to convert those string into reals (I don't remember)? using "eval" function is quite slow Thanks Paul -------------------------------------------------------------------------------- Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------------------------------------------------------------------------- Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rouxph.22 at gmail.com Tue Mar 5 13:41:25 2013 From: rouxph.22 at gmail.com (philippe) Date: Tue, 05 Mar 2013 13:41:25 +0100 Subject: [Scilab-users] handle of type Labels and Surface ? Message-ID: Hi, some things disturbing in online help for Graphics. In help Graphics_entities it is said that : "Labels : The Labels entity are children of the Axes graphics entity. This entity defines the parameters for the 3 x,y and z labels and title drawn on a graphics window." but I've no example of a graphic handle H such that H.type="Labels" ?!? this type is obsolete ? "Surface:The Surface entity is a leaf of the graphics entities hierarchy. It has sub types Fac3d or Plot3d. This entity defines the parameters for 3d surface plots." I've found no handle verifying that H.type="surface", This type is obsolete or that this just means that Surface is an alias for Fac3d,Plot3d ... Philippe. From Christophe.Dang at sidel.com Tue Mar 5 16:17:17 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 5 Mar 2013 16:17:17 +0100 Subject: [Scilab-users] handle of type Labels and Surface ? In-Reply-To: References: Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106A6C185@301EX00100.sidel.com> Hello, De la part de philippe Envoy? : mardi 5 mars 2013 13:41 > but I've no example of a graphic handle H such that > H.type="Labels" ?!? You've got three labels. If a is the handle for the axes graphic entity, then the handles for the labels are a.x_label, a.y_label and a.z_label e.g. // ********** -->plot3d() -->a = gca(); -->a.x_label ans = Handle of type "Label" with properties: ======================================= // [...] // ********** see the help topic label_properties > I've found no handle verifying that H.type="surface" same kind f answer, see help topic surface_properties when you draw a surface, you get the handle with h = gce() e.g. // ********** -->plot3d() -->h = gce() h = Handle of type "Plot3d" with properties: ======================================== // [...] // ********** -- 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 rouxph.22 at gmail.com Tue Mar 5 16:31:24 2013 From: rouxph.22 at gmail.com (philippe) Date: Tue, 05 Mar 2013 16:31:24 +0100 Subject: [Scilab-users] handle of type Labels and Surface ? In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106A6C185@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F106A6C185@301EX00100.sidel.com> Message-ID: Le 05/03/2013 16:17, Dang, Christophe a ?crit : > You've got three labels. > > If a is the handle for the axes graphic entity, > then the handles for the labels are a.x_label, a.y_label and a.z_label > > e.g. > > // ********** > > -->plot3d() > > -->a = gca(); > > -->a.x_label > > ans = > > Handle of type "Label" with properties: > ======================================= thanks ! I was searching a "Labels" handle in the Compound associated to the Axes :-) Philippe. From sgougeon at free.fr Tue Mar 5 18:09:59 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 05 Mar 2013 18:09:59 +0100 Subject: [Scilab-users] error 26 Too complex recursion! In-Reply-To: <1362471445736-4026140.post@n3.nabble.com> References: <1362409500410-4026126.post@n3.nabble.com> <1362471445736-4026140.post@n3.nabble.com> Message-ID: <513626E7.9040606@free.fr> Hello, Le 05/03/2013 09:17, haasejos a ?crit : > thanks to both of you! > is there any experience how to solve the problem of convergence in 'intc'? As written by Calixte, you should rename your f() into something else, but keep it as a macro (not a primitive: see below). Le 04/03/2013 17:04, Dang, Christophe a ?crit : > .../... > and you can simplify you code with f = sin (but this does not improve > the behaviour...) Because intg() does not accept primitives, and sin() is a primitive: See for instance http://bugzilla.scilab.org/show_bug.cgi?id=1657#c1 Regards Samuel From sgougeon at free.fr Tue Mar 5 18:12:11 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 05 Mar 2013 18:12:11 +0100 Subject: [Scilab-users] Converting a matrix of string into real In-Reply-To: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788A@exchsrv.auxitrol.ad> References: <55A12CBC06A8C9459DCE0BBEF8122FDC08B7788A@exchsrv.auxitrol.ad> Message-ID: <5136276B.1070209@free.fr> Le 05/03/2013 08:34, Carrico, Paul a ?crit : > .../... > After reading a text file (mgetl), removing the comments, I've finally > a matrix of string containing only numbers... what is the fastest way > to convert those string into reals (I don't remember)? > using "eval" function is quite slow In addition to solutions already provided, you may use*strtod()*. It is made for that. -------------- next part -------------- An HTML attachment was scrubbed... URL: From haasejos at web.de Wed Mar 6 09:52:42 2013 From: haasejos at web.de (haasejos) Date: Wed, 6 Mar 2013 00:52:42 -0800 (PST) Subject: [Scilab-users] error 26 Too complex recursion! In-Reply-To: <513626E7.9040606@free.fr> References: <1362409500410-4026126.post@n3.nabble.com> <1362471445736-4026140.post@n3.nabble.com> <513626E7.9040606@free.fr> Message-ID: <1362559962717-4026158.post@n3.nabble.com> hello, thank you for your answers. I tried several examples (see results as comments) *clear; xdel; clc; function [gg1]=g1(xi); //disp('function g1 vor gg1 = ...'); //pause; gg1=toto(xi)*exp(imult(-2*nn*%pi*xi/L)); //gg1=exp(-%i*2*nn*%pi*xi/L); endfunction; function [aaa]=a1(nn); //disp('function a1'); //pause; aaa=(2/L)*intc(c0,c0+L,g1); endfunction; function y = toto(x); //disp(x); if x <= %pi then; y = 1; else; y = -1; end endfunction; //!--error 24 //Convergence problem... //at line 14 of function intc called by : //at line 4 of function a1 called by : //a = [a a1(1)]; //at line 55 of exec file called by : //versuche5Maerz13\versuch1.sce', -1 // function [y]=toto(x); // y=x-x^2; // endfunction; // //- 4. - 10.566371i // function y = toto(x); // y = exp(x); // endfunction; // //85.066989 + 85.066989i // function y = toto(x); // y = sin(x); // endfunction; // !--error 24 // //Convergence problem... // //at line 14 of function intc called by : // //at line 4 of function a1 called by : // //a = [a a1(1)]; // //at line 47 of exec file called by : // //versuche5Maerz13\versuch1.sce', -1 c0=0; L = 2*%pi; x = (0 : %pi/100 : L); y=[]; for j =1:length(x); y=[y toto(x(j))]; end; nn = 1; a = []; a = [a a1(1)]; disp(a);* -- View this message in context: http://mailinglists.scilab.org/error-26-Too-complex-recursion-tp4026126p4026158.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From stephane.mottelet at utc.fr Wed Mar 6 15:30:09 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Wed, 06 Mar 2013 15:30:09 +0100 Subject: [Scilab-users] parallel_run under OSX Message-ID: <513752F1.6040005@utc.fr> Hello, is parallel_run supposed to work under MacOS X (tested here with Scilab 5.4.0) ? -->function a=g(arg1) --> a=arg1*arg1 -->endfunction --> -->res=parallel_run(1:10, g); A previous error has been detected while loading libsciparallel.dylib: !--error 999 Impossible de charger la biblioth?que libsciparallel.dylib : dlopen(/Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/modules/parallel/.libs/libsciparallel.dylib, 10): Symbol not found: _omp_get_num_procs Referenced from: /Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/../../lib/scilab//libsciparallel.dylib Expected in: flat namespace in /Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/../../lib/scilab//libsciparallel.dylib S. From stephane.mottelet at utc.fr Wed Mar 6 15:43:35 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Wed, 06 Mar 2013 15:43:35 +0100 Subject: [Scilab-users] parallel_run under OSX In-Reply-To: <513752F1.6040005@utc.fr> References: <513752F1.6040005@utc.fr> Message-ID: <51375617.5020208@utc.fr> Le 06/03/13 15:30, St?phane Mottelet a ?crit : > Hello, > > is parallel_run supposed to work under MacOS X (tested here with > Scilab 5.4.0) ? > > -->function a=g(arg1) > --> a=arg1*arg1 > -->endfunction > > --> > > -->res=parallel_run(1:10, g); > A previous error has been detected while loading libsciparallel.dylib: > !--error 999 > Impossible de charger la biblioth?que libsciparallel.dylib : > dlopen(/Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/modules/parallel/.libs/libsciparallel.dylib, > 10): Symbol not found: _omp_get_num_procs > Referenced from: > /Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/../../lib/scilab//libsciparallel.dylib > Expected in: flat namespace > in > /Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/../../lib/scilab//libsciparallel.dylib > > S. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users There seems to be ideas about a fix for Darwin : http://gcc.gnu.org/ml/gcc/2008-02/msg00368.html S. From stephane.mottelet at utc.fr Wed Mar 6 15:43:51 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Wed, 06 Mar 2013 15:43:51 +0100 Subject: [Scilab-users] parallel_run under OSX In-Reply-To: <513752F1.6040005@utc.fr> References: <513752F1.6040005@utc.fr> Message-ID: <51375627.103@utc.fr> Le 06/03/13 15:30, St?phane Mottelet a ?crit : > Hello, > > is parallel_run supposed to work under MacOS X (tested here with > Scilab 5.4.0) ? > > -->function a=g(arg1) > --> a=arg1*arg1 > -->endfunction > > --> > > -->res=parallel_run(1:10, g); > A previous error has been detected while loading libsciparallel.dylib: > !--error 999 > Impossible de charger la biblioth?que libsciparallel.dylib : > dlopen(/Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/modules/parallel/.libs/libsciparallel.dylib, > 10): Symbol not found: _omp_get_num_procs > Referenced from: > /Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/../../lib/scilab//libsciparallel.dylib > Expected in: flat namespace > in > /Applications/scilab-5.4.0.app/Contents/MacOS/share/scilab/../../lib/scilab//libsciparallel.dylib > > S. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users There seems to be ideas about a fix for Darwin : http://gcc.gnu.org/ml/gcc/2008-02/msg00368.html S. From sylvestre.ledru at scilab-enterprises.com Wed Mar 6 18:27:41 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Wed, 06 Mar 2013 18:27:41 +0100 Subject: [Scilab-users] parallel_run under OSX In-Reply-To: <51375627.103@utc.fr> References: <513752F1.6040005@utc.fr> <51375627.103@utc.fr> Message-ID: <51377C8D.7090901@scilab-enterprises.com> Le 06/03/2013 15:43, St?phane Mottelet a ?crit : > Le 06/03/13 15:30, St?phane Mottelet a ?crit : >> Hello, >> >> is parallel_run supposed to work under MacOS X (tested here with >> Scilab 5.4.0) ? >> > There seems to be ideas about a fix for Darwin : > > http://gcc.gnu.org/ml/gcc/2008-02/msg00368.html I think it is the same bug as : http://bugzilla.scilab.org/show_bug.cgi?id=12133 and it was not specific to Mac OS X. I was a missing explicit link against the OpenMP lib. Since the module parallel is loaded on the fly, the dynamic load of the library was failing and the error message not explicit enough. I will add a check in the continuous integration system to make sure it never happens again. Sylvestre From samuel.enibe at unn.edu.ng Thu Mar 7 15:31:27 2013 From: samuel.enibe at unn.edu.ng (samuel.enibe at unn.edu.ng) Date: Thu, 07 Mar 2013 14:31:27 +0000 Subject: [Scilab-users] Extracting strings to a matrix Message-ID: <5138a4c6.c455b40a.1127.ffffcb94@mx.google.com> Dear sir, Suppose I have the matrix shown below. Names = ['samuel Ogbonna Enibe', 'James Peter'; 'WIlson Stone Wilberforce Joshua'; 'Moses']; I would like to extract the matrix from Name into a new matrix Namenew such that the first words are placed in the first column, second words in the second column, third words in the third column, etc. I know one solution is to save the data in a text file and extract it again using space as column separator. What is the simpler way of creating my new matrix Namenew. Samuel Enibe Sent from my Nokia phone From dbu at microshade.dk Thu Mar 7 15:17:20 2013 From: dbu at microshade.dk (Daniel Buccoliero) Date: Thu, 7 Mar 2013 14:17:20 +0000 Subject: [Scilab-users] Problems using write_csv and/or csvWrite with Scilab 5.4.0 Message-ID: <03996D8859073E4D8590414CA4D9FA5562D4DB@EXMBX02.mailcloud.dk> To whom it may concern When I run a calculation in Scilab 5.3.2, I round the results and manipulate them to maintain only two or three decimals. Then I use the write_csv command to write the results to a file that Excel can read. All works very nicely, the results would look like this, 0.146 When running the exact same calculations in Scilab 5.4.0 (with the exact same scripts) however, the outcome has not only several decimals, but the numbers come with an imaginary part as well, which by the way is 0, i.e. the results look like this, 0.14599999999999 + 0i. I've tried to use the newer version of write_csv, namely csvWrite, but without any succes. Can anybody help me? ________________________ [Beskrivelse: MicroShade logo] Daniel Buccoliero Software Engineer MicroShade A/S Gregersensvej 1F DK-2630 Taastrup Denmark Phone: +45 22 14 48 49 Email: dbu at microshade.dk www.microshade.dk This e-mail may contain confidential information and is intended solely for the addressee, and any disclosure of this information is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please notify us immediately and delete this mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 3828 bytes Desc: image001.png URL: From vogt at centre-cired.fr Thu Mar 7 15:44:55 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Thu, 07 Mar 2013 15:44:55 +0100 Subject: [Scilab-users] Extracting strings to a matrix In-Reply-To: <5138a4c6.c455b40a.1127.ffffcb94@mx.google.com> References: <5138a4c6.c455b40a.1127.ffffcb94@mx.google.com> Message-ID: <5138A7E7.9050508@centre-cired.fr> Hi did you try strsplit ? On 07/03/2013 15:31, samuel.enibe at unn.edu.ng wrote: > Dear sir, > Suppose I have the matrix shown below. > > Names = ['samuel Ogbonna Enibe', > 'James Peter'; > 'WIlson Stone Wilberforce Joshua'; > 'Moses']; > I would like to extract the matrix from Name into a new matrix Namenew such that the first words are placed in the first column, second words in the second column, third words in the third column, etc. > > I know one solution is to save the data in a text file and extract it again using space as column separator. > > What is the simpler way of creating my new matrix Namenew. > > Samuel Enibe > > Sent from my Nokia phone > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbu at microshade.dk Thu Mar 7 15:46:48 2013 From: dbu at microshade.dk (Daniel Buccoliero) Date: Thu, 7 Mar 2013 14:46:48 +0000 Subject: [Scilab-users] Problems using write_csv and/or csvWrite with Scilab 5.4.0 Message-ID: <03996D8859073E4D8590414CA4D9FA5562D910@EXMBX02.mailcloud.dk> To whom it may concern When I run a calculation in Scilab 5.3.2, I round the results and manipulate them to maintain only two or three decimals. Then I use the write_csv command to write the results to a file that Excel can read. All works very nicely, the results would look like this, 0.146 When running the exact same calculations in Scilab 5.4.0 (with the exact same scripts) however, the outcome has not only several decimals, but the numbers come with an imaginary part as well, which by the way is 0, i.e. the results look like this, 0.14599999999999 + 0i. I've tried to use the newer version of write_csv, namely csvWrite, but without any succes. Can anybody help me? ________________________ [Beskrivelse: MicroShade logo] Daniel Buccoliero Software Engineer MicroShade A/S Gregersensvej 1F DK-2630 Taastrup Denmark Phone: +45 22 14 48 49 Email: dbu at microshade.dk www.microshade.dk This e-mail may contain confidential information and is intended solely for the addressee, and any disclosure of this information is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please notify us immediately and delete this mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 3828 bytes Desc: image001.png URL: From Christophe.Dang at sidel.com Thu Mar 7 15:57:36 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Thu, 7 Mar 2013 15:57:36 +0100 Subject: [Scilab-users] Problems using write_csv and/or csvWrite with Scilab 5.4.0 In-Reply-To: <03996D8859073E4D8590414CA4D9FA5562D4DB@EXMBX02.mailcloud.dk> References: <03996D8859073E4D8590414CA4D9FA5562D4DB@EXMBX02.mailcloud.dk> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106ADDDBB@301EX00100.sidel.com> Hello, > the numbers come with an imaginary part as well, > [...] 0.14599999999999 + 0i. > > I've tried to use the newer version of write_csv Did you try to display the numbers on the console? This may tell you whether the problem is writing CSV or rounding... -- 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 sylvestre.ledru at scilab-enterprises.com Thu Mar 7 15:59:44 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Thu, 07 Mar 2013 15:59:44 +0100 Subject: [Scilab-users] Problems using write_csv and/or csvWrite with Scilab 5.4.0 In-Reply-To: <03996D8859073E4D8590414CA4D9FA5562D910@EXMBX02.mailcloud.dk> References: <03996D8859073E4D8590414CA4D9FA5562D910@EXMBX02.mailcloud.dk> Message-ID: <5138AB60.3000505@scilab-enterprises.com> On 07/03/2013 15:46, Daniel Buccoliero wrote: > To whom it may concern > > > > When I run a calculation in Scilab 5.3.2, I _round_ the results and > manipulate them to maintain only two or three decimals. Then I use the > _write_csv_ command to write the results to a file that Excel can read. > All works very nicely, the results would look like this,*0.146* > > > > When running the exact same calculations in Scilab 5.4.0 (with the exact > same scripts) however, the outcome has not only several decimals, but > the numbers come with an imaginary part as well, which by the way is 0, > i.e. the results look like this, *0.14599999999999 + 0i*. > > > > I?ve tried to use the newer version of _write_csv_, namely csvWrite, but > without any succes. Actually, write_csv in Scilab 5.4.0 is connected on csvwrite. There is just a different of default behavior (see the documentation on this subject). Could you provide a test case which show the issue ? Thanks Sylvestre From krotersv at gmail.com Thu Mar 7 16:53:44 2013 From: krotersv at gmail.com (=?UTF-8?B?0KHRgtCw0L3QuNGB0LvQsNCy?=) Date: Thu, 07 Mar 2013 21:53:44 +0600 Subject: [Scilab-users] Extracting strings to a matrix In-Reply-To: <5138a4c6.c455b40a.1127.ffffcb94@mx.google.com> References: <5138a4c6.c455b40a.1127.ffffcb94@mx.google.com> Message-ID: <5138B808.8080305@gmail.com> 07.03.2013 20:31, samuel.enibe at unn.edu.ng ?????: > Dear sir, > Suppose I have the matrix shown below. > > Names = ['samuel Ogbonna Enibe', > 'James Peter'; > 'WIlson Stone Wilberforce Joshua'; > 'Moses']; > I would like to extract the matrix from Name into a new matrix Namenew such that the first words are placed in the first column, second words in the second column, third words in the third column, etc. > > I know one solution is to save the data in a text file and extract it again using space as column separator. > > What is the simpler way of creating my new matrix Namenew. > > Samuel Enibe > > Sent from my Nokia phone > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users Hi. I think you can use *strtok*. Stanislav -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenngarde at aol.com Fri Mar 8 03:29:42 2013 From: jenngarde at aol.com (scilab_user123) Date: Thu, 7 Mar 2013 18:29:42 -0800 (PST) Subject: [Scilab-users] imageprocessing problem Message-ID: <1362709782178-4026176.post@n3.nabble.com> I just got scilab for this image processing project, and i've been trying to get familiar with it. So I read the example on pages 5 & 6 here: http://www.comp.dit.ie/bmacnamee/materials/dip/labs/introtoscilab.pdf I can load and view the image just fine, but when I got up to the part with x=gray_imread('......') , it said something like ' undefined variable: gray_imread '. I already have SIVP installed by the way, and I don't understand what's wrong. -- View this message in context: http://mailinglists.scilab.org/imageprocessing-problem-tp4026176.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Fri Mar 8 09:54:03 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 8 Mar 2013 09:54:03 +0100 Subject: [Scilab-users] imageprocessing problem In-Reply-To: <1362709782178-4026176.post@n3.nabble.com> References: <1362709782178-4026176.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106ADE3B6@301EX00100.sidel.com> Hello, De la part de scilab_user123 Envoy? : vendredi 8 mars 2013 03:30 > x=gray_imread('......') , it said something like ' undefined variable: > gray_imread '. which means that the function is not defined. > I already have SIVP installed The use of a search engine says that gray_imread() belongs to SIP http://siptoolbox.sourceforge.net/ (which is not mentionned in the McNamee document) and not to SIVP. For the SIVP functions, you may look at http://sivp.sourceforge.net/func-list-0.5.0/whatis.htm Best 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 stephane.mottelet at utc.fr Fri Mar 8 10:09:08 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Fri, 08 Mar 2013 10:09:08 +0100 Subject: [Scilab-users] parallel_run under OSX In-Reply-To: <51377C8D.7090901@scilab-enterprises.com> References: <513752F1.6040005@utc.fr> <51375627.103@utc.fr> <51377C8D.7090901@scilab-enterprises.com> Message-ID: <5139AAB4.60704@utc.fr> Le 06/03/13 18:27, Sylvestre Ledru a ?crit : > Le 06/03/2013 15:43, St?phane Mottelet a ?crit : >> Le 06/03/13 15:30, St?phane Mottelet a ?crit : >>> Hello, >>> >>> is parallel_run supposed to work under MacOS X (tested here with >>> Scilab 5.4.0) ? >>> >> There seems to be ideas about a fix for Darwin : >> >> http://gcc.gnu.org/ml/gcc/2008-02/msg00368.html > I think it is the same bug as : > http://bugzilla.scilab.org/show_bug.cgi?id=12133 > and it was not specific to Mac OS X. > I was a missing explicit link against the OpenMP lib. > Since the module parallel is loaded on the fly, the dynamic load of > the library was failing and the error message not explicit enough. > > I will add a check in the continuous integration system to make sure it > never > happens again. > > Sylvestre > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users I have tried parallel_run with the 5.4.0 under Linux and the dynamic library cannot be loaded. Is there a platform where parallel_run works in the 5.4.0 ? S. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Fri Mar 8 10:21:19 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Fri, 08 Mar 2013 10:21:19 +0100 Subject: [Scilab-users] parallel_run under OSX In-Reply-To: <5139AAB4.60704@utc.fr> References: <513752F1.6040005@utc.fr> <51375627.103@utc.fr> <51377C8D.7090901@scilab-enterprises.com> <5139AAB4.60704@utc.fr> Message-ID: <5139AD8F.90708@scilab-enterprises.com> On 08/03/2013 10:09, St?phane Mottelet wrote: > Le 06/03/13 18:27, Sylvestre Ledru a ?crit : >> Le 06/03/2013 15:43, St?phane Mottelet a ?crit : >>> Le 06/03/13 15:30, St?phane Mottelet a ?crit : >>>> Hello, >>>> >>>> is parallel_run supposed to work under MacOS X (tested here with >>>> Scilab 5.4.0) ? >>>> [...] > I have tried parallel_run with the 5.4.0 under Linux and the dynamic > library cannot be loaded. Is there a platform where parallel_run works > in the 5.4.0 ? The bug I was talking about was in 5.4.0. The GNU/Linux nightly of the 5.4.X should have the fix. (the mac os x build is currently failing with a wonderful error message [1]) Sylvestre [1] ld: codegen problem, can't use rel32 to external symbol _gomp_thread_attr in _initialize_env from /usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/libgomp.a(env.o) From berns.buenaobra at gmail.com Fri Mar 8 11:58:13 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Fri, 8 Mar 2013 18:58:13 +0800 Subject: [Scilab-users] imageprocessing problem In-Reply-To: <1362709782178-4026176.post@n3.nabble.com> References: <1362709782178-4026176.post@n3.nabble.com> Message-ID: Hi: First move is to type Help on the prompt then go to SIVP where you can see all the "valid" commands. There is also another tool for this sort of thing its IPD and also OpenCV (SIVP based the toolbox there). I did a quick check your command does not exist anywhere in these two toolboxes anywhere? And yes be sure you have installed SIVP and IPD by ATOM - you should see that it will be loading it when you start-up Scilab. Regards, Berns B. USC Physics (Cebu, Philippines) On Fri, Mar 8, 2013 at 10:29 AM, scilab_user123 wrote: > I just got scilab for this image processing project, and i've been trying > to > get familiar with it. So I read the example on pages 5 & 6 here: > http://www.comp.dit.ie/bmacnamee/materials/dip/labs/introtoscilab.pdf > I can load and view the image just fine, but when I got up to the part with > x=gray_imread('......') , it said something like ' undefined variable: > gray_imread '. I already have SIVP installed by the way, and I don't > understand what's wrong. > > > > -- > View this message in context: > http://mailinglists.scilab.org/imageprocessing-problem-tp4026176.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berns.buenaobra at gmail.com Fri Mar 8 12:06:29 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Fri, 8 Mar 2013 19:06:29 +0800 Subject: [Scilab-users] imageprocessing problem In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106ADE3B6@301EX00100.sidel.com> References: <1362709782178-4026176.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106ADE3B6@301EX00100.sidel.com> Message-ID: Hi again: For SIVP to work for you - you must point to an image file you can modify this code snippet for your own purpose below: // point and read the test image file SIVP converts everything to 8-bit integer imgmat = imread('C:\Users\Your User Name\ Your Documents\Your images\yourimagefile.jpg');// check for matrix size and dimensions heresize(imgmat);// show to the screen image of sample matriximshow(imgmat);// convert to grayscalegscale= rgb2gray(imgmat);imshow(gscale); I hope this helps! Regards, Berns B. USC Physics (Cebu, Philippines) On Fri, Mar 8, 2013 at 4:54 PM, Dang, Christophe wrote: > Hello, > > De la part de scilab_user123 > Envoy? : vendredi 8 mars 2013 03:30 > > > x=gray_imread('......') , it said something like ' undefined variable: > > gray_imread '. > > which means that the function is not defined. > > > I already have SIVP installed > > The use of a search engine says that gray_imread() belongs to SIP > > http://siptoolbox.sourceforge.net/ > > (which is not mentionned in the McNamee document) and not to SIVP. > > For the SIVP functions, you may look at > > http://sivp.sourceforge.net/func-list-0.5.0/whatis.htm > > Best 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 la47 at hw.ac.uk Fri Mar 8 14:20:12 2013 From: la47 at hw.ac.uk (luisacevedo) Date: Fri, 8 Mar 2013 05:20:12 -0800 (PST) Subject: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics Message-ID: <1362748812741-4026182.post@n3.nabble.com> Hello All I have found a very useful Optical tool, link as follows http://sciao.sourceforge.net/#authors When you install it under SCilab 5.4 32 or 64 bits , it gives a MS error and the library does not appear in XCOS. Please is there anyone to try out this and give me some directions? I have requested Scilab 4.0 but it comes in linux and I can not get the windows version. Probably some else have the windows XP version and pass to me. Thanks Waiting for your replies Luis -- View this message in context: http://mailinglists.scilab.org/SCIAO-Scilab-Scicos-Adaptive-Optics-tp4026182.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From la47 at hw.ac.uk Fri Mar 8 16:45:57 2013 From: la47 at hw.ac.uk (luisacevedo) Date: Fri, 8 Mar 2013 07:45:57 -0800 (PST) Subject: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics In-Reply-To: <1362748812741-4026182.post@n3.nabble.com> References: <1362748812741-4026182.post@n3.nabble.com> Message-ID: <1362757557260-4026185.post@n3.nabble.com> The program is working with Scilab 4.0 only good stuff :-) -- View this message in context: http://mailinglists.scilab.org/SCIAO-Scilab-Scicos-Adaptive-Optics-tp4026182p4026185.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From berns.buenaobra at gmail.com Sat Mar 9 10:40:22 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Sat, 9 Mar 2013 17:40:22 +0800 Subject: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics In-Reply-To: <1362748812741-4026182.post@n3.nabble.com> References: <1362748812741-4026182.post@n3.nabble.com> Message-ID: Man this is like 2006 ago and the website is not maintained too. Between that year and now for Scilab this maybe too ancient to work with a new 64-bit like version 5.4 - but I could tell this toolbox is pretty neat but there was no further development on it since then? We should contact the authors. Regards, Berns B. USC Physics (Cebu,Philippines) On Fri, Mar 8, 2013 at 9:20 PM, luisacevedo wrote: > Hello All > > I have found a very useful Optical tool, link as follows > http://sciao.sourceforge.net/#authors > When you install it under SCilab 5.4 32 or 64 bits , it gives a MS error > and > the library does not appear in XCOS. > > Please is there anyone to try out this and give me some directions? > > I have requested Scilab 4.0 but it comes in linux and I can not get the > windows version. Probably some else have the windows XP version and pass > to > me. > > Thanks > Waiting for your replies > > Luis > > > > -- > View this message in context: > http://mailinglists.scilab.org/SCIAO-Scilab-Scicos-Adaptive-Optics-tp4026182.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Mar 9 10:48:49 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 09 Mar 2013 10:48:49 +0100 Subject: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics In-Reply-To: References: <1362748812741-4026182.post@n3.nabble.com> Message-ID: <513B0581.7030000@free.fr> Hello, Le 09/03/2013 10:40, Berns Buenaobra a ?crit : > Man this is like 2006 ago and the website is not maintained too. > Between that year and now for Scilab this maybe too ancient to work > with a new 64-bit like version 5.4 - but I could tell this toolbox is > pretty neat but there was no further development on it since then? We > should contact the authors. Luis has opened another thread about SCIAO on the dev@ mailing list, here: http://mailinglists.scilab.org/Scilab-SCIAO-tt4026183.html as well as an ATOMS page where it is possible to comment and subscribe: http://atoms.scilab.org/toolboxes/AdaptiveOptics Regard Samuel From la47 at hw.ac.uk Sat Mar 9 12:43:21 2013 From: la47 at hw.ac.uk (Luis Acevedo) Date: Sat, 9 Mar 2013 11:43:21 -0000 Subject: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics In-Reply-To: References: <1362748812741-4026182.post@n3.nabble.com> Message-ID: <000a01ce1cbb$4d339010$e79ab030$@hw.ac.uk> Hello I think that we can gather together to implement a new optical tool for Scilab 4.5. I am writing up thesis and I do not have time. Once I finish I will call people to join me. Also it is good idea to contact to the authors in case they want to contribute. Check Lighttrans and other optical softwares to see the similarity. Nowadays everything goes commercial Cheers Luis From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of Berns Buenaobra Sent: 09 March 2013 09:40 To: International users mailing list for Scilab. Subject: Re: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics Man this is like 2006 ago and the website is not maintained too. Between that year and now for Scilab this maybe too ancient to work with a new 64-bit like version 5.4 - but I could tell this toolbox is pretty neat but there was no further development on it since then? We should contact the authors. Regards, Berns B. USC Physics (Cebu,Philippines) On Fri, Mar 8, 2013 at 9:20 PM, luisacevedo wrote: Hello All I have found a very useful Optical tool, link as follows http://sciao.sourceforge.net/#authors When you install it under SCilab 5.4 32 or 64 bits , it gives a MS error and the library does not appear in XCOS. Please is there anyone to try out this and give me some directions? I have requested Scilab 4.0 but it comes in linux and I can not get the windows version. Probably some else have the windows XP version and pass to me. Thanks Waiting for your replies Luis -- View this message in context: http://mailinglists.scilab.org/SCIAO-Scilab-Scicos-Adaptive-Optics-tp4026182 .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 ----- Sunday Times Scottish University of the Year 2011-2013 Top in the UK for student experience Fourth university in the UK and top in Scotland (National Student Survey 2012) We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278. -------------- next part -------------- An HTML attachment was scrubbed... URL: From la47 at hw.ac.uk Sat Mar 9 12:42:53 2013 From: la47 at hw.ac.uk (Luis Acevedo) Date: Sat, 9 Mar 2013 11:42:53 -0000 Subject: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics In-Reply-To: <513B0581.7030000@free.fr> References: <1362748812741-4026182.post@n3.nabble.com> <513B0581.7030000@free.fr> Message-ID: <000901ce1cbb$3c79a430$b56cec90$@hw.ac.uk> Hello I think that we can gather together to implement a new optical tool for Scilab 4.5. I am writing up thesis and I do not have time. Once I finish I will call people to join me. Also it is good idea to contact to the authors in case they want to contribute. Check Lighttrans and other optical softwares to see the similarity. Nowadays everything goes commercial Cheers Luis -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: 09 March 2013 09:49 To: berns.buenaobra at gmail.com; International users mailing list for Scilab. Subject: Re: [Scilab-users] SCIAO : Scilab/Scicos Adaptive Optics Hello, Le 09/03/2013 10:40, Berns Buenaobra a ?crit : > Man this is like 2006 ago and the website is not maintained too. > Between that year and now for Scilab this maybe too ancient to work > with a new 64-bit like version 5.4 - but I could tell this toolbox is > pretty neat but there was no further development on it since then? We > should contact the authors. Luis has opened another thread about SCIAO on the dev@ mailing list, here: http://mailinglists.scilab.org/Scilab-SCIAO-tt4026183.html as well as an ATOMS page where it is possible to comment and subscribe: http://atoms.scilab.org/toolboxes/AdaptiveOptics Regard Samuel _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ----- Sunday Times Scottish University of the Year 2011-2013 Top in the UK for student experience Fourth university in the UK and top in Scotland (National Student Survey 2012) We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278. From paul.carrico at free.fr Sat Mar 9 22:28:26 2013 From: paul.carrico at free.fr (Paul Carrico) Date: Sat, 9 Mar 2013 22:28:26 +0100 Subject: [Scilab-users] topological optimization Message-ID: <000001ce1d0d$09c30840$1d4918c0$@carrico@free.fr> Hi, In order to help one of my colleagues that requested me some advices and help to design a vibration tool, I've been thinking in an ambitious (but crazy) idea in using topological optimization . crazy because I'm a newbie in that engineering field and I've no idea about the difficulties . Here, the goal is to design an aluminum tool which 1rst natural frequency is above a fixed threshold ( indirectly it depends on its shape and its weight); of course some fixing points are locked. On the net, we can find a lot of different methods, but in a first stage, which is the simplest one ? I know that in the Scilab community, there are many experienced users that can give some advices . I'm using Scilab for a while, even in conjunction with my Finite Element solver, mainly for parameters optimization . NB : I found a (popular) article from O. Sigmund "A 99 line topology optimization code in written in matlab" that might be a first way to work on that issue (????) Regards paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From tvitklg at rambler.ru Sun Mar 10 10:02:16 2013 From: tvitklg at rambler.ru (TViT) Date: Sun, 10 Mar 2013 01:02:16 -0800 (PST) Subject: [Scilab-users] Generation of linear frequency Message-ID: <1362906136960-4026202.post@n3.nabble.com> Hello! In Matlab there is a function chirp, and what is in Scilab? And why Scilab can not transform a simple example from Matlab of a file? //----------------------------------------------------- t = 0:0.001:2; % 2 secs @ 1kHz sample rate y = chirp(t,0,1,150); % Start @ DC, % cross 150Hz at t=1 sec spectrogram(y,256,250,256,1E3,'yaxis') //----------------------------------------------------- !--error 37 at line 190 of function mfile2sci called by : at line 142 of function cb_m2sci_gui called by : cbo = getcallbackobject("-6ebf8d73:13d5388519a:-7f72");cb_m2sci_gui;if exists("%oldgcbo") then gcbo = %oldgcbo; while executing a callback -- View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From arctica1963 at gmail.com Sun Mar 10 10:49:49 2013 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 10 Mar 2013 09:49:49 +0000 Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <1362906136960-4026202.post@n3.nabble.com> References: <1362906136960-4026202.post@n3.nabble.com> Message-ID: On 10 March 2013 09:02, TViT wrote: > Hello! > > In Matlab there is a function chirp, and what is in Scilab? > > And why Scilab can not transform a simple example from Matlab of a file? > > //----------------------------------------------------- > t = 0:0.001:2; % 2 secs @ 1kHz sample rate > y = chirp(t,0,1,150); % Start @ DC, > % cross 150Hz at t=1 sec > spectrogram(y,256,250,256,1E3,'yaxis') > //----------------------------------------------------- > > !--error 37 > at line 190 of function mfile2sci called by : > at line 142 of function cb_m2sci_gui called by : > cbo = getcallbackobject("-6ebf8d73:13d5388519a:-7f72");cb_m2sci_gui;if > exists("%oldgcbo") then gcbo = %oldgcbo; > while executing a callback > > > > -- > View this message in context: > http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202.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 > Google the function as chirp.m and you will get the code: function x = chirp( T, W, p ) %CHIRP generate a sampled chirp signal %----- exp(j(W/T)pi*t^2) -T/2 <= t < +T/2 % % Usage: X = chirp( T, W,

) % % X : N=pTW samples of a "chirp" signal % T : time duration from -T/2 to +T/2 % W : swept bandwidth from -W/2 to +W/2 % % optional (default is P = 1) % P : samples at P times the Nyquist rate (W) % i.e., sampling interval is 1/(PW) %--------------------------------------------------------------- % copyright 1994, by C.S. Burrus, J.H. McClellan, A.V. Oppenheim, % T.W. Parks, R.W. Schafer, & H.W. Schussler. For use with the book % "Computer-Based Exercises for Signal Processing Using MATLAB" % (Prentice-Hall, 1994). %--------------------------------------------------------------- if nargin < 3 p = 1; end J = sqrt(-1); %-------------- delta_t = 1/(p*W); N = round( p*T*W ); %--- same as T/delta_t nn = [0:N-1]'; x = exp( J*pi*W/T * (delta_t*nn - T/2).^2 ); Just recode in Scilab and place in your main source code or set in a functions libarry to be called. May be different versions of this so best to check around -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sun Mar 10 10:55:26 2013 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 10 Mar 2013 09:55:26 +0000 Subject: [Scilab-users] Generation of linear frequency In-Reply-To: References: <1362906136960-4026202.post@n3.nabble.com> Message-ID: On 10 March 2013 09:49, Lester Anderson wrote: > On 10 March 2013 09:02, TViT wrote: > >> Hello! >> >> In Matlab there is a function chirp, and what is in Scilab? >> >> And why Scilab can not transform a simple example from Matlab of a file? >> >> //----------------------------------------------------- >> t = 0:0.001:2; % 2 secs @ 1kHz sample rate >> y = chirp(t,0,1,150); % Start @ DC, >> % cross 150Hz at t=1 sec >> spectrogram(y,256,250,256,1E3,'yaxis') >> //----------------------------------------------------- >> >> !--error 37 >> at line 190 of function mfile2sci called by : >> at line 142 of function cb_m2sci_gui called by : >> cbo = getcallbackobject("-6ebf8d73:13d5388519a:-7f72");cb_m2sci_gui;if >> exists("%oldgcbo") then gcbo = %oldgcbo; >> while executing a callback >> >> >> >> -- >> View this message in context: >> http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202.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 >> > > Google the function as chirp.m and you will get the code: > > function x = chirp( T, W, p ) > %CHIRP generate a sampled chirp signal > %----- exp(j(W/T)pi*t^2) -T/2 <= t < +T/2 > % > % Usage: X = chirp( T, W,

) > % > % X : N=pTW samples of a "chirp" signal > % T : time duration from -T/2 to +T/2 > % W : swept bandwidth from -W/2 to +W/2 > % > % optional (default is P = 1) > % P : samples at P times the Nyquist rate (W) > % i.e., sampling interval is 1/(PW) > > %--------------------------------------------------------------- > % copyright 1994, by C.S. Burrus, J.H. McClellan, A.V. Oppenheim, > % T.W. Parks, R.W. Schafer, & H.W. Schussler. For use with the book > % "Computer-Based Exercises for Signal Processing Using MATLAB" > % (Prentice-Hall, 1994). > %--------------------------------------------------------------- > > if nargin < 3 > p = 1; end > J = sqrt(-1); > %-------------- > delta_t = 1/(p*W); > N = round( p*T*W ); %--- same as T/delta_t > nn = [0:N-1]'; > x = exp( J*pi*W/T * (delta_t*nn - T/2).^2 ); > > Just recode in Scilab and place in your main source code or set in a > functions libarry to be called. > May be different versions of this so best to check around > Another more detailed version; function y = chirp(t,f0,t1,f1,method,phi) %CHIRP Swept-frequency cosine generator. % Y = CHIRP(T,F0,T1,F1) generates samples of a linear swept-frequency % signal at the time instances defined in array T. The instantaneous % frequency at time 0 is F0 Hertz. The instantaneous frequency F1 % is achieved at time T1. By default, F0=0, T1=1, and F1=100. % % Y = CHIRP(T,F0,T1,F1,method) specifies alternate sweep methods. % Available methods are 'linear','quadratic', and 'logarithmic'; the % default is 'linear'. Note that for a log-sweep, F1>F0 is required. % % Y = CHIRP(T,F0,T1,F1,method, PHI) allows an initial phase PHI to % be specified in degrees. By default, PHI=0. % % Y = CHIRP(T,P) specifies a polynomial vector P for the % instantaneous frequency trajectory of the chirp. P may not be % a scalar value. % % Default values are substituted for empty or omitted trailing input % arguments. % % EXAMPLE 1: Compute the spectrogram of a linear chirp. % t=0:0.001:2; % 2 secs @ 1kHz sample rate % y=chirp(t,0,1,150); % Start @ DC, cross 150Hz at t=1sec % specgram(y,256,1E3,256,250); % Display the spectrogram % % EXAMPLE 2: Compute the spectrogram of a quadratic chirp. % t=-2:0.001:2; % +/-2 secs @ 1kHz sample rate % y=chirp(t,100,1,200,'q'); % Start @ 100Hz, cross 200Hz at t=1sec % specgram(y,128,1E3,128,120); % Display the spectrogram % % EXAMPLE 3: Compute the spectrogram of a polynomial chirp. % t=[0 0.5 1.0 1.5 2.0]; % time breakpoints % f=[0 200 100 150 300]; % instantaneous frequency breakpoints % p=polyfit(t,f,4); % fit 4th order polynomial over time % t=0:0.001:2; % 2 secs @ 1kHz sample rate % y=chirp(t,p); % subplot(211); plot(t,polyval(p,t)); set(gca,'ylim',[0 500]); % subplot(212); specgram(y,128,1E3,128,120); % % See also GAUSPULS, SAWTOOTH, SINC, SQUARE. % Author(s): D. Orofino, T. Krauss, 3/96 % Copyright 1988-2000 The MathWorks, Inc. % $Revision: 1.7 $ $Date: 2000/06/09 22:03:53 $ % Parse inputs, and substitute for defaults: error(nargchk(1,6,nargin)); if nargin<6, phi=[]; end if nargin<5, method=[]; end if nargin<4, f1=[]; end if nargin<3, t1=[]; end if nargin<2, f0=[]; end if isempty(phi), phi=0; end if isempty(method), method='linear'; end if isempty(f1), f1=100; end if isempty(t1), t1=1; end if isempty(f0), f0=0; end % Parse the method string: if length(f0)>1, method='polynomial'; else % Set p=1 for linear, 2 for quadratic, 3 for logarithmic strs = {'linear','quadratic','logarithmic'}; p = strmatch(lower(method),strs); if isempty(p), error('Unknown method selected.'); elseif length(p)>1, error('Ambiguous method selected.'); end method = strs{p}; end switch method case 'polynomial' % Polynomial chirp y = cos( 2*pi * polyval(polyint(f0),t) ); case {'linear','quadratic'}, % Polynomial chirp: p is the polynomial order beta = (f1-f0).*(t1.^(-p)); y = cos(2*pi * ( beta./(1+p).*(t.^(1+p)) + f0.*t + phi/360)); case 'logarithmic', % Logarithmic chirp: if f1F0 is required for a log-sweep.'); end beta = log10(f1-f0)/t1; y = cos(2*pi * ( (10.^(beta.*t)-1)./(beta.*log(10)) + f0.*t + phi/360)); end % [EOF] chirp.m Not familiar with the function myself but I am sure others can guide you -------------- next part -------------- An HTML attachment was scrubbed... URL: From tvitklg at rambler.ru Sun Mar 10 14:44:33 2013 From: tvitklg at rambler.ru (TViT) Date: Sun, 10 Mar 2013 06:44:33 -0700 (PDT) Subject: [Scilab-users] Generation of linear frequency In-Reply-To: References: <1362906136960-4026202.post@n3.nabble.com> Message-ID: <1362923073853-4026205.post@n3.nabble.com> Thanks! Help please with an example, I have created a file - D:\Program Files\scilab-5.4.0\modules\signal_processing\macros\chirp.sci // ------------------------------ function [x] =chirp (T, W, p) [ lhs, rhs] =argn (0); if rhs < 3 then p = 1; end J = sqrt (-1); delta_t = 1 / (p*W); N = round (p*T*W); nn = [0:N-1] '; x = exp (J * of % pi*W/T * (delta_t*nn - T/2). ^2); endfunction // ------------------------------ Has started buildmacros.bat Has appeared chirp.bin Has created a file LinGen.sci // ------------------------------------ clc; t = 0:0.001:2; // 2 secs 1kHz sample rate y = chirp (t, 0,1,150); // Start DC, cross 150Hz at t=1 sec plot (y); // ------------------------------------ I start and in a command window writes many parameters, what not so, I do not understand. I the beginner...)) -- View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202p4026205.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From krotersv at gmail.com Sun Mar 10 15:02:13 2013 From: krotersv at gmail.com (Stanislav) Date: Sun, 10 Mar 2013 07:02:13 -0700 (PDT) Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <1362923073853-4026205.post@n3.nabble.com> References: <1362906136960-4026202.post@n3.nabble.com> <1362923073853-4026205.post@n3.nabble.com> Message-ID: <1362924133284-4026206.post@n3.nabble.com> Hi. function [x] =chirp (t, f0, t1, f1, varargin) [ lhs, rhs] =argn (0); if rhs < 5 then phi = 0; else pause phi = varargin(1); end mu = (f1-f0).*t1; x = exp(%i * 2 * %pi * ( mu./2.*(t.^2) + f0.*t + phi/360)); endfunction t = 0:0.001:1; x = chirp (t, 0,1,150); scf();plot(real(x));xgrid Stanislav -- View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202p4026206.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From krotersv at gmail.com Sun Mar 10 15:03:25 2013 From: krotersv at gmail.com (Stanislav) Date: Sun, 10 Mar 2013 07:03:25 -0700 (PDT) Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <1362924133284-4026206.post@n3.nabble.com> References: <1362906136960-4026202.post@n3.nabble.com> <1362923073853-4026205.post@n3.nabble.com> <1362924133284-4026206.post@n3.nabble.com> Message-ID: <1362924205269-4026207.post@n3.nabble.com> sorry for "pause" in the code. I for debugging. -- View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202p4026207.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From krotersv at gmail.com Sun Mar 10 15:04:12 2013 From: krotersv at gmail.com (Stanislav) Date: Sun, 10 Mar 2013 07:04:12 -0700 (PDT) Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <1362924133284-4026206.post@n3.nabble.com> References: <1362906136960-4026202.post@n3.nabble.com> <1362923073853-4026205.post@n3.nabble.com> <1362924133284-4026206.post@n3.nabble.com> Message-ID: <1362924252646-4026209.post@n3.nabble.com> Sorry for "pause" in the code. It is for debugging. -- View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202p4026209.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From serge.steer at inria.fr Sun Mar 10 15:20:39 2013 From: serge.steer at inria.fr (Serge Steer) Date: Sun, 10 Mar 2013 15:20:39 +0100 (CET) Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <1362906136960-4026202.post@n3.nabble.com> Message-ID: <1963430000.4479109.1362925239348.JavaMail.root@inria.fr> The time frequency atoms module for Scilab provides chirp, spectrogram and many other functions Serge Steer ----- Mail original ----- > De: "TViT" > ?: users at lists.scilab.org > Envoy?: Dimanche 10 Mars 2013 10:02:16 > Objet: [Scilab-users] Generation of linear frequency > > Hello! > > In Matlab there is a function chirp, and what is in Scilab? > > And why Scilab can not transform a simple example from Matlab of a > file? > > //----------------------------------------------------- > t = 0:0.001:2; % 2 secs @ 1kHz sample rate > y = chirp(t,0,1,150); % Start @ DC, > % cross 150Hz at t=1 sec > spectrogram(y,256,250,256,1E3,'yaxis') > //----------------------------------------------------- > > !--error 37 > at line 190 of function mfile2sci called by : > at line 142 of function cb_m2sci_gui called by : > cbo = > getcallbackobject("-6ebf8d73:13d5388519a:-7f72");cb_m2sci_gui;if > exists("%oldgcbo") then gcbo = %oldgcbo; > while executing a callback > > > > -- > View this message in context: > http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202.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 krotersv at gmail.com Sun Mar 10 15:29:30 2013 From: krotersv at gmail.com (Stanislav) Date: Sun, 10 Mar 2013 07:29:30 -0700 (PDT) Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <1963430000.4479109.1362925239348.JavaMail.root@inria.fr> References: <1362906136960-4026202.post@n3.nabble.com> <1963430000.4479109.1362925239348.JavaMail.root@inria.fr> Message-ID: <1362925770497-4026211.post@n3.nabble.com> Hi. How can I learn what functions are provided? Stanislav -- View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202p4026211.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sun Mar 10 16:37:08 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Mar 2013 16:37:08 +0100 Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <1362925770497-4026211.post@n3.nabble.com> References: <1362906136960-4026202.post@n3.nabble.com> <1963430000.4479109.1362925239348.JavaMail.root@inria.fr> <1362925770497-4026211.post@n3.nabble.com> Message-ID: <513CA8A4.90709@free.fr> Le 10/03/2013 15:29, Stanislav a ?crit : > Hi. > How can I learn what functions are provided? In this way: http://atoms.scilab.org/toolboxes/stftb/1.2.3/filelist/stftb-1.2.3-1-src.tar.gz Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bhciidae.png Type: image/png Size: 13628 bytes Desc: not available URL: From tvitklg at rambler.ru Sun Mar 10 17:48:41 2013 From: tvitklg at rambler.ru (TViT) Date: Sun, 10 Mar 2013 09:48:41 -0700 (PDT) Subject: [Scilab-users] Generation of linear frequency In-Reply-To: <513CA8A4.90709@free.fr> References: <1362906136960-4026202.post@n3.nabble.com> <1963430000.4479109.1362925239348.JavaMail.root@inria.fr> <1362925770497-4026211.post@n3.nabble.com> <513CA8A4.90709@free.fr> Message-ID: <1362934121756-4026213.post@n3.nabble.com> By all thanks! -- View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202p4026213.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From tvitklg at rambler.ru Sun Mar 10 19:25:24 2013 From: tvitklg at rambler.ru (TViT) Date: Sun, 10 Mar 2013 11:25:24 -0700 (PDT) Subject: [Scilab-users] PolyPhase (chanelized) FFT Message-ID: <1362939924508-4026214.post@n3.nabble.com> Has seen demo - Atoms Time Frequency Toolbox (STFTB). I want to construct such beautiful spectrum recorded human voice - words, only with the high frequency resolution by method polyphase FFT https://casper.berkeley.edu/wiki/The_Polyphase_Filter_Bank_Technique . Has written a code, but my knowledge have allowed me to write only such code, as more - I do not know. Help please, or sources to realisation polyphase FFT in Scilab... My code: pFFT.sci -- View this message in context: http://mailinglists.scilab.org/PolyPhase-chanelized-FFT-tp4026214.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Mon Mar 11 10:06:40 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 11 Mar 2013 10:06:40 +0100 Subject: [Scilab-users] topological optimization In-Reply-To: <000001ce1d0d$09c30840$1d4918c0$@carrico@free.fr> References: <000001ce1d0d$09c30840$1d4918c0$@carrico@free.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106B1D87A@301EX00100.sidel.com> Hello, De la part de Paul Carrico Envoy? : samedi 9 mars 2013 22:28 > [...] design a vibration tool, [...] > Here, the goal is to design an aluminum tool which 1rst natural > frequency is above a fixed threshold If the shape of the tool is a little bit complex, I'm afraid you'll have to use finite elements analysis (FEA). These are rather complex softwares, and I know only one free, code_aster, but I never used it. http://www.code-aster.org/ Scilab has a primitive, fec(), to display the results of FEA, but not to compute it. And there is an Atoms module for FEA on trusses http://atoms.scilab.org/toolboxes/femtruss But I don't know if there is any 3d FEA module for Scilab. -- 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 Mon Mar 11 10:36:33 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 11 Mar 2013 10:36:33 +0100 Subject: [Scilab-users] topological optimization In-Reply-To: <000001ce1d0d$09c30840$1d4918c0$@carrico@free.fr> References: <000001ce1d0d$09c30840$1d4918c0$@carrico@free.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106B1D94B@301EX00100.sidel.com> Sorry, I missed the end of your message De la part de Paul Carrico Envoy? : samedi 9 mars 2013 22:28 > I'm using Scilab for a while, even in conjunction with my Finite > Element solver, mainly for parameters optimization . What yo need is an interface between a CAD software and your FE solver, because you have to modify the 3D model and feed your FE solver which then has to define a new mesh. Commercial solutions often offer this kind of link, and even feedback between FE solver and CAD with automatic optimisation possibilities. However, I don't know how Scilab could play a role il this process. -- 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 Mon Mar 11 11:05:09 2013 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 11 Mar 2013 11:05:09 +0100 (CET) Subject: [Scilab-users] topological optimization In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106B1D94B@301EX00100.sidel.com> Message-ID: <881604239.664079.1362996309934.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi Christophe, I've found interesting reports (in french) on the use of Finite elements solver in conjunction with matlab in order to solve topological optimisation using homogenization method. http://www.vrince.free.fr/PE_optimisation/ Furthermore we can see some examples of the use of Scilab: http://www.cmap.polytechnique.fr/~allaire/levelset_en.html http://www.cmap.polytechnique.fr/~allaire/freefem_en.html (+ freeFEM) Another interesting link (with Matlab programs) : http://www.topopt.dtu.dk/ Unfortunately (as imaginated), the mathematical theory behind is not trivial ? ?crazy, I said crazy ... well it's not the excat word :-))))) Paul ----- Mail original ----- De: "Christophe Dang" ?: "International users mailing list for Scilab." Envoy?: Lundi 11 Mars 2013 10:36:33 Objet: Re: [Scilab-users] topological optimization Sorry, I missed the end of your message De la part de Paul Carrico Envoy? : samedi 9 mars 2013 22:28 > I'm using Scilab for a while, even in conjunction with my Finite > Element solver, mainly for parameters optimization . What yo need is an interface between a CAD software and your FE solver, because you have to modify the 3D model and feed your FE solver which then has to define a new mesh. Commercial solutions often offer this kind of link, and even feedback between FE solver and CAD with automatic optimisation possibilities. However, I don't know how Scilab could play a role il this process. -- 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 Christophe.Dang at sidel.com Mon Mar 11 11:21:29 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 11 Mar 2013 11:21:29 +0100 Subject: [Scilab-users] topological optimization In-Reply-To: <881604239.664079.1362996309934.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <3B5FFC67498DFF49AE7271A584867D16F106B1D94B@301EX00100.sidel.com> <881604239.664079.1362996309934.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106B1DAA1@301EX00100.sidel.com> Hello, De la part de paul.carrico at free.fr Envoy? : lundi 11 mars 2013 11:05 > I've found interesting reports (in french) on the use of Finite > elements solver in conjunction with matlab in order to solve > topological optimisation using homogenization method. Very interesting, I'll have a look at it, thanks for the links. -- 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 grivet at cnrs-orleans.fr Wed Mar 13 10:59:44 2013 From: grivet at cnrs-orleans.fr (grivet) Date: Wed, 13 Mar 2013 10:59:44 +0100 Subject: [Scilab-users] color under a curve In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> Message-ID: <51404E10.8010005@cnrs-orleans.fr> Hello, How can I color the curvilinear space between a curve, the x axis and two vertical lines (extending from the x axis and the curve)? Another unrelated question. On my machine (WinXP, SP3), almost none of the Scilab 5.4 demos work; instead, Scilab displays pages of Java error messages. Is this a known Scilab/WinXP problem or do I have a problem with my version of Java? Thank you in advance for your time and help JP Grivet From vogt at centre-cired.fr Wed Mar 13 13:01:56 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Wed, 13 Mar 2013 13:01:56 +0100 Subject: [Scilab-users] color under a curve In-Reply-To: <51404E10.8010005@cnrs-orleans.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> Message-ID: <51406AB4.2050908@centre-cired.fr> On 13/03/2013 10:59, grivet wrote: > Hello, > > How can I color the curvilinear space between a curve, the x axis and > two vertical lines (extending from the > x axis and the curve)? Hi Samuel once provided a solution to this: http://mailinglists.scilab.org/Reg-Area-Between-two-curves-td3393261.html If you have time, the best would be to make a generic function and post is to fileexchange... Kind regards -- Adrien Vogt-Schilb (Cired) Tel: (+33) 1 43 94 73 83 From vogt at centre-cired.fr Wed Mar 13 13:05:40 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Wed, 13 Mar 2013 13:05:40 +0100 Subject: [Scilab-users] color under a curve In-Reply-To: <51406AB4.2050908@centre-cired.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> <51406AB4.2050908@centre-cired.fr> Message-ID: <51406B94.2060805@centre-cired.fr> On 13/03/2013 13:01, Adrien Vogt-Schilb wrote: > > Samuel once provided a solution to this: For the record: actually it was Antoine, and he provided a function. Could still be deposited to fileexchange. Antoine would you allow your function to be posted? Do you happen to have a more recent version than the one you posted back in 2011: Here is an example: x=[-10:10];y1=x+10;y2=x.*x; BetweenCurves(x,y1,y2); Here is the source code below: ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Plot area between two curves function [h,epoly,ey1,ey2]=BetweenCurves(x,y1,y2,varargin) // // Plots two curves and fill the area in between // // INPUTS: // x vector (1,n) of horizontal coordinates // y1 vector (1,n) value of 1st curve y1(x) // y2 vector (1,n) value of 2nd curve y2(x) // -- optional inputs: pairs "keyword","value" -- // "handle",h handle to the graphic window to use // "axis",a handle to the graphic axis to use // "foreground", colorid id of the color to use for painting the area // "background", colorid id of the color to use for curves stroke // // OUTPUTS: // h handle to the graphic window used // epoly handle to the polygone that fill the area in between // ey1 handle to first curve // ey2 handle to second curve //default values for optional argument hfig=-1; background=%nan; foreground=%nan; // scan varargin for optional parameter pairs (they can appear in any order) for i=1:2:length(varargin) keyword=varargin(i); value=varargin(i+1); select keyword case "handle" then hfig=value; scf(hfig); case "axis" then axis=value; sca(axis); hfig=axis.parent; case "background" then background=value; case "foreground" then background=value; end end // special treatment for handle (aka hack alert) if typeof(hfig) ~= "handle" then hfig=scf(); end h=hfig; scf(hfig); xfpoly([x,x($:-1:1)],[y1,y2($:-1:1)]); epoly=gce(); plot(x,y1); ey1=gce(); plot(x,y2); ey2=gce(); // background setting if (~isnan(background)) then // optional background specified epoly.background=background; else // default background epoly.background=color("gray87"); end // foreground setting (as for background) if (~isnan(foreground)) then epoly.foreground=foreground; ey1.children.foreground=foreground; ey2.children.foreground=foreground; else epoly.foreground=color("gray65"); ey1.children.foreground=color("gray65"); ey2.children.foreground=color("gray65"); end endfunction ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -- Adrien Vogt-Schilb (Cired) Tel: (+33) 1 43 94 73 83 From Christophe.Dang at sidel.com Wed Mar 13 14:29:58 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 13 Mar 2013 14:29:58 +0100 Subject: [Scilab-users] color under a curve In-Reply-To: <51406B94.2060805@centre-cired.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> <51406AB4.2050908@centre-cired.fr> <51406B94.2060805@centre-cired.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106B6EDC7@301EX00100.sidel.com> Hello, If the curve is on one side of the x-axis (i.e. always positive or negative), then you can use something simpler, but far less general. // ********** // set of data for the example x = linspace(-%pi/2,%pi/2,50); y = cos(x); // completion to have a closed area xmin = min(x); xmax = max(x); ymin = min(y); ymax = max(y); x($+1) = x($); x($+1) = xmin; y($+1) = 0; y($+1) = 0; // filled area only xfpoly(x,y); h = gce(); h.line_mode = "off"; h.background = 4; // adjust to your colour // curve alone (auto adjust of the axes) plot(x(1:$-2), y(1:$-2)); // ********** 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 Wed Mar 13 14:58:47 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 13 Mar 2013 14:58:47 +0100 Subject: [Scilab-users] color under a curve In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106B6EDC7@301EX00100.sidel.com> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> <51406AB4.2050908@centre-cired.fr> <51406B94.2060805@centre-cired.fr> <3B5FFC67498DFF49AE7271A584867D16F106B6EDC7@301EX00100.sidel.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106B6EE57@301EX00100.sidel.com> Sorry, All this was already in the discussion mentioned by Adrien. And more efficient. Just to let a better code : // ********** // set of data for the example x = linspace(-%pi/2,%pi/2,50); y = cos(x); // plotting plot(x,y); h = gce(); g = h.children; g.fill_mode = "on"; g.background = 4; // ********** 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 mike.pageone at googlemail.com Wed Mar 13 14:51:52 2013 From: mike.pageone at googlemail.com (Mike Page) Date: Wed, 13 Mar 2013 13:51:52 -0000 Subject: [Scilab-users] Error in Nelder-Mead functions Message-ID: Hi, I am trying to use the Nelder Mead optimisation functions to fit a biological model to some experimental data. I am using Scilab 5.4.0 on Win XP. The search halts with the error: !--error 21 Invalid index. at line 78 of function neldermead_updatesimp called by : at line 26 of function neldermead_autorestart called by : at line 22 of function neldermead_search called by : at line 37 of function CpeFit called by : at line 13 of function TestFit called by : TestFit This line in neldermead_updatesimp seems to be "str = string ( simplex0 )". If I turn on verbose mode, the problem happens here: Function Evaluation #42, index=2, x= [134014.18 0.0001 0.7648109 134014.18 0.0000012 0.7648109 134014.18 0.0000506 0.7648109 97.463] Function Evaluation #43, index=2, x= [134014.18 0.0001 0.7648109 134014.18 0.0000012 0.7648109 134014.18 0.0000012 0.7648603 97.463] Function Evaluation #44, index=2, x= [134014.18 0.0001 0.7648109 134014.18 0.0000012 0.7648109 134014.18 0.0000012 0.7648109 97.462951] Before scaling: Optim Simplex Object: ===================== nbve: 11 n: 10 x: 11-by-10 matrix fv: 11-by-1 matrix !--error 21 The Nelder Mead setup is as follows: nm = neldermead_new (); nm = neldermead_configure (nm, "-method", "box"); // nm = neldermead_configure (nm, "-verbose", 1); nm = neldermead_configure (nm, "-numberofvariables", 10); nm = neldermead_configure (nm, "-maxfunevals", 1000); nm = neldermead_configure (nm, "-maxiter", 1000); nm = neldermead_configure (nm, "-restartflag", %t); nm = neldermead_configure (nm, "-boxtermination", %t); nm = neldermead_configure (nm, "-function", CpeLossFunc); nm = neldermead_configure (nm, "-boundsmin", ... [1.0E3; 1.0E-9; 0.1; 1.0E3; 1.0E-9; 0.1; 1.0E3; 1.0E-9; 0.1; 10.0]); nm = neldermead_configure (nm, "-boundsmax", ... [10.0E6; 100.0E-6; 0.9; 10.0E6; 100.0E-6; 0.9; 10.0E6; 100.0E-6; 0.9; 10.0E3]); nm = neldermead_configure (nm, "-x0", Values); nm = neldermead_search (nm); Values = neldermead_get (nm, "-xopt"); disp (neldermead_get (nm, "-status")); nm = neldermead_destroy (nm); Anyone have any ideas what is wrong? Cheers, Mike. From Mike at Page-One.Waitrose.com Wed Mar 13 16:05:33 2013 From: Mike at Page-One.Waitrose.com (Mike Page) Date: Wed, 13 Mar 2013 15:05:33 -0000 Subject: [Scilab-users] Error in Nelder-Mead functions In-Reply-To: Message-ID: I have just checked on Scilab 5.3.2 and found this works on that version, so it looks like a bug. Mike. -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org]On Behalf Of Mike Page Sent: 13 March 2013 13:52 To: users at lists.scilab.org Subject: [Scilab-users] Error in Nelder-Mead functions Hi, I am trying to use the Nelder Mead optimisation functions to fit a biological model to some experimental data. I am using Scilab 5.4.0 on Win XP. The search halts with the error: !--error 21 Invalid index. at line 78 of function neldermead_updatesimp called by : at line 26 of function neldermead_autorestart called by : at line 22 of function neldermead_search called by : at line 37 of function CpeFit called by : at line 13 of function TestFit called by : TestFit This line in neldermead_updatesimp seems to be "str = string ( simplex0 )". If I turn on verbose mode, the problem happens here: Function Evaluation #42, index=2, x= [134014.18 0.0001 0.7648109 134014.18 0.0000012 0.7648109 134014.18 0.0000506 0.7648109 97.463] Function Evaluation #43, index=2, x= [134014.18 0.0001 0.7648109 134014.18 0.0000012 0.7648109 134014.18 0.0000012 0.7648603 97.463] Function Evaluation #44, index=2, x= [134014.18 0.0001 0.7648109 134014.18 0.0000012 0.7648109 134014.18 0.0000012 0.7648109 97.462951] Before scaling: Optim Simplex Object: ===================== nbve: 11 n: 10 x: 11-by-10 matrix fv: 11-by-1 matrix !--error 21 The Nelder Mead setup is as follows: nm = neldermead_new (); nm = neldermead_configure (nm, "-method", "box"); // nm = neldermead_configure (nm, "-verbose", 1); nm = neldermead_configure (nm, "-numberofvariables", 10); nm = neldermead_configure (nm, "-maxfunevals", 1000); nm = neldermead_configure (nm, "-maxiter", 1000); nm = neldermead_configure (nm, "-restartflag", %t); nm = neldermead_configure (nm, "-boxtermination", %t); nm = neldermead_configure (nm, "-function", CpeLossFunc); nm = neldermead_configure (nm, "-boundsmin", ... [1.0E3; 1.0E-9; 0.1; 1.0E3; 1.0E-9; 0.1; 1.0E3; 1.0E-9; 0.1; 10.0]); nm = neldermead_configure (nm, "-boundsmax", ... [10.0E6; 100.0E-6; 0.9; 10.0E6; 100.0E-6; 0.9; 10.0E6; 100.0E-6; 0.9; 10.0E3]); nm = neldermead_configure (nm, "-x0", Values); nm = neldermead_search (nm); Values = neldermead_get (nm, "-xopt"); disp (neldermead_get (nm, "-status")); nm = neldermead_destroy (nm); Anyone have any ideas what is wrong? Cheers, Mike. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.2904 / Virus Database: 2641/6168 - Release Date: 03/12/13 From stephane.mottelet at utc.fr Wed Mar 13 18:20:25 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Wed, 13 Mar 2013 18:20:25 +0100 Subject: [Scilab-users] declaration of uint8 matrix Message-ID: <5140B559.7090803@utc.fr> Hello, Is it possible to declare a uint8 matrix without first declaring it as a double ? Having to write m=uint8(zeros(n,n)) makes it impossible to declare a matrix that would fit in the stack as a uint8 but not as a double (8 times bigger). S. From sgougeon at free.fr Wed Mar 13 18:57:40 2013 From: sgougeon at free.fr (sgougeon at free.fr) Date: Wed, 13 Mar 2013 18:57:40 +0100 (CET) Subject: [Scilab-users] declaration of uint8 matrix In-Reply-To: <5140B559.7090803@utc.fr> Message-ID: <352205970.7920863.1363197460172.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello St?phane, >De: "St?phane Mottelet" >Is it possible to declare a uint8 matrix without first declaring it as a >double ? ../.. Yes, you can do: -->ui = resize_matrix(uint8(0),5,3) ui = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -->typeof(ui) ans = uint8 Regards Samuel From stephane.mottelet at utc.fr Wed Mar 13 19:09:27 2013 From: stephane.mottelet at utc.fr (=?UTF-8?B?U3TDqXBoYW5lIE1vdHRlbGV0?=) Date: Wed, 13 Mar 2013 19:09:27 +0100 Subject: [Scilab-users] declaration of uint8 matrix In-Reply-To: <352205970.7920863.1363197460172.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <352205970.7920863.1363197460172.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <5140C0D7.3040201@utc.fr> Le 13/03/13 18:57, sgougeon at free.fr a ?crit : > Hello St?phane, > >> De: "St?phane Mottelet" >> Is it possible to declare a uint8 matrix without first declaring it as a >> double ? ../.. > > Yes, you can do: > > -->ui = resize_matrix(uint8(0),5,3) > ui = > > 0 0 0 > 0 0 0 > 0 0 0 > 0 0 0 > 0 0 0 > > -->typeof(ui) > ans = > uint8 > > Regards > Samuel > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > Thanks, that's very clever ! Maybe would it be a good idea to extend the syntax of uint8 (and others) like ui=uint8(5,3) ? S. From sgougeon at free.fr Wed Mar 13 19:19:59 2013 From: sgougeon at free.fr (sgougeon at free.fr) Date: Wed, 13 Mar 2013 19:19:59 +0100 (CET) Subject: [Scilab-users] declaration of uint8 matrix In-Reply-To: <5140C0D7.3040201@utc.fr> Message-ID: <356544812.8005300.1363198799798.JavaMail.root@zimbra75-e12.priv.proxad.net> >../.. Maybe would it be a good idea to extend the syntax of uint8 (and others) like ui=uint8(5,3) ? Yes, such a feature would be useful. IMO it would be better to rather extend zeros(), ones(), and eye() with an optional input parameter "typeof" (text): zeros(X, "uint8") ones(m, n, p, "int16") ... Samuel From theo at circuit.co.jp Thu Mar 14 09:32:43 2013 From: theo at circuit.co.jp (Theo) Date: Thu, 14 Mar 2013 01:32:43 -0700 (PDT) Subject: [Scilab-users] API SCILAB: ilib_compile: Error while executing Makelib. Message-ID: <1363249963318-4026243.post@n3.nabble.com> I am trying to run the example given on the Getting started page (http://help.scilab.org/docs/5.4.0/en_US/api_scilab_getting_started.html) But I got the error below. Any help please ? ============================================================================= ___________________________________________ scilab-5.3.3 Consortium Scilab (DIGITEO) Copyright (c) 1989-2011 (INRIA) Copyright (c) 1989-2007 (ENPC) ___________________________________________ Initialisation : loading initial environment Starting the Serial Toolbox Load macros Load help START GUI Builder 2.2 Load macros Load help Type "guibuilder" to start the GUI Mingw Compiler support for Scilab Load macros Load help -->exec('C:\Work\SCILAB\DLL\lab0\test.sci', -1) G?n?re un fichier gateway G?n?re un fichier loader G?n?re un Makefile: Makelib Ex?cute le makefile Compilation de sci_foo.c Construit une biblioth?que partag?e (soyez patient) !------------- Compile file sci_foo.c -------------- ! ! ! !i686-pc-mingw32-gcc.exe -c -DWIN32 -D_MSC_VER -DSTRICT -DFORDLL -I"C:/PROGRA~1/SCILAB~1.3/libs/MALLOC/! ! includes" -I"C:/PROGRA~1/SCILAB~1.3/modules/core/includes" -I"C:/PROGRA~1/SCILAB~1.3/modules/api_! ! scilab/includes" -I"C:/PROGRA~1/SCILAB~1.3/modules/call_scilab/includes" -I"C:/PROGRA~1/SCILAB~1.! ! 3/modules/output_stream/includes" -I"C:/PROGRA~1/SCILAB~1.3/modules/jvm/includes" -I"C:/PROGRA~1/! ! SCILAB~1.3/modules/localization/includes" -I"C:/PROGRA~1/SCILAB~1.3/modules/dynamic_link/includes! ! " -I"C:/PROGRA~1/SCILAB~1.3/modules/mexlib/includes" -I"C:/PROGRA~1/SCILAB~1.3/modules/time/inclu! ! des" -I"C:/PROGRA~1/SCILAB~1.3/modules/windows_tools/includes" -I"C:/PROGRA~1/SCILAB~1.3/libs/f2c! ! " -I"C:/PROGRA~1/SCILAB~1.3/libs/hashtable" -I"C:/PROGRA~1/SCILAB~1.3/libs/intl" -m32 sci_foo.c! ! ! !sci_foo.c: In function 'sci_foo': ! ! ! !sci_foo.c:87:35: warning: incompatible implicit declaration of built-in function 'malloc' ! ! ! !sci_foo.c:121:6: error: lvalue required as left operand of assignment ! ! ! !sci_foo.c:122:6: error: lvalue required as left operand of assignment ! ! ! !make: *** [sci_foo.o] Error 1 ! !--error 10000 ilib_compile: Error while executing Makelib. at line 76 of function ilib_compile called by : at line 107 of function ilib_build called by : ilib_build('build_lib',['foo','sci_foo'],files,[]); at line 4 of exec file called by : exec('C:\Work\SCILAB\DLL\lab0\test.sci', -1) -- View this message in context: http://mailinglists.scilab.org/API-SCILAB-ilib-compile-Error-while-executing-Makelib-tp4026243.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From devaraj.munian at rntbci.com Thu Mar 14 05:16:14 2013 From: devaraj.munian at rntbci.com (Munian, Devaraj) Date: Thu, 14 Mar 2013 04:16:14 +0000 Subject: [Scilab-users] Data Extraction Issue in Scilab Message-ID: Dear Scilab Support, We here in RNTBCI are testing Scilab to compare it against Matlab. We are doing a pilot project to convert our script in Matlab to Scilab for validating purpose. If we are able to get the same result in Scilab compared with Matlab, we will be converting all our Matlab applications into Scilab applications. During our pilot project which is a most simplest project we are not able to proceed further because of issues mentioned in the ppt. I have also attached the data files and Matlab files for your reference. It will be really grateful if the issue is addressed at the earliest. Regards Devaraj | Assistant Manager | Tools and Methods | RENAULT NISSAN TECHNOLOGY & BUSINESS CENTRE INDIA PRIVATE LIMITED Ascendas IT Park, Mahindra World City SEZ | Plot # TP2/1, Natham Sub Post Office | 3rd Floor | Chengelpattu | Kancheepuram District | Tamilnadu 603002 | India | Tel # | + 9144-67416303 | eMail | devaraj.munian at rntbci.com | [cid:image001.gif at 01CE2098.C43DDEF0] TOGETHER EVERYBODY ACHIEVES MORE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 2099 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Data_Extraction_Issue_in_Scilab.pptx Type: application/vnd.openxmlformats-officedocument.presentationml.presentation Size: 44553 bytes Desc: Data_Extraction_Issue_in_Scilab.pptx URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: engine_data_extraction.m Type: application/octet-stream Size: 510 bytes Desc: engine_data_extraction.m URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: engine.in Type: application/octet-stream Size: 829 bytes Desc: engine.in URL: -------------- next part -------------- *********************************************************************************************************** CONFIDENTIALITY NOTICE This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to email.security at rntbci.com with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. RNTBCI and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks. RNTBCI is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection RNTBCI does not accept any liability. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them. *********************************************************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From saketkc at gmail.com Thu Mar 14 09:58:19 2013 From: saketkc at gmail.com (Saket Choudhary) Date: Thu, 14 Mar 2013 14:28:19 +0530 Subject: [Scilab-users] Data Extraction Issue in Scilab In-Reply-To: References: Message-ID: Issue 1 : data=read("engine.in",-1,1) data = 0.08 0.08 0.001671 0.14835 0. 4000. 1.7 3.11 0. 1. 4. 5. 0. Saket Choudhary Undergraduate Student IIT Bombay India On 14 March 2013 09:46, Munian, Devaraj wrote: > Dear Scilab Support,**** > > We here in RNTBCI are testing Scilab to compare it against Matlab. We are > doing a pilot project to convert our script in Matlab to Scilab for > validating purpose.**** > > If we are able to get the same result in Scilab compared with Matlab, we > will be converting all our Matlab applications into Scilab applications.** > ** > > During our pilot project which is a most simplest project we are not able > to proceed further because of issues mentioned in the ppt.**** > > I have also attached the data files and Matlab files for your reference.** > ** > > It will be really grateful if the issue is addressed at the earliest.**** > > Regards**** > > ** ** > > *Devaraj* | Assistant Manager | Tools and Methods | > *RENAULT NISSAN TECHNOLOGY & BUSINESS CENTRE INDIA PRIVATE LIMITED > *Ascendas IT Park, Mahindra World City SEZ | Plot # TP2/1, Natham Sub > Post Office | > 3rd Floor | Chengelpattu | Kancheepuram District | Tamilnadu 603002 | > India | > Tel # | + 9144-67416303 | > eMail | devaraj.munian at rntbci.com | **** > > [image: cid:727344808 at 01032012-1EA6]** > > * * > > *T**OGETHER* *E**VERYBODY* *A**CHIEVES** M**ORE* **** > > ** ** > > > *********************************************************************************************************** > CONFIDENTIALITY NOTICE > > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. > > If you receive this message in error, please immediately delete it and all > copies of it from your system, destroy any hard copies of it and notify us > by email to email.security at rntbci.com with a copy of this message. You > must not, directly or indirectly, use, disclose, distribute, print or copy > any part of this message if you are not the intended recipient. RNTBCI and > any of its subsidiaries each reserves the right to monitor all e-mail > communications through its networks. > > RNTBCI is neither liable for the proper, complete transmission of the > information contained in this communication nor any delay in its receipt. > This email was scanned for the presence of computer viruses. In the > unfortunate event of infection RNTBCI does not accept any liability. > > Any views expressed in this message are those of the individual sender, > except where the message states otherwise and the sender is authorised to > state them. > > *********************************************************************************************************** > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Thu Mar 14 11:08:09 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Thu, 14 Mar 2013 11:08:09 +0100 Subject: [Scilab-users] Data Extraction Issue in Scilab In-Reply-To: References: Message-ID: <5141A189.6060209@utc.fr> Hello, this small script solves your problem : fd=mopen('engine.in','r'); s=mgetl(fd); mclose(fd); data1=[]; for i=1:size(s,1) w=strsplit(s(i),'/\s+/'); for j=1:size(w,1) data1(i,j)=w(j); end end [r,c]=find(data=='bore'); bore=eval(data(r(1),c(1)-1)); Hope this helps, S. Le 14/03/13 05:16, Munian, Devaraj a ?crit : > > Dear Scilab Support, > > We here in RNTBCI are testing Scilab to compare it against Matlab. We > are doing a pilot project to convert our script in Matlab to Scilab > for validating purpose. > > If we are able to get the same result in Scilab compared with Matlab, > we will be converting all our Matlab applications into Scilab > applications. > > During our pilot project which is a most simplest project we are not > able to proceed further because of issues mentioned in the ppt. > > I have also attached the data files and Matlab files for your reference. > > It will be really grateful if the issue is addressed at the earliest. > > Regards > > *Devaraj* | Assistant Manager | Tools and Methods | > *RENAULT NISSAN TECHNOLOGY & BUSINESS CENTRE INDIA PRIVATE LIMITED > *Ascendas IT Park, Mahindra World City SEZ | Plot # TP2/1, Natham Sub > Post Office | > 3^rd Floor | Chengelpattu | Kancheepuram District | Tamilnadu 603002 | > India | > Tel # | + 9144-67416303 | > eMail | devaraj.munian at rntbci.com | > > cid:727344808 at 01032012-1EA6** > > ** > > *T**OGETHER**E**VERYBODY**A**CHIEVES**M**ORE* > > > > *********************************************************************************************************** > CONFIDENTIALITY NOTICE > > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. > > If you receive this message in error, please immediately delete it and > all copies of it from your system, destroy any hard copies of it and > notify us by email to email.security at rntbci.com with a copy of this > message. You must not, directly or indirectly, use, disclose, > distribute, print or copy any part of this message if you are not the > intended recipient. RNTBCI and any of its subsidiaries each reserves > the right to monitor all e-mail communications through its networks. > > RNTBCI is neither liable for the proper, complete transmission of the > information contained in this communication nor any delay in its > receipt. This email was scanned for the presence of computer viruses. > In the unfortunate event of infection RNTBCI does not accept any > liability. > > Any views expressed in this message are those of the individual > sender, except where the message states otherwise and the sender is > authorised to state them. > *********************************************************************************************************** > > > > _______________________________________________ > 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: not available Type: image/gif Size: 2099 bytes Desc: not available URL: From paul.carrico at esterline.com Thu Mar 14 11:34:25 2013 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 14 Mar 2013 11:34:25 +0100 Subject: [Scilab-users] Data Extraction Issue in Scilab In-Reply-To: <5141A189.6060209@utc.fr> References: <5141A189.6060209@utc.fr> Message-ID: <55A12CBC06A8C9459DCE0BBEF8122FDC08B778F6@exchsrv.auxitrol.ad> a small mistake (typo error) in the previous code ... change data1 in data (or vice versa) ________________________________ De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de St?phane Mottelet Envoy? : jeudi 14 mars 2013 11:08 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] Data Extraction Issue in Scilab Hello, this small script solves your problem : fd=mopen('engine.in','r'); s=mgetl(fd); mclose(fd); data1=[]; for i=1:size(s,1) w=strsplit(s(i),'/\s+/'); for j=1:size(w,1) data1(i,j)=w(j); end end [r,c]=find(data=='bore'); bore=eval(data(r(1),c(1)-1)); Hope this helps, S. Le 14/03/13 05:16, Munian, Devaraj a ?crit : Dear Scilab Support, We here in RNTBCI are testing Scilab to compare it against Matlab. We are doing a pilot project to convert our script in Matlab to Scilab for validating purpose. If we are able to get the same result in Scilab compared with Matlab, we will be converting all our Matlab applications into Scilab applications. During our pilot project which is a most simplest project we are not able to proceed further because of issues mentioned in the ppt. I have also attached the data files and Matlab files for your reference. It will be really grateful if the issue is addressed at the earliest. Regards Devaraj | Assistant Manager | Tools and Methods | RENAULT NISSAN TECHNOLOGY & BUSINESS CENTRE INDIA PRIVATE LIMITED Ascendas IT Park, Mahindra World City SEZ | Plot # TP2/1, Natham Sub Post Office | 3rd Floor | Chengelpattu | Kancheepuram District | Tamilnadu 603002 | India | Tel # | + 9144-67416303 | eMail | devaraj.munian at rntbci.com | TOGETHER EVERYBODY ACHIEVES MORE *********************************************************************************************************** CONFIDENTIALITY NOTICE This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to email.security at rntbci.com with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. RNTBCI and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks. RNTBCI is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection RNTBCI does not accept any liability. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them. *********************************************************************************************************** _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------------------------------------------------------------------------- Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ATT351005.gif Type: image/gif Size: 2099 bytes Desc: ATT351005.gif URL: From stephane.mottelet at utc.fr Thu Mar 14 11:10:43 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Thu, 14 Mar 2013 11:10:43 +0100 Subject: [Scilab-users] Data Extraction Issue in Scilab In-Reply-To: References: Message-ID: <5141A223.2080606@utc.fr> Sorry for the small typing errors ("data" instead of "data1") : fd=mopen('engine.in','r'); s=mgetl(fd); mclose(fd); data1=[]; for i=1:size(s,1) w=strsplit(s(i),'/\s+/'); for j=1:size(w,1) data1(i,j)=w(j); end end [r,c]=find(data1=='bore'); bore=eval(data1(r(1),c(1)-1)); S. Le 14/03/13 05:16, Munian, Devaraj a ?crit : > > Dear Scilab Support, > > We here in RNTBCI are testing Scilab to compare it against Matlab. We > are doing a pilot project to convert our script in Matlab to Scilab > for validating purpose. > > If we are able to get the same result in Scilab compared with Matlab, > we will be converting all our Matlab applications into Scilab > applications. > > During our pilot project which is a most simplest project we are not > able to proceed further because of issues mentioned in the ppt. > > I have also attached the data files and Matlab files for your reference. > > It will be really grateful if the issue is addressed at the earliest. > > Regards > > *Devaraj* | Assistant Manager | Tools and Methods | > *RENAULT NISSAN TECHNOLOGY & BUSINESS CENTRE INDIA PRIVATE LIMITED > *Ascendas IT Park, Mahindra World City SEZ | Plot # TP2/1, Natham Sub > Post Office | > 3^rd Floor | Chengelpattu | Kancheepuram District | Tamilnadu 603002 | > India | > Tel # | + 9144-67416303 | > eMail | devaraj.munian at rntbci.com | > > cid:727344808 at 01032012-1EA6** > > ** > > *T**OGETHER**E**VERYBODY**A**CHIEVES**M**ORE* > > > > *********************************************************************************************************** > CONFIDENTIALITY NOTICE > > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. > > If you receive this message in error, please immediately delete it and > all copies of it from your system, destroy any hard copies of it and > notify us by email to email.security at rntbci.com with a copy of this > message. You must not, directly or indirectly, use, disclose, > distribute, print or copy any part of this message if you are not the > intended recipient. RNTBCI and any of its subsidiaries each reserves > the right to monitor all e-mail communications through its networks. > > RNTBCI is neither liable for the proper, complete transmission of the > information contained in this communication nor any delay in its > receipt. This email was scanned for the presence of computer viruses. > In the unfortunate event of infection RNTBCI does not accept any > liability. > > Any views expressed in this message are those of the individual > sender, except where the message states otherwise and the sender is > authorised to state them. > *********************************************************************************************************** > > > > _______________________________________________ > 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: not available Type: image/gif Size: 2099 bytes Desc: not available URL: From stephane.mottelet at utc.fr Thu Mar 14 11:13:17 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Thu, 14 Mar 2013 11:13:17 +0100 Subject: [Scilab-users] Data Extraction Issue in Scilab In-Reply-To: References: Message-ID: <5141A2BD.7020308@utc.fr> Sorry for the small typing errors ("data" instead of "data1") : fd=mopen('engine.in','r'); s=mgetl(fd); mclose(fd); data1=[]; for i=1:size(s,1) w=strsplit(s(i),'/\s+/'); for j=1:size(w,1) data1(i,j)=w(j); end end [r,c]=find(data1=='bore'); bore=eval(data1(r(1),c(1)-1)); S. Le 14/03/13 05:16, Munian, Devaraj a ?crit : > > Dear Scilab Support, > > We here in RNTBCI are testing Scilab to compare it against Matlab. We > are doing a pilot project to convert our script in Matlab to Scilab > for validating purpose. > > If we are able to get the same result in Scilab compared with Matlab, > we will be converting all our Matlab applications into Scilab > applications. > > During our pilot project which is a most simplest project we are not > able to proceed further because of issues mentioned in the ppt. > > I have also attached the data files and Matlab files for your reference. > > It will be really grateful if the issue is addressed at the earliest. > > Regards > > *Devaraj* | Assistant Manager | Tools and Methods | > *RENAULT NISSAN TECHNOLOGY & BUSINESS CENTRE INDIA PRIVATE LIMITED > *Ascendas IT Park, Mahindra World City SEZ | Plot # TP2/1, Natham Sub > Post Office | > 3^rd Floor | Chengelpattu | Kancheepuram District | Tamilnadu 603002 | > India | > Tel # | + 9144-67416303 | > eMail | devaraj.munian at rntbci.com | > > cid:727344808 at 01032012-1EA6** > > ** > > *T**OGETHER**E**VERYBODY**A**CHIEVES**M**ORE* > > > > *********************************************************************************************************** > CONFIDENTIALITY NOTICE > > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. > > If you receive this message in error, please immediately delete it and > all copies of it from your system, destroy any hard copies of it and > notify us by email to email.security at rntbci.com with a copy of this > message. You must not, directly or indirectly, use, disclose, > distribute, print or copy any part of this message if you are not the > intended recipient. RNTBCI and any of its subsidiaries each reserves > the right to monitor all e-mail communications through its networks. > > RNTBCI is neither liable for the proper, complete transmission of the > information contained in this communication nor any delay in its > receipt. This email was scanned for the presence of computer viruses. > In the unfortunate event of infection RNTBCI does not accept any > liability. > > Any views expressed in this message are those of the individual > sender, except where the message states otherwise and the sender is > authorised to state them. > *********************************************************************************************************** > > > > _______________________________________________ > 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: not available Type: image/gif Size: 2099 bytes Desc: not available URL: From stephane.mottelet at utc.fr Thu Mar 14 11:43:57 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Thu, 14 Mar 2013 11:43:57 +0100 Subject: [Scilab-users] Data Extraction Issue in Scilab In-Reply-To: <5141A423.7080308@utc.fr> References: <5141A423.7080308@utc.fr> Message-ID: <5141A9ED.4090201@utc.fr> There is an even simpler manner, allowing to create a struct type variable with all fields fd=mopen('engine.in','r'); s=mgetl(fd); mclose(fd); data=struct(); for i=1:size(s,1) w=strsplit(s(i),'/\s+/'); execstr(sprintf('data.%s=%s',w(2),w(1))); end -->data data = bore: 0.08 stroke: 0.08 squish: 0.001671 conrod: 0.14835 wrist: 0 rpm: 4000 swirl: 1.7 swirl_profile: 3.11 zhead: 0 pist_id: 1 liner_id: 4 head_id: 5 crevice_flag: 0 S. Le 14/03/13 11:19, St?phane Mottelet a ?crit : > > Hello, > > this small script solves your problem : > > fd=mopen('engine.in','r'); > s=mgetl(fd); > mclose(fd); > data1=[]; > for i=1:size(s,1) > w=strsplit(s(i),'/\s+/'); > for j=1:size(w,1) > data1(i,j)=w(j); > end > end > > [r,c]=find(data1=='bore'); > bore=eval(data1(r(1),c(1)-1)); > > Hope this helps, > > S. > > Le 14/03/13 05:16, Munian, Devaraj a ?crit : >> >> Dear Scilab Support, >> >> We here in RNTBCI are testing Scilab to compare it against Matlab. We >> are doing a pilot project to convert our script in Matlab to Scilab >> for validating purpose. >> >> If we are able to get the same result in Scilab compared with Matlab, >> we will be converting all our Matlab applications into Scilab >> applications. >> >> During our pilot project which is a most simplest project we are not >> able to proceed further because of issues mentioned in the ppt. >> >> I have also attached the data files and Matlab files for your reference. >> >> It will be really grateful if the issue is addressed at the earliest. >> >> Regards >> >> *Devaraj* | Assistant Manager | Tools and Methods | >> *RENAULT NISSAN TECHNOLOGY & BUSINESS CENTRE INDIA PRIVATE LIMITED >> *Ascendas IT Park, Mahindra World City SEZ | Plot # TP2/1, Natham Sub >> Post Office | >> 3^rd Floor | Chengelpattu | Kancheepuram District | Tamilnadu 603002 >> | India | >> Tel # | + 9144-67416303 | >> eMail | devaraj.munian at rntbci.com | >> >> cid:727344808 at 01032012-1EA6** >> >> ** >> >> *T**OGETHER**E**VERYBODY**A**CHIEVES**M**ORE* >> >> >> >> *********************************************************************************************************** >> CONFIDENTIALITY NOTICE >> >> This message is for the named person's use only. It may contain >> confidential, proprietary or legally privileged information. >> >> If you receive this message in error, please immediately delete it >> and all copies of it from your system, destroy any hard copies of it >> and notify us by email to email.security at rntbci.com with a copy of >> this message. You must not, directly or indirectly, use, disclose, >> distribute, print or copy any part of this message if you are not the >> intended recipient. RNTBCI and any of its subsidiaries each reserves >> the right to monitor all e-mail communications through its networks. >> >> RNTBCI is neither liable for the proper, complete transmission of the >> information contained in this communication nor any delay in its >> receipt. This email was scanned for the presence of computer viruses. >> In the unfortunate event of infection RNTBCI does not accept any >> liability. >> >> Any views expressed in this message are those of the individual >> sender, except where the message states otherwise and the sender is >> authorised to state them. >> *********************************************************************************************************** >> >> >> >> _______________________________________________ >> 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: not available Type: image/gif Size: 2099 bytes Desc: not available URL: From grivet at cnrs-orleans.fr Fri Mar 15 10:58:05 2013 From: grivet at cnrs-orleans.fr (grivet) Date: Fri, 15 Mar 2013 10:58:05 +0100 Subject: [Scilab-users] color under a curve In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106B6EE57@301EX00100.sidel.com> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> <51406AB4.2050908@centre-cired.fr> <51406B94.2060805@centre-cired.fr> <3B5FFC67498DFF49AE7271A584867D16F106B6EDC7@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F106B6EE57@301EX00100.sidel.com> Message-ID: <5142F0AD.2030703@cnrs-orleans.fr> Thank you Adrien and Christophe. The code provided by Christophe is specially simple and elegant, but assumes the function to be strictly positive. Filled areas are different when I change x to x = linspace(-2*%pi,2*%pi,100). For my purposes, it seems best to use xfpoly() for each region where the function has a constant sign. The drawback is that color choices are not as versatile as with plot(). JP Grivet From grivet at cnrs-orleans.fr Fri Mar 15 11:18:56 2013 From: grivet at cnrs-orleans.fr (grivet) Date: Fri, 15 Mar 2013 11:18:56 +0100 Subject: [Scilab-users] strange behavior of function xstring In-Reply-To: <5142F0AD.2030703@cnrs-orleans.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> <51406AB4.2050908@centre-cired.fr> <51406B94.2060805@centre-cired.fr> <3B5FFC67498DFF49AE7271A584867D16F106B6EDC7@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F106B6EE57@301EX00100.sidel.com> <5142F0AD.2030703@cnrs-orleans.fr> Message-ID: <5142F590.4080703@cnrs-orleans.fr> Hello, I have noticed the following strange behavior of function xstring. This piece of code works fine: clear; clf(); s = "A"; plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); xstring(0.5,0.5,s); This one does not (simplified exemple, no useful purpose): clear; clf(); function etiq(x,y) s = "A"; xstring(x,y,s}; endfunction plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); etiq(0.5,0.5); Scilab stops with error message xstring(x,y,s}; !--error 2 Facteur invalide. at line 3 of function etiq called by : What do I do wrong? JP Grivet From krotersv at gmail.com Fri Mar 15 11:22:07 2013 From: krotersv at gmail.com (=?UTF-8?B?0KHRgtCw0L3QuNGB0LvQsNCy?=) Date: Fri, 15 Mar 2013 16:22:07 +0600 Subject: [Scilab-users] strange behavior of function xstring In-Reply-To: <5142F590.4080703@cnrs-orleans.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> <51406AB4.2050908@centre-cired.fr> <51406B94.2060805@centre-cired.fr> <3B5FFC67498DFF49AE7271A584867D16F106B6EDC7@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F106B6EE57@301EX00100.sidel.com> <5142F0AD.2030703@cnrs-orleans.fr> <5142F590.4080703@cnrs-orleans.fr> Message-ID: <5142F64F.8040600@gmail.com> 15.03.2013 16:18, grivet ?????: > Hello, > I have noticed the following strange behavior of function xstring. > > This piece of code works fine: > > clear; clf(); > s = "A"; > plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); > xstring(0.5,0.5,s); > > This one does not (simplified exemple, no useful purpose): > > clear; clf(); > function etiq(x,y) > s = "A"; > xstring(x,y,s}; > endfunction > plot2d(0,0,-1,"010"," ",[-2,-2,2,2]); > etiq(0.5,0.5); > > Scilab stops with error message > > xstring(x,y,s}; > !--error 2 > Facteur invalide. > at line 3 of function etiq called by : > > What do I do wrong? > JP Grivet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users Hi. Pay attention to brace! xstring(x,y,s} Stanislav From Christophe.Dang at sidel.com Fri Mar 15 13:26:56 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 15 Mar 2013 13:26:56 +0100 Subject: [Scilab-users] color under a curve In-Reply-To: <5142F0AD.2030703@cnrs-orleans.fr> References: <31874_1361555206_5127AF06_31874_5041_1_908CBC9017354841B2F32BBEC70A05A101C38A48302A@THSONEA01CMS01P.one.grp> <5127D12B.7020005@free.fr> <31648_1361580864_51281340_31648_3899_1_908CBC9017354841B2F32BBEC70A05A101C38A4830DA@THSONEA01CMS01P.one.grp> <5128BFD2.2010807@free.fr> <30467_1361695948_5129D4CC_30467_6045_1_908CBC9017354841B2F32BBEC70A05A101C38A48319A@THSONEA01CMS01P.one.grp> <5130B17A.8080207@cnrs-orleans.fr> <5130C2AB.7000903@inria.fr> <5130C872.4020105@cnrs-orleans.fr> <3B5FFC67498DFF49AE7271A584867D16F1069DF152@301EX00100.sidel.com> <51404E10.8010005@cnrs-orleans.fr> <51406AB4.2050908@centre-cired.fr> <51406B94.2060805@centre-cired.fr> <3B5FFC67498DFF49AE7271A584867D16F106B6EDC7@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F106B6EE57@301EX00100.sidel.com> <5142F0AD.2030703@cnrs-orleans.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106C0B603@301EX00100.sidel.com> Hello, De la part de grivet Envoy? : vendredi 15 mars 2013 10:58 > For my purposes, it seems best to use xfpoly() > for each region where the function has a constant sign. You can also perform several plot(), one for each region. > The drawback is that color choices are not as versatile > as with plot(). It is. All the colours of a colourmap are available. You should have a look at the help for colormap, color and getcolor http://help.scilab.org/docs/5.4.0/en_US/colormap.html -- 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 krotersv at gmail.com Fri Mar 15 16:29:01 2013 From: krotersv at gmail.com (Stanislav) Date: Fri, 15 Mar 2013 08:29:01 -0700 (PDT) Subject: [Scilab-users] message subwindow: how to change the font size? Message-ID: <1363361341273-4026262.post@n3.nabble.com> Hi. On GNU/Linux the font size of text in the message subwindow looks good. But on Windows XP it looks too small. How to enlarge it? Stanislav -- View this message in context: http://mailinglists.scilab.org/message-subwindow-how-to-change-the-font-size-tp4026262.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From porpoiseseeker at gmail.com Sun Mar 17 00:58:28 2013 From: porpoiseseeker at gmail.com (Gary Nelson) Date: Sat, 16 Mar 2013 16:58:28 -0700 Subject: [Scilab-users] Attempting to restart with 5.4.0 Message-ID: <38DE15D7-5C28-4A8C-A998-5E82599A5357@gmail.com> Greetings I did a fair amount of work with scilab in 2010 and am now attempting to restart with not much success. Some time ago, I updated to 5.4.0 and did not use it. Now, when I do a FILE/Open a file/filename nothing happens. Yesterday, that same action loaded the script into a separate window which is now absent and I can't find any action that opens it. Your guidance will be greatly appreciated Gary Nelson porpoiseseeker at gmail.com From signaloc at gmail.com Sun Mar 17 20:23:40 2013 From: signaloc at gmail.com (Modestas Bunokas) Date: Sun, 17 Mar 2013 21:23:40 +0200 Subject: [Scilab-users] Regarding simple numerical operations result display. Message-ID: If someone will find 2 min of free time, I would be very grateful. I'm somehow getting weird result doing simple operation like: a=7; b=100; x=[-2:1:2]; y=(5*x)-1;if y>a then disp(b); else disp(y);end --> - 11. - 6. - 1. 4. 9. Last result (9) is wrong, it should be 100 (b). I fully understand that it's because of lack of my knowledge in programming but in few days I could not solve or even could not find any help. Because of that writing here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Sun Mar 17 20:35:44 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Sun, 17 Mar 2013 20:35:44 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: References: Message-ID: <51461B10.8070506@durietz.se> -->y=(5*x)-1 y = - 11. - 6. - 1. 4. 9. -->y>a ans = F F F F T This is F (the first element) /Stefan On 2013-03-17 20:23, Modestas Bunokas wrote: -------------------- > If someone will find 2 min of free time, I would be very grateful. I'm > somehow getting weird result doing simple operation like: > > a=7; b=100; x=[-2:1:2]; y=(5*x)-1; > if y>a then disp(b); > else disp(y); > end > > --> - 11. - 6. - 1. 4. 9. > > Last result (9) is wrong, it should be 100 (b). I fully understand > that it's because of lack of my knowledge in programming but in few > days I could not solve or even could not find any help. Because of > that writing here. > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sun Mar 17 20:46:53 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Sun, 17 Mar 2013 20:46:53 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51461B10.8070506@durietz.se> References: <51461B10.8070506@durietz.se> Message-ID: <51461DAD.3050204@durietz.se> Sorry, I should have written (?): A multi-element logical array is true (T) only if all elements are T. -->and(y>a) ans = F /Stefan On 2013-03-17 20:35, Stefan Du Rietz wrote: -------------------- > -->y=(5*x)-1 > y = > - 11. - 6. - 1. 4. 9. > > -->y>a > ans = > F F F F T > > This is F (the first element) > > /Stefan > > > On 2013-03-17 20:23, Modestas Bunokas wrote: > -------------------- >> If someone will find 2 min of free time, I would be very grateful. I'm >> somehow getting weird result doing simple operation like: >> >> a=7; b=100; x=[-2:1:2]; y=(5*x)-1; >> if y>a then disp(b); >> else disp(y); >> end >> >> --> - 11. - 6. - 1. 4. 9. >> >> Last result (9) is wrong, it should be 100 (b). I fully understand >> that it's because of lack of my knowledge in programming but in few >> days I could not solve or even could not find any help. Because of >> that writing here. >> >> >> _______________________________________________ >> 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 sdr at durietz.se Sun Mar 17 22:05:01 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Sun, 17 Mar 2013 22:05:01 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51461DAD.3050204@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> Message-ID: <51462FFD.8010107@durietz.se> Maybe one of the last two of these four loops was what you wanted: -->bool2s(y>a) ans = 0. 0. 0. 0. 1. -->for k=bool2s(y>a), if k, disp(b), else, disp(y), end, end - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. 100. -->for k=y, if k>a, disp(b), else, disp(y), end, end - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. 100. Here, k takes the value of each element in y: -->for k=y, if k>a, disp(b), else, disp(k), end, end - 11. - 6. - 1. 4. 100. Or maybe this is easier to follow: -->for k=1:length(y), if y(k)>a, disp(b), else, disp(y(k)), end, end - 11. - 6. - 1. 4. 100. /Stefan On 2013-03-17 20:46, Stefan Du Rietz wrote: -------------------- > Sorry, > I should have written (?): > > A multi-element logical array is true (T) only if all elements are T. > -->and(y>a) > ans = > F > > /Stefan > > On 2013-03-17 20:35, Stefan Du Rietz wrote: > -------------------- >> -->y=(5*x)-1 >> y = >> - 11. - 6. - 1. 4. 9. >> >> -->y>a >> ans = >> F F F F T >> >> This is F (the first element) >> >> /Stefan >> >> >> On 2013-03-17 20:23, Modestas Bunokas wrote: >> -------------------- >>> If someone will find 2 min of free time, I would be very grateful. I'm >>> somehow getting weird result doing simple operation like: >>> >>> a=7; b=100; x=[-2:1:2]; y=(5*x)-1; >>> if y>a then disp(b); >>> else disp(y); >>> end >>> >>> --> - 11. - 6. - 1. 4. 9. >>> >>> Last result (9) is wrong, it should be 100 (b). I fully understand >>> that it's because of lack of my knowledge in programming but in few >>> days I could not solve or even could not find any help. Because of >>> that writing here. >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sun Mar 17 22:24:40 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Sun, 17 Mar 2013 22:24:40 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51462FFD.8010107@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> Message-ID: <51463498.9040200@durietz.se> But this is the ultimate solution without a loop: -->bool2s(y>a) .* b + bool2s(~y>a) .* y ans = - 11. - 6. - 1. 4. 100. /Stefan On 2013-03-17 22:05, Stefan Du Rietz wrote: -------------------- > Maybe one of the last two of these four loops was what you wanted: > > -->bool2s(y>a) > ans = > 0. 0. 0. 0. 1. > > -->for k=bool2s(y>a), if k, disp(b), else, disp(y), end, end > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > 100. > > -->for k=y, if k>a, disp(b), else, disp(y), end, end > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > 100. > > Here, k takes the value of each element in y: > > -->for k=y, if k>a, disp(b), else, disp(k), end, end > - 11. > - 6. > - 1. > 4. > 100. > > Or maybe this is easier to follow: > > -->for k=1:length(y), if y(k)>a, disp(b), else, disp(y(k)), end, end > - 11. > - 6. > - 1. > 4. > 100. > > /Stefan > > On 2013-03-17 20:46, Stefan Du Rietz wrote: > -------------------- >> Sorry, >> I should have written (?): >> >> A multi-element logical array is true (T) only if all elements are T. >> -->and(y>a) >> ans = >> F >> >> /Stefan >> >> On 2013-03-17 20:35, Stefan Du Rietz wrote: >> -------------------- >>> -->y=(5*x)-1 >>> y = >>> - 11. - 6. - 1. 4. 9. >>> >>> -->y>a >>> ans = >>> F F F F T >>> >>> This is F (the first element) >>> >>> /Stefan >>> >>> >>> On 2013-03-17 20:23, Modestas Bunokas wrote: >>> -------------------- >>>> If someone will find 2 min of free time, I would be very grateful. >>>> I'm >>>> somehow getting weird result doing simple operation like: >>>> >>>> a=7; b=100; x=[-2:1:2]; y=(5*x)-1; >>>> if y>a then disp(b); >>>> else disp(y); >>>> end >>>> >>>> --> - 11. - 6. - 1. 4. 9. >>>> >>>> Last result (9) is wrong, it should be 100 (b). I fully understand >>>> that it's because of lack of my knowledge in programming but in few >>>> days I could not solve or even could not find any help. Because of >>>> that writing here. >>>> >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From jrafaelbguerra at hotmail.com Sun Mar 17 22:39:35 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 17 Mar 2013 18:39:35 -0300 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51462FFD.8010107@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> Message-ID: Hi, The last 'for' loop provided by Stefan is the "correct" simple way of implementing the basic task requested. Just for fun, the same result can be obtained by using a single boolean math command: --> bool2s(y<=a).*(y-b) + b ans = - 11. - 6. - 1. 4. 100. Rgds Rafael -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of Stefan Du Rietz Sent: Sunday, March 17, 2013 6:05 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Regarding simple numerical operations result display. Maybe one of the last two of these four loops was what you wanted: -->bool2s(y>a) ans = 0. 0. 0. 0. 1. -->for k=bool2s(y>a), if k, disp(b), else, disp(y), end, end - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. 100. -->for k=y, if k>a, disp(b), else, disp(y), end, end - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. - 11. - 6. - 1. 4. 9. 100. Here, k takes the value of each element in y: -->for k=y, if k>a, disp(b), else, disp(k), end, end - 11. - 6. - 1. 4. 100. Or maybe this is easier to follow: -->for k=1:length(y), if y(k)>a, disp(b), else, disp(y(k)), end, end - 11. - 6. - 1. 4. 100. /Stefan On 2013-03-17 20:46, Stefan Du Rietz wrote: -------------------- > Sorry, > I should have written (?): > > A multi-element logical array is true (T) only if all elements are T. > -->and(y>a) > ans = > F > > /Stefan > > On 2013-03-17 20:35, Stefan Du Rietz wrote: > -------------------- >> -->y=(5*x)-1 >> y = >> - 11. - 6. - 1. 4. 9. >> >> -->y>a >> ans = >> F F F F T >> >> This is F (the first element) >> >> /Stefan >> >> >> On 2013-03-17 20:23, Modestas Bunokas wrote: >> -------------------- >>> If someone will find 2 min of free time, I would be very grateful. >>> I'm somehow getting weird result doing simple operation like: >>> >>> a=7; b=100; x=[-2:1:2]; y=(5*x)-1; if y>a then disp(b); >>> else disp(y); >>> end >>> >>> --> - 11. - 6. - 1. 4. 9. >>> >>> Last result (9) is wrong, it should be 100 (b). I fully understand >>> that it's because of lack of my knowledge in programming but in few >>> days I could not solve or even could not find any help. Because of >>> that writing here. >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From berns.buenaobra at gmail.com Mon Mar 18 01:25:42 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Mon, 18 Mar 2013 08:25:42 +0800 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51463498.9040200@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> Message-ID: Hi Stefan: Maybe I should like to get some insight how to do this. What I have is two columns (or 2 column vectors) and they need to go in pairs say magnitude y and a position in x say P(x,y). Now what I wanted is to be able to detect peaks from a set threshold value - I would like to keep 10 values above it in memory and discard the rest. I I repeat the same action until I only get the highest of all these column vector magnitudes at the last threshold value. There is a uniform delta for each of the threshold value I use going from bottom up. Problem: I can detect the peaks alright but how does one ensure that it sticks to its position pair? Since indexing the magnitude seemed to a sequential location in memory and not its position? Thanks for any help. Regards, Berns B. USC Physics On Mon, Mar 18, 2013 at 5:24 AM, Stefan Du Rietz wrote: > But this is the ultimate solution without a loop: > > -->bool2s(y>a) .* b + bool2s(~y>a) .* y > ans = > - 11. - 6. - 1. 4. 100. > > /Stefan > > > On 2013-03-17 22:05, Stefan Du Rietz wrote: > -------------------- > >> Maybe one of the last two of these four loops was what you wanted: >> >> -->bool2s(y>a) >> ans = >> 0. 0. 0. 0. 1. >> >> -->for k=bool2s(y>a), if k, disp(b), else, disp(y), end, end >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> 100. >> >> -->for k=y, if k>a, disp(b), else, disp(y), end, end >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> 100. >> >> Here, k takes the value of each element in y: >> >> -->for k=y, if k>a, disp(b), else, disp(k), end, end >> - 11. >> - 6. >> - 1. >> 4. >> 100. >> >> Or maybe this is easier to follow: >> >> -->for k=1:length(y), if y(k)>a, disp(b), else, disp(y(k)), end, end >> - 11. >> - 6. >> - 1. >> 4. >> 100. >> >> /Stefan >> >> On 2013-03-17 20:46, Stefan Du Rietz wrote: >> -------------------- >> >>> Sorry, >>> I should have written (?): >>> >>> A multi-element logical array is true (T) only if all elements are T. >>> -->and(y>a) >>> ans = >>> F >>> >>> /Stefan >>> >>> On 2013-03-17 20:35, Stefan Du Rietz wrote: >>> -------------------- >>> >>>> -->y=(5*x)-1 >>>> y = >>>> - 11. - 6. - 1. 4. 9. >>>> >>>> -->y>a >>>> ans = >>>> F F F F T >>>> >>>> This is F (the first element) >>>> >>>> /Stefan >>>> >>>> >>>> On 2013-03-17 20:23, Modestas Bunokas wrote: >>>> -------------------- >>>> >>>>> If someone will find 2 min of free time, I would be very grateful. >>>>> I'm >>>>> somehow getting weird result doing simple operation like: >>>>> >>>>> a=7; b=100; x=[-2:1:2]; y=(5*x)-1; >>>>> if y>a then disp(b); >>>>> else disp(y); >>>>> end >>>>> >>>>> --> - 11. - 6. - 1. 4. 9. >>>>> >>>>> Last result (9) is wrong, it should be 100 (b). I fully understand >>>>> that it's because of lack of my knowledge in programming but in few >>>>> days I could not solve or even could not find any help. Because of >>>>> that writing here. >>>>> >>>>> >>>>> ______________________________**_________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/**mailman/listinfo/users >>>>> >>>>> >>>> ______________________________**_________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/**mailman/listinfo/users >>>> >>>> >>> ______________________________**_________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/**mailman/listinfo/users >>> >>> >> ______________________________**_________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/**mailman/listinfo/users >> >> > ______________________________**_________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/**mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From signaloc at gmail.com Mon Mar 18 07:54:24 2013 From: signaloc at gmail.com (Modestas Bunokas) Date: Sun, 17 Mar 2013 23:54:24 -0700 (PDT) Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> Message-ID: <1363589664797-4026281.post@n3.nabble.com> Stefan and Berns, thank you for your kind help, as it was really ultimate solution in one single line. If for real did not expected so much help here. Thank you again, -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regarding-simple-numerical-operations-result-display-tp4026274p4026281.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sdr at durietz.se Mon Mar 18 13:09:05 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 18 Mar 2013 13:09:05 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> Message-ID: <514703E1.9040004@durietz.se> Hi Berns, I am not sure if I understand exactly what you mean. Perhaps something like this simplified example (to keep the 5 pairs with the largest y-values)? x = (1:10)'; y = [1:5; 6:10]; y = y(:); data = [x, y]; th = 1:10; // threshold values data // display the original data for k=1:length(th) index = data(:, 2) > th(k); if sum(index) < 5 // too few data values left break end data = data(index, :) // display this result end Output from the run: data = 1. 1. 2. 6. 3. 2. 4. 7. 5. 3. 6. 8. 7. 4. 8. 9. 9. 5. 10. 10. data = 2. 6. 3. 2. 4. 7. 5. 3. 6. 8. 7. 4. 8. 9. 9. 5. 10. 10. data = 2. 6. 4. 7. 5. 3. 6. 8. 7. 4. 8. 9. 9. 5. 10. 10. data = 2. 6. 4. 7. 6. 8. 7. 4. 8. 9. 9. 5. 10. 10. data = 2. 6. 4. 7. 6. 8. 8. 9. 9. 5. 10. 10. data = 2. 6. 4. 7. 6. 8. 8. 9. 10. 10. Regards Stefan On 2013-03-18 01:25, Berns Buenaobra wrote: -------------------- > Hi Stefan: > > Maybe I should like to get some insight how to do this. > > What I have is two columns (or 2 column vectors) and they need to go > in pairs say magnitude y and a position in x say P(x,y). Now what I > wanted is to be able to detect peaks from a set threshold value - I > would like to keep 10 values above it in memory and discard the rest. > I I repeat the same action until I only get the highest of all these > column vector magnitudes at the last threshold value. There is a > uniform delta for each of the threshold value I use going from bottom up. > > Problem: I can detect the peaks alright but how does one ensure that > it sticks to its position pair? Since indexing the magnitude seemed to > a sequential location in memory and not its position? > > Thanks for any help. > > Regards, > Berns B. > USC Physics > > > > > On Mon, Mar 18, 2013 at 5:24 AM, Stefan Du Rietz > wrote: > > But this is the ultimate solution without a loop: > > -->bool2s(y>a) .* b + bool2s(~y>a) .* y > ans = > - 11. - 6. - 1. 4. 100. > > /Stefan > > > On 2013-03-17 22:05, Stefan Du Rietz wrote: > -------------------- > > Maybe one of the last two of these four loops was what you wanted: > > -->bool2s(y>a) > ans = > 0. 0. 0. 0. 1. > > -->for k=bool2s(y>a), if k, disp(b), else, disp(y), end, end > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > 100. > > -->for k=y, if k>a, disp(b), else, disp(y), end, end > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > - 11. - 6. - 1. 4. 9. > 100. > > Here, k takes the value of each element in y: > > -->for k=y, if k>a, disp(b), else, disp(k), end, end > - 11. > - 6. > - 1. > 4. > 100. > > Or maybe this is easier to follow: > > -->for k=1:length(y), if y(k)>a, disp(b), else, disp(y(k)), > end, end > - 11. > - 6. > - 1. > 4. > 100. > > /Stefan > > On 2013-03-17 20:46, Stefan Du Rietz wrote: > -------------------- > > Sorry, > I should have written (?): > > A multi-element logical array is true (T) only if all > elements are T. > -->and(y>a) > ans = > F > > /Stefan > > On 2013-03-17 20:35, Stefan Du Rietz wrote: > -------------------- > > -->y=(5*x)-1 > y = > - 11. - 6. - 1. 4. 9. > > -->y>a > ans = > F F F F T > > This is F (the first element) > > /Stefan > > > On 2013-03-17 20:23, Modestas Bunokas wrote: > -------------------- > > If someone will find 2 min of free time, I would > be very grateful. > I'm > somehow getting weird result doing simple > operation like: > > a=7; b=100; x=[-2:1:2]; y=(5*x)-1; > if y>a then disp(b); > else disp(y); > end > > --> - 11. - 6. - 1. 4. 9. > > Last result (9) is wrong, it should be 100 (b). I > fully understand > that it's because of lack of my knowledge in > programming but in few > days I could not solve or even could not find any > help. Because of > that writing here. > > > _________________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/__mailman/listinfo/users > > > > _________________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/__mailman/listinfo/users > > > > _________________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/__mailman/listinfo/users > > > > _________________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/__mailman/listinfo/users > > > > _________________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/__mailman/listinfo/users > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From simon.mayr at gmail.com Mon Mar 18 17:07:08 2013 From: simon.mayr at gmail.com (simi99) Date: Mon, 18 Mar 2013 09:07:08 -0700 (PDT) Subject: [Scilab-users] Problem with Scilab 5.4.0 x64 and Coselica Toolbox Message-ID: <1363622828728-4026283.post@n3.nabble.com> Hello Everybody! I want to build a boost converter in xcos, using the coselica toolbox. 1) Win7 x64, Scilab 5.4.0 x86, Coselica 0.5.2 : No problem to simulate the boost converter displayed above. 2) Win7 x64, Scilab 5.4.0 x64, Coselica 0.5.2 : Trying to simulate the boost converter above leads to the following error message: Replacing the transistor with a ideal opening switch solves the problem. Thanks for help in advance! Simon -- View this message in context: http://mailinglists.scilab.org/Problem-with-Scilab-5-4-0-x64-and-Coselica-Toolbox-tp4026283.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sdr at durietz.se Mon Mar 18 17:23:11 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 18 Mar 2013 17:23:11 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <514703E1.9040004@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> Message-ID: <51473F6F.6000008@durietz.se> But as usual there is a better (faster, simpler) solution without a loop! // sort in reverse order and get indices [ysort, k] = gsort(data(:, 2)); // take indices of the 5 largest values k = k(1:5); // keep those data data = [data(k, :)]; Regards Stefan On 2013-03-18 13:09, Stefan Du Rietz wrote: -------------------- > Hi Berns, > I am not sure if I understand exactly what you mean. > > Perhaps something like this simplified example (to keep the 5 pairs > with the largest y-values)? > > x = (1:10)'; > y = [1:5; 6:10]; y = y(:); > data = [x, y]; > th = 1:10; // threshold values > > data // display the original data > for k=1:length(th) > index = data(:, 2) > th(k); > if sum(index) < 5 // too few data values left > break > end > data = data(index, :) // display this result > end > > Output from the run: > data = > 1. 1. > 2. 6. > 3. 2. > 4. 7. > 5. 3. > 6. 8. > 7. 4. > 8. 9. > 9. 5. > 10. 10. > data = > 2. 6. > 3. 2. > 4. 7. > 5. 3. > 6. 8. > 7. 4. > 8. 9. > 9. 5. > 10. 10. > data = > 2. 6. > 4. 7. > 5. 3. > 6. 8. > 7. 4. > 8. 9. > 9. 5. > 10. 10. > data = > 2. 6. > 4. 7. > 6. 8. > 7. 4. > 8. 9. > 9. 5. > 10. 10. > data = > 2. 6. > 4. 7. > 6. 8. > 8. 9. > 9. 5. > 10. 10. > data = > 2. 6. > 4. 7. > 6. 8. > 8. 9. > 10. 10. > > Regards > Stefan > > > On 2013-03-18 01:25, Berns Buenaobra wrote: > -------------------- >> Hi Stefan: >> >> Maybe I should like to get some insight how to do this. >> >> What I have is two columns (or 2 column vectors) and they need to go >> in pairs say magnitude y and a position in x say P(x,y). Now what I >> wanted is to be able to detect peaks from a set threshold value - I >> would like to keep 10 values above it in memory and discard the rest. >> I I repeat the same action until I only get the highest of all these >> column vector magnitudes at the last threshold value. There is a >> uniform delta for each of the threshold value I use going from >> bottom up. >> >> Problem: I can detect the peaks alright but how does one ensure that >> it sticks to its position pair? Since indexing the magnitude seemed to >> a sequential location in memory and not its position? >> >> Thanks for any help. >> >> Regards, >> Berns B. >> USC Physics >> >> >> >> >> On Mon, Mar 18, 2013 at 5:24 AM, Stefan Du Rietz > > wrote: >> >> But this is the ultimate solution without a loop: >> >> -->bool2s(y>a) .* b + bool2s(~y>a) .* y >> ans = >> - 11. - 6. - 1. 4. 100. >> >> /Stefan >> >> >> On 2013-03-17 22:05, Stefan Du Rietz wrote: >> -------------------- >> >> Maybe one of the last two of these four loops was what you >> wanted: >> >> -->bool2s(y>a) >> ans = >> 0. 0. 0. 0. 1. >> >> -->for k=bool2s(y>a), if k, disp(b), else, disp(y), end, end >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> 100. >> >> -->for k=y, if k>a, disp(b), else, disp(y), end, end >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> - 11. - 6. - 1. 4. 9. >> 100. >> >> Here, k takes the value of each element in y: >> >> -->for k=y, if k>a, disp(b), else, disp(k), end, end >> - 11. >> - 6. >> - 1. >> 4. >> 100. >> >> Or maybe this is easier to follow: >> >> -->for k=1:length(y), if y(k)>a, disp(b), else, disp(y(k)), >> end, end >> - 11. >> - 6. >> - 1. >> 4. >> 100. >> >> /Stefan >> >> On 2013-03-17 20:46, Stefan Du Rietz wrote: >> -------------------- >> >> Sorry, >> I should have written (?): >> >> A multi-element logical array is true (T) only if all >> elements are T. >> -->and(y>a) >> ans = >> F >> >> /Stefan >> >> On 2013-03-17 20:35, Stefan Du Rietz wrote: >> -------------------- >> >> -->y=(5*x)-1 >> y = >> - 11. - 6. - 1. 4. 9. >> >> -->y>a >> ans = >> F F F F T >> >> This is F (the first element) >> >> /Stefan >> >> >> On 2013-03-17 20:23, Modestas Bunokas wrote: >> -------------------- >> >> If someone will find 2 min of free time, I would >> be very grateful. >> I'm >> somehow getting weird result doing simple >> operation like: >> >> a=7; b=100; x=[-2:1:2]; y=(5*x)-1; >> if y>a then disp(b); >> else disp(y); >> end >> >> --> - 11. - 6. - 1. 4. 9. >> >> Last result (9) is wrong, it should be 100 (b). I >> fully understand >> that it's because of lack of my knowledge in >> programming but in few >> days I could not solve or even could not find any >> help. Because of >> that writing here. >> >> >> _________________________________________________ >> users mailing list >> users at lists.scilab.org >> >> http://lists.scilab.org/__mailman/listinfo/users >> >> >> >> _________________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/__mailman/listinfo/users >> >> >> >> _________________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/__mailman/listinfo/users >> >> >> >> _________________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/__mailman/listinfo/users >> >> >> >> _________________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/__mailman/listinfo/users >> >> >> >> >> >> _______________________________________________ >> 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 berns.buenaobra at gmail.com Tue Mar 19 04:17:50 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Tue, 19 Mar 2013 11:17:50 +0800 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51473F6F.6000008@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> Message-ID: Outstanding! Thanks Stefan, Berns B. On Tue, Mar 19, 2013 at 12:23 AM, Stefan Du Rietz wrote: > But as usual there is a better (faster, simpler) solution without a loop! > > // sort in reverse order and get indices > [ysort, k] = gsort(data(:, 2)); > // take indices of the 5 largest values > k = k(1:5); > // keep those data > data = [data(k, :)]; > > Regards > Stefan > > > > On 2013-03-18 13:09, Stefan Du Rietz wrote: > -------------------- > >> Hi Berns, >> I am not sure if I understand exactly what you mean. >> >> Perhaps something like this simplified example (to keep the 5 pairs >> with the largest y-values)? >> >> x = (1:10)'; >> y = [1:5; 6:10]; y = y(:); >> data = [x, y]; >> th = 1:10; // threshold values >> >> data // display the original data >> for k=1:length(th) >> index = data(:, 2) > th(k); >> if sum(index) < 5 // too few data values left >> break >> end >> data = data(index, :) // display this result >> end >> >> Output from the run: >> data = >> 1. 1. >> 2. 6. >> 3. 2. >> 4. 7. >> 5. 3. >> 6. 8. >> 7. 4. >> 8. 9. >> 9. 5. >> 10. 10. >> data = >> 2. 6. >> 3. 2. >> 4. 7. >> 5. 3. >> 6. 8. >> 7. 4. >> 8. 9. >> 9. 5. >> 10. 10. >> data = >> 2. 6. >> 4. 7. >> 5. 3. >> 6. 8. >> 7. 4. >> 8. 9. >> 9. 5. >> 10. 10. >> data = >> 2. 6. >> 4. 7. >> 6. 8. >> 7. 4. >> 8. 9. >> 9. 5. >> 10. 10. >> data = >> 2. 6. >> 4. 7. >> 6. 8. >> 8. 9. >> 9. 5. >> 10. 10. >> data = >> 2. 6. >> 4. 7. >> 6. 8. >> 8. 9. >> 10. 10. >> >> Regards >> Stefan >> >> >> On 2013-03-18 01:25, Berns Buenaobra wrote: >> -------------------- >> >>> Hi Stefan: >>> >>> Maybe I should like to get some insight how to do this. >>> >>> What I have is two columns (or 2 column vectors) and they need to go >>> in pairs say magnitude y and a position in x say P(x,y). Now what I >>> wanted is to be able to detect peaks from a set threshold value - I >>> would like to keep 10 values above it in memory and discard the rest. >>> I I repeat the same action until I only get the highest of all these >>> column vector magnitudes at the last threshold value. There is a >>> uniform delta for each of the threshold value I use going from >>> bottom up. >>> >>> Problem: I can detect the peaks alright but how does one ensure that >>> it sticks to its position pair? Since indexing the magnitude seemed to >>> a sequential location in memory and not its position? >>> >>> Thanks for any help. >>> >>> Regards, >>> Berns B. >>> USC Physics >>> >>> >>> >>> >>> On Mon, Mar 18, 2013 at 5:24 AM, Stefan Du Rietz >> > wrote: >>> >>> But this is the ultimate solution without a loop: >>> >>> -->bool2s(y>a) .* b + bool2s(~y>a) .* y >>> ans = >>> - 11. - 6. - 1. 4. 100. >>> >>> /Stefan >>> >>> >>> On 2013-03-17 22:05, Stefan Du Rietz wrote: >>> -------------------- >>> >>> Maybe one of the last two of these four loops was what you >>> wanted: >>> >>> -->bool2s(y>a) >>> ans = >>> 0. 0. 0. 0. 1. >>> >>> -->for k=bool2s(y>a), if k, disp(b), else, disp(y), end, end >>> - 11. - 6. - 1. 4. 9. >>> - 11. - 6. - 1. 4. 9. >>> - 11. - 6. - 1. 4. 9. >>> - 11. - 6. - 1. 4. 9. >>> 100. >>> >>> -->for k=y, if k>a, disp(b), else, disp(y), end, end >>> - 11. - 6. - 1. 4. 9. >>> - 11. - 6. - 1. 4. 9. >>> - 11. - 6. - 1. 4. 9. >>> - 11. - 6. - 1. 4. 9. >>> 100. >>> >>> Here, k takes the value of each element in y: >>> >>> -->for k=y, if k>a, disp(b), else, disp(k), end, end >>> - 11. >>> - 6. >>> - 1. >>> 4. >>> 100. >>> >>> Or maybe this is easier to follow: >>> >>> -->for k=1:length(y), if y(k)>a, disp(b), else, disp(y(k)), >>> end, end >>> - 11. >>> - 6. >>> - 1. >>> 4. >>> 100. >>> >>> /Stefan >>> >>> On 2013-03-17 20:46, Stefan Du Rietz wrote: >>> -------------------- >>> >>> Sorry, >>> I should have written (?): >>> >>> A multi-element logical array is true (T) only if all >>> elements are T. >>> -->and(y>a) >>> ans = >>> F >>> >>> /Stefan >>> >>> On 2013-03-17 20:35, Stefan Du Rietz wrote: >>> -------------------- >>> >>> -->y=(5*x)-1 >>> y = >>> - 11. - 6. - 1. 4. 9. >>> >>> -->y>a >>> ans = >>> F F F F T >>> >>> This is F (the first element) >>> >>> /Stefan >>> >>> >>> On 2013-03-17 20:23, Modestas Bunokas wrote: >>> -------------------- >>> >>> If someone will find 2 min of free time, I would >>> be very grateful. >>> I'm >>> somehow getting weird result doing simple >>> operation like: >>> >>> a=7; b=100; x=[-2:1:2]; y=(5*x)-1; >>> if y>a then disp(b); >>> else disp(y); >>> end >>> >>> --> - 11. - 6. - 1. 4. 9. >>> >>> Last result (9) is wrong, it should be 100 (b). I >>> fully understand >>> that it's because of lack of my knowledge in >>> programming but in few >>> days I could not solve or even could not find any >>> help. Because of >>> that writing here. >>> >>> >>> ______________________________**___________________ >>> users mailing list >>> users at lists.scilab.org >>> >>> http://lists.scilab.org/__**mailman/listinfo/users >>> >>> > >>> >>> >>> ______________________________**___________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/__**mailman/listinfo/users >>> >>> > >>> >>> >>> ______________________________**___________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/__**mailman/listinfo/users >>> >>> > >>> >>> >>> ______________________________**___________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/__**mailman/listinfo/users >>> >>> > >>> >>> >>> ______________________________**___________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/__**mailman/listinfo/users >>> >>> > >>> >>> >>> >>> >>> ______________________________**_________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/**mailman/listinfo/users >>> >>> >> ______________________________**_________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/**mailman/listinfo/users >> >> > ______________________________**_________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/**mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tvitklg at rambler.ru Tue Mar 19 08:05:44 2013 From: tvitklg at rambler.ru (TViT) Date: Tue, 19 Mar 2013 00:05:44 -0700 (PDT) Subject: [Scilab-users] Computing Performance and debugging in Scilab. Message-ID: <1363676744020-4026287.post@n3.nabble.com> 1) Say to me please, as in Scilab to see quantity(amount) of operations of add mul and others operations which the function calculates. For example how assembler listing or logs can Scilab create? It is necessary to understand speed of algorithm and through what functions it is possible to increase speed. Can there is for this purpose a function - counter, to call it before performance of tested algorithm and after and to compare value of the counter of commands it is possible so to make in Scilab? 2) How to debug my algorithms it is possible to see on lines to watch(keep up) on steps calculations which the function carries out. It for understanding where a mistake and how much actions are made at calculation. -- View this message in context: http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab-tp4026287.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From berns.buenaobra at gmail.com Tue Mar 19 08:51:18 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Tue, 19 Mar 2013 15:51:18 +0800 Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: <1363676744020-4026287.post@n3.nabble.com> References: <1363676744020-4026287.post@n3.nabble.com> Message-ID: Hello TVit: This seemed to me almost saying we reverse engineer the code? I do no know if the Open Source agreement will even allow it. Decompiling it surely will bring you to this level of detail but whats the rationale? You could do time profile your routines like in the olden days where you can out CPU clocks like a software a stop watch. Perhaps that should be better - however, I don't know of any way of code profiling functions in Scilab right now? I think the developer are looking more and more on high level development and its always better - decoupled, object oriented, parallel, polymorphic etc. This is my personal point view of it. Regards, Berns B. USC Physics On Tue, Mar 19, 2013 at 3:05 PM, TViT wrote: > 1) Say to me please, as in Scilab to see quantity(amount) of operations of > add mul and others operations which the function calculates. For example > how > assembler listing or logs can Scilab create? > > It is necessary to understand speed of algorithm and through what functions > it is possible to increase speed. > > Can there is for this purpose a function - counter, to call it before > performance of tested algorithm and after and to compare value of the > counter of commands it is possible so to make in Scilab? > > 2) How to debug my algorithms it is possible to see on lines to watch(keep > up) on steps calculations which the function carries out. It for > understanding where a mistake and how much actions are made at calculation. > > > > -- > View this message in context: > http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab-tp4026287.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnelson.zynrgy at gmail.com Sun Mar 17 00:23:54 2013 From: gnelson.zynrgy at gmail.com (Gary Nelson) Date: Sat, 16 Mar 2013 16:23:54 -0700 Subject: [Scilab-users] Restart with 5.4.0 Message-ID: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> Greetings I did a fair amount of work with scilab in 2010 and am now attempting to restart with not much success. Some time ago, I updated to 5.4.0 and did not use it. Now, when I do a FILE/Open a file/filename nothing happens. Yesterday, that same action loaded the script into a separate window which is now absent and I can't find any action that opens it. Your guidance will be greatly appreciated Gary Nelson gnelson.zynrgy at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.mayr at gmail.com Tue Mar 19 09:27:42 2013 From: simon.mayr at gmail.com (simi99) Date: Tue, 19 Mar 2013 01:27:42 -0700 (PDT) Subject: [Scilab-users] Problem with Scilab 5.4.0 x64 and Coselica Toolbox In-Reply-To: <1363622828728-4026283.post@n3.nabble.com> References: <1363622828728-4026283.post@n3.nabble.com> Message-ID: <1363681662488-4026290.post@n3.nabble.com> Solved! I tried to reduce the complexity by removing the capacitor and the diode. Afterwards the simulation worked. Next, I added the diode and the capacitor again step by step and the simulation still works! I don't know why, but it works now! -- View this message in context: http://mailinglists.scilab.org/Problem-with-Scilab-5-4-0-x64-and-Coselica-Toolbox-tp4026283p4026290.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Tue Mar 19 09:37:08 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 19 Mar 2013 09:37:08 +0100 Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: <1363676744020-4026287.post@n3.nabble.com> References: <1363676744020-4026287.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> Hello, De la part de TViT Envoy? : mardi 19 mars 2013 08:06 > 1) Say to me please, as in Scilab to see quantity(amount) of > operations of add mul and others operations which the function > calculates. you can retrieve the "profile" of a function, see the help for add_profiling() to "prepare" the function, and showprofile() and plotprofile() to have the result http://help.scilab.org/docs/5.4.0/en_US/add_profiling.html http://help.scilab.org/docs/5.4.0/en_US/showprofile.html http://help.scilab.org/docs/5.4.0/en_US/plotprofile.html > 2) How to debug my algorithms it is possible to see on lines to > watch(keep up) on steps calculations which the function carries out. you might launch the script with the mode 1 or 4 http://help.scilab.org/docs/5.4.0/en_US/exec.html 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 Christophe.Dang at sidel.com Tue Mar 19 09:26:57 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 19 Mar 2013 09:26:57 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51473F6F.6000008@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> Hello, De la part de Stefan Du Rietz Envoy? : lundi 18 mars 2013 17:23 > But as usual there is a better (faster, simpler) solution without a > loop! > > // sort in reverse order and get indices > [ysort, k] = gsort(data(:, 2)); Well, there are loops, hidden in gsort(), which is a quicksort. I think it is faster because you perform the loops only once. For optimisation in finding the highest -- or lowest -- values, you might find some ideas there: http://en.wikipedia.org/wiki/Selection_algorithm Best 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 Tue Mar 19 09:57:25 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 19 Mar 2013 09:57:25 +0100 Subject: [Scilab-users] Restart with 5.4.0 In-Reply-To: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106C92797@301EX00100.sidel.com> Hello, De la part de Gary Nelson Envoy? : dimanche 17 mars 2013 00:24 > Some time ago, I updated to 5.4.0 and did not use it. > Now, when I do a FILE/Open a file/filename nothing happens. I'm afraid this is a little vague. Many things can have happened * maybe the install was not correct * maybe something changed between the install and now I suggest you try to reinstall, and then come back to us if this does not work, with additional elements such as your OS version. Best 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 sdr at durietz.se Tue Mar 19 11:10:04 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Tue, 19 Mar 2013 11:10:04 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> Message-ID: <5148397C.3090003@durietz.se> On 2013-03-19 09:26, Dang, Christophe wrote: -------------------- > Hello, > > De la part de Stefan Du Rietz > Envoy? : lundi 18 mars 2013 17:23 > >> But as usual there is a better (faster, simpler) solution without a >> loop! >> >> // sort in reverse order and get indices >> [ysort, k] = gsort(data(:, 2)); > > Well, there are loops, hidden in gsort(), which is a quicksort. > > I think it is faster because you perform the loops only once. > > For optimisation in finding the highest -- or lowest -- values, > you might find some ideas there: > > http://en.wikipedia.org/wiki/Selection_algorithm > > Best regards > But gsort is a built-in function (and very efficient): -->typeof(gsort) ans = fptr I cite from your linked Wikipedia article: "Selection can be reduced to sorting by sorting the list and then extracting the desired element. This method is efficient ..." You should avoid code with loops because all lines in a loop are re-interpreted by Scilab in every round-trip -- it is therefore very slow. This is of course not the case with built-in functions. I once used the datenum function in Scilab 4, which was not vectorized. It took many minutes to convert my large datevec matrix into a datenum vector. After my vectorization, it took a fractional second! Regards Stefan From Christophe.Dang at sidel.com Tue Mar 19 11:26:28 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 19 Mar 2013 11:26:28 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <5148397C.3090003@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> <5148397C.3090003@durietz.se> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106C92A23@301EX00100.sidel.com> De la part de Stefan Du Rietz Envoy? : mardi 19 mars 2013 11:10 > But gsort is a built-in function (and very efficient): I just wonder if it can be as efficient if you write your own function and then compile it with comp(). It can be interesting to do so in specific cases: a specific implementation might be faster than a general one. -- 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 Serge.Steer at inria.fr Tue Mar 19 11:43:54 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 19 Mar 2013 11:43:54 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106C92A23@301EX00100.sidel.com> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> <5148397C.3090003@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C92A23@301EX00100.sidel.com> Message-ID: <5148416A.2070909@inria.fr> Le 19/03/2013 11:26, Dang, Christophe a ?crit : > De la part de Stefan Du Rietz > Envoy? : mardi 19 mars 2013 11:10 > >> But gsort is a built-in function (and very efficient): > I just wonder if it can be as efficient if you write your own function > and then compile it with comp(). Note that comp is now made automatically when you define a Scilab function, but comp only generate a pre-interpreted code not a processor binary code so gsort which is a built-in (processor binary code) will be in any case much more efficient. > > It can be interesting to do so in specific cases: > a specific implementation might be faster than a general one. > From Christophe.Dang at sidel.com Tue Mar 19 11:46:27 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 19 Mar 2013 11:46:27 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <5148416A.2070909@inria.fr> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> <5148397C.3090003@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C92A23@301EX00100.sidel.com> <5148416A.2070909@inria.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106C92AA0@301EX00100.sidel.com> De la part de Serge Steer Envoy? : mardi 19 mars 2013 11:44 > Note that comp [...] only generate a pre-interpreted code not a > processor binary code Thanks for the information. -- 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 sdr at durietz.se Tue Mar 19 13:32:26 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Tue, 19 Mar 2013 13:32:26 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <5148416A.2070909@inria.fr> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> <5148397C.3090003@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C92A23@301EX00100.sidel.com> <5148416A.2070909@inria.fr> Message-ID: <51485ADA.8030208@durietz.se> On 2013-03-19 11:43, Serge Steer wrote: -------------------- > Le 19/03/2013 11:26, Dang, Christophe a ?crit : >> De la part de Stefan Du Rietz >> Envoy? : mardi 19 mars 2013 11:10 >> >>> But gsort is a built-in function (and very efficient): >> I just wonder if it can be as efficient if you write your own function >> and then compile it with comp(). > Note that comp is now made automatically when you define a Scilab > function, but comp only generate a pre-interpreted code not a > processor binary code so gsort which is a built-in (processor binary > code) will be in any case much more efficient. > Serge, can you please also tell us what "pre-interpreted" implies regarding loops? Best regards Stefan From tvitklg at rambler.ru Tue Mar 19 21:45:46 2013 From: tvitklg at rambler.ru (TViT) Date: Tue, 19 Mar 2013 13:45:46 -0700 (PDT) Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> Message-ID: <1363725946116-4026302.post@n3.nabble.com> Thanks Dang Christophe. Not precisely that it is necessary, but to receive representation about time of performance probably. But how to her to use? For example I need to understand key functions from all my algorithm. I call FFT and I want to see when will calculate faster FFT, and when is faster FIR or IIR filters for reception of a spectrum and on the contrary to see a side in functions when better FFT, and when filters. And then to test all algorithm through different functions. I want on it the elementary example to test, but gives out a mistake... //test profiling clf; y=fft(setSignal); add_profiling("fft"); showprofile(fft); f=Fs*(0:(N/2))/N; n=size(f,'*'); bar(f,abs(y(1:n)),0.01,'blue');sleep(2000); -- View this message in context: http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab-tp4026287p4026302.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Wed Mar 20 08:52:55 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 20 Mar 2013 08:52:55 +0100 Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: <1363725946116-4026302.post@n3.nabble.com> References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> <1363725946116-4026302.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> Hello, De la part de TViT Envoy? : mardi 19 mars 2013 21:46 > Not precisely that it is necessary, but to receive representation > about time of performance probably. For the time performance itself, you can use tic() and toc() http://help.scilab.org/docs/5.4.0/en_US/tic.html > I want on it the elementary example to test, but gives out a > mistake... > > add_profiling("fft"); Well, profiling only works with external (home made) functions. I didn't understand you wanted to evaluate primitives (built in functions). Additionally, showprofile() must be used *after* the function. Concerning the primitives, I have no clue. You can always download the source to have a look inside, if you dare http://www.scilab.org/development/sources/stable I think that a lot of functions implement well known alogorithms or use existing Fortran or C functions. The help pages sometimes give external links, e.g. for fft(), the help page says : http://help.scilab.org/docs/5.4.0/en_US/fft.html "Algorithms This function uses the fftw3 library.' with a link pointing to http://www.fftw.org/ Otherwise, you can probably use more general tracking tools, but I don't know anything about such things... -- 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 clement.david at scilab-enterprises.com Wed Mar 20 09:31:15 2013 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Wed, 20 Mar 2013 09:31:15 +0100 Subject: [Scilab-users] Problem with Scilab 5.4.0 x64 and Coselica Toolbox In-Reply-To: <1363681662488-4026290.post@n3.nabble.com> References: <1363622828728-4026283.post@n3.nabble.com> <1363681662488-4026290.post@n3.nabble.com> Message-ID: <1363768275.2098.20.camel@CLONE03> Hello, It might be a bug, can you report [1] with the buggy diagram (before and after the edit) please ? [1]: bugzilla.scilab.org Thanks in advance, -- Cl?ment On Tue, 2013-03-19 at 01:27 -0700, simi99 wrote: > Solved! > > I tried to reduce the complexity by removing the capacitor and the diode. > Afterwards the simulation worked. Next, I added the diode and the capacitor > again step by step and the simulation still works! I don't know why, but it > works now! > > > > -- > View this message in context: http://mailinglists.scilab.org/Problem-with-Scilab-5-4-0-x64-and-Coselica-Toolbox-tp4026283p4026290.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 simon.mayr at gmail.com Wed Mar 20 10:26:00 2013 From: simon.mayr at gmail.com (simi99) Date: Wed, 20 Mar 2013 02:26:00 -0700 (PDT) Subject: [Scilab-users] Problem with Scilab 5.4.0 x64 and Coselica Toolbox In-Reply-To: <1363768275.2098.20.camel@CLONE03> References: <1363622828728-4026283.post@n3.nabble.com> <1363681662488-4026290.post@n3.nabble.com> <1363768275.2098.20.camel@CLONE03> Message-ID: <1363771560946-4026305.post@n3.nabble.com> done! -- View this message in context: http://mailinglists.scilab.org/Problem-with-Scilab-5-4-0-x64-and-Coselica-Toolbox-tp4026283p4026305.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Wed Mar 20 14:38:22 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 20 Mar 2013 14:38:22 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <51485ADA.8030208@durietz.se> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> <5148397C.3090003@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C92A23@301EX00100.sidel.com> <5148416A.2070909@inria.fr> <51485ADA.8030208@durietz.se> Message-ID: <5149BBCE.7020004@inria.fr> Le 19/03/2013 13:32, Stefan Du Rietz a ?crit : > On 2013-03-19 11:43, Serge Steer wrote: > -------------------- >> Le 19/03/2013 11:26, Dang, Christophe a ?crit : >>> De la part de Stefan Du Rietz >>> Envoy? : mardi 19 mars 2013 11:10 >>> >>>> But gsort is a built-in function (and very efficient): >>> I just wonder if it can be as efficient if you write your own function >>> and then compile it with comp(). >> Note that comp is now made automatically when you define a Scilab >> function, but comp only generate a pre-interpreted code not a >> processor binary code so gsort which is a built-in (processor binary >> code) will be in any case much more efficient. >> > Serge, can you please also tell us what "pre-interpreted" implies > regarding loops? Nothing special is done for loops. The pre-interpretation just parses the original code, checks its syntactical correctness and transforms it into a reverse polish notation more appropriate for stack automaton. Most of the time spent in execution of Scilab code is used for handling type and dimension checking and the decision tree relative to the types and dimensions with select the final piece of code that will realise the computation. Example: imagine the A+B Scilab instruction, it implies the following set of tests and routing: Get location of A in the memory Get location of B in the memory What is the type of A (1, 2, ...) -->assume 1 What is the type of B (1, 2, ...) -->assume 1 What is the dimension of A (empty, scalar, array) -->assume array What is the dimension of B (empty, scalar, array) -->assume scalar Is A real or complex --> assume real Is B real or complex --> assume real Is there enough memory to store the result -->assume yes Finally call the code that adds a double scalar to each entries of an array ou doubles So at least 10 operations to select the proper leaf of the tree. It is neglectible if A is a big array, but significative if A is just a 1 by 2 array Serge > > Best regards > Stefan > > > > From sdr at durietz.se Wed Mar 20 20:50:24 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Wed, 20 Mar 2013 20:50:24 +0100 Subject: [Scilab-users] Regarding simple numerical operations result display. In-Reply-To: <5149BBCE.7020004@inria.fr> References: <51461B10.8070506@durietz.se> <51461DAD.3050204@durietz.se> <51462FFD.8010107@durietz.se> <51463498.9040200@durietz.se> <514703E1.9040004@durietz.se> <51473F6F.6000008@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C926B4@301EX00100.sidel.com> <5148397C.3090003@durietz.se> <3B5FFC67498DFF49AE7271A584867D16F106C92A23@301EX00100.sidel.com> <5148416A.2070909@inria.fr> <51485ADA.8030208@durietz.se> <5149BBCE.7020004@inria.fr> Message-ID: <514A1300.9020104@durietz.se> On 2013-03-20 14:38, Serge Steer wrote: -------------------- > Le 19/03/2013 13:32, Stefan Du Rietz a ?crit : >> On 2013-03-19 11:43, Serge Steer wrote: >> -------------------- >>> Le 19/03/2013 11:26, Dang, Christophe a ?crit : >>>> De la part de Stefan Du Rietz >>>> Envoy? : mardi 19 mars 2013 11:10 >>>> >>>>> But gsort is a built-in function (and very efficient): >>>> I just wonder if it can be as efficient if you write your own >>>> function >>>> and then compile it with comp(). >>> Note that comp is now made automatically when you define a Scilab >>> function, but comp only generate a pre-interpreted code not a >>> processor binary code so gsort which is a built-in (processor binary >>> code) will be in any case much more efficient. >>> >> Serge, can you please also tell us what "pre-interpreted" implies >> regarding loops? > Nothing special is done for loops. The pre-interpretation just parses > the original code, checks its syntactical correctness and transforms > it into a reverse polish notation more appropriate for stack automaton. > > Most of the time spent in execution of Scilab code is used for > handling type and dimension checking and the decision tree relative to > the types and dimensions with select the final piece of code that will > realise the computation. > > Example: imagine the A+B Scilab instruction, it implies the following > set of tests and routing: > > Get location of A in the memory > Get location of B in the memory > What is the type of A (1, 2, ...) -->assume 1 > What is the type of B (1, 2, ...) -->assume 1 > What is the dimension of A (empty, scalar, array) -->assume array > What is the dimension of B (empty, scalar, array) -->assume scalar > Is A real or complex --> assume real > Is B real or complex --> assume real > Is there enough memory to store the result -->assume yes > Finally call the code that adds a double scalar to each entries of an > array ou doubles > > So at least 10 operations to select the proper leaf of the tree. It is > neglectible if A is a big array, but significative if A is just a 1 by > 2 array > > > Serge > Very good! I have not found this information elsewhere. Thank you very much! >> Best regards >> Stefan >> >> >> >> > > From tvitklg at rambler.ru Wed Mar 20 21:15:42 2013 From: tvitklg at rambler.ru (TViT) Date: Wed, 20 Mar 2013 13:15:42 -0700 (PDT) Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> <1363725946116-4026302.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> Message-ID: <1363810542155-4026310.post@n3.nabble.com> Excuse, but I can not measure time of performance of function. What I not correctly make? clc; clear; Fs = 11025; t = 0:1/Fs:1; N=size(t,'*'); Signal=sin(2*%pi*500*t)+sin(2*%pi*1500*t)+sin(2*%pi*2500*t)+sin(2*%pi*3500*t)+sin(2*%pi*4500*t)+grand(1,N,'nor',0,1); disp(N); tic(); y=fft(Signal); t=toc(); printf("%.20f\n",t); f=Fs*(0:(N/2))/N; n=size(f,'*'); bar(f,abs(y(1:n)),0.01,'blue') sleep(2000);close(); -- View this message in context: http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab-tp4026287p4026310.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Wed Mar 20 23:03:32 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 20 Mar 2013 19:03:32 -0300 Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: <1363810542155-4026310.post@n3.nabble.com> References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> <1363725946116-4026302.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> <1363810542155-4026310.post@n3.nabble.com> Message-ID: Hi, In my Win7 Scilab 5.4 your code outputs the time of execution of the fft command: -->printf("%.20f\n",t); 0.14100000000000001000 What else do you need to know? Rgds Rafael -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of TViT Sent: Wednesday, March 20, 2013 5:16 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Computing Performance and debugging in Scilab. Excuse, but I can not measure time of performance of function. What I not correctly make? clc; clear; Fs = 11025; t = 0:1/Fs:1; N=size(t,'*'); Signal=sin(2*%pi*500*t)+sin(2*%pi*1500*t)+sin(2*%pi*2500*t)+sin(2*%pi*3500*t )+sin(2*%pi*4500*t)+grand(1,N,'nor',0,1); disp(N); tic(); y=fft(Signal); t=toc(); printf("%.20f\n",t); f=Fs*(0:(N/2))/N; n=size(f,'*'); bar(f,abs(y(1:n)),0.01,'blue') //sleep(2000);close(); -- View this message in context: http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab -tp4026287p4026310.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 amonmayr at laas.fr Wed Mar 20 22:59:55 2013 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Wed, 20 Mar 2013 22:59:55 +0100 Subject: [Scilab-users] =?utf-8?q?Scan_file_backward_from_the_end=3F?= Message-ID: <4440-514a3180-1-1ffdd0a0@166204668> Hi all, Do any of you know an efficient way to scan a text file backward from the end in scilab? I want to load into scilab text data (a footer) that is situated in a file after a big binary blob of variable length (a huge tiff image). For the moment I scan line by line from the top and test whether it looks like the start of the footer. It works but it is terribly slow as I have to scan the whole binary blob. Any idea on how I could do the same more efficiently using only scilab functions (to stay portable for my colleagues running scilab on Windows)? Cheers, Antoine From serge.steer at inria.fr Wed Mar 20 23:43:18 2013 From: serge.steer at inria.fr (Serge Steer) Date: Wed, 20 Mar 2013 23:43:18 +0100 (CET) Subject: [Scilab-users] Scan file backward from the end? In-Reply-To: <4440-514a3180-1-1ffdd0a0@166204668> Message-ID: <970291918.7835962.1363819398821.JavaMail.root@inria.fr> If you know the approximate size of the footer in number of bytes (assume N greater than it) you can try to set the pointer N bytes before the end of file using the u=mopen("myfile"); mseek(-N,u,'end') then read the rest with mgetl(-1,u) Serge ----- Mail original ----- > De: "Antoine Monmayrant" > ?: users at lists.scilab.org > Envoy?: Mercredi 20 Mars 2013 22:59:55 > Objet: [Scilab-users] Scan file backward from the end? > > Hi all, > > Do any of you know an efficient way to scan a text file backward from > the end in scilab? > I want to load into scilab text data (a footer) that is situated in a > file after a big binary blob of variable length (a huge tiff image). > For the moment I scan line by line from the top and test whether it > looks like the start of the footer. > It works but it is terribly slow as I have to scan the whole binary > blob. > Any idea on how I could do the same more efficiently using only > scilab functions (to stay portable for my colleagues running scilab > on Windows)? > > Cheers, > > Antoine > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From amonmayr at laas.fr Thu Mar 21 07:44:35 2013 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 21 Mar 2013 07:44:35 +0100 Subject: [Scilab-users] =?utf-8?q?Scan_file_backward_from_the_end=3F?= In-Reply-To: <970291918.7835962.1363819398821.JavaMail.root@inria.fr> Message-ID: <64a-514aac80-1-51324c80@101864374> On Wednesday, March 20, 2013 23.43 CET, Serge Steer wrote: > If you know the approximate size of the footer in number of bytes (assume N greater than it) you can try to set the pointer N bytes before the end of file using the > u=mopen("myfile"); > mseek(-N,u,'end') > then read the rest with > mgetl(-1,u) > > Serge Thanks for the tip, I'll give it a try today. Cheers, Antoine From tvitklg at rambler.ru Thu Mar 21 09:53:06 2013 From: tvitklg at rambler.ru (TViT) Date: Thu, 21 Mar 2013 01:53:06 -0700 (PDT) Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> <1363725946116-4026302.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> <1363810542155-4026310.post@n3.nabble.com> Message-ID: <1363855986434-4026315.post@n3.nabble.com> Strange, at me houses my computer gives out always 0.00000000000000000000. Has tested on the working computer 0.047. Question I think I shall be closed to understand what a problem of a house. -- View this message in context: http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab-tp4026287p4026315.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Thu Mar 21 11:39:59 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 21 Mar 2013 11:39:59 +0100 Subject: [Scilab-users] Computing Performance and debugging in Scilab. In-Reply-To: <1363855986434-4026315.post@n3.nabble.com> References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> <1363725946116-4026302.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> <1363810542155-4026310.post@n3.nabble.com> <1363855986434-4026315.post@n3.nabble.com> Message-ID: <514AE37F.3050308@inria.fr> Le 21/03/2013 09:53, TViT a ?crit : > Strange, at me houses my computer gives out always 0.00000000000000000000. > Has tested on the working computer 0.047. > Question I think I shall be closed to understand what a problem of a house. May be you have a very fact computer. try to execute many time the same instruction tic;for i=1:100, instructions,end;toc()/100 > > > -- > View this message in context: http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab-tp4026287p4026315.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 ezequielsoule at gmail.com Thu Mar 21 14:50:36 2013 From: ezequielsoule at gmail.com (Ezequiel Soule) Date: Thu, 21 Mar 2013 10:50:36 -0300 Subject: [Scilab-users] problem loading enviroment In-Reply-To: <1363810542155-4026310.post@n3.nabble.com> References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> <1363725946116-4026302.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> <1363810542155-4026310.post@n3.nabble.com> Message-ID: <514B102C.2090307@gmail.com> Hello, sometimes, when I try to load an eviroment, I got a message like this: loading initial environment Warning : redefining function: %_sodload . Use funcprot(0) to avoid this message inside function: createMacro . = (pos,V,R,calc_D_superp_dobcel(N, N2)) !--error 41 Incompatible output argument. at line 16 of function coord called by : at line 13 of function createMacro called by : at line 8 of function %__convertVariable__ called by : at line 836 of function %_sodload called by : then load(%fileToLoad); disp(msprintf(gettext while executing a callback and it does?t load anything. I had no problem saving it, or runing it, or manipulating the variables, or any kind of problem before or after saving, but it does not load... there seems to be some problem with some of the functions saved in the enviroment but, I repeat, I had no problem saving or running them. I can load the variables if I list them (as in load("filename","var_1","var_2",..."var_n")), but it is really stupid I have to do this instead of just loading everything... From haasejos at web.de Thu Mar 21 16:41:23 2013 From: haasejos at web.de (haasejos) Date: Thu, 21 Mar 2013 08:41:23 -0700 (PDT) Subject: [Scilab-users] discrete Fourier transform Message-ID: <1363880483952-4026318.post@n3.nabble.com> hello, for signalanalysis I would like to use discrete Fourier transform (dft). To see, how it works, I use the simple example below. Why is *XfA = abs(Xf)*2/n* respectively why is XfA = abs(Xf) wrong? clear; clc; xdel; function y = f(x); y = sin(x); endfunction; n = 200; x=linspace(0,2*%pi,n); y=f(x); mat = [x',y']; //disp(mat); //plot2d(x , y); //xtitle('DATA','n''','y'''); Xf=dft(y,-1); XfA = abs(Xf)*2/n; plot2d3([1:n/2]',XfA(1:n/2)); -- View this message in context: http://mailinglists.scilab.org/discrete-Fourier-transform-tp4026318.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From cedric.benslimane at aeroconseil.com Thu Mar 21 17:02:57 2013 From: cedric.benslimane at aeroconseil.com (cedricbdo) Date: Thu, 21 Mar 2013 09:02:57 -0700 (PDT) Subject: [Scilab-users] Help to set parameters in an Xcos Diagram Message-ID: <1363881777820-4026319.post@n3.nabble.com> Hello everybody, I'd like to set parameters of my scs_m structure for an Xcos Diagram (see attached file) using command lines. To be specific I'd like to set the following imulation parameters : - final integration time - max integration time interval I want them to be equal to a dt that I already define in my program. I am using this code so far : loadXcosLibs() importXcosDiagram('C:\STAMPE_3.5\STAMPE_SRC\essai.xcos'); typeof(scs_m) // Diagram structure scs_m.props.tf = dt; // Final integration time xcos_simulate(scs_m,4); But I don't know what command line to use to set the max step of integration time for my simulation. Also, I'd like to set to dt in the same way the parameters (period, iniialization time) of the block "CLOCK_c" which is in my xcos diagram. I think I must use something like scs_m.objs.something = dt. I would be very thankful for any help :) essai.xcos -- View this message in context: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Thu Mar 21 17:13:59 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 21 Mar 2013 17:13:59 +0100 Subject: [Scilab-users] discrete Fourier transform In-Reply-To: <1363880483952-4026318.post@n3.nabble.com> References: <1363880483952-4026318.post@n3.nabble.com> Message-ID: <514B31C7.10903@inria.fr> Le 21/03/2013 16:41, haasejos a ?crit : > hello, > for signalanalysis I would like to use discrete Fourier transform (dft). To > see, how it works, I use the simple example below. Why is *XfA = > abs(Xf)*2/n* respectively why is XfA = abs(Xf) wrong? Why do you say that XfA = abs(Xf) is wrong Note however. It is much more efficient using fft instead of dft. Serge Steer > > clear; clc; xdel; > > function y = f(x); > y = sin(x); > endfunction; > n = 200; > x=linspace(0,2*%pi,n); > y=f(x); > > mat = [x',y']; > //disp(mat); > //plot2d(x , y); > > //xtitle('DATA','n''','y'''); > > Xf=dft(y,-1); > XfA = abs(Xf)*2/n; > plot2d3([1:n/2]',XfA(1:n/2)); > > > > > -- > View this message in context: http://mailinglists.scilab.org/discrete-Fourier-transform-tp4026318.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 tvitklg at rambler.ru Thu Mar 21 17:41:32 2013 From: tvitklg at rambler.ru (TViT) Date: Thu, 21 Mar 2013 09:41:32 -0700 (PDT) Subject: [Scilab-users] problem loading enviroment In-Reply-To: <514B102C.2090307@gmail.com> References: <1363676744020-4026287.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106C926F9@301EX00100.sidel.com> <1363725946116-4026302.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106CC9663@301EX00100.sidel.com> <1363810542155-4026310.post@n3.nabble.com> <514B102C.2090307@gmail.com> Message-ID: <1363884092559-4026321.post@n3.nabble.com> The people, I have checked up houses once again, a problem in that that if to create test script in a file for example TicToc.sci and to start this file, shows always 0.0000000000, and if to copy the text to insert and to start in a command window directly without start of a file. sci (or sce) that shows 0.01600000000000000000. How it to understand? In what the difference when is started script from SciNotes??? -- View this message in context: http://mailinglists.scilab.org/Computing-Performance-and-debugging-in-Scilab-tp4026287p4026321.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From clement.david at scilab-enterprises.com Thu Mar 21 17:59:20 2013 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Thu, 21 Mar 2013 17:59:20 +0100 Subject: [Scilab-users] Help to set parameters in an Xcos Diagram In-Reply-To: <1363881777820-4026319.post@n3.nabble.com> References: <1363881777820-4026319.post@n3.nabble.com> Message-ID: <1363885160.6195.6.camel@CLONE03> Hello C?dric, The max integration time interval can be set using the scs_m.props.tol vector which is documented [1]. To set a specific parameter values, define a variable in the diagram context which is used as dt then set it the right value the scicos_context struct. For more information on setting variable values, take a look at the "Optimization of a PID" [2] wiki page. [1]: http://help.scilab.org/docs/5.4.0/en_US/scicos_params.html [2]: http://wiki.scilab.org/Xcos/Examples/PID?highlight=%28% scicos_context%29 > I'd like to set parameters of my scs_m structure for an Xcos Diagram (see > attached file) using command lines. > > To be specific I'd like to set the following imulation parameters : > > - final integration time > > - max integration time interval > > I want them to be equal to a dt that I already define in my program. I am > using this code so far : > > > > loadXcosLibs() importXcosDiagram('C:\STAMPE_3.5\STAMPE_SRC\essai.xcos'); > > typeof(scs_m) // Diagram structure > > scs_m.props.tf = dt; // Final integration time > > > > xcos_simulate(scs_m,4); > > > > But I don't know what command line to use to set the max step of integration > time for my simulation. > > > > Also, I'd like to set to dt in the same way the parameters (period, > iniialization time) of the block "CLOCK_c" which is in my xcos diagram. > > I think I must use something like scs_m.objs.something = dt. > > > > I would be very thankful for any help :) essai.xcos > -- Cl?ment DAVID Development Engineer / Account Manager ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com From sdr at durietz.se Thu Mar 21 18:46:14 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Thu, 21 Mar 2013 18:46:14 +0100 Subject: [Scilab-users] discrete Fourier transform In-Reply-To: <514B31C7.10903@inria.fr> References: <1363880483952-4026318.post@n3.nabble.com> <514B31C7.10903@inria.fr> Message-ID: <514B4766.2020905@durietz.se> On 2013-03-21 17:13, Serge Steer wrote: -------------------- > Le 21/03/2013 16:41, haasejos a ?crit : >> hello, >> for signalanalysis I would like to use discrete Fourier transform >> (dft). To >> see, how it works, I use the simple example below. Why is *XfA = >> abs(Xf)*2/n* respectively why is XfA = abs(Xf) wrong? > Why do you say that XfA = abs(Xf) is wrong > Note however. It is much more efficient using fft instead of dft. > > Serge Steer Maybe haasejos meant and should have used XfA == abs(Xf) Stefan >> >> clear; clc; xdel; >> >> function y = f(x); >> y = sin(x); >> endfunction; >> n = 200; >> x=linspace(0,2*%pi,n); >> y=f(x); >> >> mat = [x',y']; >> //disp(mat); >> //plot2d(x , y); >> >> //xtitle('DATA','n''','y'''); >> >> Xf=dft(y,-1); >> XfA = abs(Xf)*2/n; >> plot2d3([1:n/2]',XfA(1:n/2)); >> >> >> >> >> -- >> View this message in context: >> http://mailinglists.scilab.org/discrete-Fourier-transform-tp4026318.html >> >> Sent from the Scilab users - Mailing Lists Archives mailing list >> archive at Nabble.com. >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From haasejos at web.de Thu Mar 21 20:34:28 2013 From: haasejos at web.de (haasejos) Date: Thu, 21 Mar 2013 12:34:28 -0700 (PDT) Subject: [Scilab-users] discrete Fourier transform In-Reply-To: <514B4766.2020905@durietz.se> References: <1363880483952-4026318.post@n3.nabble.com> <514B31C7.10903@inria.fr> <514B4766.2020905@durietz.se> Message-ID: <1363894468336-4026324.post@n3.nabble.com> good evening, what I meant is, that XfA(2) should be "1". Because this value can be understood as the amplitude of sin(x). But XfA(2) beeing calculated with XfA=abs(Xf) (see example) returns "100". This is wrong, isn't it? Josef -- View this message in context: http://mailinglists.scilab.org/discrete-Fourier-transform-tp4026318p4026324.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sdr at durietz.se Thu Mar 21 21:02:51 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Thu, 21 Mar 2013 21:02:51 +0100 Subject: [Scilab-users] discrete Fourier transform In-Reply-To: <1363894468336-4026324.post@n3.nabble.com> References: <1363880483952-4026318.post@n3.nabble.com> <514B31C7.10903@inria.fr> <514B4766.2020905@durietz.se> <1363894468336-4026324.post@n3.nabble.com> Message-ID: <514B676B.5030204@durietz.se> On 2013-03-21 20:34, haasejos wrote: -------------------- > good evening, > what I meant is, that XfA(2) should be "1". Because this value can be > understood as the amplitude of sin(x). But XfA(2) beeing calculated with > XfA=abs(Xf) (see example) returns "100". This is wrong, isn't it? > Josef > -->n = 200; -->x=linspace(0,2*%pi,n); -->y=sin(x); -->Xf=dft(y,-1); -->XfA = abs(Xf)*2/n; -->XfA(2) ans = 0.9974519 /Stefan From haasejos at web.de Thu Mar 21 22:13:42 2013 From: haasejos at web.de (haasejos) Date: Thu, 21 Mar 2013 14:13:42 -0700 (PDT) Subject: [Scilab-users] discrete Fourier transform In-Reply-To: <514B676B.5030204@durietz.se> References: <1363880483952-4026318.post@n3.nabble.com> <514B31C7.10903@inria.fr> <514B4766.2020905@durietz.se> <1363894468336-4026324.post@n3.nabble.com> <514B676B.5030204@durietz.se> Message-ID: <1363900422243-4026326.post@n3.nabble.com> -->n = 200; -->x=linspace(0,2*%pi,n); -->y=sin(x); -->Xf=dft(y,-1); -->XfA = abs(Xf); *please look at the difference! * -->XfA(2) ans = 99.745189 -- View this message in context: http://mailinglists.scilab.org/discrete-Fourier-transform-tp4026318p4026326.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Mike at Page-One.Waitrose.com Thu Mar 21 22:34:16 2013 From: Mike at Page-One.Waitrose.com (Mike Page) Date: Thu, 21 Mar 2013 21:34:16 -0000 Subject: [Scilab-users] discrete Fourier transform In-Reply-To: <1363900422243-4026326.post@n3.nabble.com> Message-ID: Hi, I think this is just a question of scaling. There is no "correct" scaling for the FFT - just some different conventions. This is explained here (http://www.mathworks.co.uk/matlabcentral/answers/15770-scaling-the-fft-and- the-ifft). The "correct" answer with Scilab would be exactly 100 (N/2) in your case, but you have a small error because your waveform is not exactly periodic - the first and last sample are the same, but you should have the last sample being the one before the first sample for a complete cycle. The following code does that: -->n=201; -->x=linspace(0,2*%pi,n); -->x=x(1:200); -->y=sin(x); -->Xf=dft(y,-1); -->XfA = abs(Xf); -->XfA(2) ans = 100. HTH, Mike. -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org]On Behalf Of haasejos Sent: 21 March 2013 21:14 To: users at lists.scilab.org Subject: Re: [Scilab-users] discrete Fourier transform -->n = 200; -->x=linspace(0,2*%pi,n); -->y=sin(x); -->Xf=dft(y,-1); -->XfA = abs(Xf); *please look at the difference! * -->XfA(2) ans = 99.745189 -- View this message in context: http://mailinglists.scilab.org/discrete-Fourier-transform-tp4026318p4026326. 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3267 / Virus Database: 3160/6194 - Release Date: 03/21/13 From cedric.benslimane at aeroconseil.com Fri Mar 22 09:07:03 2013 From: cedric.benslimane at aeroconseil.com (cedricbdo) Date: Fri, 22 Mar 2013 01:07:03 -0700 (PDT) Subject: [Scilab-users] Help to set parameters in an Xcos Diagram In-Reply-To: <1363885160.6195.6.camel@CLONE03> References: <1363881777820-4026319.post@n3.nabble.com> <1363885160.6195.6.camel@CLONE03> Message-ID: <496740A7DF9242449329BB6231C9CAB902B312D8@LOBOS.aeroconseil.com> Thank you very much for your quick answer. Cedric De : Cl?ment David-2 [via Scilab / Xcos - Mailing Lists Archives] [mailto:ml-node+s994242n4026322h79 at n3.nabble.com] Envoy? : jeudi 21 mars 2013 18:00 ? : BENSLIMANE Cedric Objet : Re: Help to set parameters in an Xcos Diagram Hello C?dric, The max integration time interval can be set using the scs_m.props.tol vector which is documented [1]. To set a specific parameter values, define a variable in the diagram context which is used as dt then set it the right value the scicos_context struct. For more information on setting variable values, take a look at the "Optimization of a PID" [2] wiki page. [1]: http://help.scilab.org/docs/5.4.0/en_US/scicos_params.html [2]: http://wiki.scilab.org/Xcos/Examples/PID?highlight=%28% scicos_context%29 > I'd like to set parameters of my scs_m structure for an Xcos Diagram (see > attached file) using command lines. > > To be specific I'd like to set the following imulation parameters : > > - final integration time > > - max integration time interval > > I want them to be equal to a dt that I already define in my program. I am > using this code so far : > > > > loadXcosLibs() importXcosDiagram('C:\STAMPE_3.5\STAMPE_SRC\essai.xcos'); > > typeof(scs_m) // Diagram structure > > scs_m.props.tf = dt; // Final integration time > > > > xcos_simulate(scs_m,4); > > > > But I don't know what command line to use to set the max step of integration > time for my simulation. > > > > Also, I'd like to set to dt in the same way the parameters (period, > iniialization time) of the block "CLOCK_c" which is in my xcos diagram. > > I think I must use something like scs_m.objs.something = dt. > > > > I would be very thankful for any help :) essai.xcos > -- Cl?ment DAVID Development Engineer / Account Manager ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users ________________________________ If you reply to this email, your message will be added to the discussion below: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319p4026322.html To unsubscribe from Help to set parameters in an Xcos Diagram, click here . NAML Le contenu de ce message est pr?vu uniquement pour le destinataire nomm?. Il contient des informations qui peuvent ?tre confidentielles. A moins d'?tre le destinataire nomm? ou autoris? par le destinataire, vous ne pouvez pas copier, employer ou r?v?ler ? une autre personne le contenu de ce message. Si vous le recevez par erreur, s'il vous plait, informez nous imm?diatement et d?truisez le. The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -- View this message in context: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319p4026328.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedric.benslimane at aeroconseil.com Fri Mar 22 10:49:09 2013 From: cedric.benslimane at aeroconseil.com (cedricbdo) Date: Fri, 22 Mar 2013 02:49:09 -0700 (PDT) Subject: [Scilab-users] Help to set parameters in an Xcos Diagram In-Reply-To: <1363885160.6195.6.camel@CLONE03> References: <1363881777820-4026319.post@n3.nabble.com> <1363885160.6195.6.camel@CLONE03> Message-ID: <1363945749092-4026329.post@n3.nabble.com> I have another problem. Thanks to your advice, I am using the following code : dt = d0.1; typeof(scs_m) scs_m.props.tf = dt; scs_m.props.tol = [0.000001;0.000001;1.000D10;dt;0;1;0]; scs_m.props.Context; Context.Time_step=dt; scicos_simulate(scs_m,list(),Context,'nw'); However, I got the following error : Error 1000 : Context is not a valid field name. I have no idea where it comes from. Could you help me please. -- View this message in context: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319p4026329.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From cedric.benslimane at aeroconseil.com Fri Mar 22 15:21:17 2013 From: cedric.benslimane at aeroconseil.com (cedricbdo) Date: Fri, 22 Mar 2013 07:21:17 -0700 (PDT) Subject: [Scilab-users] Error (Index Invalid) in do_eval function Message-ID: <1363962077615-4026330.post@n3.nabble.com> Hello everybody, I am actually trying to set Xcos parameters in Scilab 5.4.0 but I have a message error. I would be very thankful for any help. Here is my code to define my structure : loadXcosLibs(); importXcosDiagram('C:\Documents and Settings\benslimane_c\Bureau\5.2.2\STAMPE_SRC\essai.xcos'); global scs_m_def; global Info_Sim; scs_m_def = scs_m; Info_Sim = list(); scs_m_def = scs_m; scs_m_def.props(5) = 2*dt; scs_m_def.props(4)(1) = 0.000001; scs_m_def.props(4)(2) = 0.000001; scs_m_def.props(4)(3) = 0.0000000001; scs_m_def.props(4)(4) = dt; scs_m_def.props(4)(5) = 0; scs_m_def.props(4)(6) = 1; scs_m_def.props(4)(7) = 0; %scicos_context.Time_step=dt; Info_Sim = scicos_simulate(scs_m_def,list(),[,%scicos_context],'nw'); The message error I always got is the following : !--error 21 Index invalide. at line 99 of function do_eval called by : at line 216 of function scicos_simulate called I don't understand how i can have an "index invalid" error in a function that is already provided in Scilab. Thanks guys, Cedric -- View this message in context: http://mailinglists.scilab.org/Error-Index-Invalid-in-do-eval-function-tp4026330.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From haasejos at web.de Fri Mar 22 18:43:11 2013 From: haasejos at web.de (haasejos) Date: Fri, 22 Mar 2013 10:43:11 -0700 (PDT) Subject: [Scilab-users] discrete Fourier transform In-Reply-To: References: <1363880483952-4026318.post@n3.nabble.com> <514B31C7.10903@inria.fr> <514B4766.2020905@durietz.se> <1363894468336-4026324.post@n3.nabble.com> <514B676B.5030204@durietz.se> <1363900422243-4026326.post@n3.nabble.com> Message-ID: <1363974191942-4026331.post@n3.nabble.com> thanks a lot for your answers! -- View this message in context: http://mailinglists.scilab.org/discrete-Fourier-transform-tp4026318p4026331.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From gnelson.zynrgy at gmail.com Sat Mar 23 01:58:39 2013 From: gnelson.zynrgy at gmail.com (Gary Nelson) Date: Fri, 22 Mar 2013 17:58:39 -0700 Subject: [Scilab-users] Restart with 5.4.0 In-Reply-To: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> Message-ID: <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> As mentioned in earlier query, I am trying to get restarted with Scilab and almost got there. I just reinstalled 5.4.0 per your suggestion and that makes no difference to results. Running Mac OSX 10.8.2 with 8GB ram. I open 5.4 and see the console window as expected. Then I open a file with code that works that I wrote a year or two ago. But nothing opens. A few days ago, I got this to work but don't know what I am doing differently. Earlier, another independent window opened that contained the code. Execute ran the code and the results showed up in the console window as expected. But now, open a file does not create that other window, and I don't see a way to make it happen. This has to be simple, but I have lost the recipe and much appreciate the help. Gary Nelson gnelson.zynrgy at gmail.com > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnelson.zynrgy at gmail.com Sun Mar 24 00:16:04 2013 From: gnelson.zynrgy at gmail.com (Gary Nelson) Date: Sat, 23 Mar 2013 16:16:04 -0700 Subject: [Scilab-users] Restart with 5.4.0 update In-Reply-To: <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> Message-ID: If I invoke File/Execute File_Name it clearly executes the file but I don't see the source code in any window, just the results or errors in the console window I must have accidentally turned off the window that reveals the source code. What can I do to fix this?? THanks Gary Nelson gnelson.zynrgy at gmail.com On Mar 22, 2013, at 5:58 PM, Gary Nelson wrote: > As mentioned in earlier query, I am trying to get restarted with Scilab and almost got there. > > I just reinstalled 5.4.0 per your suggestion and that makes no difference to results. Running Mac OSX 10.8.2 with 8GB ram. > > I open 5.4 and see the console window as expected. Then I open a file with code that works that I wrote a year or two ago. But nothing opens. > > A few days ago, I got this to work but don't know what I am doing differently. Earlier, another independent window opened that contained the code. Execute ran the code and the results showed up in the console window as expected. > > But now, open a file does not create that other window, and I don't see a way to make it happen. > > This has to be simple, but I have lost the recipe and much appreciate the help. > > > > Gary Nelson > gnelson.zynrgy at gmail.com > > >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Mar 24 00:27:12 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 24 Mar 2013 00:27:12 +0100 Subject: [Scilab-users] Restart with 5.4.0 update In-Reply-To: References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> Message-ID: <514E3A50.3070608@free.fr> Le 24/03/2013 00:16, Gary Nelson a ?crit : > What can I do to fix this?? you may type --> scinotes or use: (Console) Menu Applications => Scinotes then open a script from Scinotes. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnelson.zynrgy at gmail.com Sun Mar 24 23:19:28 2013 From: gnelson.zynrgy at gmail.com (Gary Nelson) Date: Sun, 24 Mar 2013 15:19:28 -0700 Subject: [Scilab-users] Restart with 5.4.0 update In-Reply-To: <514E3A50.3070608@free.fr> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> <514E3A50.3070608@free.fr> Message-ID: <45F47C56-7AC5-44EA-A3C8-EF95EF557F68@gmail.com> My problem seems to be that scinotes has vanished. Neither --> scinotes nor Applications/scinotes does anything at all. A scinotes window used to open and now there is none. Again, I reinstalled 5.4.0 to no avail. Recall that a few days ago the scinotes window was opening and I was beginning to make progress. Then it disappeared and I can't do anything useful. This has to be a simple problem, but it eludes me. I thank you for your guidance Gary Nelson gnelson.zynrgy at gmail.com On Mar 23, 2013, at 4:27 PM, Samuel Gougeon wrote: > Le 24/03/2013 00:16, Gary Nelson a ?crit : >> What can I do to fix this?? > you may type > --> scinotes > or use: (Console) Menu Applications => Scinotes > then open a script from Scinotes. > > 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 rnyk1991 at gmail.com Mon Mar 25 04:52:53 2013 From: rnyk1991 at gmail.com (Rakshith Nayak) Date: Mon, 25 Mar 2013 09:22:53 +0530 Subject: [Scilab-users] Restart with 5.4.0 update In-Reply-To: <45F47C56-7AC5-44EA-A3C8-EF95EF557F68@gmail.com> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> <514E3A50.3070608@free.fr> <45F47C56-7AC5-44EA-A3C8-EF95EF557F68@gmail.com> Message-ID: Have you tried the MATLAB equivalent for "echo" -- mode() function? In MATLAB echo displays everything in the command window. you can use mode(1) in scilab for echo on in MATLAB mode(0) in scilab for echo off in MATLAB OR why not use a text editor first? --say notepad++ OR if you are keen on opening files from the terminal you can follow this link. http://apple.stackexchange.com/questions/16593/how-do-i-start-texteditor-from-the-command-line reference: http://www.mathworks.in/help/matlab/ref/echo.html http://help.scilab.org/docs/5.3.0/en_US/m2sci_echo.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Mon Mar 25 10:11:40 2013 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 25 Mar 2013 10:11:40 +0100 Subject: [Scilab-users] Help to set parameters in an Xcos Diagram In-Reply-To: <1363945749092-4026329.post@n3.nabble.com> References: <1363881777820-4026319.post@n3.nabble.com> <1363885160.6195.6.camel@CLONE03> <1363945749092-4026329.post@n3.nabble.com> Message-ID: <1364202700.29791.2.camel@CLONE03> Hello, That's a typo in your code, you should take a better look at the PID optimisation exemple. The context argument passed to the scicos_simulate macro is a struct() with key-values representation of updated variables. On Fri, 2013-03-22 at 02:49 -0700, cedricbdo wrote: > I have another problem. > > Thanks to your advice, I am using the following code : > > dt = d0.1; > typeof(scs_m) > scs_m.props.tf = dt; > scs_m.props.tol = [0.000001;0.000001;1.000D10;dt;0;1;0]; > scs_m.props.Context; > Context.Time_step=dt; > scicos_simulate(scs_m,list(),Context,'nw'); > > However, I got the following error : > > Error 1000 : > Context is not a valid field name. > > I have no idea where it comes from. > Could you help me please. > > > > -- > View this message in context: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319p4026329.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 -- Cl?ment DAVID Development Engineer / Account Manager ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com From cedric.benslimane at aeroconseil.com Mon Mar 25 13:02:19 2013 From: cedric.benslimane at aeroconseil.com (cedricbdo) Date: Mon, 25 Mar 2013 05:02:19 -0700 (PDT) Subject: [Scilab-users] Help to set parameters in an Xcos Diagram In-Reply-To: <1364202700.29791.2.camel@CLONE03> References: <1363881777820-4026319.post@n3.nabble.com> <1363885160.6195.6.camel@CLONE03> <1363945749092-4026329.post@n3.nabble.com> <1364202700.29791.2.camel@CLONE03> Message-ID: <496740A7DF9242449329BB6231C9CAB902B31555@LOBOS.aeroconseil.com> Hi, Thanks, I will look carefully the example. Regards, Cedric De : Cl?ment David-2 [via Scilab / Xcos - Mailing Lists Archives] [mailto:ml-node+s994242n4026347h54 at n3.nabble.com] Envoy? : lundi 25 mars 2013 10:12 ? : BENSLIMANE Cedric Objet : Re: Help to set parameters in an Xcos Diagram Hello, That's a typo in your code, you should take a better look at the PID optimisation exemple. The context argument passed to the scicos_simulate macro is a struct() with key-values representation of updated variables. On Fri, 2013-03-22 at 02:49 -0700, cedricbdo wrote: > I have another problem. > > Thanks to your advice, I am using the following code : > > dt = d0.1; > typeof(scs_m) > scs_m.props.tf = dt; > scs_m.props.tol = [0.000001;0.000001;1.000D10;dt;0;1;0]; > scs_m.props.Context; > Context.Time_step=dt; > scicos_simulate(scs_m,list(),Context,'nw'); > > However, I got the following error : > > Error 1000 : > Context is not a valid field name. > > I have no idea where it comes from. > Could you help me please. > > > > -- > View this message in context: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319p4026329.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users -- Cl?ment DAVID Development Engineer / Account Manager ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users ________________________________ If you reply to this email, your message will be added to the discussion below: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319p4026347.html To unsubscribe from Help to set parameters in an Xcos Diagram, click here . NAML Le contenu de ce message est pr?vu uniquement pour le destinataire nomm?. Il contient des informations qui peuvent ?tre confidentielles. A moins d'?tre le destinataire nomm? ou autoris? par le destinataire, vous ne pouvez pas copier, employer ou r?v?ler ? une autre personne le contenu de ce message. Si vous le recevez par erreur, s'il vous plait, informez nous imm?diatement et d?truisez le. The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -- View this message in context: http://mailinglists.scilab.org/Help-to-set-parameters-in-an-Xcos-Diagram-tp4026319p4026348.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Mar 26 00:43:34 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 26 Mar 2013 00:43:34 +0100 Subject: [Scilab-users] Restart with 5.4.0 update In-Reply-To: <45F47C56-7AC5-44EA-A3C8-EF95EF557F68@gmail.com> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> <514E3A50.3070608@free.fr> <45F47C56-7AC5-44EA-A3C8-EF95EF557F68@gmail.com> Message-ID: <5150E126.9030901@free.fr> Hi Gary, // What does edit sind // ? // What does editor my_new_file.sce // ? In the Preferences => Scinotes : Editor frame : What is the status of Scinotes? use Scinotes checked? Samuel Le 24/03/2013 23:19, Gary Nelson a ?crit : > My problem seems to be that scinotes has vanished. Neither > > --> scinotes > > nor > > Applications/scinotes > > > does anything at all. A scinotes window used to open and now there is > none. > > Again, I reinstalled 5.4.0 to no avail. > > Recall that a few days ago the scinotes window was opening and I was > beginning to make progress. Then it disappeared and I can't do > anything useful. > > This has to be a simple problem, but it eludes me. > > I thank you for your guidance > > > Gary Nelson > gnelson.zynrgy at gmail.com > > > > > > On Mar 23, 2013, at 4:27 PM, Samuel Gougeon > wrote: > >> Le 24/03/2013 00:16, Gary Nelson a ?crit : >>> What can I do to fix this?? >> you may type >> --> scinotes >> or use: (Console) Menu Applications => Scinotes >> then open a script from Scinotes. >> >> Samuel >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From communication at scilab-enterprises.com Tue Mar 26 09:04:06 2013 From: communication at scilab-enterprises.com (Communication) Date: Tue, 26 Mar 2013 09:04:06 +0100 Subject: [Scilab-users] =?iso-8859-1?q?SAVE_THE_DATE_-_ScilabTEC_2013=2C_w?= =?iso-8859-1?q?ednesday_26_june_2013_-_=C9cole_Polytechnique?= Message-ID: <51515676.2040900@scilab-enterprises.com> scilabtec SAVE THE DATE for the 5th edition of ScilabTEC, the annual Scilab Users Day. Complete program to come shortly. Find the last editions of ScilabTEC online at http://www.scilab.org/community/scilabtec -- Communications and Public Relations Department Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles (France) http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 35206 bytes Desc: not available URL: From tvitklg at rambler.ru Tue Mar 26 09:36:24 2013 From: tvitklg at rambler.ru (TViT) Date: Tue, 26 Mar 2013 01:36:24 -0700 (PDT) Subject: [Scilab-users] [Users] Discrete cosine transform In-Reply-To: <1346173704960-4024743.post@n3.nabble.com> References: <1345228164.512773.31919.54484@saddam3.rambler.ru> <50338CCA.1000305@inria.fr> <1346136304948-4024738.post@n3.nabble.com> <503CB7C0.6010001@inria.fr> <1346173704960-4024743.post@n3.nabble.com> Message-ID: <1364286984827-4026359.post@n3.nabble.com> Say please why the example, given in the help does not work? What communication(connection) DCT and FFTw? In my representation FFT through one script is carried out, and DCT through another script however dct.sci has not found in Scilab 5.4.0 //---------------------------------- -->d=dct(s); !--error 999 dct: Creation of requested fftw plan failed. //---------------------------------- // build a sampled at 1000hz containing pure frequencies // at 50 and 70 Hz sample_rate=1000; t = 0:1/sample_rate:0.6; N=size(t,'*'); //number of samples s=sin(2*%pi*50*t)+sin(2*%pi*70*t+%pi/4)+grand(1,N,'nor',0,1); d=dct(s); // zero low energy components d(abs(d)<1)=0; size(find(y1<>0),'*') //only 30 non zero coefficients out of 600 clf;plot(s,'b'),plot(dct(d,1),'r') -- View this message in context: http://mailinglists.scilab.org/Users-Discrete-cosine-transform-tp4024712p4026359.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Tue Mar 26 09:54:35 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 26 Mar 2013 09:54:35 +0100 Subject: [Scilab-users] [Users] Discrete cosine transform In-Reply-To: <1364286984827-4026359.post@n3.nabble.com> References: <1345228164.512773.31919.54484@saddam3.rambler.ru> <50338CCA.1000305@inria.fr> <1346136304948-4024738.post@n3.nabble.com> <503CB7C0.6010001@inria.fr> <1346173704960-4024743.post@n3.nabble.com> <1364286984827-4026359.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106E0A8BA@301EX00100.sidel.com> Hello, De la part de TViT Envoy? : mardi 26 mars 2013 09:36 > Say please why the example, given in the help does not work? > > //---------------------------------- > -->d=dct(s); > !--error 999 > dct: Creation of requested fftw plan failed. I think you refere to the example given in the "dct" help topic. I've got the same error... -- 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 ameni088 at hotmail.fr Tue Mar 26 14:29:03 2013 From: ameni088 at hotmail.fr (ScilabUser) Date: Tue, 26 Mar 2013 06:29:03 -0700 (PDT) Subject: [Scilab-users] problems with libjavasci2.so.5.3.3.. Just Begining with Scilab Message-ID: <1364304543403-4026361.post@n3.nabble.com> Hi, I am working on MintUbuntu and I am tring to use Scilab with Eclipse , so: 1/ I installed scilab and libjavasci2 from software Manager 2/ I defined 2 environments *SCI= /usr/share/scilab *and *LD_LIBRARY_PATH=/usr/lib/scilab* 3/ I added two externals jars: *org.scilab.modules.javasci.jar * and * org.scilab.modules.types.jar* But when I run the application, I see this error: *************** The native library javasci does not exist or cannot be found. java.lang.UnsatisfiedLinkError: /usr/lib/jni/libjavasci2.so.5.3.3: /usr/lib/scilab/libscilinear_algebra.so.5: undefined symbol: find_ at ......... *************** I didn't understand the problem !! Help please.. Thanks -- View this message in context: http://mailinglists.scilab.org/problems-with-libjavasci2-so-5-3-3-Just-Begining-with-Scilab-tp4026361.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Tue Mar 26 18:22:30 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 26 Mar 2013 18:22:30 +0100 Subject: [Scilab-users] [Users] Discrete cosine transform In-Reply-To: <1364286984827-4026359.post@n3.nabble.com> References: <1345228164.512773.31919.54484@saddam3.rambler.ru> <50338CCA.1000305@inria.fr> <1346136304948-4024738.post@n3.nabble.com> <503CB7C0.6010001@inria.fr> <1346173704960-4024743.post@n3.nabble.com> <1364286984827-4026359.post@n3.nabble.com> Message-ID: <5151D956.7030407@inria.fr> With Scilab 5.4.0 Windows versions using the MKL library, the dct and dst function does not work (the associated routines are not present in the MKL library) One solution is to use a non MKL version You can also use the attached Scilab function based on fft (slower) Serge Steer Le 26/03/2013 09:36, TViT a ?crit : > Say please why the example, given in the help does not work? What > communication(connection) DCT and FFTw? > In my representation FFT through one script is carried out, and DCT through > another script however dct.sci has not found in Scilab 5.4.0 > > //---------------------------------- > -->d=dct(s); > !--error 999 > dct: Creation of requested fftw plan failed. > > //---------------------------------- > // build a sampled at 1000hz containing pure frequencies > // at 50 and 70 Hz > sample_rate=1000; > t = 0:1/sample_rate:0.6; > N=size(t,'*'); //number of samples > s=sin(2*%pi*50*t)+sin(2*%pi*70*t+%pi/4)+grand(1,N,'nor',0,1); > d=dct(s); > // zero low energy components > d(abs(d)<1)=0; > size(find(y1<>0),'*') //only 30 non zero coefficients out of 600 > clf;plot(s,'b'),plot(dct(d,1),'r') > > > > -- > View this message in context: http://mailinglists.scilab.org/Users-Discrete-cosine-transform-tp4024712p4026359.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 > -------------- next part -------------- function y=dct(A,varargin) if A==[] then y=A;return;end if size(A,'*')==1 then y=A;return;end if size(varargin)==0 then d=-1 else d=varargin(1) varargin(1)=null() end select size(varargin) case 0 then //dct(A [,sign]) y=dct_nd(A,d) case 1 then //dct(A [,sign],selection) case 3 then //dct(A [,sign],dims,incrs) end endfunction function y= dct_nd(y,flag) for k=1:ndims(y) y=dct_1d(y,flag,k) end endfunction function y = dct_1d (x,flag,sel) //Ref: A. K. Jain, "Fundamentals of Digital Image Processing", pp. 150-153. if x==[] then y=x,return,end if argn(2)==1 then flag=-1,end szx=size(x); if argn(2)<3 then if size(find(szx>1),'*')==1 then sel=k;else sel=1;end end n=szx(sel) if n==1 then y=x,return,end if sel<>1 then sz1=1:ndims(x);sz1([1 sel])=sz1([sel 1]); x=permute(x,sz1) szx=permute(szx,sz1) end x=matrix(x,n,-1); m=size(x,2); if flag==-1 then w=[sqrt(0.25/n);sqrt(0.5/n)*exp((-%i*%pi/2/n)*(1:n-1)')]*ones(1,m); if isreal(x)&modulo(n,2)==0 then y=2*real(w.*fft([x(1:2:n,:); x(n:-2:2,:)],flag,1)); else y=fft([x;x($:-1:1,:)],flag,1); y=w.*y(1:n,:); if isreal(x) then y=real(y); end end else //inverse transform if isreal(x)&modulo(n,2)==0 then w = [sqrt(n/4);sqrt(n/2)*exp((%i*%pi/2/n)*(1:n-1)')]*ones(1,m); y=fft(w.*x,flag,1); y([1:2:n,n:-2:1],:)=2*real(y); else w = [sqrt(4*n);sqrt(2*n)*exp((%i*%pi/2/n)*(1:n-1)')]*ones(1,m); y=[x.*w;zeros(1,nc);-%i*w(2:$,:).*x($:-1:2,:)]; y=fft([x.*w;zeros(1,nc);-%i*w(2:$,:).*x($:-1:2,:)],flag,1); y=y(1:n,:); if isreal(x) then y=real(y); end end end if sel<>1 then y=permute(y,sz1) ;end y=matrix(y,szx) endfunction function y=idct(x) y=dct(x,1) endfunction function y=dst(x,flag) [mx,nx]=size(x); if argn(2)==1 then flag=-1,end if size(x,1)==1 then //transform x as a column vector x=matrix(x,-1,1); n=mx*nx; nc=1; else n=mx; nc=nx end if n==1 then y=matrix(x,mx,nx),return,end y=fft([zeros(1,nc);x;zeros(1,nc);-x($:-1:1,:)],-1,1) if isreal(x) then y=-imag(y(2:n+1,:))/2 else y=y(2:n+1,:)/(-2*%i) end if flag==1 then y=2/(n+1)*y;end y=matrix(y,mx,nx); endfunction function y=idst(x) y=dst(x,1) endfunction From tvitklg at rambler.ru Tue Mar 26 19:20:46 2013 From: tvitklg at rambler.ru (TViT) Date: Tue, 26 Mar 2013 11:20:46 -0700 (PDT) Subject: [Scilab-users] [Users] Discrete cosine transform In-Reply-To: <5151D956.7030407@inria.fr> References: <1345228164.512773.31919.54484@saddam3.rambler.ru> <50338CCA.1000305@inria.fr> <1346136304948-4024738.post@n3.nabble.com> <503CB7C0.6010001@inria.fr> <1346173704960-4024743.post@n3.nabble.com> <1364286984827-4026359.post@n3.nabble.com> <5151D956.7030407@inria.fr> Message-ID: <1364322046607-4026364.post@n3.nabble.com> Serge and how to use? I moved dct.sci to a folder ?:\Program Files\scilab-5.4.0\modules\signal_processing\macros Has started buildmacros.bat and the file dct.bin has appeared. The example from Help all the same does not work. I should somewhere specify not used libraries, only macros scripts were use? That Where such MKL library. How to remove, that all functions worked on scripts and to not waste time on struggle with libraries. -- View this message in context: http://mailinglists.scilab.org/Users-Discrete-cosine-transform-tp4024712p4026364.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Wed Mar 27 11:08:12 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 27 Mar 2013 11:08:12 +0100 Subject: [Scilab-users] [Users] Discrete cosine transform In-Reply-To: <1364322046607-4026364.post@n3.nabble.com> References: <1345228164.512773.31919.54484@saddam3.rambler.ru> <50338CCA.1000305@inria.fr> <1346136304948-4024738.post@n3.nabble.com> <503CB7C0.6010001@inria.fr> <1346173704960-4024743.post@n3.nabble.com> <1364286984827-4026359.post@n3.nabble.com> <5151D956.7030407@inria.fr> <1364322046607-4026364.post@n3.nabble.com> Message-ID: <5152C50C.5080000@inria.fr> Le 26/03/2013 19:20, TViT a ?crit : > Serge and how to use? Just exec the file before use, it will overload the dct function Serge Steer > I moved dct.sci to a folder ?:\Program > Files\scilab-5.4.0\modules\signal_processing\macros > Has started buildmacros.bat and the file dct.bin has appeared. The example > from Help all the same does not work. > I should somewhere specify not used libraries, only macros scripts were use? > > That Where such MKL library. How to remove, that all functions worked on > scripts and to not waste time on struggle with libraries. > > > > -- > View this message in context: http://mailinglists.scilab.org/Users-Discrete-cosine-transform-tp4024712p4026364.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 stephane.becu at maya-technologies.com Wed Mar 27 14:38:03 2013 From: stephane.becu at maya-technologies.com (Stephane BECU) Date: Wed, 27 Mar 2013 13:38:03 +0000 Subject: [Scilab-users] X Y coordinates in a scilab plot Message-ID: Hello, I'd like to add a characters string in a scilab plot. Using the "xstring()" function , I have to fix the positon of the text giving the X Y coordinates of the left bottom point of the box containing the text. I was wondring where was the origin position and how to know which distance should be considered? Thanks for help, St?phane [Maya Technologies] Stephane BECU Tel: +33 4 38 49 59 01 Mobile: www.maya-technologies.com Maya technologies La Petite Halle ZAC Bouchayer Viallet 31, rue Gustave Eiffel 38 000 Grenoble -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Wed Mar 27 18:58:24 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 27 Mar 2013 18:58:24 +0100 Subject: [Scilab-users] X Y coordinates in a scilab plot In-Reply-To: References: Message-ID: <51533340.8030404@inria.fr> Le 27/03/2013 14:38, Stephane BECU a ?crit : > > Hello, > > I'd like to add a characters string in a scilab plot. Using the > "xstring()" function , I have to fix the positon of the text giving > the X Y coordinates of the left bottom point of the box containing the > text. I was wondring where was the origin position and how to know > which distance should be considered? > The string is supposed enclosed into a rectangle. The coordinates required for xstring are the coordinates of the top left corner of the rectangle If you want to know the actual dimension of the minimal rectangle containing a string you may use the xstringl function. Serge Steer > > Thanks for help, > > St?phane > > Maya Technologies *Stephane BECU* > > Tel:+33 4 38 49 59 01 > Mobile: > www.maya-technologies.com > > *Maya technologies* > La Petite Halle > ZAC Bouchayer Viallet > 31, rue Gustave Eiffel > 38 000 Grenoble > > > > _______________________________________________ > 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 esterline.com Thu Mar 28 09:09:16 2013 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 28 Mar 2013 09:09:16 +0100 Subject: [Scilab-users] basic question on scilab rights issue Message-ID: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77975@exchsrv.auxitrol.ad> Dear, I installed scilab on a server (CentOS) to shared it with my colleagues ; even if it seems to work, I've the message hereafter : what I've to do in order to make the job correctly ? thanks Paul -------------------------------------------------------------------------------- /usr/bin/chcon: impossible de changer le contexte de ??? /scilab-5.4.0/bin/scilab-bin? ?? ? ??? system_u:object_r:execmem_exec_t:s0? ??: Op?ration non permise Error: Cannot chcon 'scilab-bin' /usr/bin/chcon: impossible de changer le contexte de ??? /scilab-5.4.0/bin/scilab-cli-bin? ?? ? ??? system_u:object_r:execmem_exec_t:s0? ??: Op?ration non permise Error: Cannot chcon 'scilab-cli-bin' -------------------------------------------------------------------------------- Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Thu Mar 28 09:15:42 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Thu, 28 Mar 2013 09:15:42 +0100 Subject: [Scilab-users] basic question on scilab rights issue In-Reply-To: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77975@exchsrv.auxitrol.ad> References: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77975@exchsrv.auxitrol.ad> Message-ID: <5153FC2E.9020508@scilab-enterprises.com> Bonjour Paul, On 28/03/2013 09:09, Carrico, Paul wrote: > Dear, > > I installed scilab on a server (CentOS) to shared it with my colleagues > ; even if it seems to work, I've the message hereafter : what I've to do > in order to make the job correctly ? Selinux is complaining about non regular operations done by Scilab (basically, the load of the native Java library). However, Scilab bypasses itself the limitation of selinux It is done by the function check_and_disable_selinux in bin/scilab but it is supposed to work at the end. Sylvestre From stephane.becu at maya-technologies.com Thu Mar 28 14:39:32 2013 From: stephane.becu at maya-technologies.com (Stephane BECU) Date: Thu, 28 Mar 2013 13:39:32 +0000 Subject: [Scilab-users] X Y coordinates in a scilab plot In-Reply-To: <51533340.8030404@inria.fr> References: , <51533340.8030404@inria.fr> Message-ID: <8c20a50dd0a741e2b88aa3220378b9f8@EXCHSRV.maya-technologies.local> Thanks Serge for your reply, but I'm not sure it answered my problem. In fact I want to know how to calculate the appropriate coordinates to place the ttext at the relevant poisiton of my plot... St?phane ________________________________ De : users-bounces at lists.scilab.org de la part de Serge Steer Envoy? : mercredi 27 mars 2013 18:58 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] X Y coordinates in a scilab plot Le 27/03/2013 14:38, Stephane BECU a ?crit : Hello, I'd like to add a characters string in a scilab plot. Using the "xstring()" function , I have to fix the positon of the text giving the X Y coordinates of the left bottom point of the box containing the text. I was wondring where was the origin position and how to know which distance should be considered? The string is supposed enclosed into a rectangle. The coordinates required for xstring are the coordinates of the top left corner of the rectangle If you want to know the actual dimension of the minimal rectangle containing a string you may use the xstringl function. Serge Steer Thanks for help, St?phane [Maya Technologies] Stephane BECU Tel: +33 4 38 49 59 01 Mobile: www.maya-technologies.com Maya technologies La Petite Halle ZAC Bouchayer Viallet 31, rue Gustave Eiffel 38 000 Grenoble _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From grivet at cnrs-orleans.fr Thu Mar 28 16:22:44 2013 From: grivet at cnrs-orleans.fr (grivet) Date: Thu, 28 Mar 2013 16:22:44 +0100 Subject: [Scilab-users] xclick on a Mac In-Reply-To: <8c20a50dd0a741e2b88aa3220378b9f8@EXCHSRV.maya-technologies.local> References: , <51533340.8030404@inria.fr> <8c20a50dd0a741e2b88aa3220378b9f8@EXCHSRV.maya-technologies.local> Message-ID: <51546044.4070409@cnrs-orleans.fr> Hi, I have written a small program to illustrate simple electrostatics. The user is supposed to click (4 times) inside the figure to place a point charge and then to enter the value of this charge. The program will then compute and map the electrostatic potential. clear; clf(); a = gca(); a.tight_limits = "on"; xsetech(wrect=[0,0,1,1],frect=[-5,-5,5,5],arect = 0.99*[1,1,1,1]); np = 4; i = 1; xinfo("clic gauche dans la fen?tre pour placer une charge (4 en tout)"); while i <= np [ib,xx,yy] = xclick(1); if abs(xx) < 5 & abs(yy) < 5 & ib==3 xs(i) = xx; ys(i)=yy; charge(i) = evstr(x_dialog("valeur de la charge: ","1")); if charge(i) >0 then plot2d(xs(i),ys(i),style = -4,strf="002") else plot2d(xs(i),ys(i),style = -5,strf="002") end i = i+1; end xinfo("clic gauche dans la fen?tre pour placer une charge (il reste " + string(5-i)+ " charge(s))"); end /............potential computation and display.........../ This program performs quite well under WinXP/SP3. However, when run ona Mac (OS X version 10.7.5 Scilab 5.4.0 ), it stops after the first click; Scilab emits screen-fulls of Java error messages and warnings. Can naybody help me run this softaware on the Mac ? Thank you in advance for your time and help. JP Grivet From Serge.Steer at inria.fr Thu Mar 28 16:59:48 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 28 Mar 2013 16:59:48 +0100 Subject: [Scilab-users] X Y coordinates in a scilab plot In-Reply-To: <8c20a50dd0a741e2b88aa3220378b9f8@EXCHSRV.maya-technologies.local> References: , <51533340.8030404@inria.fr> <8c20a50dd0a741e2b88aa3220378b9f8@EXCHSRV.maya-technologies.local> Message-ID: <515468F4.7010400@inria.fr> Le 28/03/2013 14:39, Stephane BECU a ?crit : > > Thanks Serge for your reply, but I'm not sure it answered my > problem. In fact I want to know how to calculate the appropriate > coordinates to place the ttext at the relevant poisiton of my plot... > How do you define "the appropriate coordinates"? Please find below an example of string placement t=linspace(0,2*%pi,100); clf;plot(t,sin(t)) //now I want to draw a string at different locations str="Scilab"; rect=xstringl(0,0,str); //the lower left corner of the rectangle surrounding the string positionned at the (3,sin(3)) point plot(3,sin(3),'xr') xstring(3,sin(3),str) e=gce();e.box='on'; //the upper left corner of the rectangle surrounding the string is positionned at the (3,sin(3)) point plot(2,sin(2),'xr') xstring(2,sin(2)-rect(4),str) e=gce();e.box='on'; Serge > ------------------------------------------------------------------------ > *De :* users-bounces at lists.scilab.org de la part de Serge Steer > *Envoy? :* mercredi 27 mars 2013 18:58 > *? :* International users mailing list for Scilab. > *Objet :* Re: [Scilab-users] X Y coordinates in a scilab plot > > Le 27/03/2013 14:38, Stephane BECU a ?crit : >> >> Hello, >> >> I'd like to add a characters string in a scilab plot. Using the >> "xstring()" function , I have to fix the positon of the text giving >> the X Y coordinates of the left bottom point of the box containing >> the text. I was wondring where was the origin position and how to >> know which distance should be considered? >> > The string is supposed enclosed into a rectangle. The coordinates > required for xstring are the coordinates of the top left corner of the > rectangle > If you want to know the actual dimension of the minimal rectangle > containing a string you may use the xstringl function. > Serge Steer >> >> Thanks for help, >> >> St?phane >> >> Maya Technologies *Stephane BECU* >> >> Tel:+33 4 38 49 59 01 >> Mobile: >> www.maya-technologies.com >> >> *Maya technologies* >> La Petite Halle >> ZAC Bouchayer Viallet >> 31, rue Gustave Eiffel >> 38 000 Grenoble >> >> >> >> _______________________________________________ >> 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 antoine.monmayrant at laas.fr Thu Mar 28 17:03:19 2013 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 28 Mar 2013 17:03:19 +0100 Subject: [Scilab-users] xclick on a Mac In-Reply-To: <51546044.4070409@cnrs-orleans.fr> References: , <51533340.8030404@inria.fr> <8c20a50dd0a741e2b88aa3220378b9f8@EXCHSRV.maya-technologies.local> <51546044.4070409@cnrs-orleans.fr> Message-ID: <515469C7.9060304@laas.fr> Hi, This might not help and may not be related, but guibuilder is not working on OSX and I think this is due to a problem with detection of mouse clicks... Antoine From porpoiseseeker at gmail.com Fri Mar 29 06:42:52 2013 From: porpoiseseeker at gmail.com (Gary Nelson) Date: Thu, 28 Mar 2013 22:42:52 -0700 Subject: [Scilab-users] Restart with 5.4.0 update In-Reply-To: <5150E126.9030901@free.fr> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> <514E3A50.3070608@free.fr> <45F47C56-7AC5-44EA-A3C8-EF95EF557F68@gmail.com> <5150E126.9030901@free.fr> Message-ID: <7CA8DE74-DE6A-415C-A27D-C8253D1155E5@gmail.com> Gary Nelson porpoiseseeker at gmail.com On Mar 25, 2013, at 4:43 PM, Samuel Gougeon wrote: > Hi Gary, > > // What does > edit sind // ? Tried this is console window: no effect > // What does > editor my_new_file.sce // ? Asked if I wanted to create that file, apparently did it. Nothing visible happened > > In the Preferences => Scinotes : Editor frame : > What is the status of Scinotes? use Scinotes checked? Yes, Use Scinotes is checked. I am wondering about some MacOSx preferences that might be corrupted. I don't know what to look for to trash existing preferences THere are several configuration files including one for scinotes. Thanks. Hope we can get this going as I have some fun coding I want to do > > Samuel > > > Le 24/03/2013 23:19, Gary Nelson a ?crit : >> My problem seems to be that scinotes has vanished. Neither >> >> --> scinotes >> >> nor >> >> Applications/scinotes >> >> >> does anything at all. A scinotes window used to open and now there is none. >> >> Again, I reinstalled 5.4.0 to no avail. >> >> Recall that a few days ago the scinotes window was opening and I was beginning to make progress. Then it disappeared and I can't do anything useful. >> >> This has to be a simple problem, but it eludes me. >> >> I thank you for your guidance >> >> >> Gary Nelson >> gnelson.zynrgy at gmail.com >> >> >> >> >> >> On Mar 23, 2013, at 4:27 PM, Samuel Gougeon wrote: >> >>> Le 24/03/2013 00:16, Gary Nelson a ?crit : >>>> What can I do to fix this?? >>> you may type >>> --> scinotes >>> or use: (Console) Menu Applications => Scinotes >>> then open a script from Scinotes. >>> >>> Samuel >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From porpoiseseeker at gmail.com Fri Mar 29 07:55:45 2013 From: porpoiseseeker at gmail.com (Gary Nelson) Date: Thu, 28 Mar 2013 23:55:45 -0700 Subject: [Scilab-users] Restart with 5.4.0 update In-Reply-To: <5150E126.9030901@free.fr> References: <5693B9E9-5774-414E-B8F6-923FBA04D959@gmail.com> <22EB72AF-1018-4A98-A9AD-D5DEDA7E5500@gmail.com> <514E3A50.3070608@free.fr> <45F47C56-7AC5-44EA-A3C8-EF95EF557F68@gmail.com> <5150E126.9030901@free.fr> Message-ID: <9E87323D-BAD1-4E20-BF6B-297F8E1ED55B@gmail.com> Samuel, I don't know what did it, but the SciNotes window opened and stayed with me until I closed Scilab and reopened. Then Scinotes is gone again I never saw SciNotes open, but discovered it using that MacOSX feature of sweeping 4 fingers over the touchpad to collapse all windows. When I did that I found SciNotes open. I just tried your suggestions below, but to no avail. Very weird. It is clearly a configuration problem but not obvious. Thanks Gary Nelson porpoiseseeker at gmail.com On Mar 25, 2013, at 4:43 PM, Samuel Gougeon wrote: > Hi Gary, > > // What does > edit sind // ? > // What does > editor my_new_file.sce // ? > > In the Preferences => Scinotes : Editor frame : > What is the status of Scinotes? use Scinotes checked? > > Samuel > > > Le 24/03/2013 23:19, Gary Nelson a ?crit : >> My problem seems to be that scinotes has vanished. Neither >> >> --> scinotes >> >> nor >> >> Applications/scinotes >> >> >> does anything at all. A scinotes window used to open and now there is none. >> >> Again, I reinstalled 5.4.0 to no avail. >> >> Recall that a few days ago the scinotes window was opening and I was beginning to make progress. Then it disappeared and I can't do anything useful. >> >> This has to be a simple problem, but it eludes me. >> >> I thank you for your guidance >> >> >> Gary Nelson >> gnelson.zynrgy at gmail.com >> >> >> >> >> >> On Mar 23, 2013, at 4:27 PM, Samuel Gougeon wrote: >> >>> Le 24/03/2013 00:16, Gary Nelson a ?crit : >>>> What can I do to fix this?? >>> you may type >>> --> scinotes >>> or use: (Console) Menu Applications => Scinotes >>> then open a script from Scinotes. >>> >>> Samuel >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyrock at outlook.com Fri Mar 29 11:01:44 2013 From: andyrock at outlook.com (AndyRock) Date: Fri, 29 Mar 2013 03:01:44 -0700 (PDT) Subject: [Scilab-users] Error to make Example1 Message-ID: <1364551304645-4026382.post@n3.nabble.com> Hi, I downloaded scilab-5.4.0 and I tried to make example located in /scilab-5.4.0/share/scilab/modules/javasci/examples/v2 so I updated SCI variable in the makefile but I had this error: *The native library javasci does not exist or cannot be found. java.lang.UnsatisfiedLinkError: /home/scilab-5.4.0/lib/scilab/libjavasci2.so.5.4.0: libscilab.so.0: cannot open shared object file: No such file or directory at java.lang... at ... * Is that I forgot something Thanks -- View this message in context: http://mailinglists.scilab.org/Error-to-make-Example1-tp4026382.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sylvestre.ledru at scilab-enterprises.com Fri Mar 29 11:12:37 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Fri, 29 Mar 2013 11:12:37 +0100 Subject: [Scilab-users] Error to make Example1 In-Reply-To: <1364551304645-4026382.post@n3.nabble.com> References: <1364551304645-4026382.post@n3.nabble.com> Message-ID: <51556915.5010705@scilab-enterprises.com> Le 29/03/2013 11:01, AndyRock a ?crit : > Hi, > > I downloaded scilab-5.4.0 and I tried to make example located in > /scilab-5.4.0/share/scilab/modules/javasci/examples/v2 so I updated SCI > variable in the makefile > but I had this error: > > *The native library javasci does not exist or cannot be found. > java.lang.UnsatisfiedLinkError: > /home/scilab-5.4.0/lib/scilab/libjavasci2.so.5.4.0: libscilab.so.0: cannot > open shared object file: No such file or directory > at java.lang... > at ... * > > Is that I forgot something The third item of http://help.scilab.org/javasci_faq_v2 is probably what you are looking for. Sylvestre From andyrock at outlook.com Fri Mar 29 14:45:05 2013 From: andyrock at outlook.com (AndyRock) Date: Fri, 29 Mar 2013 06:45:05 -0700 (PDT) Subject: [Scilab-users] Error to make Example1 In-Reply-To: <51556915.5010705@scilab-enterprises.com> References: <1364551304645-4026382.post@n3.nabble.com> <51556915.5010705@scilab-enterprises.com> Message-ID: <1364564705517-4026391.post@n3.nabble.com> This is my Makefile: I tried to follow steps in this page http://help.scilab.org/docs/5.4.0/en_US/compile_and_run_javasci_v2.html ************************ # A sample Makefile to build a Javasci v2-based application # Path to Scilab data SCI =/home/scilab-5.4.0/share/scilab # Java API CLASSPATH = $(SCI)/modules/javasci/jar/org.scilab.modules.javasci.jar:$(SCI)/modules/types/jar/org.scilab.modules.types.jar # Path to native libs LD_LIBRARY_PATH = $(SCI)/../../lib/scilab/ # Scilab binary: /path/to/scilab/lib/scilab/ # with the source version: $(SCI)/modules/javasci/.libs/:$(SCI)/modules/.libs/ all: javac -cp $(CLASSPATH) Example1.java java -cp $(CLASSPATH):. -DSCI=$(SCI) -Djava.library.path=$(LD_LIBRARY_PATH) Example1 *********************** Thanks -- View this message in context: http://mailinglists.scilab.org/Error-to-make-Example1-tp4026382p4026391.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sylvestre.ledru at scilab-enterprises.com Fri Mar 29 15:17:48 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Fri, 29 Mar 2013 15:17:48 +0100 Subject: [Scilab-users] Error to make Example1 In-Reply-To: <1364564705517-4026391.post@n3.nabble.com> References: <1364551304645-4026382.post@n3.nabble.com> <51556915.5010705@scilab-enterprises.com> <1364564705517-4026391.post@n3.nabble.com> Message-ID: <5155A28C.6060102@scilab-enterprises.com> Le 29/03/2013 14:45, AndyRock a ?crit : > This is my Makefile: > I tried to follow steps in this page > http://help.scilab.org/docs/5.4.0/en_US/compile_and_run_javasci_v2.html > > > ************************ > # A sample Makefile to build a Javasci v2-based application > # Path to Scilab data > SCI =/home/scilab-5.4.0/share/scilab > # Java API > CLASSPATH = > $(SCI)/modules/javasci/jar/org.scilab.modules.javasci.jar:$(SCI)/modules/types/jar/org.scilab.modules.types.jar > # Path to native libs > LD_LIBRARY_PATH = $(SCI)/../../lib/scilab/ > # Scilab binary: /path/to/scilab/lib/scilab/ > # with the source version: > $(SCI)/modules/javasci/.libs/:$(SCI)/modules/.libs/ > all: > javac -cp $(CLASSPATH) Example1.java > java -cp $(CLASSPATH):. -DSCI=$(SCI) -Djava.library.path=$(LD_LIBRARY_PATH) > Example1 > > *********************** > Thanks > > There is a missing item in the documentation (which I just fixed). With LD_LIBRARY_PATH = $(SCI)/../../lib/scilab/:$(SCI)/../../lib/thirdparty/ and using the call sequence: LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) java -cp $(CLASSPATH):. -DSCI=$(SCI) Example1 it fixes your issue on my system. Sylvestre From michael.dunn at ubm.com Sat Mar 30 01:39:57 2013 From: michael.dunn at ubm.com (Michael Dunn) Date: Fri, 29 Mar 2013 20:39:57 -0400 Subject: [Scilab-users] Want to compare phase Message-ID: Hi?Scilab newbie here. I want to compare the phase of two sinewaves, and am trying to figure out if phasemag is something I can use. I'm experimenting, but it's still a bit mysterious. I did try correlation (in a spreadsheet mind you), and it worked well, except for not distinguishing 0-? from ?-2? ranges. If not phasemag, is there some other function that might be applicable? Thanks! Michael Dunn | Editor-in-Chief Scope Junction | http://www.scopejunction.com/ UBM Electronics (415) 947-6096 (USA) (519) 744-9395 (Canada) Skype: MichaelDunn_UBM LinkedIn: http://www.linkedin.com/in/cantares [cid:74368E56-589C-4F54-8EB9-80E8441BAAEA] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0037D790-7BC6-4B2E-8F0E-A3D972B2935B[30].png Type: image/png Size: 12428 bytes Desc: 0037D790-7BC6-4B2E-8F0E-A3D972B2935B[30].png URL: From hrdessau at knology.net Sat Mar 30 16:32:20 2013 From: hrdessau at knology.net (Harold Dessau) Date: Sat, 30 Mar 2013 10:32:20 -0500 Subject: [Scilab-users] Scilab 5.4.0 fixes not updated Message-ID: <73FCADA9-1C4E-4954-A2ED-2907AE2B919B@knology.net> An old MacOS 10.8 bug was reportedly fixed involving an endfunction call that Scilab could not see. I had expected that Scilab 5.4.0 would update fixed bugs so that new downloads would work. Regrettably, this does not appear to be the case. Must we wait for Scilab 5.4.1 for the bug fixes? Is there a release date? Hal Dessau From lihnyaa at gmail.com Sat Mar 30 16:39:28 2013 From: lihnyaa at gmail.com (lihnyaa) Date: Sat, 30 Mar 2013 08:39:28 -0700 (PDT) Subject: [Scilab-users] How to duck the variable browser Message-ID: <1364657968258-4026401.post@n3.nabble.com> I use scilab 5.3.3 under Win7, and only scilab console appear when I start scilab, and I cannot find the "?" on the variable browser as others said. I am a new leaner of scilab, and thanks for your help. -- View this message in context: http://mailinglists.scilab.org/How-to-duck-the-variable-browser-tp4026401.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From krotersv at gmail.com Sat Mar 30 17:45:33 2013 From: krotersv at gmail.com (=?UTF-8?B?0KHRgtCw0L3QuNGB0LvQsNCy?=) Date: Sat, 30 Mar 2013 22:45:33 +0600 Subject: [Scilab-users] How to duck the variable browser In-Reply-To: <1364657968258-4026401.post@n3.nabble.com> References: <1364657968258-4026401.post@n3.nabble.com> Message-ID: <515716AD.5020000@gmail.com> 30.03.2013 21:39, lihnyaa ?????: > I use scilab 5.3.3 under Win7, and only scilab console appear when I start > scilab, and I cannot find the "?" on the variable browser as others said. > > I am a new leaner of scilab, and thanks for your help. > > > > > -- > View this message in context: http://mailinglists.scilab.org/How-to-duck-the-variable-browser-tp4026401.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 Hi. I think that other said about Scilab 5.4.0. Try it. Stanislav From porpoiseseeker at gmail.com Sat Mar 30 21:46:23 2013 From: porpoiseseeker at gmail.com (Gary Nelson) Date: Sat, 30 Mar 2013 13:46:23 -0700 Subject: [Scilab-users] Trouble with 5.4.0 on MacOSX 10.8.3 In-Reply-To: <73FCADA9-1C4E-4954-A2ED-2907AE2B919B@knology.net> References: <73FCADA9-1C4E-4954-A2ED-2907AE2B919B@knology.net> Message-ID: <25AF300B-AA73-4463-82E9-82A1E1FDE846@gmail.com> Thanks to Samuel for his help I installed 5.4.0 on this upgraded version of OSX and SciNotes will not reliably open. If I do this ->dir SCIHOME ans = .history.scilab configuration.xml scinotesConfiguration.xml XConfiguration.xml keysConfiguration.xml windowsConfiguration.xml It would seem that some of these configuration files is corrupted, but I can't find them. A seach of the hard drive using SCIHOME or any of the above file names produces no hits. How do I find these and trash them? Thanks Gary Nelson porpoiseseeker at gmail.com From sgougeon at free.fr Sat Mar 30 21:59:07 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 30 Mar 2013 21:59:07 +0100 Subject: [Scilab-users] Trouble with 5.4.0 on MacOSX 10.8.3 In-Reply-To: <25AF300B-AA73-4463-82E9-82A1E1FDE846@gmail.com> References: <73FCADA9-1C4E-4954-A2ED-2907AE2B919B@knology.net> <25AF300B-AA73-4463-82E9-82A1E1FDE846@gmail.com> Message-ID: <5157521B.6080909@free.fr> Le 30/03/2013 21:46, Gary Nelson a ?crit : > > How do I find these in --> SCIHOME --> help SCIHOME > and trash them? with your OSfile browser, or under Scilab with --> help deletefile http://help.scilab.org/docs/5.4.0/en_US/deletefile.html Samuel From porpoiseseeker at gmail.com Sat Mar 30 22:54:34 2013 From: porpoiseseeker at gmail.com (Gary Nelson) Date: Sat, 30 Mar 2013 14:54:34 -0700 Subject: [Scilab-users] Trouble with 5.4.0 on MacOSX 10.8.3 In-Reply-To: <5157521B.6080909@free.fr> References: <73FCADA9-1C4E-4954-A2ED-2907AE2B919B@knology.net> <25AF300B-AA73-4463-82E9-82A1E1FDE846@gmail.com> <5157521B.6080909@free.fr> Message-ID: <19B0CBFC-C181-46A6-97E9-F92B87FC92EF@gmail.com> From SCILAB -->deletefile('scinotesConfiguration.xml') ans = F -->deletefile(SCIHOME+/'scinotesConfiguration.xml') !--error 2 Invalid factor. --> -->SCIHOME SCIHOME = /Users/garynelson/.Scilab/scilab-5.4.0 -->deletefile(SCIHOME+/'scinotesConfiguration.xml') !--error 2 Invalid factor. ->SCIHOME SCIHOME = /Users/garynelson/.Scilab/scilab-5.4.0 -->deletefile('/scinotesConfiguration.xml') ans = F Is there an error in the syntax here? From OS file browser, there are no files visible with any of these names. Thanks again for your help and patience Gary Nelson porpoiseseeker at gmail.com On Mar 30, 2013, at 1:59 PM, Samuel Gougeon wrote: > Le 30/03/2013 21:46, Gary Nelson a ?crit : >> How do I find these > in > --> SCIHOME > --> help SCIHOME > > >> and trash them? > with your OSfile browser, or under Scilab with > > --> help deletefile > > http://help.scilab.org/docs/5.4.0/en_US/deletefile.html > > Samuel > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From lihnyaa at gmail.com Sun Mar 31 15:28:35 2013 From: lihnyaa at gmail.com (lihnyaa) Date: Sun, 31 Mar 2013 06:28:35 -0700 (PDT) Subject: [Scilab-users] About the function ms_var in GROCER Message-ID: <1364736515498-4026408.post@n3.nabble.com> hello all, I am using ?ric Dubois' GROCER to estimate a MSVAR and I came across a problem about the function ms_var. The simplest call to ms_var takes the following form: ms_var(typvar,p,endo,MS_M,MS_M_V,MS_var_opt ). And the function really works well when there are only 4 endogenous variables in the VAR, but it encounters an error when 5 variables are included. I'm not good at programming, so help is needed. Thank you very much. And I can use msvar_irf to get the impulse response fuction, but there are two kind of irf, named 'full' and 'partial'. So What is the difference between them. Does the 'full' mean exact impulse?response function and the 'partial' is regime dependent impulse response function(the function is conditional on a given regime prevailing at the time of the disturbance and throughout the duration of the response). And thanks very much again. -- View this message in context: http://mailinglists.scilab.org/About-the-function-ms-var-in-GROCER-tp4026408.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From lihnyaa at gmail.com Sun Mar 31 15:32:35 2013 From: lihnyaa at gmail.com (lihnyaa) Date: Sun, 31 Mar 2013 06:32:35 -0700 (PDT) Subject: [Scilab-users] How to duck the variable browser In-Reply-To: <515716AD.5020000@gmail.com> References: <1364657968258-4026401.post@n3.nabble.com> <515716AD.5020000@gmail.com> Message-ID: <1364736755914-4026409.post@n3.nabble.com> So, that means I can not fixed the variable browser in the console window. Thanks for your kind help. -- View this message in context: http://mailinglists.scilab.org/How-to-duck-the-variable-browser-tp4026401p4026409.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From krotersv at gmail.com Sun Mar 31 15:39:30 2013 From: krotersv at gmail.com (Stanislav) Date: Sun, 31 Mar 2013 06:39:30 -0700 (PDT) Subject: [Scilab-users] How to duck the variable browser In-Reply-To: <1364736755914-4026409.post@n3.nabble.com> References: <1364657968258-4026401.post@n3.nabble.com> <515716AD.5020000@gmail.com> <1364736755914-4026409.post@n3.nabble.com> Message-ID: <1364737170964-4026410.post@n3.nabble.com> Hi. I am not sure that variable browser in 5.3.3 does have this ability. Stanislav -- View this message in context: http://mailinglists.scilab.org/How-to-duck-the-variable-browser-tp4026401p4026410.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sun Mar 31 16:47:40 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 31 Mar 2013 16:47:40 +0200 Subject: [Scilab-users] How to duck the variable browser In-Reply-To: <1364737170964-4026410.post@n3.nabble.com> References: <1364657968258-4026401.post@n3.nabble.com> <515716AD.5020000@gmail.com> <1364736755914-4026409.post@n3.nabble.com> <1364737170964-4026410.post@n3.nabble.com> Message-ID: <51584C8C.4020800@free.fr> Le 31/03/2013 15:39, Stanislav a ?crit : > Hi. > I am not sure that variable browser in 5.3.3 does have this ability. It has it. This was introduced in 5.2 or even before in 5. From grocer.toolbox at gmail.com Sun Mar 31 22:33:04 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Sun, 31 Mar 2013 22:33:04 +0200 Subject: [Scilab-users] About the function ms_var in GROCER In-Reply-To: <1364736515498-4026408.post@n3.nabble.com> References: <1364736515498-4026408.post@n3.nabble.com> Message-ID: Hello. What do you mean exactly by: "it encounters an error when 5 variables are included."? Please, send data and code so that I can see what is tour problem. Eric. PS: you will have to wait a little bit for help by myself, because I take a plane tomorrow. 2013/3/31 lihnyaa > hello all, > > I am using ?ric Dubois' GROCER to estimate a MSVAR and I came across a > problem about the function ms_var. > The simplest call to ms_var takes the following form: > ms_var(typvar,p,endo,MS_M,MS_M_V,MS_var_opt ). And the function really > works well when there are only 4 endogenous variables in the VAR, but it > encounters an error when 5 variables are included. > > I'm not good at programming, so help is needed. > Thank you very much. > > And I can use msvar_irf to get the impulse response fuction, but there are > two kind of irf, named 'full' and 'partial'. So What is the difference > between them. Does the 'full' mean exact impulse?response function and the > 'partial' is regime dependent impulse response function(the function is > conditional on a > given regime prevailing at the time of the disturbance and throughout the > duration of the response). > > And thanks very much again. > > > > -- > View this message in context: > http://mailinglists.scilab.org/About-the-function-ms-var-in-GROCER-tp4026408.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: