From rouxph.22 at gmail.com Fri Sep 2 13:10:27 2016 From: rouxph.22 at gmail.com (philippe) Date: Fri, 2 Sep 2016 13:10:27 +0200 Subject: [Scilab-users] strange error with "rat" Message-ID: Hi to all, I use rat to do integer simplifications in vectors (if possible). I use it like this -->[n,d]=rat(2/14) d = 7. n = 1. but I have a strnage error when rat is called from another (very complex) function : *********************************************** -->[D,P,txt]=diagonalisation(A,'txt', variables, 'M') !--error 246 Fonction non d?finie pour le type d'argument donn?, V?rifier les arguments ou d?finir la fonction %s_rat pour la surcharge. at line 38 of function vector2int called by : at line 95 of function matrix2noyau called by : at line 61 of function eigenvector called by : at line 83 of function diagonalisation called by : ******************************************************** I've checked that the argument of rat is a constant (it's -1/2), but I can't reproduce the bug out of this context!?!? Does anyone have any idea of what could have happened ? Philippe From sgougeon at free.fr Fri Sep 2 14:32:00 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Fri, 02 Sep 2016 14:32:00 +0200 Subject: [Scilab-users] strange error with "rat" In-Reply-To: References: Message-ID: Hello Philippe, Le 2016-09-02 13:10, philippe a ?crit?: > Hi to all, > > > I use rat to do integer simplifications in vectors (if possible). I > use > it like this > > -->[n,d]=rat(2/14) > d = > > 7. > n = > > 1. > > but I have a strnage error when rat is called from another (very > complex) function : > > > *********************************************** > > -->[D,P,txt]=diagonalisation(A,'txt', variables, 'M') > > !--error 246 > Fonction non d?finie pour le type d'argument donn?, > V?rifier les arguments ou d?finir la fonction %s_rat pour la > surcharge. > at line 38 of function vector2int called by : > at line 95 of function matrix2noyau called by : > at line 61 of function eigenvector called by : > at line 83 of function diagonalisation called by : > ******************************************************** > > I've checked that the argument of rat is a constant (it's -1/2), but I > can't reproduce the bug out of this context!?!? > > Does anyone have any idea of what could have happened ? When the %s_ overload is called, it is often due to some unsupported complex values (even with null imaginary parts: only the encoding matters). So, you may check before calling rat() that its input argument is not of complex type , with isreal(x). HTH Samuel From rouxph.22 at gmail.com Fri Sep 2 15:49:28 2016 From: rouxph.22 at gmail.com (philippe) Date: Fri, 2 Sep 2016 15:49:28 +0200 Subject: [Scilab-users] strange error with "rat" In-Reply-To: References: Message-ID: Le 02/09/2016 ? 14:32, sgougeon at free.fr a ?crit : > > When the %s_ overload is called, it is often due to some unsupported > complex values (even with null imaginary parts: only the encoding matters). > So, you may check before calling rat() that its input argument is not > of complex type , with isreal(x). thanks Samuel, an imaginary part was present due to rounding errors Grrr.... Philippe From paul.carrico at free.fr Mon Sep 5 19:46:53 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 5 Sep 2016 19:46:53 +0200 (CEST) Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <1414653535.231484681.1473097445948.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1426721440.231491939.1473097613292.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi, I looking into Atoms to the package "Scilab-Arduino" from demosciences but I fail in finding it: is the package still available or am I doing something wrong? Thanks Paul From cfuttrup at gmail.com Mon Sep 5 19:54:27 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 5 Sep 2016 19:54:27 +0200 Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <1426721440.231491939.1473097613292.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1426721440.231491939.1473097613292.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <41c36ab1-2d2d-6b7e-adcb-c396f23d6a84@gmail.com> Hi Paul I found this: https://atoms.scilab.org/toolboxes/arduino/1.3/ /Claus On 05-09-2016 19:46, paul.carrico at free.fr wrote: > Hi, > > I looking into Atoms to the package "Scilab-Arduino" from demosciences but I fail in finding it: is the package still available or am I doing something wrong? > > Thanks > > Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From paul.carrico at free.fr Mon Sep 5 21:09:36 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 5 Sep 2016 21:09:36 +0200 (CEST) Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <41c36ab1-2d2d-6b7e-adcb-c396f23d6a84@gmail.com> Message-ID: <1971480674.231779596.1473102576264.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi Claus, First thanks for the answer. I was looking to install it from the Atoms interface directly in Scilab ... I can understand now it's necessary to download the tarball and to install it. Paul ----- Mail original ----- De: "Claus Futtrup" ?: users at lists.scilab.org Envoy?: Lundi 5 Septembre 2016 19:54:27 Objet: Re: [Scilab-users] Scilab - Arduino Hi Paul I found this: https://atoms.scilab.org/toolboxes/arduino/1.3/ /Claus On 05-09-2016 19:46, paul.carrico at free.fr wrote: > Hi, > > I looking into Atoms to the package "Scilab-Arduino" from demosciences but I fail in finding it: is the package still available or am I doing something wrong? > > Thanks > > Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From cfuttrup at gmail.com Mon Sep 5 21:22:14 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 5 Sep 2016 21:22:14 +0200 Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <1971480674.231779596.1473102576264.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1971480674.231779596.1473102576264.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <01bf97ae-e7ae-ae8a-565e-f9c64078fae4@gmail.com> Hi Paul It's not necessary to download and install offline. When you look at the website for the module, it says: Category Instruments Control This means, open ATOMS, go to Instruments Control ... that's where you should be able to find the Arduino package. I haven't checked if it exist in ATOMS there ... but if you don't find the package there, please report it as a bug to Scilab. Best regards, Claus On 05-09-2016 21:09, paul.carrico at free.fr wrote: > Hi Claus, > > First thanks for the answer. > > I was looking to install it from the Atoms interface directly in Scilab ... I can understand now it's necessary to download the tarball and to install it. > > Paul > > ----- Mail original ----- > De: "Claus Futtrup" > ?: users at lists.scilab.org > Envoy?: Lundi 5 Septembre 2016 19:54:27 > Objet: Re: [Scilab-users] Scilab - Arduino > > Hi Paul > > I found this: https://atoms.scilab.org/toolboxes/arduino/1.3/ > > /Claus > > On 05-09-2016 19:46, paul.carrico at free.fr wrote: >> Hi, >> >> I looking into Atoms to the package "Scilab-Arduino" from demosciences but I fail in finding it: is the package still available or am I doing something wrong? >> >> Thanks >> >> Paul >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Mon Sep 5 21:37:41 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 5 Sep 2016 21:37:41 +0200 (CEST) Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <01bf97ae-e7ae-ae8a-565e-f9c64078fae4@gmail.com> Message-ID: <806513687.231870450.1473104261715.JavaMail.root@zimbra5-e1.priv.proxad.net> I do not find it (see screenshot), but in the meantime I noticed it works only under Windows OS ... and I'm under linux/ubuntu!! It's a pitty :-) In any way thanks for your support Claus Paul ----- Mail original ----- De: "Claus Futtrup" ?: users at lists.scilab.org Envoy?: Lundi 5 Septembre 2016 21:22:14 Objet: Re: [Scilab-users] Scilab - Arduino Hi Paul It's not necessary to download and install offline. When you look at the website for the module, it says: Category Instruments Control This means, open ATOMS, go to Instruments Control ... that's where you should be able to find the Arduino package. I haven't checked if it exist in ATOMS there ... but if you don't find the package there, please report it as a bug to Scilab. Best regards, Claus On 05-09-2016 21:09, paul.carrico at free.fr wrote: Hi Claus, First thanks for the answer. I was looking to install it from the Atoms interface directly in Scilab ... I can understand now it's necessary to download the tarball and to install it. Paul ----- Mail original ----- De: "Claus Futtrup" ?: users at lists.scilab.org Envoy?: Lundi 5 Septembre 2016 19:54:27 Objet: Re: [Scilab-users] Scilab - Arduino Hi Paul I found this: https://atoms.scilab.org/toolboxes/arduino/1.3/ /Claus On 05-09-2016 19:46, paul.carrico at free.fr wrote: Hi, I looking into Atoms to the package "Scilab-Arduino" from demosciences but I fail in finding it: is the package still available or am I doing something wrong? Thanks Paul _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ 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 -------------- A non-text attachment was scrubbed... Name: screenshot.png Type: image/png Size: 61928 bytes Desc: not available URL: From sgougeon at free.fr Mon Sep 5 21:43:36 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 5 Sep 2016 21:43:36 +0200 Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <01bf97ae-e7ae-ae8a-565e-f9c64078fae4@gmail.com> References: <1971480674.231779596.1473102576264.JavaMail.root@zimbra5-e1.priv.proxad.net> <01bf97ae-e7ae-ae8a-565e-f9c64078fae4@gmail.com> Message-ID: <57CDCAE8.8080505@free.fr> Hello, Le 05/09/2016 21:22, Claus Futtrup a ?crit : > Hi Paul > > It's not necessary to download and install offline. > > When you look at the website for the module, it says: > > Category > Instruments Control > > > This means, open ATOMS, go to Instruments Control ... that's where you > should be able to find the Arduino package. > > I haven't checked if it exist in ATOMS there ... but if you don't find > the package there, please report it as a bug to Scilab. . I guess that Paul is running either Scilab 5.5 or Scilab 6, whereas the "arduino" module is not yet packaged for Scilab 6 (neither the 1.2 nor the 1.3 releases): "This toolbox is in the process of being built" => no binary available... And was formerly available for Scilab 5.4 but not 5.5. New versioning and filtering rules applying since end of june then make Arduino available only from Scilab 5.4. These rules kill the usage of many Scilab 5 resources. It is quite hard to think that this evolution is not intentional. It was perfectly anticipable. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Mon Sep 5 22:30:37 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Mon, 5 Sep 2016 22:30:37 +0200 (CEST) Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <57CDCAE8.8080505@free.fr> Message-ID: <206796004.232027916.1473107437081.JavaMail.root@zimbra5-e1.priv.proxad.net> Scilab 5.5.2 for me ... the latest stable release ----- Mail original ----- De: "Samuel Gougeon" ?: "Users mailing list for Scilab" Envoy?: Lundi 5 Septembre 2016 21:43:36 Objet: Re: [Scilab-users] Scilab - Arduino Hello, Le 05/09/2016 21:22, Claus Futtrup a ?crit : Hi Paul It's not necessary to download and install offline. When you look at the website for the module, it says: Category Instruments Control This means, open ATOMS, go to Instruments Control ... that's where you should be able to find the Arduino package. I haven't checked if it exist in ATOMS there ... but if you don't find the package there, please report it as a bug to Scilab. . I guess that Paul is running either Scilab 5.5 or Scilab 6, whereas the "arduino" module is not yet packaged for Scilab 6 (neither the 1.2 nor the 1.3 releases): "This toolbox is in the process of being built" => no binary available... And was formerly available for Scilab 5.4 but not 5.5. New versioning and filtering rules applying since end of june then make Arduino available only from Scilab 5.4. These rules kill the usage of many Scilab 5 resources. It is quite hard to think that this evolution is not intentional. It was perfectly anticipable. Samuel _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From n.strelkov at gmail.com Mon Sep 5 22:56:49 2016 From: n.strelkov at gmail.com (Nikolay Strelkov) Date: Mon, 5 Sep 2016 23:56:49 +0300 Subject: [Scilab-users] Scilab - Arduino In-Reply-To: <206796004.232027916.1473107437081.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <57CDCAE8.8080505@free.fr> <206796004.232027916.1473107437081.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: Dear Paul! I'm on Ubuntu 12.04.5 LTS amd64 with binary Scilab 5.5.2 amd64. I downloaded Arduino toolbox from link in this comment (Francisco-Ronay Lopez-estrada -- July 16, 2015, 07:51:43 PM ) - Arduino linux3.zip . I extracted this zip-archive to my SCIHOME directory ( /home/nikolay/.Scilab/scilab-5.5.2), then launched builder.sce and then added loader.sce to autoload by creating /home/nikolay/.Scilab/scilab-5.5.2/.scilab with the following line: exec('/home/nikolay/.Scilab/scilab-5.5.2/linux3/loader.sce',-1); Then I restarted Scilab and Arduino toolbox loaded with messages: Startup execution: loading initial environment Start Arduino Load macros Load serial dll Shared archive loaded. Link done. Load palette Load help Load demos Arduino Version: 1.2 --> In Ubuntu your user should be a member of dialout group - sudo adduser $USER dialout . For better Scilab usability I suggest to use light window manager theme, for example Radiance. After this you can use Arduino with Xcos. You can vote for official linux port of Arduino toolbox on forge . Hope this helps. -- *With best regards,Ph.D., assistant professor at MPEI ,IEEE member,maintainer of Mathieu functions toolbox for Scilab ,Nikolay Strelkov.* 2016-09-05 23:30 GMT+03:00 : > Scilab 5.5.2 for me ... the latest stable release > > > ----- Mail original ----- > De: "Samuel Gougeon" > ?: "Users mailing list for Scilab" > Envoy?: Lundi 5 Septembre 2016 21:43:36 > Objet: Re: [Scilab-users] Scilab - Arduino > > > > Hello, > > Le 05/09/2016 21:22, Claus Futtrup a ?crit : > > > > Hi Paul > > It's not necessary to download and install offline. > > When you look at the website for the module, it says: > > > Category > Instruments Control > This means, open ATOMS, go to Instruments Control ... that's where you > should be able to find the Arduino package. > > I haven't checked if it exist in ATOMS there ... but if you don't find the > package there, please report it as a bug to Scilab. > . > I guess that Paul is running either Scilab 5.5 or Scilab 6, whereas the > "arduino" module is not yet packaged for Scilab 6 (neither the 1.2 nor the > 1.3 releases): "This toolbox is in the process of being built" => no binary > available... And was formerly available for Scilab 5.4 but not 5.5. > > New versioning and filtering rules applying since end of june then make > Arduino available only from Scilab 5.4. > These rules kill the usage of many Scilab 5 resources. > It is quite hard to think that this evolution is not intentional. It was > perfectly anticipable. > > 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 paul.carrico at free.fr Tue Sep 6 14:34:42 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 6 Sep 2016 14:34:42 +0200 (CEST) Subject: [Scilab-users] Scilab - Arduino In-Reply-To: Message-ID: <1110013924.236806537.1473165282764.JavaMail.root@zimbra5-e1.priv.proxad.net> Nicolay, Thanks for the information (good way to start both with Arduino & Xcos) Paul ----- Mail original ----- De: "Nikolay Strelkov" ?: "Users mailing list for Scilab" Envoy?: Lundi 5 Septembre 2016 22:56:49 Objet: Re: [Scilab-users] Scilab - Arduino Dear Paul! I'm on Ubuntu 12.04.5 LTS amd64 with binary Scilab 5.5.2 amd64. I downloaded Arduino toolbox from link in this comment ( Francisco-Ronay Lopez-estrada -- July 16, 2015, 07:51:43 PM ) - Arduino linux3.zip . I extracted this zip-archive to my SCIHOME directory ( /home/nikolay/.Scilab/scilab-5.5.2 ), then launched builder.sce and then added loader.sce to autoload by creating /home/nikolay/.Scilab/scilab-5.5.2/.scilab with the following line: exec(' /home/nikolay/.Scilab/scilab-5.5.2/ linux3/loader.sce',-1); Then I restarted Scilab and Arduino toolbox loaded with messages: Startup execution: loading initial environment Start Arduino Load macros Load serial dll Shared archive loaded. Link done. Load palette Load help Load demos Arduino Version: 1.2 --> In Ubuntu your user should be a member of dialout group - sudo adduser $USER dialout . For better Scilab usability I suggest to use light window manager theme, for example Radiance. After this you can use Arduino with Xcos. You can vote for official linux port of Arduino toolbox on forge . Hope this helps. -- With best regards, Ph.D., assistant professor at MPEI , IEEE member, maintainer of Mathieu functions toolbox for Scilab , Nikolay Strelkov. 2016-09-05 23:30 GMT+03:00 < paul.carrico at free.fr > : Scilab 5.5.2 for me ... the latest stable release ----- Mail original ----- De: "Samuel Gougeon" < sgougeon at free.fr > ?: "Users mailing list for Scilab" < users at lists.scilab.org > Envoy?: Lundi 5 Septembre 2016 21:43:36 Objet: Re: [Scilab-users] Scilab - Arduino Hello, Le 05/09/2016 21:22, Claus Futtrup a ?crit : Hi Paul It's not necessary to download and install offline. When you look at the website for the module, it says: Category Instruments Control This means, open ATOMS, go to Instruments Control ... that's where you should be able to find the Arduino package. I haven't checked if it exist in ATOMS there ... but if you don't find the package there, please report it as a bug to Scilab. . I guess that Paul is running either Scilab 5.5 or Scilab 6, whereas the "arduino" module is not yet packaged for Scilab 6 (neither the 1.2 nor the 1.3 releases): "This toolbox is in the process of being built" => no binary available... And was formerly available for Scilab 5.4 but not 5.5. New versioning and filtering rules applying since end of june then make Arduino available only from Scilab 5.4. These rules kill the usage of many Scilab 5 resources. It is quite hard to think that this evolution is not intentional. It was perfectly anticipable. 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 From cfuttrup at gmail.com Fri Sep 9 20:34:00 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 9 Sep 2016 20:34:00 +0200 Subject: [Scilab-users] Cubic spline Message-ID: <0f81d314-70be-ff2c-0428-e1297d54f053@gmail.com> Hi there In Scilab I've used interp1 to calculate a cubic spline interpolation, like this: a(:,1) = interp1(log(f3),a1,log(f),'spline'); a = amplitude (magnitude). f3 is a frequency (27000 linear spaced data), a1 is the original data, f is the resampled 1200 frequencies (log-spaced), where I need the spline to interpolate some data for me. Above should work OK, but it's not perfect, compared to a Fortran script. The fortran script calculates with its own cubic spline routine, utilizing LAPACK (DGTTRF and DGTTRS) to solve for polynomial coefficients. The question is - above code line with the interp1 spline, which kind of spline is it? Digging into interp, I see multiple options. Digging into splin, I also see multiple options. I looks like the interp1 is using "natural" spline - is this correct? It's strange because the splin help documentation doesn't recommend this. It says: Don't use the natural type unless the underlying function have zero second end points derivatives. This might be my problem. The Scilab help for interp1 doesn't give any examples, but does mention I can add an "extrap" method. Could this be any of the suggestions in the splin documentation. For example, could I write: a(:,1) = interp1(log(f3),a1,log(f),'spline','not-a-knot'); ? P.S. Since not-a-knot is mentioned as the default for the splin function, I think it should also be made the default for interp1 ... just my two cents. /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Sep 11 18:48:28 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 11 Sep 2016 16:48:28 +0000 Subject: [Scilab-users] Cubic spline In-Reply-To: <0f81d314-70be-ff2c-0428-e1297d54f053@gmail.com> References: <0f81d314-70be-ff2c-0428-e1297d54f053@gmail.com> Message-ID: Hi, The code line using interp1 and the spline method seems to perform "not_a_knot" cubic spline interpolation, as demonstrated by the simple test here below: x0 = [0 1 2 3 4]; y0 = [0 -1 0 2 1]; x = 0:0.05:4; y1 = interp1(x0,y0,x,'spline'); d = splin(x0, y0,"not_a_knot"); e = splin(x0, y0,"natural"); y2 = interp(x, x0, y0, d); y3 = interp(x, x0, y0, e); clf(); plot(x,y1,'blue',x,y2,'--green',x,y3,'red',x0,y0,'Xblack') What do you mean by your result is ?OK, but it's not perfect, compared to a Fortran script?? Could you provide a snapshot? Regards, Rafae; From: Claus Futtrup Sent: Friday, September 09, 2016 8:34 PM To: International users mailing list for Scilab. Subject: [Scilab-users] Cubic spline Hi there In Scilab I've used interp1 to calculate a cubic spline interpolation, like this: a(:,1) = interp1(log(f3),a1,log(f),'spline'); a = amplitude (magnitude). f3 is a frequency (27000 linear spaced data), a1 is the original data, f is the resampled 1200 frequencies (log-spaced), where I need the spline to interpolate some data for me. Above should work OK, but it's not perfect, compared to a Fortran script. The fortran script calculates with its own cubic spline routine, utilizing LAPACK (DGTTRF and DGTTRS) to solve for polynomial coefficients. The question is - above code line with the interp1 spline, which kind of spline is it? Digging into interp, I see multiple options. Digging into splin, I also see multiple options. I looks like the interp1 is using "natural" spline - is this correct? It's strange because the splin help documentation doesn't recommend this. It says: Don't use the natural type unless the underlying function have zero second end points derivatives. This might be my problem. The Scilab help for interp1 doesn't give any examples, but does mention I can add an "extrap" method. Could this be any of the suggestions in the splin documentation. For example, could I write: a(:,1) = interp1(log(f3),a1,log(f),'spline','not-a-knot'); ? P.S. Since not-a-knot is mentioned as the default for the splin function, I think it should also be made the default for interp1 ... just my two cents. /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From petar.filipovic at hotmail.com Mon Sep 12 12:25:09 2016 From: petar.filipovic at hotmail.com (petarf) Date: Mon, 12 Sep 2016 03:25:09 -0700 (MST) Subject: [Scilab-users] GUI save and import data Message-ID: <1473675909241-4034558.post@n3.nabble.com> Hello, I have created GUI whre you put some data and then it does some calculation as shown in the picture. Does anyone know how to store this data into a .txt file. Also, I want to be able to load data from .txt file? Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From paul.bignier at scilab-enterprises.com Mon Sep 12 12:31:26 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 12 Sep 2016 12:31:26 +0200 Subject: [Scilab-users] GUI save and import data In-Reply-To: <1473675909241-4034558.post@n3.nabble.com> References: <1473675909241-4034558.post@n3.nabble.com> Message-ID: Hi Petar, To write to txt, you may add a button with a callback that will call mopen & mputl. To read, you may combine uigetfile and mgetl functions. Regards, Paul On 09/12/2016 12:25 PM, petarf wrote: > Hello, > > I have created GUI whre you put some data and then it does some calculation > as shown in the picture. > Does anyone know how to store this data into a .txt file. Also, I want to be > able to load data from .txt file? > > Regards, Petar > > > > > > -- > View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558.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 -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com From petar.filipovic at hotmail.com Mon Sep 12 12:44:56 2016 From: petar.filipovic at hotmail.com (petarf) Date: Mon, 12 Sep 2016 03:44:56 -0700 (MST) Subject: [Scilab-users] GUI save and import data In-Reply-To: References: <1473675909241-4034558.post@n3.nabble.com> Message-ID: <1473677096805-4034560.post@n3.nabble.com> Hi Paul, Thank you for your fast replay. Now I have this problem. function saveFile // Gather data //par=[]; Q=findobj("tag","Q"); par(1)=evstr(Q.string); dpTot=findobj("tag","dpTot"); par(2)=evstr(dpTot.string); rho=findobj("tag","rho"); par(3)=evstr(rho.string); n=findobj("tag","n"); par(4)=evstr(n.string); eta=findobj("tag","eta"); par(5)=evstr(eta.string); dh=findobj("tag","dh"); par(6)=evstr(dh.string); ds=findobj("tag","ds"); par(7)=evstr(ds.string); z=findobj("tag","z"); par(8)=evstr(z.string); Lh=findobj("tag","Lh"); par(9)=evstr(Lh.string); Ls=findobj("tag","Ls"); par(10)=evstr(Ls.string); beta2h=findobj("tag","beta2h"); par(11)=evstr(beta2h.string); m=findobj("tag","m"); par(12)=evstr(m.string); k=findobj("tag","k"); par(13)=evstr(k.string); sh=findobj("tag","sh"); par(14)=evstr(sh.string); ss=findobj("tag","ss"); par(15)=evstr(ss.string); rSl=findobj("tag","rSl"); par(16)=evstr(rSl.string); rSt=findobj("tag","rSt"); par(17)=evstr(rSt.string); zetaMax=findobj("tag","zetaMax"); par(18)=evstr(zetaMax.string); //N=findobj("tag","N"); par(18)=evstr(N.string); //e=findobj("tag","e"); par(20)=evstr(e.string); alpha=findobj("tag","alpha"); par(19)=evstr(alpha.string); rDeltaR=findobj("tag","rDeltaR"); par(20)=evstr(rDeltaR.string); rVas=findobj("tag","rVas"); par(21)=evstr(rVas.string); rVah=findobj("tag","rVah"); par(22)=evstr(rVah.string); rDDVa=findobj("tag","rDDVa"); par(23)=evstr(rDDVa.string); rDDuVu=findobj("tag","rDDuVu"); par(24)=evstr(rDDuVu.string); scL=findobj("tag","scL"); par(25)=evstr(scL.string); [FileName]=uiputfile("","","Choose a file name"); Name=fullfile(FileName); fidI=mopen(Name,'w'); for i=1:size(par) mfprintf(fidI,"%0.5f\n",par(i)): end mclose(fidI); endfunction This is the part where i store data. I get this: mfprintf(fidI,"%0.5f\n",par(i)): !--error 2 Invalid factor. at line 45 of function saveFile called by : endfunction Any ideas? Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034560.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Mon Sep 12 12:51:45 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 12 Sep 2016 10:51:45 +0000 Subject: [Scilab-users] GUI save and import data In-Reply-To: <1473677096805-4034560.post@n3.nabble.com> References: <1473675909241-4034558.post@n3.nabble.com> <1473677096805-4034560.post@n3.nabble.com> Message-ID: Hi, Not related with your error message but the code line: for i=1:size(par) does not sound good. Try replacing by: for i=1:length(par) Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of petarf Sent: Monday, September 12, 2016 12:45 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] GUI save and import data Hi Paul, Thank you for your fast replay. Now I have this problem. function saveFile // Gather data //par=[]; Q=findobj("tag","Q"); par(1)=evstr(Q.string); dpTot=findobj("tag","dpTot"); par(2)=evstr(dpTot.string); rho=findobj("tag","rho"); par(3)=evstr(rho.string); n=findobj("tag","n"); par(4)=evstr(n.string); eta=findobj("tag","eta"); par(5)=evstr(eta.string); dh=findobj("tag","dh"); par(6)=evstr(dh.string); ds=findobj("tag","ds"); par(7)=evstr(ds.string); z=findobj("tag","z"); par(8)=evstr(z.string); Lh=findobj("tag","Lh"); par(9)=evstr(Lh.string); Ls=findobj("tag","Ls"); par(10)=evstr(Ls.string); beta2h=findobj("tag","beta2h"); par(11)=evstr(beta2h.string); m=findobj("tag","m"); par(12)=evstr(m.string); k=findobj("tag","k"); par(13)=evstr(k.string); sh=findobj("tag","sh"); par(14)=evstr(sh.string); ss=findobj("tag","ss"); par(15)=evstr(ss.string); rSl=findobj("tag","rSl"); par(16)=evstr(rSl.string); rSt=findobj("tag","rSt"); par(17)=evstr(rSt.string); zetaMax=findobj("tag","zetaMax"); par(18)=evstr(zetaMax.string); //N=findobj("tag","N"); par(18)=evstr(N.string); //e=findobj("tag","e"); par(20)=evstr(e.string); alpha=findobj("tag","alpha"); par(19)=evstr(alpha.string); rDeltaR=findobj("tag","rDeltaR"); par(20)=evstr(rDeltaR.string); rVas=findobj("tag","rVas"); par(21)=evstr(rVas.string); rVah=findobj("tag","rVah"); par(22)=evstr(rVah.string); rDDVa=findobj("tag","rDDVa"); par(23)=evstr(rDDVa.string); rDDuVu=findobj("tag","rDDuVu"); par(24)=evstr(rDDuVu.string); scL=findobj("tag","scL"); par(25)=evstr(scL.string); [FileName]=uiputfile("","","Choose a file name"); Name=fullfile(FileName); fidI=mopen(Name,'w'); for i=1:size(par) mfprintf(fidI,"%0.5f\n",par(i)): end mclose(fidI); endfunction This is the part where i store data. I get this: mfprintf(fidI,"%0.5f\n",par(i)): !--error 2 Invalid factor. at line 45 of function saveFile called by : endfunction Any ideas? Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034560.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 petar.filipovic at hotmail.com Mon Sep 12 12:56:49 2016 From: petar.filipovic at hotmail.com (petarf) Date: Mon, 12 Sep 2016 03:56:49 -0700 (MST) Subject: [Scilab-users] GUI save and import data In-Reply-To: References: <1473675909241-4034558.post@n3.nabble.com> Message-ID: <1473677809662-4034563.post@n3.nabble.com> Hi Paul, Thank you for you fast reply. I managed to do something with save option. function saveFile // Gather data Q=findobj("tag","Q"); parameter(1)=evstr(Q.string); dpTot=findobj("tag","dpTot"); parameter(2)=evstr(dpTot.string); rho=findobj("tag","rho"); parameter(3)=evstr(rho.string); n=findobj("tag","n"); parameter(4)=evstr(n.string); eta=findobj("tag","eta"); parameter(5)=evstr(eta.string); dh=findobj("tag","dh"); parameter(6)=evstr(dh.string); ds=findobj("tag","ds"); parameter(7)=evstr(ds.string); z=findobj("tag","z"); parameter(8)=evstr(z.string); Lh=findobj("tag","Lh"); parameter(9)=evstr(Lh.string); Ls=findobj("tag","Ls"); parameter(10)=evstr(Ls.string); beta2h=findobj("tag","beta2h"); parameter(11)=evstr(beta2h.string); m=findobj("tag","m"); parameter(12)=evstr(m.string); k=findobj("tag","k"); parameter(13)=evstr(k.string); sh=findobj("tag","sh"); parameter(14)=evstr(sh.string); ss=findobj("tag","ss"); parameter(15)=evstr(ss.string); rSl=findobj("tag","rSl"); parameter(16)=evstr(rSl.string); rSt=findobj("tag","rSt"); parameter(17)=evstr(rSt.string); zetaMax=findobj("tag","zetaMax"); parameter(18)=evstr(zetaMax.string); alpha=findobj("tag","alpha"); parameter(19)=evstr(alpha.string); rDeltaR=findobj("tag","rDeltaR"); parameter(20)=evstr(rDeltaR.string); rVas=findobj("tag","rVas"); parameter(21)=evstr(rVas.string); rVah=findobj("tag","rVah"); parameter(22)=evstr(rVah.string); rDDVa=findobj("tag","rDDVa"); parameter(23)=evstr(rDDVa.string); rDDuVu=findobj("tag","rDDuVu"); parameter(24)=evstr(rDDuVu.string); scL=findobj("tag","scL"); parameter(25)=evstr(scL.string); [FileName]=uiputfile("","","Choose a file name"); Name=fullfile(FileName); fidI=mopen(Name,'w'); for i=1:size(parameter) mfprintf(fidI,"%0.5f\n",parameter(i)); end mclose(fidI); endfunction But when I choose to save this parameters to file called data.txt the file is created but empty. This error occurs: !--error 204 ':': Wrong type for argument #2: Scalar expected. at line 36 of function saveFile called by : -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034563.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From petar.filipovic at hotmail.com Mon Sep 12 13:02:11 2016 From: petar.filipovic at hotmail.com (petarf) Date: Mon, 12 Sep 2016 04:02:11 -0700 (MST) Subject: [Scilab-users] GUI save and import data In-Reply-To: <1473677809662-4034563.post@n3.nabble.com> References: <1473675909241-4034558.post@n3.nabble.com> <1473677809662-4034563.post@n3.nabble.com> Message-ID: <1473678131689-4034564.post@n3.nabble.com> I apologise for posting twice. I deleted previous post but nothing happend. Problem was with size/lenght. Thnak you for your help! Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034564.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From pierre-aime.agnel at scilab-enterprises.com Tue Sep 13 11:02:24 2016 From: pierre-aime.agnel at scilab-enterprises.com (=?UTF-8?Q?Pierre-Aim=c3=a9_Agnel?=) Date: Tue, 13 Sep 2016 11:02:24 +0200 Subject: [Scilab-users] ATOMS web : display issue for statistics categories In-Reply-To: <57BC73CC.1080607@free.fr> References: <57BC73CC.1080607@free.fr> Message-ID: <2cf4f39c-c879-2d54-a02d-a1ef93e4ae91@scilab-enterprises.com> Hi Samuel, This issue has been resolved. Thank you for the heads up! Le 23/08/2016 ? 18:03, Samuel Gougeon a ?crit : > Dear all, > > When i try to list atoms modules in the Statistics categories, i get > an empty list, > despite the number of existing modules is well displayed (please see > below). > https://atoms.scilab.org/categories/data_analysis_-_statistics > > The name of the module / sub-module is not displayed in the "You are > here: home |....." path. > It's OK for all other categories, but displaying this one looks bugged. > > Do you get the same? > > Regards > Samuel Gougeon > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Pierre-Aim? Agnel Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.60 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: 67255 bytes Desc: not available URL: From petar.filipovic at hotmail.com Tue Sep 13 14:12:01 2016 From: petar.filipovic at hotmail.com (petarf) Date: Tue, 13 Sep 2016 05:12:01 -0700 (MST) Subject: [Scilab-users] GUI save and import data In-Reply-To: References: <1473675909241-4034558.post@n3.nabble.com> <1473677096805-4034560.post@n3.nabble.com> Message-ID: <1473768721915-4034566.post@n3.nabble.com> Hi, I managed to write function to place new values from txt. file instead of old values. But now when I run the calculation Q=findobj("tag","Q"); par(1)=evstr(Q.string); dpTot=findobj("tag","dpTot"); par(2)=evstr(dpTot.string); these set of lines do not read new values. String Q is evaluated as old value. Any ideas? Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034566.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Tue Sep 13 16:14:07 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 13 Sep 2016 14:14:07 +0000 Subject: [Scilab-users] GUI save and import data In-Reply-To: <1473768721915-4034566.post@n3.nabble.com> References: <1473675909241-4034558.post@n3.nabble.com> <1473677096805-4034560.post@n3.nabble.com> <1473768721915-4034566.post@n3.nabble.com> Message-ID: Hi, Without seeing the details of your code and with no experience with findobj, from what I could understand from the help file, the command lines like: Q=findobj("tag","Q"); do not sound good. As findobj outputs an handle to your uicontrol object, you could try: hdl = findobj("tag","Q"); Q = hdl.Q; // or: Q = evstr(hdl.Q); if data stored as string dpTot = hdl.dpTot; // etc.. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of petarf Sent: Tuesday, September 13, 2016 2:12 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] GUI save and import data Hi, I managed to write function to place new values from txt. file instead of old values. But now when I run the calculation Q=findobj("tag","Q"); par(1)=evstr(Q.string); dpTot=findobj("tag","dpTot"); par(2)=evstr(dpTot.string); these set of lines do not read new values. String Q is evaluated as old value. Any ideas? Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034566.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 Nils.Leimbach at dlr.de Tue Sep 13 16:11:45 2016 From: Nils.Leimbach at dlr.de (Nils.Leimbach at dlr.de) Date: Tue, 13 Sep 2016 14:11:45 +0000 Subject: [Scilab-users] Block Rotation when defining through function Message-ID: Hello! I am creating an Xcos simulation using functions and scripts. When trying to rotate a block it will, but the inputs will not behave the way I tell them to beforehand (switch sides and rotate 180 degrees). Am I missing something, or is this a known or unknown bug? I have attached a screenshot of the code I use to rotate the block and switch the inputs, as well as the outcome once opened in Xcos. I also included a picture of what happens when I run the resulting simulation and look at the object data afterwards. Thanks Nils -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Code1.PNG Type: image/png Size: 7714 bytes Desc: Code1.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Xcos1.PNG Type: image/png Size: 2858 bytes Desc: Xcos1.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Result1.PNG Type: image/png Size: 4232 bytes Desc: Result1.PNG URL: From jrafaelbguerra at hotmail.com Tue Sep 13 16:17:48 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 13 Sep 2016 14:17:48 +0000 Subject: [Scilab-users] GUI save and import data In-Reply-To: References: <1473675909241-4034558.post@n3.nabble.com> <1473677096805-4034560.post@n3.nabble.com> <1473768721915-4034566.post@n3.nabble.com> Message-ID: I am sorry, please discard my previous comment... after further reading of the help doc, it does not make sense. From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Rafael Guerra Sent: Tuesday, September 13, 2016 4:14 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] GUI save and import data Hi, Without seeing the details of your code and with no experience with findobj, from what I could understand from the help file, the command lines like: Q=findobj("tag","Q"); do not sound good. As findobj outputs an handle to your uicontrol object, you could try: hdl = findobj("tag","Q"); Q = hdl.Q; // or: Q = evstr(hdl.Q); if data stored as string dpTot = hdl.dpTot; // etc.. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of petarf Sent: Tuesday, September 13, 2016 2:12 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] GUI save and import data Hi, I managed to write function to place new values from txt. file instead of old values. But now when I run the calculation Q=findobj("tag","Q"); par(1)=evstr(Q.string); dpTot=findobj("tag","dpTot"); par(2)=evstr(dpTot.string); these set of lines do not read new values. String Q is evaluated as old value. Any ideas? Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034566.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 paul.bignier at scilab-enterprises.com Tue Sep 13 16:21:13 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Tue, 13 Sep 2016 16:21:13 +0200 Subject: [Scilab-users] Block Rotation when defining through function In-Reply-To: References: Message-ID: Hello, I guess you are using some Scilab 6 version? Xcos 6 has been deeply reworked but some graphical bugs remain ; could you please report it on the bugzilla ? Thank you, best regards, Paul On 09/13/2016 04:11 PM, Nils.Leimbach at dlr.de wrote: > > Hello! > > I am creating an Xcos simulation using functions and scripts. > > When trying to rotate a block it will, but the inputs will not behave > the way I tell them to beforehand (switch sides and rotate 180 degrees). > > Am I missing something, or is this a known or unknown bug? > > I have attached a screenshot of the code I use to rotate the block and > switch the inputs, as well as the outcome once opened in Xcos. > > I also included a picture of what happens when I run the resulting > simulation and look at the object data afterwards. > > Thanks > > Nils > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nils.Leimbach at dlr.de Tue Sep 13 16:49:35 2016 From: Nils.Leimbach at dlr.de (Nils.Leimbach at dlr.de) Date: Tue, 13 Sep 2016 14:49:35 +0000 Subject: [Scilab-users] Block Rotation when defining through function In-Reply-To: References: Message-ID: Thanks for the quick reply, I am using version 5.5.2. The bug has been reported as bug #14768. Thanks, Nils Von: users [mailto:users-bounces at lists.scilab.org] Im Auftrag von Paul Bignier Gesendet: Dienstag, 13. September 2016 16:21 An: Users mailing list for Scilab Betreff: Re: [Scilab-users] Block Rotation when defining through function Hello, I guess you are using some Scilab 6 version? Xcos 6 has been deeply reworked but some graphical bugs remain ; could you please report it on the bugzilla? Thank you, best regards, Paul On 09/13/2016 04:11 PM, Nils.Leimbach at dlr.de wrote: Hello! I am creating an Xcos simulation using functions and scripts. When trying to rotate a block it will, but the inputs will not behave the way I tell them to beforehand (switch sides and rotate 180 degrees). Am I missing something, or is this a known or unknown bug? I have attached a screenshot of the code I use to rotate the block and switch the inputs, as well as the outcome once opened in Xcos. I also included a picture of what happens when I run the resulting simulation and look at the object data afterwards. Thanks Nils _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Wed Sep 14 11:44:41 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 14 Sep 2016 11:44:41 +0200 Subject: [Scilab-users] Rotating and flipping Bigsom_f component - disgraceful representation Message-ID: <002301d20e6c$9ecfc8c0$dc6f5a40$@wanadoo.fr> Dear, When rotating or flipping a bigsom_f component, would it be possible to keep the Sigma symbol as the original, i.e to not rotate or flip the symbol as to keep an harmonius display? (only rotate the box ans input/output) Also to avoid space between input and output and the box. See bug #14769 for attached file Sincerely Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 906 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.jpg Type: image/jpeg Size: 11009 bytes Desc: not available URL: From petar.filipovic at hotmail.com Thu Sep 15 10:10:06 2016 From: petar.filipovic at hotmail.com (petarf) Date: Thu, 15 Sep 2016 01:10:06 -0700 (MST) Subject: [Scilab-users] GUI save and import data In-Reply-To: References: <1473675909241-4034558.post@n3.nabble.com> <1473677096805-4034560.post@n3.nabble.com> <1473768721915-4034566.post@n3.nabble.com> Message-ID: <1473927006003-4034574.post@n3.nabble.com> Hi Rafael, Thank you for your reply. It is hard for me to explain this but I will try to make it simple and effective. I have master file in which I create GUI and set initial values. Part of the code where I set inital values is: // labels1=["Q","dpTot","rho","n","eta"]; labels2=["m^3/s","Pa","kg/m^3","rev/min","-",]; values1=[0,0,0,0,0]; for k=1:size(labels1,2) // guientry1(k)=uicontrol("parent",axfanblade,"style","edit","string",string(values1(k)),"position",[L3,guih1-k*20+guih1o,180,20],"horizontalalignment","left","fontsize",14,"background",[.9 .9 .9],"tag",labels1(k)); // end After that, master file creates push button which calls script that do some calculation. In that file I obtain values that I enter manually with "tag" option as I mentioned in previous comment. // Q=findobj("tag","Q"); param.Q=evstr(Q.string); etc. // This works when parameters are set in GUI master file or when I enter them manually in the created GUI. Next I have created scrtip which opens a text file and read parameters from .txt file. But it seems that values are only replaced in GUI, I see them in GUI but they are not read with "tag" option in the scritp that do calculation. Scritp does the calculation with old parameters. I have 25 parameters that I need to eneter to do calculation it is annoying to enter them manually all over again. Regards, Petar -- View this message in context: http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034574.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Thu Sep 15 14:11:37 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 15 Sep 2016 12:11:37 +0000 Subject: [Scilab-users] GUI save and import data In-Reply-To: <1473927006003-4034574.post@n3.nabble.com> References: <1473675909241-4034558.post@n3.nabble.com> <1473677096805-4034560.post@n3.nabble.com> <1473768721915-4034566.post@n3.nabble.com> <1473927006003-4034574.post@n3.nabble.com> Message-ID: Hi Petar, >From the code you provided, you may have consulted the Openeering tutorial "How to develop a GUI in Scilab". With regards to the detailed example in that tutorial, it seems possible to reuse the newly input GUI input parameters (par variable) if: - the par(k) variable is not reset inside syscompute function (par =[]); - the par(k) variable is declared inside (and outside) syscompute as global - the GUI figure is closed and reopened before reusing the new input parameters Not sure if this is might be the source of your problem nor if all the points above are necessary or correct but, hopefully the example below that seems to work may help you: global par; function syscompute(par) global par; Q = findobj("tag", "Q"); par(1) = evstr(Q.string); dpTot = findobj("tag", "dpTot"); par(2) = evstr(dpTot.string); y = par(1)*sqrt(par(2)); // or call some function from here printf("Q= %.3f, dpTot= %.3f\n",par(1),par(2)); printf("Result = %.3f\n\n",y); endfunction f=figure(); labels1=["Q","dpTot"]; values1=[0,0]; par = values1; for k=1:size(labels1,2) uicontrol("parent",f,"style","text","string",labels1(k),"position",[0,300-k*20,100,20]); guientry1(k)=uicontrol("parent",f,"style","edit","string",string(values1(k)),"position",... [100,300-k*20,50,20],"tag",labels1(k)); end hb = uicontrol(f, "style","pushbutton", ... "Position",[50 200 100 20], "String","Compute", ... "Callback","syscompute"); input("Input new values in GUI, hit Compute, then ENTER here to continue...","string"); // Show below the reusability of newly input GUI parameters (above): close(f); f=figure(); for k=1:size(labels1,2) values1(k)= par(k); uicontrol("parent",f,"style","text","string",labels1(k),"position",[0,300-k*20,100,20]); guientry1(k)=uicontrol("parent",f,"style","edit","string",string(values1(k)),"position",[100,300-k*20,50,20],"tag",labels1(k)); end hb = uicontrol(f, "style","pushbutton", ... "Position",[50 200 100 20], "String","Compute", ... "Callback","syscompute"); input("Do Compute in GUI then ENTER here to continue......","string") close(f) Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at gmail.com Mon Sep 19 10:49:27 2016 From: heinznabielek at gmail.com (Heinz Nabielek) Date: Mon, 19 Sep 2016 10:49:27 +0200 Subject: [Scilab-users] Again: On the PC, Scilab does not find the C compiler Message-ID: <210C99F6-1052-4DE9-A5C8-F256665522D2@gmail.com> "Scilab doesn't find a C compiler": I have 64 bit Scilab 5.5.2 in 64 bit Windows10 and a working Microsoft Visual Studio 2014, but Scilab does not find the C compiler. All the Scilab commands asking for compilers have a negative response. What to do? Heinz From sgougeon at free.fr Mon Sep 19 14:28:52 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Mon, 19 Sep 2016 14:28:52 +0200 (CEST) Subject: [Scilab-users] Again: On the PC, Scilab does not find the C compiler In-Reply-To: <210C99F6-1052-4DE9-A5C8-F256665522D2@gmail.com> Message-ID: <657884102.952351073.1474288132114.JavaMail.root@zimbra75-e12.priv.proxad.net> >De: "Heinz Nabielek" >"Scilab doesn't find a C compiler": I have 64 bit Scilab 5.5.2 in 64 bit Windows10 >and a working Microsoft Visual Studio 2014, but Scilab does not find the C compiler. >All the Scilab commands asking for compilers have a negative response. > >What to do? > >Heinz You may support this thread: http://bugzilla.scilab.org/12355 From cfuttrup at gmail.com Tue Sep 20 21:24:40 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Tue, 20 Sep 2016 21:24:40 +0200 Subject: [Scilab-users] Cubic spline In-Reply-To: References: <0f81d314-70be-ff2c-0428-e1297d54f053@gmail.com> Message-ID: <354b67f1-2472-3529-61b5-dd774b1b66b1@gmail.com> Hi Rafael Guerra, et al. Thank you for clarifying this to me - that interp1 uses not-a-knot as default. IMHO Scilab documentation should be clear about this. >What do you mean by your result is ?OK, but it's not perfect, compared to a Fortran script?? I can try to make a snapshot ... what kind do you need? Like a difference in the resulting vector, a piece of source code ... or maybe a graph plot illustrating the difference? Since the default acc. to your script is not-a-knot ... returning to my original question, is it true I can alter this to 'natural' cubic spline by writing: a(:,1) = _interp1_(log(f3),a1,log(f),'spline','natural'); ? ... The documentation for interp1 spline isn't clear whether 'natural' is an option for the extrapolation. The documentation in Scilab ( https://help.scilab.org/docs/6.0.0/en_US/interp1.html ) only says: The|extrapolation|parameter sets the evaluation rule for extrapolation, i.e for|xp(i)|not in [x1,xn] interval "extrap" the extrapolation is performed by the defined method. yp=interp1(x,y,xp,method,"extrap") ... And the documentation provides no examples of adding this "extrap" parameter to the spline fitting (or any other fitting). ??? Anyway, the Fortran code uses 'natural' cubic spline and (as mentioned) DGTTRF and DGTTRS - are there any Scilab equivalent functions? ... I might wish to try to code (exactly) the same spline functionality, just to eliminate a potential error here. DGTTRF computes an LU factorization of a real tridiagonal matrix A * using elimination with partial pivoting and row interchanges. DGTTRS solves one of the systems of equations * A*X = B or A'*X = B, * with a tridiagonal matrix A using the LU factorization computed * by DGTTRF. ( Source: https://www.gfd-dennou.org/arch/ruby/products/ruby-lapack/doc/dgt.html ) P.S. Sorry for the not-so-fast response time, 1) I'm thinking a lot about it, 2) I shall try not to make too many false statements ... but it's a bit difficult because I don't understand why I get the differences that I observe - and I feel a bit like I'm searching for the reason (the solution) while being blind-folded. Best regards, Claus On 11-09-2016 18:48, Rafael Guerra wrote: > > Hi, > > The code line using *interp1* and the spline method seems to perform > "not_a_knot" cubic spline interpolation, as demonstrated by the simple > test here below: > > x0= [0 1 2 3 4]; > y0= [0 -1 0 2 1]; > x= 0:0.05:4; > y1= _interp1_(x0,y0,x,'spline'); > d= splin(x0, y0,"not_a_knot"); > e= splin(x0, y0,"natural"); > y2= interp(x, x0, y0, d); > y3= interp(x, x0, y0, e); > _clf_(); > _plot_(x,y1,'blue',x,y2,'--green',x,y3,'red',x0,y0,'Xblack') > > What do you mean by your result is ?OK, but it's not perfect, compared > to a Fortran script?? > > Could you provide a snapshot? > > Regards, > > Rafae; > > *From:*Claus Futtrup > *Sent:* Friday, September 09, 2016 8:34 PM > *To:* International users mailing list for Scilab. > > *Subject:* [Scilab-users] Cubic spline > > Hi there > > In Scilab I've used interp1 to calculate a cubic spline interpolation, > like this: > > a(:,1) = _interp1_(log(f3),a1,log(f),'spline'); > > a = amplitude (magnitude). f3 is a frequency (27000 linear spaced > data), a1 is the original data, f is the resampled 1200 frequencies > (log-spaced), where I need the spline to interpolate some data for me. > > Above should work OK, but it's not perfect, compared to a Fortran > script. The fortran script calculates with its own cubic spline > routine, utilizing LAPACK (DGTTRF and DGTTRS) to solve for polynomial > coefficients. > > The question is - above code line with the interp1 spline, which kind > of spline is it? > > Digging into interp, I see multiple options. Digging into splin, I > also see multiple options. > > I looks like the interp1 is using "natural" spline - is this correct? > > It's strange because the splin help documentation doesn't recommend > this. It says: Don't use the natural type unless the underlying > function have zero second end points derivatives. > > This might be my problem. > > The Scilab help for interp1 doesn't give any examples, but does > mention I can add an "extrap" method. Could this be any of the > suggestions in the splin documentation. For example, could I write: > > a(:,1) = _interp1_(log(f3),a1,log(f),'spline','not-a-knot'); > > ? > > P.S. Since not-a-knot is mentioned as the default for the splin > function, I think it should also be made the default for interp1 ... > just my two cents. > > /Claus > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From yann.debray at scilab-enterprises.com Wed Sep 21 10:38:30 2016 From: yann.debray at scilab-enterprises.com (Scilab Team) Date: Wed, 21 Sep 2016 10:38:30 +0200 Subject: [Scilab-users] macOS Sierra - Scilab not working yet Message-ID: <57E24706.704@scilab-enterprises.com> Dear Scilab-user, For those of you using Scilab on MAC, we just tested Scilab 5.5.2 and 6.0.0 beta 2 on the new release of macOS Sierra published yesterday. You just want to inform you that it is not working at the moment, and that we will be investigating it. -- -- The Scilab Team From jrafaelbguerra at hotmail.com Wed Sep 21 13:11:51 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 21 Sep 2016 11:11:51 +0000 Subject: [Scilab-users] Cubic spline In-Reply-To: <354b67f1-2472-3529-61b5-dd774b1b66b1@gmail.com> References: <0f81d314-70be-ff2c-0428-e1297d54f053@gmail.com> <354b67f1-2472-3529-61b5-dd774b1b66b1@gmail.com> Message-ID: Hi Claus, To try understand the significance of the differences between Scilab and the Fortran code, you could provide a small sample dataset (<10 points) that illustrates your point and tell us what you do not like. Say, you could provide: [xi,yi] the spline input, [x,yf] the Fortran results and [x,ys] the Scilab results. According to interp1 documentation it seems that there is no option to pass any spline arguments such as 'natural'. There are many more options available when using the dedicated splin and interp functions, as in the example I have provided. Regarding the quality of the linear algebra methods used in Scilab, this is beyond my knowledge. It seems that BLAS/LAPACK are used but not always. See discussion on: https://wiki.scilab.org/LackOfUseOfBLAS-LAPACK and also the references provided. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Tuesday, September 20, 2016 9:25 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Cubic spline Hi Rafael Guerra, et al. Thank you for clarifying this to me - that interp1 uses not-a-knot as default. IMHO Scilab documentation should be clear about this. >What do you mean by your result is "OK, but it's not perfect, compared to a Fortran script"? I can try to make a snapshot ... what kind do you need? Like a difference in the resulting vector, a piece of source code ... or maybe a graph plot illustrating the difference? Since the default acc. to your script is not-a-knot ... returning to my original question, is it true I can alter this to 'natural' cubic spline by writing: a(:,1) = interp1(log(f3),a1,log(f),'spline','natural'); ? ... The documentation for interp1 spline isn't clear whether 'natural' is an option for the extrapolation. The documentation in Scilab ( https://help.scilab.org/docs/6.0.0/en_US/interp1.html ) only says: The extrapolation parameter sets the evaluation rule for extrapolation, i.e for xp(i)not in [x1,xn] interval "extrap" the extrapolation is performed by the defined method. yp=interp1(x,y,xp,method,"extrap") ... And the documentation provides no examples of adding this "extrap" parameter to the spline fitting (or any other fitting). ??? Anyway, the Fortran code uses 'natural' cubic spline and (as mentioned) DGTTRF and DGTTRS - are there any Scilab equivalent functions? ... I might wish to try to code (exactly) the same spline functionality, just to eliminate a potential error here. DGTTRF computes an LU factorization of a real tridiagonal matrix A * using elimination with partial pivoting and row interchanges. DGTTRS solves one of the systems of equations * A*X = B or A'*X = B, * with a tridiagonal matrix A using the LU factorization computed * by DGTTRF. ( Source: https://www.gfd-dennou.org/arch/ruby/products/ruby-lapack/doc/dgt.html ) P.S. Sorry for the not-so-fast response time, 1) I'm thinking a lot about it, 2) I shall try not to make too many false statements ... but it's a bit difficult because I don't understand why I get the differences that I observe - and I feel a bit like I'm searching for the reason (the solution) while being blind-folded. Best regards, Claus On 11-09-2016 18:48, Rafael Guerra wrote: Hi, The code line using interp1 and the spline method seems to perform "not_a_knot" cubic spline interpolation, as demonstrated by the simple test here below: x0 = [0 1 2 3 4]; y0 = [0 -1 0 2 1]; x = 0:0.05:4; y1 = interp1(x0,y0,x,'spline'); d = splin(x0, y0,"not_a_knot"); e = splin(x0, y0,"natural"); y2 = interp(x, x0, y0, d); y3 = interp(x, x0, y0, e); clf(); plot(x,y1,'blue',x,y2,'--green',x,y3,'red',x0,y0,'Xblack') What do you mean by your result is "OK, but it's not perfect, compared to a Fortran script"? Could you provide a snapshot? Regards, Rafae; From: Claus Futtrup Sent: Friday, September 09, 2016 8:34 PM To: International users mailing list for Scilab. Subject: [Scilab-users] Cubic spline Hi there In Scilab I've used interp1 to calculate a cubic spline interpolation, like this: a(:,1) = interp1(log(f3),a1,log(f),'spline'); a = amplitude (magnitude). f3 is a frequency (27000 linear spaced data), a1 is the original data, f is the resampled 1200 frequencies (log-spaced), where I need the spline to interpolate some data for me. Above should work OK, but it's not perfect, compared to a Fortran script. The fortran script calculates with its own cubic spline routine, utilizing LAPACK (DGTTRF and DGTTRS) to solve for polynomial coefficients. The question is - above code line with the interp1 spline, which kind of spline is it? Digging into interp, I see multiple options. Digging into splin, I also see multiple options. I looks like the interp1 is using "natural" spline - is this correct? It's strange because the splin help documentation doesn't recommend this. It says: Don't use the natural type unless the underlying function have zero second end points derivatives. This might be my problem. The Scilab help for interp1 doesn't give any examples, but does mention I can add an "extrap" method. Could this be any of the suggestions in the splin documentation. For example, could I write: a(:,1) = interp1(log(f3),a1,log(f),'spline','not-a-knot'); ? P.S. Since not-a-knot is mentioned as the default for the splin function, I think it should also be made the default for interp1 ... just my two cents. /Claus _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerhard.kreuzer at liftoff.at Thu Sep 22 08:08:41 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Wed, 21 Sep 2016 23:08:41 -0700 (MST) Subject: [Scilab-users] Functions lib Message-ID: <1474524521110-4034588.post@n3.nabble.com> Hi, I now have some functions and want to use it from different scripts. Copying this functions into each script isn't that nice. Any way to have some 'function library' which I can put all this common things? Thanks for helping Gerhard -- View this message in context: http://mailinglists.scilab.org/Functions-lib-tp4034588.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From clement.david at scilab-enterprises.com Thu Sep 22 08:23:34 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Thu, 22 Sep 2016 08:23:34 +0200 Subject: [Scilab-users] Functions lib In-Reply-To: <1474524521110-4034588.post@n3.nabble.com> References: <1474524521110-4034588.post@n3.nabble.com> Message-ID: <1474525414.2729.13.camel@scilab-enterprises.com> Hello Gerhard, Great question ! Use the toolbox_skeleton [1] and create you own Scilab toolbox to easily re-use you own function set. It might be automatically loaded at Scilab startup and used by your scripts. First, simply create a directory "myToolbox" and a sub-directory "macros". Put all your Scilab function (aka macros) in this sub-directory. Second, copy the builder.sce and macros/buildmacros.sce (from the skeleton) into your directories to "build" the library. Change the TOOLBOX_NAME and TOOLBOX_TITLE on builder.sce to reflect your toolbox name ("myToolbox" in this example). Still on builder.sce, remove all the non-macros builds (no C / C++ / help). Third, copy and rename etc/toolbox_skeleton.start and etc/toolbox_skeleton.quit into directory etc/ in your toolbox to "load" the library. In your "myToolbox" example, rename them to etc/myToolbox.start and etc/myToolbox.quit. Edit the myToolbox.start file to only load the Scilab function (no C / C++ / help / preferences). Still on myToolbox.start, change the library name "toolbox_skeletonlib" to "myToolboxlib". And that's it ! `exec builder.sce` to build the toolbox and `exec loader.sce` to load it. To load it at Scilab startup, use `atomsInstall` with the directory argument. ? [1]:?https://wiki.scilab.org/howto/Create%20a%20toolbox For in depth, understanding browse the wiki or any existing toolbox on ATOMS. Thanks, -- Cl?ment Le mercredi 21 septembre 2016 ? 23:08 -0700, Gerhard Kreuzer a ?crit?: > Hi, > > I now have some functions and want to use it from different scripts. Copying > this functions into each script isn't that nice. Any way to have some > 'function library' which I can put all this common things? > > Thanks for helping > > Gerhard > > > > -- > View this message in context: http://mailinglists.scilab.org/Functions-lib-tp4034588.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Thu Sep 22 08:26:27 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 22 Sep 2016 08:26:27 +0200 Subject: [Scilab-users] Functions lib In-Reply-To: <1474524521110-4034588.post@n3.nabble.com> References: <1474524521110-4034588.post@n3.nabble.com> Message-ID: <57E37993.5050701@free.fr> Hello, Le 22/09/2016 08:08, Gerhard Kreuzer a ?crit : > Hi, > > I now have some functions and want to use it from different scripts. Copying > this functions into each script isn't that nice. Any way to have some > 'function library' which I can put all this common things? . You may * put all of them (.sci files) in a directory, * cd to this directory * do genlib mytoolslib // where mytoolslib is the name you want to give to the library edit SCIHOME/scilab.ini // in your startup file scilab.ini, add the line, to load the library at startup of each new scilab session mytoolslib = lib(path_to_the_lib_directory); Then for each new Scilab session, the functions of your library with be available from anywhere in the session. HTH Samuel Gougeon From gerhard.kreuzer at liftoff.at Thu Sep 22 09:02:30 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Thu, 22 Sep 2016 00:02:30 -0700 (MST) Subject: [Scilab-users] Functions lib In-Reply-To: <57E37993.5050701@free.fr> References: <1474524521110-4034588.post@n3.nabble.com> <57E37993.5050701@free.fr> Message-ID: <025d01d2149f$3b426bd0$b1c74370$@liftoff.at> .. ok? thanks. Seems it took some time (for a newbee), try it this evening. Thanks a lot. Gerhard Von: Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives] [mailto:ml-node+s994242n4034590h90 at n3.nabble.com] Gesendet: Donnerstag, 22. September 2016 08:27 An: Gerhard Kreuzer Betreff: Re: Functions lib Hello, Le 22/09/2016 08:08, Gerhard Kreuzer a ?crit : > Hi, > > I now have some functions and want to use it from different scripts. Copying > this functions into each script isn't that nice. Any way to have some > 'function library' which I can put all this common things? . You may * put all of them (.sci files) in a directory, * cd to this directory * do genlib mytoolslib // where mytoolslib is the name you want to give to the library edit SCIHOME/scilab.ini // in your startup file scilab.ini, add the line, to load the library at startup of each new scilab session mytoolslib = lib(path_to_the_lib_directory); Then for each new Scilab session, the functions of your library with be available from anywhere in the session. HTH Samuel Gougeon _______________________________________________ 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/Functions-lib-tp4034588p4034590.html To unsubscribe from Functions lib, click here . NAML -- View this message in context: http://mailinglists.scilab.org/Functions-lib-tp4034588p4034591.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Thu Sep 22 09:48:27 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 22 Sep 2016 07:48:27 +0000 Subject: [Scilab-users] {EXT} Re: Functions lib In-Reply-To: <025d01d2149f$3b426bd0$b1c74370$@liftoff.at> References: <1474524521110-4034588.post@n3.nabble.com> <57E37993.5050701@free.fr> <025d01d2149f$3b426bd0$b1c74370$@liftoff.at> Message-ID: Hello, > De : Gerhard Kreuzer > Envoy? : jeudi 22 septembre 2016 09:03 > >> Von: Samuel GOUGEON >> Gesendet: Donnerstag, 22. September 2016 08:27 >> >> You may >> [?] >> Then for each new Scilab session, the functions of your library with be >> available from anywhere in the session. There is also the quick and dirty way : put it in a *.sci file as mentioned, and read this file with an exec() or getd() in the Scilab code. But the effort for learning how to declare it in an *.ini file can spare you some effort latter. You might also look at the "library" section of the help: https://help.scilab.org/docs/6.0.0/en_US/section_b0e75452c88728d23bbe1cbd7fad7b12.html I don't know now, but before, you had to create a directory containing: * a file named "name" (without any extension), which is an ascii file containing the names of the functions; * for each function, create a *.bin file with the name of the function with : save("function_name.bin", function_name); * call the library with the lib() command. The advantage compared with the simple *.sci method Is that you can have several functions with the same name, e.g. if you defined an f() function in the library lib1 and in the library lib2, you can call them with lib1.f() and lib2.f(). Not sure that it is worth investing in this knowledge. 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 paul.carrico at free.fr Thu Sep 22 23:09:40 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 22 Sep 2016 23:09:40 +0200 (CEST) Subject: [Scilab-users] fourier series and fft In-Reply-To: <392966302.301283474.1474577924744.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1405667942.301303669.1474578580517.JavaMail.root@zimbra5-e1.priv.proxad.net> dear all I'm novice in Fourier series and other and my question is probably naive (sorry for this) => I'm wondering if scilab can directly calculate the Fourier coefficient a0, a_k and b_k ? I'm currently doing it "by hand" is order to familiarise myself with it (and I'm looking at the same time to documents on FFT use and rules to refind the 2 natural frequencies of the example here bellow), but it seems I'll need to code the coefficient calculations ... Am I right ? Thanks Paul ######################################################################### mode ( 0 ) function y = f ( x ) y = 2. * sin ( 2 * %pi * x ) - 3. * cos ( %pi * x ) ; endfunction periode = 2 ; number_of_periodes = 1 ; n = periode * number_of_periodes ; x = [ 0 : %pi / 100 : n ] ' ; y = f ( x ) ; N = size ( x , " * " ) ; scf ( ) plot2d ( x , y ) ; a = fft ( y , - 1 ) ; -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Thu Sep 22 23:17:27 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 22 Sep 2016 14:17:27 -0700 Subject: [Scilab-users] fourier series and fft In-Reply-To: <1405667942.301303669.1474578580517.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1405667942.301303669.1474578580517.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1474579047.2896.74.camel@Servo> Hey Paul: If you mean the Fourier series of a continuous-time periodic signal (or a continuous-time function of finite scope), then no, Scilab doesn't do that, because the FFT is different from the Fourier Series. If you have a signal that's symbolically defined as f(t) over some span of time, then Maxima may help you get a symbolic definition of the Fourier Series. The FFT is essentially the Fourier series of a sampled-time periodic (or finite-scope) signal, so if that sampled-time signal is a sufficiently accurate approximation of your continuous-time signal, and if your a0, a_k and b_k are defined to match the way that Scilab does the FFT, then the real part of the FFT are the a coefficients, and the imaginary part are the b coefficients. If you gather up half a dozen books that include signal processing, especially if some are from applications areas a bit removed from "normal" signal processing, you'll find that everyone specifies their Fourier stuff differently. So what comes out of Scilab's FFT may not match _your_ definitions of a0, etc., but they match _someone's_. On Thu, 2016-09-22 at 23:09 +0200, paul.carrico at free.fr wrote: > dear all > > I'm novice in Fourier series and other and my question is probably > naive (sorry for this) => I'm wondering if scilab can directly > calculate the Fourier coefficient a0, a_k and b_k ? > > > I'm currently doing it "by hand" is order to familiarise myself with > it (and I'm looking at the same time to documents on FFT use and > rules to refind the 2 natural frequencies of the example here bellow), > but it seems I'll need to code the coefficient calculations ... Am I > right ? > > > > Thanks > > > Paul > > > ######################################################################### > mode(0) > > function y=f(x) > y=2.*sin(2 * %pi * x) - 3.*cos(%pi * x); > endfunction > > periode = 2; > number_of_periodes = 1; > n = periode * number_of_periodes; > > x = [0 : %pi/100 : n]'; > y = f(x); > N = size(x,"*"); > > scf() > plot2d(x,y); > > a = fft(y,-1); > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From paul.carrico at free.fr Fri Sep 23 08:44:50 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Fri, 23 Sep 2016 08:44:50 +0200 (CEST) Subject: [Scilab-users] fourier series and fft In-Reply-To: <1474579047.2896.74.camel@Servo> Message-ID: <1928031951.302772828.1474613090020.JavaMail.root@zimbra5-e1.priv.proxad.net> Thanks Tim for this answer; well I notice I need to "dig" deeper on that topic Paul ----- Mail original ----- De: "Tim Wescott" ?: "Users mailing list for Scilab" Envoy?: Jeudi 22 Septembre 2016 23:17:27 Objet: Re: [Scilab-users] fourier series and fft Hey Paul: If you mean the Fourier series of a continuous-time periodic signal (or a continuous-time function of finite scope), then no, Scilab doesn't do that, because the FFT is different from the Fourier Series. If you have a signal that's symbolically defined as f(t) over some span of time, then Maxima may help you get a symbolic definition of the Fourier Series. The FFT is essentially the Fourier series of a sampled-time periodic (or finite-scope) signal, so if that sampled-time signal is a sufficiently accurate approximation of your continuous-time signal, and if your a0, a_k and b_k are defined to match the way that Scilab does the FFT, then the real part of the FFT are the a coefficients, and the imaginary part are the b coefficients. If you gather up half a dozen books that include signal processing, especially if some are from applications areas a bit removed from "normal" signal processing, you'll find that everyone specifies their Fourier stuff differently. So what comes out of Scilab's FFT may not match _your_ definitions of a0, etc., but they match _someone's_. On Thu, 2016-09-22 at 23:09 +0200, paul.carrico at free.fr wrote: > dear all > > I'm novice in Fourier series and other and my question is probably > naive (sorry for this) => I'm wondering if scilab can directly > calculate the Fourier coefficient a0, a_k and b_k ? > > > I'm currently doing it "by hand" is order to familiarise myself with > it (and I'm looking at the same time to documents on FFT use and > rules to refind the 2 natural frequencies of the example here bellow), > but it seems I'll need to code the coefficient calculations ... Am I > right ? > > > > Thanks > > > Paul > > > ######################################################################### > mode(0) > > function y=f(x) > y=2.*sin(2 * %pi * x) - 3.*cos(%pi * x); > endfunction > > periode = 2; > number_of_periodes = 1; > n = periode * number_of_periodes; > > x = [0 : %pi/100 : n]'; > y = f(x); > N = size(x,"*"); > > scf() > plot2d(x,y); > > a = fft(y,-1); > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Fri Sep 23 10:59:43 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 23 Sep 2016 10:59:43 +0200 Subject: [Scilab-users] {EXT} Re: Functions lib In-Reply-To: References: <1474524521110-4034588.post@n3.nabble.com> <57E37993.5050701@free.fr> <025d01d2149f$3b426bd0$b1c74370$@liftoff.at> Message-ID: <57E4EEFF.90107@free.fr> Le 22/09/2016 09:48, Dang Ngoc Chan, Christophe a ?crit : > .../... > There is also the quick and dirty way : > put it in a *.sci file as mentioned, > and read this file with an exec() or getd() > in the Scilab code. > But the effort for learning how to declare it in an *.ini file > can spare you some effort latter. > > You might also look at the "library" section of the help: > https://help.scilab.org/docs/6.0.0/en_US/section_b0e75452c88728d23bbe1cbd7fad7b12.html > > I don't know now, but before, you had to create a directory containing: > * a file named "name" (without any extension), > which is an ascii file containing the names of the functions; . That's true, this is required for Scilab 5, and no longer for Scilab 6. > * for each function, create a *.bin file with the name of the function > with : save("function_name.bin", function_name); . This is not enough. The "lib" file is also required. It is generated with genlib(..) > * call the library with the lib() command. > > The advantage compared with the simple *.sci method > Is that you can have several functions with the same name, > e.g. if you defined an f() function in the library lib1 and in the library lib2, > you can call them with lib1.f() and lib2.f(). > Not sure that it is worth investing in this knowledge. . When an unprotected function registered in a (protected) library is cleared, calling it again looks for it in existing libraries and reloads it automatically. This is not the case after clearing a function loaded with exec(). Its reference is then lost. Samuel Gougeon From jrafaelbguerra at hotmail.com Fri Sep 23 13:57:31 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 23 Sep 2016 11:57:31 +0000 Subject: [Scilab-users] fourier series and fft In-Reply-To: <1928031951.302772828.1474613090020.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1474579047.2896.74.camel@Servo> <1928031951.302772828.1474613090020.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: Hi Paul, Fyi, Tom Co's simple tutorial: http://www.chem.mtu.edu/~tbco/cm416/fft1.pdf shows how to obtain the Fourier coefficients via the fft Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of paul.carrico at free.fr Sent: Friday, September 23, 2016 8:45 AM To: tim at wescottdesign.com; Users mailing list for Scilab Subject: Re: [Scilab-users] fourier series and fft Thanks Tim for this answer; well I notice I need to "dig" deeper on that topic Paul ----- Mail original ----- De: "Tim Wescott" > ?: "Users mailing list for Scilab" > Envoy?: Jeudi 22 Septembre 2016 23:17:27 Objet: Re: [Scilab-users] fourier series and fft Hey Paul: If you mean the Fourier series of a continuous-time periodic signal (or a continuous-time function of finite scope), then no, Scilab doesn't do that, because the FFT is different from the Fourier Series. If you have a signal that's symbolically defined as f(t) over some span of time, then Maxima may help you get a symbolic definition of the Fourier Series. The FFT is essentially the Fourier series of a sampled-time periodic (or finite-scope) signal, so if that sampled-time signal is a sufficiently accurate approximation of your continuous-time signal, and if your a0, a_k and b_k are defined to match the way that Scilab does the FFT, then the real part of the FFT are the a coefficients, and the imaginary part are the b coefficients. If you gather up half a dozen books that include signal processing, especially if some are from applications areas a bit removed from "normal" signal processing, you'll find that everyone specifies their Fourier stuff differently. So what comes out of Scilab's FFT may not match _your_ definitions of a0, etc., but they match _someone's_. On Thu, 2016-09-22 at 23:09 +0200, paul.carrico at free.fr wrote: > dear all > > I'm novice in Fourier series and other and my question is probably > naive (sorry for this) => I'm wondering if scilab can directly > calculate the Fourier coefficient a0, a_k and b_k ? > > > I'm currently doing it "by hand" is order to familiarise myself with > it (and I'm looking at the same time to documents on FFT use and > rules to refind the 2 natural frequencies of the example here bellow), > but it seems I'll need to code the coefficient calculations ... Am I > right ? > > Thanks > > Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Fri Sep 23 14:00:32 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Fri, 23 Sep 2016 14:00:32 +0200 (CEST) Subject: [Scilab-users] fourier series and fft In-Reply-To: Message-ID: <1074213001.304292535.1474632032455.JavaMail.root@zimbra5-e1.priv.proxad.net> sound interesting ... many thanks for the information Paul ----- Mail original ----- De: "Rafael Guerra" ?: "Users mailing list for Scilab" Envoy?: Vendredi 23 Septembre 2016 13:57:31 Objet: Re: [Scilab-users] fourier series and fft Hi Paul, Fyi, Tom Co's simple tutorial: http://www.chem.mtu.edu/~tbco/cm416/fft1.pdf shows how to obtain the Fourier coefficients via the fft Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of paul.carrico at free.fr Sent: Friday, September 23, 2016 8:45 AM To: tim at wescottdesign.com; Users mailing list for Scilab Subject: Re: [Scilab-users] fourier series and fft Thanks Tim for this answer; well I notice I need to "dig" deeper on that topic Paul ----- Mail original ----- De: "Tim Wescott " < tim at wescottdesign.com > ?: "Users mailing list for Scilab" < users at lists.scilab.org > Envoy? : Jeudi 22 Septembre 2016 23:17:27 Objet: Re: [Scilab-users] fourier series and fft Hey Paul: If you mean the Fourier series of a continuous-time periodic signal (or a continuous-time function of finite scope), then no, Scilab doesn't do that, because the FFT is different from the Fourier Series. If you have a signal that's symbolically defined as f(t) over some span of time, then Maxima may help you get a symbolic definition of the Fourier Series. The FFT is essentially the Fourier series of a sampled-time periodic (or finite-scope) signal, so if that sampled-time signal is a sufficiently accurate approximation of your continuous-time signal, and if your a0, a_k and b_k are defined to match the way that Scilab does the FFT , then the real part of the FFT are the a coefficients, and the imaginary part are the b coefficients. If you gather up half a dozen books that include signal processing, especially if some are from applications areas a bit removed from "normal" signal processing, you'll find that everyone specifies their Fourier stuff differently. So what comes out of Scilab's FFT may not match _your_ definitions of a0, etc., but they match _someone's_. On Thu, 2016-09-22 at 23:09 +0200, paul.carrico at free.fr wrote: > dear all > > I'm novice in Fourier series and other and my question is probably > naive (sorry for this) => I'm wondering if scilab can directly > calculate the Fourier coefficient a0, a_k and b_k ? > > > I'm currently doing it "by hand" is order to familiarise myself with > it (and I'm looking at the same time to documents on FFT use and > rules to refind the 2 natural frequencies of the example here bellow), > but it seems I'll need to code the coefficient calculations ... Am I > right ? > > Thanks > > Paul _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Sep 23 15:32:54 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 23 Sep 2016 13:32:54 +0000 Subject: [Scilab-users] {EXT} Re: Functions lib In-Reply-To: <57E4EEFF.90107@free.fr> References: <1474524521110-4034588.post@n3.nabble.com> <57E37993.5050701@free.fr> <025d01d2149f$3b426bd0$b1c74370$@liftoff.at> <57E4EEFF.90107@free.fr> Message-ID: Hello all, hello Samuel, > De : Samuel Gougeon > Envoy? : vendredi 23 septembre 2016 11:00 > >> * a file named "name" (without any extension), which is an ascii file >> containing the names of the functions; > > That's true, this is required for Scilab 5, and no longer for Scilab 6. > [...] > This is not enough. The "lib" file is also required. It is generated with genlib(..) I did not try to create a library recently, but the help still mentions the "names" file (BTW I forgot the "s") https://help.scilab.org/docs/6.0.0/en_US/lib.html and does not mention any lib file. When reading the help page for genlib https://help.scilab.org/docs/6.0.0/en_US/genlib.html I understand it is an automated process to create the bin files, but it does not either mention any lib file. Maybe the help pages need an update? (Or maybe I need to read more cautiously.) egards -- 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 Fri Sep 23 17:30:15 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Fri, 23 Sep 2016 17:30:15 +0200 (CEST) Subject: [Scilab-users] Functions lib In-Reply-To: Message-ID: <1314195454.972875687.1474644615017.JavaMail.root@zimbra75-e12.priv.proxad.net> ----- Mail original ----- De: "Dang Ngoc Chan, Christophe" >Hello all, hello Samuel, > >> De : Samuel Gougeon >> Envoy? : vendredi 23 septembre 2016 11:00 >> >>> * a file named "name" (without any extension), which is an ascii file >>> containing the names of the functions; >> >> That's true, this is required for Scilab 5, and no longer for Scilab 6. >> [...] >> This is not enough. The "lib" file is also required. It is generated with genlib(..) > >I did not try to create a library recently, >but the help still mentions the "names" file >(BTW I forgot the "s") >https://help.scilab.org/docs/6.0.0/en_US/lib.html >and does not mention any lib file. > >When reading the help page for genlib >https://help.scilab.org/docs/6.0.0/en_US/genlib.html >I understand it is an automated process to create the bin files, >but it does not either mention any lib file. > >Maybe the help pages need an update? >(Or maybe I need to read more cautiously.) IMO, as already mentionned on this forum, lib() looks almost useless. load() does exactly the same, except that it does not allow to rename on loading the loaded library. It names it according to its default name declared when compiling it. But i never met circumstances where the default name was a problem. Rather, most often we try to guess what is the default name of the library to use it as LHS output of lib(). Yes, "help lib" is outdated. "help genlib" actually speaks about the "lib" file: "When all .sci files have been processed, genlib creates a library variable named lib_name and saves it in the file lib in dir_name." Samuel From noguchi.japan at gmail.com Sat Sep 24 15:59:37 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 24 Sep 2016 06:59:37 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time Message-ID: <1474725577246-4034608.post@n3.nabble.com> Hello, I am looking for a Scilab software which is similar to Matlab System ID tool box. I would like to obtain values of parameters, Tau, K and Td for following first order delay + Dead time model from time series data. ymodel = (K/(Tau*s+1))*exp(-Td*s)*u ymodel: process output, u: process input SISO continuous time Object function: Min ( (y-ymodel)^2) Could you please tell me which package I should use to solve this issue? Best Regards, -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Sep 24 16:37:09 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 24 Sep 2016 16:37:09 +0200 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <1474725577246-4034608.post@n3.nabble.com> References: <1474725577246-4034608.post@n3.nabble.com> Message-ID: <57E68F95.1000907@free.fr> Hello, Le 24/09/2016 15:59, Fukashiimo a ?crit : > Hello, > > I am looking for a Scilab software which is similar to Matlab System ID tool > box. > > I would like to obtain values of parameters, Tau, K and Td for following > first order delay + Dead time model from time series data. > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > ymodel: process output, u: process input > SISO continuous time > > Object function: Min ( (y-ymodel)^2) > > Could you please tell me which package I should use to solve this issue? Have you had a look to this module: https://help.scilab.org/docs/6.0.0/en_US/section_64a8529216e858b335b0e6c058385350.html ? From sgougeon at free.fr Sat Sep 24 16:44:06 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 24 Sep 2016 16:44:06 +0200 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <1474725577246-4034608.post@n3.nabble.com> References: <1474725577246-4034608.post@n3.nabble.com> Message-ID: <57E69136.509@free.fr> Le 24/09/2016 15:59, Fukashiimo a ?crit : > Hello, > > I am looking for a Scilab software which is similar to Matlab System ID tool > box. > > I would like to obtain values of parameters, Tau, K and Td for following > first order delay + Dead time model from time series data. > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > ymodel: process output, u: process input > SISO continuous time . What is s? What's the input variable: s or u? And is the other a known parameter? From sgougeon at free.fr Sat Sep 24 17:09:28 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 24 Sep 2016 17:09:28 +0200 Subject: [Scilab-users] fourier series and fft In-Reply-To: <1405667942.301303669.1474578580517.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1405667942.301303669.1474578580517.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <57E69728.9030600@free.fr> Le 22/09/2016 23:09, paul.carrico at free.fr a ?crit : > dear all > > I'm novice in Fourier series and other and my question is probably > naive (sorry for this) => I'm wondering if scilab can directly > calculate the Fourier coefficient a0, a_k and b_k ? > > I'm currently doing it "by hand" is order to familiarise myself with > it (and I'm looking at the same time to documents on FFT use and > rules to refind the 2 natural frequencies of the example here bellow), > but it seems I'll need to code the coefficient calculations ... Am I > right ? . Doing that is the main purpose of fft(). fft() returns the (bilateral) complex coefficients c_k of the series. a_k and b_k are easily computed from them. // Example #1: n = 100; x = linspace(0, 1, n+1); x = x(1:n); y = sin(2*%pi*x); ft = fft(y); ft = clean(ft); c = ft/n; c0 = c(1) // c(k) = ft(k+1) // c(-k) = ft(n+1-k) a0 = c0 // average a = (c(2:(n/2)) + c(n:-1:(n/2+2))) // a_k = c_k + c_(-k) b = %i*(c(2:n/2) - c(n:-1:n/2+2)) // b_k = %i*(c_k - c_(-k)) // Example #2: n = 100; x = linspace(0, 2, n+1); x = x(1:n); y = 2*sin(2 * %pi * x) - 3*cos(%pi * x); ft = fft(y); ft = clean(ft); c = ft/n; c0 = c(1) a0 = c0 a = (c(2:(n/2)) + c(n:-1:(n/2+2))) b = %i*(c(2:n/2) - c(n:-1:n/2+2)) --> a = (c(2:(n/2)) + c(n:-1:(n/2+2))) a = column 1 to 22 -3. 0. 0. 0. 0. 0. 0. ... // here is the "-3" coeff of the first even cos() harmonic --> b = %i*(c(2:n/2) - c(n:-1:n/2+2)) b = column 1 to 22 0. 2. 0. 0. 0. 0. 0. ... // here is the "3" coeff of the second odd sin() harmonic Anyway, the full x-range is considered as the period. If it is not actually the case, some artefacts appear in the results. To avoid them, it is mandatory to sample /x/ over a multiple of its "natural" period. Example #1: The period of sin(2*%pi*x) is 2*pi, this is why x must be sampled from 0 to 1. Example #2: The period of 2*sin(2 * %pi * x) - 3*cos(%pi * x)is also 2*pi, this is why x must be sampled from 0 to 2 (in the cos() argument). HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Sat Sep 24 20:48:28 2016 From: clement.david at scilab-enterprises.com (clement.david at scilab-enterprises.com) Date: Sat, 24 Sep 2016 20:48:28 +0200 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <57E69136.509@free.fr> Message-ID: <1a8c1607-6f1a-4c57-be7a-6c2cd1f6d601@email.android.com> An HTML attachment was scrubbed... URL: From noguchi.japan at gmail.com Sat Sep 24 23:10:43 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 24 Sep 2016 14:10:43 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <57E69136.509@free.fr> References: <1474725577246-4034608.post@n3.nabble.com> <57E69136.509@free.fr> Message-ID: s is the Laplace operator, u is the process input vatiable, y is the process output variable, 2016/09/24 23:44 "Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives]" : > Le 24/09/2016 15:59, Fukashiimo a ?crit : > > > Hello, > > > > I am looking for a Scilab software which is similar to Matlab System ID > tool > > box. > > > > I would like to obtain values of parameters, Tau, K and Td for following > > first order delay + Dead time model from time series data. > > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > > ymodel: process output, u: process input > > SISO continuous time > . > What is s? > What's the input variable: s or u? And is the other a known parameter? > > > _______________________________________________ > 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/System-Identification-for- > First-order-delay-and-dead-time-tp4034608p4034610.html > To unsubscribe from System Identification for First order delay and dead > time, click here > > . > NAML > > -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034613.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.crete at thalesgroup.com Sat Sep 24 23:17:20 2016 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Sat, 24 Sep 2016 23:17:20 +0200 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: References: <1474725577246-4034608.post@n3.nabble.com> <57E69136.509@free.fr> Message-ID: <8F1D40232A0E68409E3FC23A30C326620171EF560E0F@THSONEA01CMS04P.one.grp> Hello, If ymodel is (experimentally) proportional to u (and u is not too close to 0), it seems better to adjust z= ymodel/u = f(s). I frequently use ?datafit? for this purpose. Here f(x)= (K/(Tau*x+1))*exp(-Td*x). HTH, Denis [@@ THALES GROUP INTERNAL @@] De : users [mailto:users-bounces at lists.scilab.org] De la part de Fukashiimo Envoy? : samedi 24 septembre 2016 23:11 ? : users at lists.scilab.org Objet : Re: [Scilab-users] System Identification for First order delay and dead time s is the Laplace operator, u is the process input vatiable, y is the process output variable, 2016/09/24 23:44 "Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives]" <[hidden email]>: Le 24/09/2016 15:59, Fukashiimo a ?crit : > Hello, > > I am looking for a Scilab software which is similar to Matlab System ID tool > box. > > I would like to obtain values of parameters, Tau, K and Td for following > first order delay + Dead time model from time series data. > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > ymodel: process output, u: process input > SISO continuous time . What is s? What's the input variable: s or u? And is the other a known parameter? _______________________________________________ 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034610.html To unsubscribe from System Identification for First order delay and dead time, click here. NAML ________________________________ View this message in context: Re: System Identification for First order delay and dead time Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From noguchi.japan at gmail.com Sun Sep 25 01:02:51 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 24 Sep 2016 16:02:51 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <8F1D40232A0E68409E3FC23A30C326620171EF560E0F@THSONEA01CMS04P.one.grp> References: <1474725577246-4034608.post@n3.nabble.com> <57E69136.509@free.fr> <8F1D40232A0E68409E3FC23A30C326620171EF560E0F@THSONEA01CMS04P.one.grp> Message-ID: Thank you for your advice. y and u have some correration. X in your equation is the Laplace operator, In this case, how I can use datafit? "Denis Cr?t? [via Scilab / Xcos - Mailing Lists Archives]" : >Hello, > >If ymodel is (experimentally) proportional to u (and u is not too close to 0), it seems better to adjust z= ymodel/u = f(s). > >I frequently use ?datafit? for this purpose. Here f(x)= ?(K/(Tau*x+1))*exp(-Td*x). > >HTH, > >Denis > >? > >[@@ THALES GROUP INTERNAL @@] > >? > >De?: users [mailto:[hidden email]] De la part de Fukashiimo >Envoy??: samedi 24 septembre 2016 23:11 >??: [hidden email] >Objet?: Re: [Scilab-users] System Identification for First order delay and dead time > >? > >s is the Laplace operator, u is the process input vatiable, y is the process output variable, > >? > >2016/09/24 23:44 "Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives]" <[hidden email]>: > >Le 24/09/2016 15:59, Fukashiimo a ?crit : > > >> Hello, >> >> I am looking for a Scilab software which is similar to Matlab System ID tool >> box. >> >> I would like to obtain values of parameters, Tau, K and Td for following >> first order delay + Dead time model from time series data. >> ymodel = (K/(Tau*s+1))*exp(-Td*s)*u >> ymodel: process output, u: process input >> SISO continuous time > >. > >What is s? > >What's the input variable: s or u? And is the other a known parameter? > > >_______________________________________________ >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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034610.html > >To unsubscribe from System Identification for First order delay and dead time, click here. >NAML > >? > >View this message in context: Re: System Identification for First order delay and dead time >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 > > > Denis Cr?t? > > > > > > > >If you reply to this email, your message will be added to the discussion below: > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034614.html > > > > To unsubscribe from System Identification for First order delay and dead time, click here. > NAML > -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034615.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From noguchi.japan at gmail.com Sun Sep 25 01:07:12 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 24 Sep 2016 16:07:12 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <1a8c1607-6f1a-4c57-be7a-6c2cd1f6d601@email.android.com> References: <1474725577246-4034608.post@n3.nabble.com> <57E69136.509@free.fr> <1a8c1607-6f1a-4c57-be7a-6c2cd1f6d601@email.android.com> Message-ID: <13s0nndyyuviqe76x8emnxqa.1474758414605@email.android.com> Thank you for your advice. Is it possible to obtain Td also? I am going to use it. "Cl?ment David-2 [via Scilab / Xcos - Mailing Lists Archives]" : >Hello, > >I suggest you to take a look at the `time_id` function [1]. AFAIK this will give you a first idea of the parameters. If you need more, I suggest you to take a look at the "Optimization" topic in the help and implement a custom cost function. > >@samuel : IMHO `s` is supposed to be the %s Scilab variable (the Laplace variable also named `p`) ; `u` is the input ; `y` is the output. > >[1]: https://help.scilab.org/docs/5.5.2/en_US/time_id.html > >Thanks, > >-- >Cl?ment > > >_______________________________________________ >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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034612.html > > > > To unsubscribe from System Identification for First order delay and dead time, click here. > NAML > -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034616.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 Sun Sep 25 01:24:13 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 25 Sep 2016 01:24:13 +0200 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: References: <1474725577246-4034608.post@n3.nabble.com> <57E69136.509@free.fr> <8F1D40232A0E68409E3FC23A30C326620171EF560E0F@THSONEA01CMS04P.one.grp> Message-ID: <57E70B1D.6050408@free.fr> Le 25/09/2016 01:02, Fukashiimo a ?crit : > Thank you for your advice. y and u have some correration. X in your > equation is the Laplace operator, In this case, how I can use datafit? . AFAIK, there is no way in Scilab to perform a formal fit. This is why i asked about known values of u, s or both. >Object function: Min ( (y-ymodel)^2) So you need to know/have some y = y_actual(s,u) values for given s and u pairs. Which are the known data? Do you have a y_actual surface known for a (s,u) fixed mesh? -------------- next part -------------- An HTML attachment was scrubbed... URL: From noguchi.japan at gmail.com Sun Sep 25 01:44:26 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 24 Sep 2016 16:44:26 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <57E70B1D.6050408@free.fr> References: <1474725577246-4034608.post@n3.nabble.com> <57E69136.509@free.fr> <8F1D40232A0E68409E3FC23A30C326620171EF560E0F@THSONEA01CMS04P.one.grp> <57E70B1D.6050408@free.fr> Message-ID: Yes. I have data of y and u. s is the Laplaceoperator, no data is available. for s. "Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives]" : >Le 25/09/2016 01:02, Fukashiimo a ?crit?: > >Thank you for your advice. y and u have some correration. X in your equation is the Laplace operator, In this case, how I can use datafit? > >. >AFAIK, there is no way in Scilab to perform a formal fit. >This is why i asked about known values of u, s or both. >>Object function: Min ( (y-ymodel)^2) So you need to know/have some y = y_actual(s,u) values for given s and u pairs. >Which are the known data? >Do you have a y_actual surface known for a (s,u) fixed mesh? > > >_______________________________________________ >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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034617.html > > > > To unsubscribe from System Identification for First order delay and dead time, click here. > NAML > -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034618.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Sun Sep 25 02:22:11 2016 From: tim at wescottdesign.com (tim at wescottdesign.com) Date: Sat, 24 Sep 2016 17:22:11 -0700 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <1474725577246-4034608.post@n3.nabble.com> References: <1474725577246-4034608.post@n3.nabble.com> Message-ID: I suggest that you roll your own cost function, and use optim. Where possible, with optim, if part of the problem is nonlinear and part is linear, it's good to use a plain old linear least-squares fit for the plain old linear part. In your case, that's K. Tau and Td will have to be determined by optim. The cost function should generate a vector for ymodel with K = 1, then find the best fit for K with K = y / ymodel; then return a cost cost = norm(y - K * ymodel); wrap that all up in NDCost and then optim, and away you'll go. On 2016-09-24 06:59, Fukashiimo wrote: > Hello, > > I am looking for a Scilab software which is similar to Matlab System ID > tool > box. > > I would like to obtain values of parameters, Tau, K and Td for > following > first order delay + Dead time model from time series data. > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > ymodel: process output, u: process input > SISO continuous time > > Object function: Min ( (y-ymodel)^2) > > Could you please tell me which package I should use to solve this > issue? > > Best Regards, > > > > -- > View this message in context: > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.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 noguchi.japan at gmail.com Sun Sep 25 10:07:56 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sun, 25 Sep 2016 01:07:56 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: References: <1474725577246-4034608.post@n3.nabble.com> Message-ID: Thank you for your suggestion. However, I am not sure how I should formulate my Laplace domain equation. Could you please advise me more specifically? Thanks. 2016/09/25 ??9:33 "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" : > I suggest that you roll your own cost function, and use optim. > > Where possible, with optim, if part of the problem is nonlinear and part > is linear, it's good to use a plain old linear least-squares fit for the > plain old linear part. In your case, that's K. Tau and Td will have to > be determined by optim. > > The cost function should generate a vector for ymodel with K = 1, then > find the best fit for K with > > K = y / ymodel; > > then return a cost > > cost = norm(y - K * ymodel); > > wrap that all up in NDCost and then optim, and away you'll go. > > On 2016-09-24 06:59, Fukashiimo wrote: > > > Hello, > > > > I am looking for a Scilab software which is similar to Matlab System ID > > tool > > box. > > > > I would like to obtain values of parameters, Tau, K and Td for > > following > > first order delay + Dead time model from time series data. > > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > > ymodel: process output, u: process input > > SISO continuous time > > > > Object function: Min ( (y-ymodel)^2) > > > > Could you please tell me which package I should use to solve this > > issue? > > > > Best Regards, > > > > > > > > -- > > View this message in context: > > http://mailinglists.scilab.org/System-Identification-for- > First-order-delay-and-dead-time-tp4034608.html > > Sent from the Scilab users - Mailing Lists Archives mailing list > > archive at Nabble.com. > > _______________________________________________ > > users mailing list > > [hidden email] > > http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://mailinglists.scilab.org/System-Identification-for- > First-order-delay-and-dead-time-tp4034608p4034619.html > To unsubscribe from System Identification for First order delay and dead > time, click here > > . > NAML > > -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034620.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Sun Sep 25 21:07:15 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 25 Sep 2016 12:07:15 -0700 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: References: <1474725577246-4034608.post@n3.nabble.com> Message-ID: <1474830435.2826.25.camel@Servo> Heh. I just realized a better way to do this: I assume that you've sampled u and y at a constant rate, and that you have captured some reasonable amount of the response. This will be perfect if u is periodic. If u is periodic, then for some integer number of periods, take U = fft(u) and Y = fft(y). If u isn't periodic, then take FFT's of u and y after windowing them both with identical windows. Now calculate the frequencies for each bin of the above fft's. Define H(w) = ( K ./ (%i * tau * w + 1) ) .* exp(-%i * w * T). Calculate Ymodel = U .* H(w) Now, thanks to the magic of Parseval's Theorem, norm(Y - Ymodel) is the same as, or just a constant multiplier away from being, norm(y - ymodel) -- but you never actually have to compute ymodel. So optimize on tau and T as described before. You should only have to take your FFTs once at the beginning -- the rest will be repeatedly calculating H(w) for the various values of tau and T (and K, if you want to be lazy and just toss it into optim, although it'll be much faster to determine it using least-squares fit). On Sun, 2016-09-25 at 01:07 -0700, Fukashiimo wrote: > Thank you for your suggestion. However, I am not sure how I should > formulate my Laplace domain equation. Could you please advise me more > specifically? > > Thanks. > > > 2016/09/25 ??9:33 "Tim Wescott [via Scilab / Xcos - Mailing Lists > Archives]" <[hidden email]>: > I suggest that you roll your own cost function, and use > optim. > > Where possible, with optim, if part of the problem is > nonlinear and part > is linear, it's good to use a plain old linear least-squares > fit for the > plain old linear part. In your case, that's K. Tau and Td > will have to > be determined by optim. > > The cost function should generate a vector for ymodel with K = > 1, then > find the best fit for K with > > K = y / ymodel; > > then return a cost > > cost = norm(y - K * ymodel); > > wrap that all up in NDCost and then optim, and away you'll > go. > > On 2016-09-24 06:59, Fukashiimo wrote: > > > Hello, > > > > I am looking for a Scilab software which is similar to > Matlab System ID > > tool > > box. > > > > I would like to obtain values of parameters, Tau, K and Td > for > > following > > first order delay + Dead time model from time series data. > > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > > ymodel: process output, u: process input > > SISO continuous time > > > > Object function: Min ( (y-ymodel)^2) > > > > Could you please tell me which package I should use to solve > this > > issue? > > > > Best Regards, > > > > > > > > -- > > View this message in context: > > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html > > Sent from the Scilab users - Mailing Lists Archives mailing > list > > archive at Nabble.com. > > _______________________________________________ > > users mailing list > > [hidden email] > > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users > > > > ______________________________________________________________ > If you reply to this email, your message will be added to the > discussion below: > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html > To unsubscribe from System Identification for First order > delay and dead time, click here. > NAML > > > ______________________________________________________________________ > View this message in context: Re: System Identification for First > order delay and dead time > 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 -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From Christophe.Dang at sidel.com Mon Sep 26 09:05:58 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 26 Sep 2016 07:05:58 +0000 Subject: [Scilab-users] {EXT} Re: Functions lib In-Reply-To: <1314195454.972875687.1474644615017.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <1314195454.972875687.1474644615017.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: Hello, > De : sgougeon at free.fr > Envoy? : vendredi 23 septembre 2016 17:30 > > IMO, as already mentionned on this forum, lib() looks almost useless. > [...] > Yes, "help lib" is outdated. > "help genlib" actually speaks about the "lib" file: Thanks for the clarification. 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 Frieder.Nikolaisen at student.hs-rm.de Mon Sep 26 13:27:35 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Mon, 26 Sep 2016 13:27:35 +0200 Subject: [Scilab-users] Plot with two different y-axis as one plot Message-ID: Dear Sir or Madam, I want to print a Diagramm with two different y-axis and one x-axis. I want to zoom both plots at the same time after plotting. With my Code, I only zoom the secound plot. How could I plot it in a propperway? a11=newaxes() a11.tight_limits="on" plot(x_Achse, y_AchseP, 'green') legend("Leistung",2) // a12=newaxes() // a12.tight_limits="on" // a12.filled = "off" // Keine Hintergrundfarbe // plot(x_Achse, y_Achsea, 'red') // legend("Beschleunigung",2) // Rechte Achse erstellen und zweite Fkt. drucken a2=newaxes() a2.filled = "off" // Keine Hintergrundfarbe a2.axes_visible(1)="off" // y-Achse ausblenden a2.y_location="right" a2.tight_limits="on" plot(x_Achse,y_Achsen) legend("Drehzahl",1) I would even like to have four y-axis, two of both sides in the same Color as the graph. How to do this? Best regards Frieder Nikolaisen From sgougeon at free.fr Mon Sep 26 14:18:32 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Mon, 26 Sep 2016 14:18:32 +0200 (CEST) Subject: [Scilab-users] Plot with two different y-axis as one plot In-Reply-To: Message-ID: <1759903207.984408392.1474892312509.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello, >De: "Frieder Nikolaisen" >Envoy?: Lundi 26 Septembre 2016 13:27:35 >Objet: [Scilab-users] Plot with two different y-axis as one plot > >Dear Sir or Madam, > >I want to print a Diagramm with two different y-axis and one x-axis. I >want to zoom both plots at the same time after plotting. With my Code, I >only zoom the secound plot. How could I plot it in a propperway? Assuming that you are speaking about the interactive zoom: This bug that was a regression from Scilab 5.4.0 was greatly fixed by Caio during the last Google Summer Of Code. You may download the nightly built release and use it for this purpose: http://www.scilab.org/fr/development/nightly_builds/master >.../... > >I would even like to have four y-axis, two of both sides in the same >Color as the graph. How to do this? What do you mean by "2 on both sides"? In Scilab, AFAIK, it is not possible to choose the side of each axis on which ticks and labels are drawn. There is a trick to do that, but it's neither straightforward nor handy. In the demos, there is a Graphics => Plot 2D and 3D => plotyyy example for plotting 3 y-axes with 3 different scales. You may see its code and mimic it. Regards Samuel Gougeon From noguchi.japan at gmail.com Mon Sep 26 15:03:58 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Mon, 26 Sep 2016 06:03:58 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <8F1D40232A0E68409E3FC23A30C326620171EF560E0F@THSONEA01CMS04P.one.grp> References: <1474725577246-4034608.post@n3.nabble.com> <57E69136.509@free.fr> <8F1D40232A0E68409E3FC23A30C326620171EF560E0F@THSONEA01CMS04P.one.grp> Message-ID: <6ee59879-80e2-4a7a-b5eb-65c1d6d50bfc@bvec34483> Dear Denis, Thank you for your message. "s" is the Laplace operator and it is not a process input. f(u)= (K/(Tau*s+1))*exp(-Td*s)*u f(u) is the proess output and u is the process input, such as step input. K is the constant, process gain Tau is the constant, first order delay time constant Td is th constant, dead time Such case How we can get these constant values from datafit? Could you please advise? Thanks. ----- ??????? ----- ???: "Denis Cr?t? [via Scilab / Xcos - Mailing Lists Archives]" ??: "Fukashiimo" ????: 2016?9?25?(???) 06:23:27 ??: Re: System Identification for First order delay and dead time Hello, If ymodel is (experimentally) proportional to u (and u is not too close to 0), it seems better to adjust z= ymodel/u = f(s). I frequently use ?datafit? for this purpose. Here f(x)= ?(K/(Tau*x+1))*exp(-Td*x). HTH, Denis ? [@@ THALES GROUP INTERNAL @@] ? De?: users [mailto: [hidden email] ] De la part de Fukashiimo Envoy??: samedi 24 septembre 2016 2 3:11 ??: [hidden email] Objet?: Re: [Scilab-users] System Identification for First order delay and dead time ? s is the Laplace operator, u is the process input vatiable, y is the process output variable, ? 2016/09/24 23:44 "Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives]" < [hidden email] >: Le 24/09/2016 15:59, Fukashiimo a ?crit : > Hello, > > I am looking for a Scilab software which is similar to Matlab System ID tool > box. > > I would like to obtain values of parameters, Tau, K and Td for following > first order delay + Dead time model from time series data. > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > ymodel: process output, u: process input > SISO continuous time . What is s? What's the input variable: s or u? And is the other a known parameter? _______________________________________________ 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034610.html To unsubscribe from System Identification for First order delay and dead time, click here . NAML ? View this message in context: Re: System Identification for First order delay and dead time 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 Denis Cr?t? If you reply to this email, your message will be added to the discussion below: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034614.html To unsubscribe from System Identification for First order delay and dead time, click here . NAML -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034627.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frieder.Nikolaisen at student.hs-rm.de Mon Sep 26 14:59:17 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Mon, 26 Sep 2016 14:59:17 +0200 Subject: [Scilab-users] Plot with two different y-axis as one plot In-Reply-To: <1759903207.984408392.1474892312509.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <1759903207.984408392.1474892312509.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: Hello Mr. Gougeon, thanks for your fast reply. I have the SCILAB build 5.5.2 I do use the ScilabHelp, but I cannot find a plotyyy. That isn't the Demos? I found online by searching scilab Demos plotyyy: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=3a6f9d2f2634f286b686875725f4346dc3aaeeb6 (your are the author) That isn't quite different to my Code, as there is added a new axis and the Background is transparent. In this case, if I zoom in after plotting, that might be called interactiv, I only zoom in the later plotted graph, not both. So I cannot compare both Graphs, because they are now related to two "different" x-axis. There isn't a plotyyy function in SciLab, only the workaround? > What do you mean by "2 on both sides"? Having four Graphs with four different y-axis (instead of only two). It's quite common in my field of engineering. Best Regards, Frieder Nikolaisen Am 26.09.2016 14:18, schrieb sgougeon at free.fr: > Hello, > >>De: "Frieder Nikolaisen" >>Envoy?: Lundi 26 Septembre 2016 13:27:35 >>Objet: [Scilab-users] Plot with two different y-axis as one plot >> >>Dear Sir or Madam, >> >>I want to print a Diagramm with two different y-axis and one x-axis. >> I >>want to zoom both plots at the same time after plotting. With my >> Code, I >>only zoom the secound plot. How could I plot it in a propperway? > > Assuming that you are speaking about the interactive zoom: > This bug that was a regression from Scilab 5.4.0 was greatly fixed > by Caio during the last Google Summer Of Code. > You may download the nightly built release and use it for this > purpose: > http://www.scilab.org/fr/development/nightly_builds/master > >>.../... >> >>I would even like to have four y-axis, two of both sides in the same >>Color as the graph. How to do this? > > What do you mean by "2 on both sides"? > In Scilab, AFAIK, it is not possible to choose the side of each axis > on which ticks and labels are drawn. There is a trick to do that, > but it's neither straightforward nor handy. > > In the demos, there is a Graphics => Plot 2D and 3D => plotyyy > example for plotting 3 y-axes with 3 different scales. > You may see its code and mimic it. > > Regards > Samuel Gougeon > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From noguchi.japan at gmail.com Mon Sep 26 16:11:19 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Mon, 26 Sep 2016 07:11:19 -0700 (MST) Subject: [Scilab-users] Scilab: System Identification for First order delay and dead time Message-ID: <3692b870-7554-4e8f-b198-8f00f93702a2@bvec34483> Dear Cl?ment, Thank you for your suggestion. I made following Scilabe code: // z=poly(0,'z'); h=(0.065/(z-0.934))*(1/z^10)// <== 10 Sampling period dead time u=zeros(1,100); for i=10:1:100 u(1,i)=2.0; end t=1:1:100; rep=flts(u,tf2ss(h)); plot(t,rep,t,u)// <== We can see the step type process input with amplitude=2 and its process response with 10 sampling period dead time. k=find(rep<>0,1) //here the threshold has to be improved in case of noisy signal //H=time_id(1,"step",rep(k:$)) H=time_id(2,u,rep) rep=flts(u,tf2ss(H)); plot(t,rep,'.r')// <== We can see the process response by identified model. H h = 0.065 ----------- 10 11 - 0.934z + z H = 0.0265880 ------------- - 0.9779092 + z h is the discreate transfer function to provide operation data. H is the identified transfer function obtained from the opeartion data using time_id. I have two issues. 1. H is not similar to h even the data doesn't include any noise. How I can obtain transfer function nearly same as h? 2. I would like to have continuous transfer function. How I should convert the discreate transfer function to continuous transfer function. May I ask your further advise on these issues? Thanks. ----- ??????? ----- ???: "Cl?ment David-2 [via Scilab / Xcos - Mailing Lists Archives]" ??: "Fukashiimo" ????: 2016?9?25?(???) 04:15:09 ??: Re: System Identification for First order delay and dead time Hello, I suggest you to take a look at the `time_id` function [1]. AFAIK this will give you a first idea of the parameters. If you need more, I suggest you to take a look at the "Optimization" topic in the help and implement a custom cost function. @samuel : IMHO `s` is supposed to be the %s Scilab variable (the Laplace variable also named `p`) ; `u` is the input ; `y` is the output. [1]: https://help.scilab.org/docs/5.5.2/en_US/time_id.html Thanks, -- Cl?ment _______________________________________________ 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034612.html To unsubscribe from System Identification for First order delay and dead time, click here . NAML -- View this message in context: http://mailinglists.scilab.org/Scilab-System-Identification-for-First-order-delay-and-dead-time-tp4034630.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenechukwu.cj at gmail.com Mon Sep 26 16:20:53 2016 From: kenechukwu.cj at gmail.com (Chijioke Kenechukwu) Date: Mon, 26 Sep 2016 15:20:53 +0100 Subject: [Scilab-users] Scilab vs matlab Message-ID: What is the advantage of scilab over matlab -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Sep 26 16:33:35 2016 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 26 Sep 2016 16:33:35 +0200 Subject: [Scilab-users] Scilab vs matlab In-Reply-To: References: Message-ID: The price :-D Le 26/09/2016 ? 16:20, Chijioke Kenechukwu a ?crit : > > What is the advantage of scilab over matlab > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jean-Yves.Baudais at insa-rennes.fr Mon Sep 26 17:25:02 2016 From: Jean-Yves.Baudais at insa-rennes.fr (jbaudais@insa-rennes.fr) Date: Mon, 26 Sep 2016 17:25:02 +0200 Subject: [Scilab-users] Scilab vs matlab In-Reply-To: References: Message-ID: Hello, Le 26/09/2016 ? 16:20, Chijioke Kenechukwu a ?crit : > What is the advantage of scilab over matlab There is this http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.177.5019&rep=rep1&type=pdf It's a very old comparison (2008!!!) and I didn't find newer report. But as St?phane said, the price... Jean-Yves From jrafaelbguerra at hotmail.com Mon Sep 26 17:34:04 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 26 Sep 2016 15:34:04 +0000 Subject: [Scilab-users] Scilab vs matlab In-Reply-To: References: Message-ID: Hello, Off course the price. Fyi, Eike Rietsch, an advanced Matlab user, wrote in 2010 a quite comprehensive ?Introduction to Scilab from a Matlab User's Point of View?. He had several positive comments about Scilab including, quote: ? ? the power that typed lists and matrix-oriented typed lists o?er. Operator overloading is just one example, and the ?exibility o?ered by Scilab is unmatched by Matlab. ? Scilab provides one way of passing parameters to a function that is not available in Matlab: named arguments? ? Scilab is more ?exible in the way functions can be de?ned within a script (or within another function). Also that document does not cover the graphical aspects but it seems that Matlab is more versatile and the leader on that front. Not sure about what is the status today nor after Scilab 6 will be deployed. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of St?phane Mottelet Sent: Monday, September 26, 2016 4:34 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Scilab vs matlab The price :-D Le 26/09/2016 ? 16:20, Chijioke Kenechukwu a ?crit : What is the advantage of scilab over matlab _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Sep 26 18:29:53 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Mon, 26 Sep 2016 18:29:53 +0200 (CEST) Subject: [Scilab-users] Plot with two different y-axis as one plot In-Reply-To: Message-ID: <89519820.985406268.1474907393352.JavaMail.root@zimbra75-e12.priv.proxad.net> >De: "Frieder Nikolaisen" >.../... >I do use the ScilabHelp, but I cannot find a plotyyy. That isn't the Demos? no. To get and use the demos manager, you may run --> demo_gui >.../... In this case, if I zoom in after >plotting, that might be called interactiv, I only zoom in the later >plotted graph, not both. So I cannot compare both Graphs, because they >are now related to two "different" x-axis. Sure. This is the bug fixed last summer. Installing the most recent nightly release of Scilab takes 3 mn and does not require uninstalling your running stable 5.5.2 release. You may have as many different Scilab installed versions as you want, in parallel. This is a common situation for developers or others. >There isn't a plotyyy function in SciLab, only the workaround? It is not a work-around. A native plotyyy() is not really needed. Then why not a plotyyyy, plotyyyyy, plotxx, plotxxx, plotxxyy, etc? Such a collection would be quite meaningless. Only the fact that you can build the desired multiaxes plot function of your dream and needs is meaningful. Scilab enables you to do so. >> What do you mean by "2 on both sides"? > >Having four Graphs with four different y-axis (instead of only two). >It's quite common in my field of engineering. Would you have a snapshot of such a plot? When there are really many plots sharing the same x-axis for different y scales, another solution is to use subplot(n,1,i) instructions with multiple plot2d(x, yi) with the shared x absissae. HTH Regards Samuel Gougeon From tim at wescottdesign.com Mon Sep 26 19:56:22 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Mon, 26 Sep 2016 10:56:22 -0700 Subject: [Scilab-users] Scilab vs matlab In-Reply-To: References: Message-ID: <1474912582.2826.62.camel@Servo> It's free (as in beer) It's free (as in open source) It has a much better system of data typing (although as a dedicated C++ programmer, IMHO it could be better). Any language that includes transfer functions as a native type is, IMHO, excellent. Because it is free and free, not only does one not have to pay as much as a nice car to have it, one is not also constantly struggling with stupid license issues. Matlab either binds you to one computer or puts demands on your IT team to implement a floating license. Scilab just lets you use it. As a consultant, I can use Scilab without worrying if my customer has a license. Were I to use Matlab, not only would I be constrained in trading work back and forth, but I'd have to make sure that I never used a toolbox (more $$$) that my customer did not have. Matlab seems to have more comprehensive tool boxes and pre-packaged solutions. But, I'm deeply suspicious of pre-packaged solutions for the same reasons I'm suspicious of experts who won't explain their methods: "you can trust me because I'm expensive" does not constitute a good reason for me to use a result, and that's basically the implied promise of a Matlab toolbox. If Matlab were free, I'd still use Scilab -- Scilab is just better. On Mon, 2016-09-26 at 15:20 +0100, Chijioke Kenechukwu wrote: > What is the advantage of scilab over matlab > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From dositheus41 at gmail.com Tue Sep 27 04:36:42 2016 From: dositheus41 at gmail.com (=?UTF-8?Q?Ren=C3=A9_Grognard?=) Date: Tue, 27 Sep 2016 12:36:42 +1000 Subject: [Scilab-users] Scilab vs matlab In-Reply-To: <1474912582.2826.62.camel@Servo> References: <1474912582.2826.62.camel@Servo> Message-ID: Also there is an army of people ready to answer your questions for free! On Tue, Sep 27, 2016 at 3:56 AM, Tim Wescott wrote: > It's free (as in beer) > > It's free (as in open source) > > It has a much better system of data typing (although as a dedicated C++ > programmer, IMHO it could be better). > > Any language that includes transfer functions as a native type is, IMHO, > excellent. > > Because it is free and free, not only does one not have to pay as much > as a nice car to have it, one is not also constantly struggling with > stupid license issues. Matlab either binds you to one computer or puts > demands on your IT team to implement a floating license. Scilab just > lets you use it. > > As a consultant, I can use Scilab without worrying if my customer has a > license. Were I to use Matlab, not only would I be constrained in > trading work back and forth, but I'd have to make sure that I never used > a toolbox (more $$$) that my customer did not have. > > Matlab seems to have more comprehensive tool boxes and pre-packaged > solutions. But, I'm deeply suspicious of pre-packaged solutions for the > same reasons I'm suspicious of experts who won't explain their methods: > "you can trust me because I'm expensive" does not constitute a good > reason for me to use a result, and that's basically the implied promise > of a Matlab toolbox. > > If Matlab were free, I'd still use Scilab -- Scilab is just better. > > On Mon, 2016-09-26 at 15:20 +0100, Chijioke Kenechukwu wrote: > > What is the advantage of scilab over matlab > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: 503.349.8432 > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Sep 27 09:08:15 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 27 Sep 2016 09:08:15 +0200 (CEST) Subject: [Scilab-users] is vectorization possible In-Reply-To: <460347515.322441186.1474959976754.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi All Is the vectorization possible for the example herebellow? everything I tried failed ! Thanks for any help Paul ################################################################## mode(0) k = 100; a = rand(k,1); w = 5; n = (k/w); i = [1 : n]'; tmp = zeros(n,1); // using vectorization tmp(i,1) = sum(a( [1 + (i-1)*n : i*n],:) abort // same using a loop for i = 1 : n tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); end tmp -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Tue Sep 27 09:17:30 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Tue, 27 Sep 2016 00:17:30 -0700 Subject: [Scilab-users] is vectorization possible In-Reply-To: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1474960650.3107.2.camel@Servo> tmp = sum(a( [1 + (i-1)*n : i*n],:), 'c') Or sum(..., 'r'). I can't remember which is which. One makes a row, the other makes a column, but I can never remember if it's "sum all columns" or "sum into a column". On Tue, 2016-09-27 at 09:08 +0200, paul.carrico at free.fr wrote: > Hi All > > Is the vectorization possible for the example herebellow? everything I > tried failed ! > > Thanks for any help > > Paul > > ################################################################## > mode(0) > > > k = 100; > a = rand(k,1); > > > w = 5; > n = (k/w); > > > i = [1 : n]'; > > > tmp = zeros(n,1); > > > // using vectorization > tmp(i,1) = sum(a( [1 + (i-1)*n : i*n],:) > abort > > > > > // same using a loop > for i = 1 : n > tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); > end > > > tmp > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From cpngonadi at gmail.com Tue Sep 27 09:24:57 2016 From: cpngonadi at gmail.com (Chukwuemeka Ngonadi) Date: Tue, 27 Sep 2016 08:24:57 +0100 Subject: [Scilab-users] Scilab vs matlab In-Reply-To: References: <1474912582.2826.62.camel@Servo> Message-ID: Thanks for the reply On Sep 27, 2016 3:36 AM, "Ren? Grognard" wrote: > Also there is an army of people ready to answer your questions for free! > > On Tue, Sep 27, 2016 at 3:56 AM, Tim Wescott > wrote: > >> It's free (as in beer) >> >> It's free (as in open source) >> >> It has a much better system of data typing (although as a dedicated C++ >> programmer, IMHO it could be better). >> >> Any language that includes transfer functions as a native type is, IMHO, >> excellent. >> >> Because it is free and free, not only does one not have to pay as much >> as a nice car to have it, one is not also constantly struggling with >> stupid license issues. Matlab either binds you to one computer or puts >> demands on your IT team to implement a floating license. Scilab just >> lets you use it. >> >> As a consultant, I can use Scilab without worrying if my customer has a >> license. Were I to use Matlab, not only would I be constrained in >> trading work back and forth, but I'd have to make sure that I never used >> a toolbox (more $$$) that my customer did not have. >> >> Matlab seems to have more comprehensive tool boxes and pre-packaged >> solutions. But, I'm deeply suspicious of pre-packaged solutions for the >> same reasons I'm suspicious of experts who won't explain their methods: >> "you can trust me because I'm expensive" does not constitute a good >> reason for me to use a result, and that's basically the implied promise >> of a Matlab toolbox. >> >> If Matlab were free, I'd still use Scilab -- Scilab is just better. >> >> On Mon, 2016-09-26 at 15:20 +0100, Chijioke Kenechukwu wrote: >> > What is the advantage of scilab over matlab >> > >> > _______________________________________________ >> > users mailing list >> > users at lists.scilab.org >> > http://lists.scilab.org/mailman/listinfo/users >> >> -- >> >> Tim Wescott >> www.wescottdesign.com >> Control & Communications systems, circuit & software design. >> Phone: 503.631.7815 >> Cell: 503.349.8432 >> >> >> _______________________________________________ >> 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 paul.carrico at free.fr Tue Sep 27 09:28:55 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 27 Sep 2016 09:28:55 +0200 (CEST) Subject: [Scilab-users] is vectorization possible In-Reply-To: <1474960650.3107.2.camel@Servo> Message-ID: <1906559611.322518810.1474961335624.JavaMail.root@zimbra5-e1.priv.proxad.net> Thanks Tim for the answer, nevertheless it cannot work. I want to make the sum of blocks of rows; here - 'i' is a vector - tmp is a vector of 20 rows in the current example - the loop does the job, but I do not understand why the vectorization fails ... is it a synthax error ? Paul pb: in my understanding, 'c' means 'column' and 'r' means row => for matrix operations ----- Mail original ----- De: "Tim Wescott" ?: users at lists.scilab.org Envoy?: Mardi 27 Septembre 2016 09:17:30 Objet: Re: [Scilab-users] is vectorization possible tmp = sum(a( [1 + (i-1)*n : i*n],:), 'c') Or sum(..., 'r'). I can't remember which is which. One makes a row, the other makes a column, but I can never remember if it's "sum all columns" or "sum into a column". On Tue, 2016-09-27 at 09:08 +0200, paul.carrico at free.fr wrote: > Hi All > > Is the vectorization possible for the example herebellow? everything I > tried failed ! > > Thanks for any help > > Paul > > ################################################################## > mode(0) > > > k = 100; > a = rand(k,1); > > > w = 5; > n = (k/w); > > > i = [1 : n]'; > > > tmp = zeros(n,1); > > > // using vectorization > tmp(i,1) = sum(a( [1 + (i-1)*n : i*n],:) > abort > > > > > // same using a loop > for i = 1 : n > tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); > end > > > tmp > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Tue Sep 27 09:48:50 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 27 Sep 2016 09:48:50 +0200 Subject: [Scilab-users] is vectorization possible In-Reply-To: <1474960650.3107.2.camel@Servo> References: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> <1474960650.3107.2.camel@Servo> Message-ID: <57EA2462.9000306@free.fr> Le 27/09/2016 09:17, Tim Wescott a ?crit : > .../... > > Or sum(..., 'r'). I can't remember which is which. One makes a row, > the other makes a column, but I can never remember if it's "sum all > columns" or "sum into a column". :) Never did i, until i realized that operating *across* Rows yields a Row, or across Columns Yields a Column. Nevertheless i vaguely remember having met very few functions for which it is the opposite (but for good understandable reasons). Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Tue Sep 27 09:55:48 2016 From: tim at wescottdesign.com (tim at wescottdesign.com) Date: Tue, 27 Sep 2016 00:55:48 -0700 Subject: [Scilab-users] is vectorization possible In-Reply-To: <1906559611.322518810.1474961335624.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1906559611.322518810.1474961335624.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <5316362b873630ea930e3e9995bdbd61@wescottdesign.com> OK. I think I see where I went wrong. There's a way to do this but it's a bit mind boggling. If you can let ix be a rectangular matrix of indexes, then a(ix) will be a column vector of indexed values. Then you can use 'matrix' to reassembly a(ix) into a rectangular matrix, the rows or columns of which you can sum up. I don't know if it'll be faster than the for loop, though. There may be an even better way of doing it, but I don't know what it is. On 2016-09-27 00:28, paul.carrico at free.fr wrote: > Thanks Tim for the answer, nevertheless it cannot work. > > I want to make the sum of blocks of rows; here > - 'i' is a vector > - tmp is a vector of 20 rows in the current example > - the loop does the job, but I do not understand why the vectorization > fails ... is it a synthax error ? > > Paul > > pb: in my understanding, 'c' means 'column' and 'r' means row => for > matrix operations > > > > ----- Mail original ----- > De: "Tim Wescott" > ?: users at lists.scilab.org > Envoy?: Mardi 27 Septembre 2016 09:17:30 > Objet: Re: [Scilab-users] is vectorization possible > > tmp = sum(a( [1 + (i-1)*n : i*n],:), 'c') > > Or sum(..., 'r'). I can't remember which is which. One makes a row, > the other makes a column, but I can never remember if it's "sum all > columns" or "sum into a column". > > On Tue, 2016-09-27 at 09:08 +0200, paul.carrico at free.fr wrote: >> Hi All >> >> Is the vectorization possible for the example herebellow? everything I >> tried failed ! >> >> Thanks for any help >> >> Paul >> >> ################################################################## >> mode(0) >> >> >> k = 100; >> a = rand(k,1); >> >> >> w = 5; >> n = (k/w); >> >> >> i = [1 : n]'; >> >> >> tmp = zeros(n,1); >> >> >> // using vectorization >> tmp(i,1) = sum(a( [1 + (i-1)*n : i*n],:) >> abort >> >> >> >> >> // same using a loop >> for i = 1 : n >> tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); >> end >> >> >> tmp >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: 503.349.8432 > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From tim at wescottdesign.com Tue Sep 27 09:58:14 2016 From: tim at wescottdesign.com (tim at wescottdesign.com) Date: Tue, 27 Sep 2016 00:58:14 -0700 Subject: [Scilab-users] is vectorization possible In-Reply-To: <57EA2462.9000306@free.fr> References: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> <1474960650.3107.2.camel@Servo> <57EA2462.9000306@free.fr> Message-ID: <8b3d1d34a45228dd0be4f21da80593f4@wescottdesign.com> On 2016-09-27 00:48, Samuel Gougeon wrote: > Le 27/09/2016 09:17, Tim Wescott a ?crit : > >> .../... >> >> Or sum(..., 'r'). I can't remember which is which. One makes a row, >> the other makes a column, but I can never remember if it's "sum all >> columns" or "sum into a column". > :) > Never did i, until i realized that operating ACROSS Rows yields a Row, or across Columns Yields a Column. > Nevertheless i vaguely remember having met very few functions for which it is the opposite (but for good understandable reasons). I just make a matrix 'thing', then do size(sum(thing, 'c')). Then I know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleksiy.bond at gmail.com Tue Sep 27 09:59:12 2016 From: oleksiy.bond at gmail.com (ol.bond) Date: Tue, 27 Sep 2016 00:59:12 -0700 (MST) Subject: [Scilab-users] is vectorization possible In-Reply-To: <5316362b873630ea930e3e9995bdbd61@wescottdesign.com> References: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> <1474960650.3107.2.camel@Servo> <1906559611.322518810.1474961335624.JavaMail.root@zimbra5-e1.priv.proxad.net> <5316362b873630ea930e3e9995bdbd61@wescottdesign.com> Message-ID: As just mentioned by Tim, you have to transform your vector 'a' to a matrix, and then apply summation: tmp = sum(matrix(a,w,n)','c'); 2016-09-27 16:56 GMT+09:00 Tim Wescott [via Scilab / Xcos - Mailing Lists Archives] : > OK. I think I see where I went wrong. > > There's a way to do this but it's a bit mind boggling. > > If you can let ix be a rectangular matrix of indexes, then a(ix) will be > a column vector of indexed values. Then you can use 'matrix' to > reassembly a(ix) into a rectangular matrix, the rows or columns of which > you can sum up. I don't know if it'll be faster than the for loop, > though. > > There may be an even better way of doing it, but I don't know what it > is. > > On 2016-09-27 00:28, [hidden email] > wrote: > > > Thanks Tim for the answer, nevertheless it cannot work. > > > > I want to make the sum of blocks of rows; here > > - 'i' is a vector > > - tmp is a vector of 20 rows in the current example > > - the loop does the job, but I do not understand why the vectorization > > fails ... is it a synthax error ? > > > > Paul > > > > pb: in my understanding, 'c' means 'column' and 'r' means row => for > > matrix operations > > > > > > > > ----- Mail original ----- > > De: "Tim Wescott" <[hidden email] > > > > ?: [hidden email] > > > Envoy?: Mardi 27 Septembre 2016 09:17:30 > > Objet: Re: [Scilab-users] is vectorization possible > > > > tmp = sum(a( [1 + (i-1)*n : i*n],:), 'c') > > > > Or sum(..., 'r'). I can't remember which is which. One makes a row, > > the other makes a column, but I can never remember if it's "sum all > > columns" or "sum into a column". > > > > On Tue, 2016-09-27 at 09:08 +0200, [hidden email] > wrote: > >> Hi All > >> > >> Is the vectorization possible for the example herebellow? everything I > >> tried failed ! > >> > >> Thanks for any help > >> > >> Paul > >> > >> ################################################################## > >> mode(0) > >> > >> > >> k = 100; > >> a = rand(k,1); > >> > >> > >> w = 5; > >> n = (k/w); > >> > >> > >> i = [1 : n]'; > >> > >> > >> tmp = zeros(n,1); > >> > >> > >> // using vectorization > >> tmp(i,1) = sum(a( [1 + (i-1)*n : i*n],:) > >> abort > >> > >> > >> > >> > >> // same using a loop > >> for i = 1 : n > >> tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); > >> end > >> > >> > >> tmp > >> _______________________________________________ > >> users mailing list > >> [hidden email] > >> http://lists.scilab.org/mailman/listinfo/users > > > > -- > > > > Tim Wescott > > www.wescottdesign.com > > Control & Communications systems, circuit & software design. > > Phone: 503.631.7815 > > Cell: 503.349.8432 > > > > > > _______________________________________________ > > users mailing list > > [hidden email] > > http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://mailinglists.scilab.org/Scilab-users-is-vectorization-possible- > tp4034639p4034644.html > To start a new topic under Scilab users - Mailing Lists Archives, email > ml-node+s994242n2602246h53 at n3.nabble.com > To unsubscribe from Scilab users - Mailing Lists Archives, click here > > . > NAML > > -- View this message in context: http://mailinglists.scilab.org/Scilab-users-is-vectorization-possible-tp4034639p4034646.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Sep 27 10:26:53 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 27 Sep 2016 10:26:53 +0200 (CEST) Subject: [Scilab-users] is vectorization possible In-Reply-To: Message-ID: <1541287852.322723391.1474964813646.JavaMail.root@zimbra5-e1.priv.proxad.net> thanks to both of you I works now Paul ############################### mode(0) k = 1E6; a = rand(k,1); w = 2; n = (k/w); // same using a loop tic() tmp2 = zeros(n,1); for i = 1 : n tmp2(i,1) = sum(a([1 + (i-1)*w : i*w],:)); end duree_loop = toc() // using vectorization tic() tmp = zeros(n,1); tmp = sum(matrix(a,w,n),'r')'; duree_vectorization = toc() max_error = max(abs(tmp - tmp2)) ----- Mail original ----- De: "ol.bond" ?: users at lists.scilab.org Envoy?: Mardi 27 Septembre 2016 09:59:12 Objet: Re: [Scilab-users] is vectorization possible As just mentioned by Tim, you have to transform your vector 'a' to a matrix, and then apply summation: tmp = sum(matrix(a,w,n)','c'); 2016-09-27 16:56 GMT+09:00 Tim Wescott [via Scilab / Xcos - Mailing Lists Archives] < [hidden email] > : OK. I think I see where I went wrong. There's a way to do this but it's a bit mind boggling. If you can let ix be a rectangular matrix of indexes, then a(ix) will be a column vector of indexed values. Then you can use 'matrix' to reassembly a(ix) into a rectangular matrix, the rows or columns of which you can sum up. I don't know if it'll be faster than the for loop, though. There may be an even better way of doing it, but I don't know what it is. On 2016-09-27 00:28, [hidden email] wrote: > Thanks Tim for the answer, nevertheless it cannot work. > > I want to make the sum of blocks of rows; here > - 'i' is a vector > - tmp is a vector of 20 rows in the current example > - the loop does the job, but I do not understand why the vectorization > fails ... is it a synthax error ? > > Paul > > pb: in my understanding, 'c' means 'column' and 'r' means row => for > matrix operations > > > > ----- Mail original ----- > De: "Tim Wescott" < [hidden email] > > ?: [hidden email] > Envoy?: Mardi 27 Septembre 2016 09:17:30 > Objet: Re: [Scilab-users] is vectorization possible > > tmp = sum(a( [1 + (i-1)*n : i*n],:), 'c') > > Or sum(..., 'r'). I can't remember which is which. One makes a row, > the other makes a column, but I can never remember if it's "sum all > columns" or "sum into a column". > > On Tue, 2016-09-27 at 09:08 +0200, [hidden email] wrote: >> Hi All >> >> Is the vectorization possible for the example herebellow? everything I >> tried failed ! >> >> Thanks for any help >> >> Paul >> >> ################################################################## >> mode(0) >> >> >> k = 100; >> a = rand(k,1); >> >> >> w = 5; >> n = (k/w); >> >> >> i = [1 : n]'; >> >> >> tmp = zeros(n,1); >> >> >> // using vectorization >> tmp(i,1) = sum(a( [1 + (i-1)*n : i*n],:) >> abort >> >> >> >> >> // same using a loop >> for i = 1 : n >> tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); >> end >> >> >> tmp >> _______________________________________________ >> users mailing list >> [hidden email] >> http://lists.scilab.org/mailman/listinfo/users > > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: 503.349.8432 > > > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users If you reply to this email, your message will be added to the discussion below: http://mailinglists.scilab.org/Scilab-users-is-vectorization-possible-tp4034639p4034644.html To start a new topic under Scilab users - Mailing Lists Archives, email [hidden email] To unsubscribe from Scilab users - Mailing Lists Archives, click here . NAML View this message in context: Re: is vectorization possible Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From Christophe.Dang at sidel.com Tue Sep 27 10:48:08 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Tue, 27 Sep 2016 08:48:08 +0000 Subject: [Scilab-users] {EXT} Re: is vectorization possible In-Reply-To: <1541287852.322723391.1474964813646.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1541287852.322723391.1474964813646.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: Hello, > De : paul.carrico at free.fr > Envoy? : mardi 27 septembre 2016 10:27 > > It works now To have it complete, my solution, once debugged, is twice slower than the vectorised solution (but faster than the initial loop) tic() indices0 = 0:w:(k-1); tmp3 = zeros(n,1); for i = 1 : w indices = indices0 + i; tmp3 = tmp3 + a(indices); end duree_loop3 = toc() (my email delivery seems quite slow today, so you might see this a bit late). 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 Sep 27 10:16:13 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Tue, 27 Sep 2016 08:16:13 +0000 Subject: [Scilab-users] is vectorization possible Message-ID: Hello, > De : paul.carrico at free.fr > Envoy? : mardi 27 septembre 2016 09:08 > > for i = 1 : n > tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); > end So you want to sum on a window which width is w, isn't it? Not full vectorization, but you might loop on w (=5) instead of n (=20), something like for i = 1:w tmp = tmp + a(i : n-w-1 + i) end It might be faster. -- 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 Tue Sep 27 15:04:35 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 27 Sep 2016 15:04:35 +0200 (CEST) Subject: [Scilab-users] issue with "sum" In-Reply-To: <1328734144.323868820.1474981446119.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1951464141.323872388.1474981475575.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi again In the following example, the sum lead to an opposite sign for the complex part ? Am I doing something wrong ? thanks for any highlight Paul ################################################ mode(0) A = [ - 3. 6.123D-17 3. - 3. - 3.062D-17 - 5.303D-17*%i - 1.5 + 2.5980762*%i - 3. - 3.062D-17 + 5.303D-17*%i - 1.5 - 2.5980762*%i] mat = matrix(A,3,3) sum1 = sum(mat,'r')' // reference matrix sum_c1 = sum(mat(:,1)) // sum of the 1rst column of sum1 matrix sum_c2 = sum(mat(:,2)) // 2nd column of sum1 matrix sum_c3 = sum(mat(:,3)) // 3rd column of sum1 matrix From stephane.mottelet at utc.fr Tue Sep 27 15:09:36 2016 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 27 Sep 2016 15:09:36 +0200 Subject: [Scilab-users] issue with "sum" In-Reply-To: <1951464141.323872388.1474981475575.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1951464141.323872388.1474981475575.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: paul, remember the transpose is *conjugate transpose*, use .' instead. S. Le 27/09/2016 ? 15:04, paul.carrico at free.fr a ?crit : > Hi again > > In the following example, the sum lead to an opposite sign for the complex part ? Am I doing something wrong ? > > thanks for any highlight > > Paul > > ################################################ > mode(0) > > A = [ > - 3. > 6.123D-17 > 3. > - 3. > - 3.062D-17 - 5.303D-17*%i > - 1.5 + 2.5980762*%i > - 3. > - 3.062D-17 + 5.303D-17*%i > - 1.5 - 2.5980762*%i] > > mat = matrix(A,3,3) > > sum1 = sum(mat,'r')' // reference matrix > > sum_c1 = sum(mat(:,1)) // sum of the 1rst column of sum1 matrix > sum_c2 = sum(mat(:,2)) // 2nd column of sum1 matrix > sum_c3 = sum(mat(:,3)) // 3rd column of sum1 matrix > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From paul.carrico at free.fr Tue Sep 27 15:17:58 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 27 Sep 2016 15:17:58 +0200 (CEST) Subject: [Scilab-users] issue with "sum" In-Reply-To: Message-ID: <374075410.323926415.1474982278019.JavaMail.root@zimbra5-e1.priv.proxad.net> "remember" .... heuhhh ... :-) Thanks Stephane ----- Mail original ----- De: "St?phane Mottelet" ?: "Users mailing list for Scilab" Envoy?: Mardi 27 Septembre 2016 15:09:36 Objet: Re: [Scilab-users] issue with "sum" paul, remember the transpose is *conjugate transpose*, use .' instead. S. Le 27/09/2016 ? 15:04, paul.carrico at free.fr a ?crit : > Hi again > > In the following example, the sum lead to an opposite sign for the complex part ? Am I doing something wrong ? > > thanks for any highlight > > Paul > > ################################################ > mode(0) > > A = [ > - 3. > 6.123D-17 > 3. > - 3. > - 3.062D-17 - 5.303D-17*%i > - 1.5 + 2.5980762*%i > - 3. > - 3.062D-17 + 5.303D-17*%i > - 1.5 - 2.5980762*%i] > > mat = matrix(A,3,3) > > sum1 = sum(mat,'r')' // reference matrix > > sum_c1 = sum(mat(:,1)) // sum of the 1rst column of sum1 matrix > sum_c2 = sum(mat(:,2)) // 2nd column of sum1 matrix > sum_c3 = sum(mat(:,3)) // 3rd column of sum1 matrix > > _______________________________________________ > 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 noguchi.japan at gmail.com Tue Sep 27 16:30:57 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Tue, 27 Sep 2016 07:30:57 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <1474830435.2826.25.camel@Servo> References: <1474725577246-4034608.post@n3.nabble.com> <1474830435.2826.25.camel@Servo> Message-ID: <4a0a58e0-e9ca-4aa1-bfa2-4a3436bc9ff9@bvec34483> Dear Tim, Thank you for yor advise. However, u is the step signal, such as 50% ==>60% ==> 50%. u and y are sampled with constant interval, such as one second. I made following Scilabe code, using time_id: // z=poly(0,'z'); h=(0.065/(z-0.934))*(1/z^10)// <== 10 Sampling period dead time u=zeros(1,100); for i=10:1:100 u(1,i)=2.0; end t=1:1:100; rep=flts(u,tf2ss(h)); plot(t,rep,t,u)// <== We can see the step type process input with amplitude=2 and its process response with 10 sampling period dead time. k=find(rep<>0,1) //here the threshold has to be improved in case of noisy signal //H=time_id(1,"step",rep(k:$)) H=time_id(2,u,rep) rep=flts(u,tf2ss(H)); plot(t,rep,'.r')// <== We can see the process response by identified model. H h = 0.065 ----------- 10 11 - 0.934z + z H = 0.0265880 ------------- - 0.9779092 + z h is the discreate transfer function to provide operation data. H is the identified transfer function obtained from the opeartion data using time_id. I have two issues. 1. H is not similar to h even the data doesn't include any noise. How I can obtain transfer function nearly same as h? 2. I would like to have continuous transfer function. How I should convert the discreate transfer function to continuous transfer function. I am lokking for a solution for these two issues. May I ask your advise again? Thanks. ----- ??????? ----- ???: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" ??: "Fukashiimo" ????: 2016?9?26?(???) 04:07:52 ??: Re: System Identification for First order delay and dead time Heh. ?I just realized a better way to do this: I assume that you've sampled u and y at a constant rate, and that you have captured some reasonable amount of the response. ?This will be perfect if u is periodic. If u is periodic, then for some integer number of periods, take U = fft(u) and Y = fft(y). ?If u isn't periodic, then take FFT's of u and y after windowing them both with identical windows. Now calculate the frequencies for each bin of the above fft's. Define H(w) = ( K ./ (%i * tau * w + 1) ) .* exp(-%i * w * T). Calculate Ymodel = U .* H(w) Now, thanks to the magic of Parseval's Theorem, norm(Y - Ymodel) is the same as, or just a constant multiplier away from being, norm(y - ymodel) -- but you never actually have to compute ymodel. So optimize on tau and T as described before. ?You should only have to take your FFTs once at the beginning -- the rest will be repeatedly calculating H(w) for the various values of tau and T (and K, if you want to be lazy and just toss it into optim, although it'll be much faster to determine it using least-squares fit). On Sun, 2016-09-25 at 01:07 -0700, Fukashiimo wrote: > Thank you for your suggestion. However, I am not sure how I should > formulate my Laplace domain equation. Could you please advise me more > specifically? > > Thanks. > > > 2016/09/25 ??9:33 "Tim Wescott [via Scilab / Xcos - Mailing Lists > Archives]" <[hidden email]>: > ? ? ? ? I suggest that you roll your own cost function, and use > ? ? ? ? optim. > ? ? ? ? > ? ? ? ? Where possible, with optim, if part of the problem is > ? ? ? ? nonlinear and part > ? ? ? ? is linear, it's good to use a plain old linear least-squares > ? ? ? ? fit for the > ? ? ? ? plain old linear part. ?In your case, that's K. ?Tau and Td > ? ? ? ? will have to > ? ? ? ? be determined by optim. > ? ? ? ? > ? ? ? ? The cost function should generate a vector for ymodel with K = > ? ? ? ? 1, then > ? ? ? ? find the best fit for K with > ? ? ? ? > ? ? ? ? K = y / ymodel; > ? ? ? ? > ? ? ? ? then return a cost > ? ? ? ? > ? ? ? ? cost = norm(y - K * ymodel); > ? ? ? ? > ? ? ? ? wrap that all up in NDCost and then optim, and away you'll > ? ? ? ? go. > ? ? ? ? > ? ? ? ? On 2016-09-24 06:59, Fukashiimo wrote: > ? ? ? ? > ? ? ? ? > Hello, > ? ? ? ? > > ? ? ? ? > I am looking for a Scilab software which is similar to > ? ? ? ? Matlab System ID > ? ? ? ? > tool > ? ? ? ? > box. > ? ? ? ? > > ? ? ? ? > I would like to obtain values of parameters, Tau, K and Td > ? ? ? ? for > ? ? ? ? > following > ? ? ? ? > first order delay + Dead time model from time series data. > ? ? ? ? > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > ? ? ? ? > ymodel: process output, u: process input > ? ? ? ? > SISO continuous time > ? ? ? ? > > ? ? ? ? > Object function: Min ( (y-ymodel)^2) > ? ? ? ? > > ? ? ? ? > Could you please tell me which package I should use to solve > ? ? ? ? this > ? ? ? ? > issue? > ? ? ? ? > > ? ? ? ? > Best Regards, > ? ? ? ? > > ? ? ? ? > > ? ? ? ? > > ? ? ? ? > -- > ? ? ? ? > View this message in context: > ? ? ? ? > > ? ? ? ? http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html > ? ? ? ? > Sent from the Scilab users - Mailing Lists Archives mailing > ? ? ? ? list > ? ? ? ? > archive at Nabble.com. > ? ? ? ? > _______________________________________________ > ? ? ? ? > users mailing list > ? ? ? ? > [hidden email] > ? ? ? ? > http://lists.scilab.org/mailman/listinfo/users > ? ? ? ? _______________________________________________ > ? ? ? ? users mailing list > ? ? ? ? [hidden email] > ? ? ? ? http://lists.scilab.org/mailman/listinfo/users > ? ? ? ? > ? ? ? ? > ? ? ? ? > ? ? ? ? ______________________________________________________________ > ? ? ? ? If you reply to this email, your message will be added to the > ? ? ? ? discussion below: > ? ? ? ? http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html ? > ? ? ? ? To unsubscribe from System Identification for First order > ? ? ? ? delay and dead time, click here. > ? ? ? ? NAML > > > ______________________________________________________________________ > View this message in context: Re: System Identification for First > order delay and dead time > 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 -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: ?503.349.8432 _______________________________________________ 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034622.html To unsubscribe from System Identification for First order delay and dead time, click here . NAML -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034653.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Tue Sep 27 18:31:34 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Tue, 27 Sep 2016 09:31:34 -0700 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <4a0a58e0-e9ca-4aa1-bfa2-4a3436bc9ff9@bvec34483> References: <1474725577246-4034608.post@n3.nabble.com> <1474830435.2826.25.camel@Servo> <4a0a58e0-e9ca-4aa1-bfa2-4a3436bc9ff9@bvec34483> Message-ID: <1474993894.3107.6.camel@Servo> First, you're not doing what I recommended you do. Yet you are addressing me for help with your solution, when I've already suggested two. Why? Second, your prototype transfer function is 11th order, and you instruct time_id to find the best fit to a second-order transfer function. You are surprised that get a transfer function in return that's not a good fit. Why? Third, you've been told that Scilab does not have a pre-packaged way of doing a fit to a system with pure time delay, and you've been given more than one suggestion for how to roll your own. You don't seem to have taken any of these suggestions. Why? On Tue, 2016-09-27 at 07:30 -0700, Fukashiimo wrote: > Dear Tim, > > Thank you for yor advise. > > However, u is the step signal, such as 50% ==>60% ==> 50%. > u and y are sampled with constant interval, such as one second. > > > > I made following Scilabe code, using time_id: > > // > z=poly(0,'z'); > h=(0.065/(z-0.934))*(1/z^10)// <== 10 Sampling period dead time > u=zeros(1,100); > for i=10:1:100 > u(1,i)=2.0; > end > t=1:1:100; > rep=flts(u,tf2ss(h)); > plot(t,rep,t,u)// <== We can see the step type process input with > amplitude=2 and its process response with 10 sampling period dead > time. > k=find(rep<>0,1) //here the threshold has to be improved in case of > noisy signal > //H=time_id(1,"step",rep(k:$)) > H=time_id(2,u,rep) > rep=flts(u,tf2ss(H)); > plot(t,rep,'.r')// <== We can see the process response by identified > model. > H > > > h = > > 0.065 > ----------- > 10 11 > - 0.934z + z > > > H = > > 0.0265880 > ------------- > - 0.9779092 + z > > > h is the discreate transfer function to provide operation data. > H is the identified transfer function obtained from the opeartion data > using time_id. > > I have two issues. > 1. H is not similar to h even the data doesn't include any noise. How > I can obtain transfer function nearly same as h? > 2. I would like to have continuous transfer function. How I should > convert the discreate transfer function to continuous transfer > function. > > > I am lokking for a solution for these two issues. > May I ask your advise again? > > > Thanks. > > > ----- ??????? ----- > ???: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" > <[hidden email]> > ??: "Fukashiimo" <[hidden email]> > ????: 2016?9?26?(???) 04:07:52 > ??: Re: System Identification for First order delay and dead time > > Heh. I just realized a better way to do this: > > I assume that you've sampled u and y at a constant rate, and that you > have captured some reasonable amount of the response. This will be > perfect if u is periodic. > > If u is periodic, then for some integer number of periods, take U = > fft(u) and Y = fft(y). If u isn't periodic, then take FFT's of u and > y > after windowing them both with identical windows. > > Now calculate the frequencies for each bin of the above fft's. > > Define H(w) = ( K ./ (%i * tau * w + 1) ) .* exp(-%i * w * T). > > Calculate Ymodel = U .* H(w) > > Now, thanks to the magic of Parseval's Theorem, > norm(Y - Ymodel) is the same as, or just a constant multiplier away > from > being, norm(y - ymodel) -- but you never actually have to compute > ymodel. > > So optimize on tau and T as described before. You should only have > to > take your FFTs once at the beginning -- the rest will be repeatedly > calculating H(w) for the various values of tau and T (and K, if you > want > to be lazy and just toss it into optim, although it'll be much faster > to > determine it using least-squares fit). > > On Sun, 2016-09-25 at 01:07 -0700, Fukashiimo wrote: > > > Thank you for your suggestion. However, I am not sure how I should > > formulate my Laplace domain equation. Could you please advise me > more > > specifically? > > > > Thanks. > > > > > > 2016/09/25 ??9:33 "Tim Wescott [via Scilab / Xcos - Mailing Lists > > Archives]" <[hidden email]>: > > I suggest that you roll your own cost function, and use > > optim. > > > > Where possible, with optim, if part of the problem is > > nonlinear and part > > is linear, it's good to use a plain old linear > least-squares > > fit for the > > plain old linear part. In your case, that's K. Tau and Td > > will have to > > be determined by optim. > > > > The cost function should generate a vector for ymodel with K > = > > 1, then > > find the best fit for K with > > > > K = y / ymodel; > > > > then return a cost > > > > cost = norm(y - K * ymodel); > > > > wrap that all up in NDCost and then optim, and away you'll > > go. > > > > On 2016-09-24 06:59, Fukashiimo wrote: > > > > > Hello, > > > > > > I am looking for a Scilab software which is similar to > > Matlab System ID > > > tool > > > box. > > > > > > I would like to obtain values of parameters, Tau, K and > Td > > for > > > following > > > first order delay + Dead time model from time series > data. > > > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > > > ymodel: process output, u: process input > > > SISO continuous time > > > > > > Object function: Min ( (y-ymodel)^2) > > > > > > Could you please tell me which package I should use to > solve > > this > > > issue? > > > > > > Best Regards, > > > > > > > > > > > > -- > > > View this message in context: > > > > > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html > > > Sent from the Scilab users - Mailing Lists Archives > mailing > > list > > > archive at Nabble.com. > > > _______________________________________________ > > > users mailing list > > > [hidden email] > > > http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > > users mailing list > > [hidden email] > > http://lists.scilab.org/mailman/listinfo/users > > > > > > > > > ______________________________________________________________ > > If you reply to this email, your message will be added to > the > > discussion below: > > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html > > To unsubscribe from System Identification for First order > > delay and dead time, click here. > > NAML > > > > > > > ______________________________________________________________________ > > View this message in context: Re: System Identification for First > > order delay and dead time > > 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 > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: 503.349.8432 > > > _______________________________________________ > 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034622.html > To unsubscribe from System Identification for First order delay and > dead time, click here . > NAML > > > ______________________________________________________________________ > View this message in context: Re: System Identification for First > order delay and dead time > 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 -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From paul.carrico at free.fr Tue Sep 27 18:58:54 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 27 Sep 2016 18:58:54 +0200 (CEST) Subject: [Scilab-users] scilab 6 and vectorization In-Reply-To: <1121482306.324832154.1474995106048.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <2085233186.324859183.1474995534559.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi I cannot say if this topic has ever been discussed so far, but I installed Scilab 6.0 in order to work with a huge amount of data ; unlike the current stable data that is limited to 2 Go, the 6.0 one is announced to not be limited ... ... I tried a code using vectorization and I've been disappointed to notice that it doesn't work Is there a document summarizing the changes regarding this topic? Regards Paul From Serge.Steer at inria.fr Tue Sep 27 22:14:12 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 27 Sep 2016 22:14:12 +0200 Subject: [Scilab-users] is vectorization possible In-Reply-To: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <959886027.322449082.1474960095931.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: Le 27/09/2016 ? 09:08, paul.carrico at free.fr a ?crit : > Hi All > > Is the vectorization possible for the example herebellow? everything I > tried failed ! if a is a vector, it is quite straight forward: sum(matrix(a,w,-1),1).' k=100;a=rand(k,1);w=5;n=k/w; tmp = zeros(n,1); for i = 1 : n tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); end tmp-sum(sum(matrix(a,w,n,-1),3),1).' If a is matrix it is more tricky: sum(sum(matrix(a,w,n,-1),3),1).' k=100;a=rand(k,4);w=5;n=k/w; tmp = zeros(n,1); for i = 1 : n tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); end tmp-sum(sum(matrix(a,w,n,-1),3),1).' Serge > > Thanks for any help > > Paul > > ################################################################## > mode(0) > > k = 100; > a = rand(k,1); > > w = 5; > n = (k/w); > > i = [1 : n]'; > > tmp = zeros(n,1); > > // using vectorization > tmp(i,1) = sum(a( [1 + (i-1)*n : i*n],:) > abort > > > // same using a loop > for i = 1 : n > tmp(i,1) = sum(a( [1 + (i-1)*w : i*w],:)); > end > > tmp > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frieder.Nikolaisen at student.hs-rm.de Wed Sep 28 09:50:28 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Wed, 28 Sep 2016 09:50:28 +0200 Subject: [Scilab-users] Plot with two different y-axis as one plot In-Reply-To: <89519820.985406268.1474907393352.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <89519820.985406268.1474907393352.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <155b6d4d7b819db3b53e909b9100e415@mail.student.hs-rm.de> Dear Mr. Gougeon?, my mail was blocked, because I had a 150kB Picture attached... I did you the plotyyy demo for my Programm. It's a nice result. I still have a Trouble by putting the plots on each other: I did build a user Interface with the guibuilder tool 3.0. There I did use the Axes tool to have my plotyyy in the same window. But only my ploty ist plotted in the White area and the other two plots are in the entire window. How to solve this? I did attach a plot, now 20kB, of a pump from an old exam. The plot does provide SI dimensions as well as US ones. Thats why there are three x-axis and two y-axis. Best regards Frieder Nikolaisen Am 26.09.2016 18:29, schrieb sgougeon at free.fr: >>De: "Frieder Nikolaisen" >>.../... >>I do use the ScilabHelp, but I cannot find a plotyyy. That isn't the >> Demos? > > no. To get and use the demos manager, you may run > --> demo_gui > >>.../... In this case, if I zoom in after >>plotting, that might be called interactiv, I only zoom in the later >>plotted graph, not both. So I cannot compare both Graphs, because >> they >>are now related to two "different" x-axis. > > Sure. This is the bug fixed last summer. > Installing the most recent nightly release of Scilab takes 3 mn > and does not require uninstalling your running stable 5.5.2 release. > You may have as many different Scilab installed versions as you want, > in parallel. This is a common situation for developers or others. > >>There isn't a plotyyy function in SciLab, only the workaround? > It is not a work-around. A native plotyyy() is not really needed. > Then why not a plotyyyy, plotyyyyy, plotxx, plotxxx, plotxxyy, etc? > Such a collection would be quite meaningless. > Only the fact that you can build the desired multiaxes plot function > of your dream and needs is meaningful. Scilab enables you to do so. > > >>> What do you mean by "2 on both sides"? >> >>Having four Graphs with four different y-axis (instead of only two). >>It's quite common in my field of engineering. > > Would you have a snapshot of such a plot? > When there are really many plots sharing the same x-axis for > different y > scales, another solution is to use subplot(n,1,i) instructions with > multiple plot2d(x, yi) with the shared x absissae. > > HTH > Regards > Samuel Gougeon > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: pump.JPG Type: image/jpeg Size: 30642 bytes Desc: not available URL: From sgougeon at free.fr Wed Sep 28 12:35:44 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Wed, 28 Sep 2016 12:35:44 +0200 (CEST) Subject: [Scilab-users] Plot with two different y-axis as one plot In-Reply-To: <155b6d4d7b819db3b53e909b9100e415@mail.student.hs-rm.de> Message-ID: <148536990.993122198.1475058944012.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello, >I did attach a plot, now 20kB, of a pump from an old exam. The plot >does provide SI dimensions as well as US ones. Thats why there are three >x-axis and two y-axis. For this kind of case where * you want different axes _for the same data_ * all expected axes are linear (not logarithmic), drawaxis() can be used to add extra axes, instead of newaxes(). HTH Samuel Gougeon From guba at vi-anec.de Wed Sep 28 13:23:43 2016 From: guba at vi-anec.de (=?UTF-8?Q?G=c3=bcnter_Bachelier?=) Date: Wed, 28 Sep 2016 13:23:43 +0200 Subject: [Scilab-users] conformal maps for image distortion in Scilab? Message-ID: I am interested in using conformal maps for image distortion and I am looking for software environments that can do this. I found methods for - Mathematica (http://community.wolfram.com/groups/-/m/t/854405?p_p_auth=TLh6kMXL), - Maple (http://www.mapleprimes.com/questions/214724-Conformal-Maps-For-Image-Distortion) and - MatLab (http://de.mathworks.com/help/images/examples/exploring-a-conformal-mapping.html). For obvious reasons I would prefer open source solutions therefore I would like to know if (and how) Scilab is able to transform images with conformal maps (with high quality output i.e. no aliasing)? Thank you very much! best regards G?nter Bachelier From Frieder.Nikolaisen at student.hs-rm.de Wed Sep 28 13:38:52 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Wed, 28 Sep 2016 13:38:52 +0200 Subject: [Scilab-users] Plot with two different y-axis as one plot In-Reply-To: <148536990.993122198.1475058944012.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <148536990.993122198.1475058944012.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <0d001e250fd5be1f6978e6c25a78a460@mail.student.hs-rm.de> Thank you. Am 28.09.2016 12:35, schrieb sgougeon at free.fr: > Hello, > >>I did attach a plot, now 20kB, of a pump from an old exam. The plot >>does provide SI dimensions as well as US ones. Thats why there are >> three >>x-axis and two y-axis. > > For this kind of case where > * you want different axes _for the same data_ > * all expected axes are linear (not logarithmic), > drawaxis() can be used to add extra axes, instead of newaxes(). > > HTH > Samuel Gougeon > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From paul.carrico at esterline.com Wed Sep 28 15:34:50 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Wed, 28 Sep 2016 13:34:50 +0000 Subject: [Scilab-users] scilab 6.00 beta2 crash (feedback) Message-ID: <3A6B7233274DB449A2A0053A47684F953F7180FB@BGS-EX01.auxitrol.ad> Hi all, Here is a feedback of a crash of scilab 6.00 beta2; I used the code here bellow on a 32 Go CentOS 7 machine. Ligne 951 : 2650 Erreur de segmentation (core dumped) ''$SCILABBIN'' ''$@'' t = [0:2e-5:1]'; n = size(t,"*"); X = zeros(n,1); k = [1:n]'.*.ones(n,1); m = ones(n,1).*.[1:n]'; nl = size(m,"*"); tmp = zeros(nl,1); Paul EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bignier at scilab-enterprises.com Wed Sep 28 15:56:52 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Wed, 28 Sep 2016 15:56:52 +0200 Subject: [Scilab-users] scilab 6.00 beta2 crash (feedback) In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F7180FB@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F7180FB@BGS-EX01.auxitrol.ad> Message-ID: <34623e12-ad9b-8e2c-8fc8-6dfa733bbdeb@scilab-enterprises.com> Hi Paul, The line "k= [1:n]'.*.ones(n,1);" intends to produce a 50001x50001 (total 2.5 billion) matrix, which goes over the int32 limit of 2147483647 (2.147 billion), that provokes the inner sizes to wrap and become negative, leading to the crash. If you try k= [1:n/2]'.*.ones(n/2,1); it will work but eat up your ram. If you try it a few times a message will say "Can not allocate 'XXX' MB memory." because it can still deal with such sizes. So are you sure about what you want to do? In the future when you get crashes, please report them on the bugzilla . Thank you, Best regards, Paul On 09/28/2016 03:34 PM, Carrico, Paul wrote: > > Hi all, > > Here is a feedback of a crash of scilab 6.00 beta2; I used the code > here bellow on a 32 Go CentOS 7 machine. > > Ligne 951 : 2650 Erreur de segmentation (core dumped) ??$SCILABBIN?? > ??$@?? > > t= [0:2e-5:1]'; > > n= size(t,"*"); > > X= zeros(n,1); > > k= [1:n]'.*.ones(n,1); > > m= ones(n,1).*.[1:n]'; > > nl= size(m,"*"); > > tmp= zeros(nl,1); > > Paul > > */EXPORT CONTROL : > /**Cet email ne contient pas de donn?es techniques > This email does not contain technical data* > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Wed Sep 28 16:05:38 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Wed, 28 Sep 2016 14:05:38 +0000 Subject: [Scilab-users] [EXTERNAL] Re: scilab 6.00 beta2 crash (feedback) In-Reply-To: <34623e12-ad9b-8e2c-8fc8-6dfa733bbdeb@scilab-enterprises.com> References: <3A6B7233274DB449A2A0053A47684F953F7180FB@BGS-EX01.auxitrol.ad> <34623e12-ad9b-8e2c-8fc8-6dfa733bbdeb@scilab-enterprises.com> Message-ID: <3A6B7233274DB449A2A0053A47684F953F718122@BGS-EX01.auxitrol.ad> Ok for bugzilla (sorry for that) Nota : k is a vector ..... at least in Scilab 5.5.4 EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data De : users [mailto:users-bounces at lists.scilab.org] De la part de Paul Bignier Envoy? : mercredi 28 septembre 2016 15:57 ? : Users mailing list for Scilab Objet : [EXTERNAL] Re: [Scilab-users] scilab 6.00 beta2 crash (feedback) Hi Paul, The line "k = [1:n]'.*.ones(n,1);" intends to produce a 50001x50001 (total 2.5 billion) matrix, which goes over the int32 limit of 2147483647 (2.147 billion), that provokes the inner sizes to wrap and become negative, leading to the crash. If you try k = [1:n/2]'.*.ones(n/2,1); it will work but eat up your ram. If you try it a few times a message will say "Can not allocate 'XXX' MB memory." because it can still deal with such sizes. So are you sure about what you want to do? In the future when you get crashes, please report them on the bugzilla. Thank you, Best regards, Paul On 09/28/2016 03:34 PM, Carrico, Paul wrote: Hi all, Here is a feedback of a crash of scilab 6.00 beta2; I used the code here bellow on a 32 Go CentOS 7 machine. Ligne 951 : 2650 Erreur de segmentation (core dumped) ''$SCILABBIN'' ''$@'' t = [0:2e-5:1]'; n = size(t,"*"); X = zeros(n,1); k = [1:n]'.*.ones(n,1); m = ones(n,1).*.[1:n]'; nl = size(m,"*"); tmp = zeros(nl,1); Paul EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bignier at scilab-enterprises.com Wed Sep 28 16:09:23 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Wed, 28 Sep 2016 16:09:23 +0200 Subject: [Scilab-users] [EXTERNAL] Re: scilab 6.00 beta2 crash (feedback) In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F718122@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F7180FB@BGS-EX01.auxitrol.ad> <34623e12-ad9b-8e2c-8fc8-6dfa733bbdeb@scilab-enterprises.com> <3A6B7233274DB449A2A0053A47684F953F718122@BGS-EX01.auxitrol.ad> Message-ID: <918070b1-b77e-2930-ae94-c0c13e9b9953@scilab-enterprises.com> My bad, a 50001*50001x1 vector! Paul On 09/28/2016 04:05 PM, Carrico, Paul wrote: > > Ok for bugzilla (sorry for that) > > /_Nota_/: k is a vector ?.. at least in Scilab 5.5.4 > > */EXPORT CONTROL : > /**Cet email ne contient pas de donn?es techniques > This email does not contain technical data* > > *De :*users [mailto:users-bounces at lists.scilab.org] *De la part de* > Paul Bignier > *Envoy? :* mercredi 28 septembre 2016 15:57 > *? :* Users mailing list for Scilab > *Objet :* [EXTERNAL] Re: [Scilab-users] scilab 6.00 beta2 crash (feedback) > > Hi Paul, > > The line "k =[1:n]'.*.ones(n,1);" intends to produce a 50001x50001 > (total 2.5 billion) matrix, which goes over the int32 limit of > 2147483647 (2.147 billion), that provokes the inner sizes to wrap and > become negative, leading to the crash. > > If you try k =[1:n/2]'.*.ones(n/2,1); it will work but eat up your > ram. If you try it a few times a message will say "Can not allocate > 'XXX' MB memory." because it can still deal with such sizes. > > So are you sure about what you want to do? > > In the future when you get crashes, please report them on the bugzilla > . > > Thank you, > > Best regards, > > Paul > > On 09/28/2016 03:34 PM, Carrico, Paul wrote: > > Hi all, > > Here is a feedback of a crash of scilab 6.00 beta2; I used the > code here bellow on a 32 Go CentOS 7 machine. > > Ligne 951 : 2650 Erreur de segmentation (core dumped) > ??$SCILABBIN?? ??$@?? > > t =[0:2e-5:1]'; > > n =size(t,"*"); > > X =zeros(n,1); > > k =[1:n]'.*.ones(n,1); > > m =ones(n,1).*.[1:n]'; > > nl =size(m,"*"); > > tmp =zeros(nl,1); > > Paul > > */EXPORT CONTROL : > /**Cet email ne contient pas de donn?es techniques > This email does not contain technical data* > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > > > -- > Paul BIGNIER > Development engineer > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > Phone: +33.1.80.77.04.68 > http://www.scilab-enterprises.com > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Wed Sep 28 16:20:04 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 28 Sep 2016 14:20:04 +0000 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code Message-ID: Dear Scilab'ers, Is there a comprehensive list of the key changes in Scilab 6 that one must bear in mind when trying to upgrade existing Scilab 5 code? Thanks and regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Wed Sep 28 18:30:34 2016 From: clement.david at scilab-enterprises.com (clement.david at scilab-enterprises.com) Date: Wed, 28 Sep 2016 18:30:34 +0200 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code In-Reply-To: Message-ID: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Wed Sep 28 18:53:04 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 28 Sep 2016 18:53:04 +0200 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code In-Reply-To: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> References: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> Message-ID: Hi Rafael For a start, see https://help.scilab.org/docs/6.0.0/en_US/CHANGES.html This details the changes in 6.0.0 beta-2 compared to 5.5.2. In particular see the section "Syntax Modifications" and "Feature changes and additions". In practice I just execute my 5.5 code and see if Scilab is OK with it. * |1./M|is now parsed as|1 ./ M|instead of|1. / M| Thank goodness. :-) /Claus On 28-09-2016 18:30, clement.david at scilab-enterprises.com wrote: > > Hello Rafael, > > Currently there is a only the detailed CHANGES.md file with key > modifications described in a specific section. > > I guess it might also be good to have something like a wiki page > describing the modifications "from a user point of view". Maybe an > advanced user or contributor already started something. Do you have > some ideas about the expected content ? > > Thanks, > > -- > Clement > > > On Sep 28, 2016 16:20, Rafael Guerra wrote: > > Dear Scilab?ers, > > Is there a comprehensive list of the key changes in Scilab 6 that > one must bear in mind when trying to upgrade existing Scilab 5 code? > > Thanks and regards, > > Rafael > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Wed Sep 28 19:28:58 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 28 Sep 2016 17:28:58 +0000 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code In-Reply-To: References: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> Message-ID: Hi Claus, Many thanks for the link to that very helpful page, of which I was unaware of. Hi Clement: that content seems very well organized and should meet all user needs. If there is anything missing, the users' feedback could be updated there. Kind regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Wednesday, September 28, 2016 6:53 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code Hi Rafael For a start, see https://help.scilab.org/docs/6.0.0/en_US/CHANGES.html This details the changes in 6.0.0 beta-2 compared to 5.5.2. In particular see the section "Syntax Modifications" and "Feature changes and additions". In practice I just execute my 5.5 code and see if Scilab is OK with it. * 1./M is now parsed as 1 ./ M instead of 1. / M Thank goodness. :-) /Claus On 28-09-2016 18:30, clement.david at scilab-enterprises.com wrote: Hello Rafael, Currently there is a only the detailed CHANGES.md file with key modifications described in a specific section. I guess it might also be good to have something like a wiki page describing the modifications "from a user point of view". Maybe an advanced user or contributor already started something. Do you have some ideas about the expected content ? Thanks, -- Clement On Sep 28, 2016 16:20, Rafael Guerra wrote: Dear Scilab'ers, Is there a comprehensive list of the key changes in Scilab 6 that one must bear in mind when trying to upgrade existing Scilab 5 code? Thanks and regards, Rafael _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Sep 28 20:43:39 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 28 Sep 2016 20:43:39 +0200 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code In-Reply-To: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> References: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> Message-ID: <57EC0F5B.5000107@free.fr> Le 28/09/2016 18:30, clement.david at scilab-enterprises.com a ?crit : > > Hello Rafael, > > Currently there is a only the detailed CHANGES.md file with key > modifications described in a specific section. > > I guess it might also be good to have something like a wiki page > describing the modifications "from a user point of view". Maybe an > advanced user or contributor already started something. > Better than that: You have dreamt about it, Pierre-Aim? did it : https://wiki.scilab.org/FromScilab5ToScilab6 :) From jrafaelbguerra at hotmail.com Wed Sep 28 21:50:49 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 28 Sep 2016 19:50:49 +0000 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code In-Reply-To: <57EC0F5B.5000107@free.fr> References: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> <57EC0F5B.5000107@free.fr> Message-ID: Hi Samuel, Thanks for the very useful link, which provided key information that does seem to be (totally) in: https://help.scilab.org/docs/6.0.0/en_US/CHANGES.html Maybe the latter document could be updated with (a summary) of the former. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Wednesday, September 28, 2016 8:44 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code Le 28/09/2016 18:30, clement.david at scilab-enterprises.com a ?crit : > > Hello Rafael, > > Currently there is a only the detailed CHANGES.md file with key > modifications described in a specific section. > > I guess it might also be good to have something like a wiki page > describing the modifications "from a user point of view". Maybe an > advanced user or contributor already started something. > Better than that: You have dreamt about it, Pierre-Aim? did it : https://wiki.scilab.org/FromScilab5ToScilab6 :) _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From jrafaelbguerra at hotmail.com Wed Sep 28 21:54:13 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 28 Sep 2016 19:54:13 +0000 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code In-Reply-To: References: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> <57EC0F5B.5000107@free.fr> Message-ID: (sorry - correction) Hi Samuel, Thanks for the very useful link, which provides key information that does not seem to be (totally) in: https://help.scilab.org/docs/6.0.0/en_US/CHANGES.html Maybe the latter document could be updated with (a summary) of the former. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Wednesday, September 28, 2016 8:44 PM To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code Le 28/09/2016 18:30, clement.david at scilab-enterprises.com a ?crit : > > Hello Rafael, > > Currently there is a only the detailed CHANGES.md file with key > modifications described in a specific section. > > I guess it might also be good to have something like a wiki page > describing the modifications "from a user point of view". Maybe an > advanced user or contributor already started something. > Better than that: You have dreamt about it, Pierre-Aim? did it : https://wiki.scilab.org/FromScilab5ToScilab6 :) _______________________________________________ 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 clement.david at scilab-enterprises.com Thu Sep 29 09:33:27 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Thu, 29 Sep 2016 09:33:27 +0200 Subject: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code In-Reply-To: References: <603e47b7-c8c7-4c27-a61e-6ccd4eecd3be@email.android.com> <57EC0F5B.5000107@free.fr> Message-ID: <1475134407.2015.7.camel@scilab-enterprises.com> Hi all, Nice content on?https://wiki.scilab.org/FromScilab5ToScilab6?; I will add a link to it on the more formal CHANGES.md file. As advanced user, do not hesitate to add content on this wiki page ; it can be edited by any registered user. Thanks, -- Cl?ment Le mercredi 28 septembre 2016 ? 19:54 +0000, Rafael Guerra a ?crit?: > (sorry - correction) > ? > Hi Samuel, > ? > Thanks for the very useful link, which provides key information that does not seem to be (totally) > in: https://help.scilab.org/docs/6.0.0/en_US/CHANGES.html > Maybe the latter document could be updated with (a summary) of the former. > ? > Regards, > Rafael > ? > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon > Sent: Wednesday, September 28, 2016 8:44 PM > To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Scilab 6 notes on upgrading Scilab 5 code > ? > Le 28/09/2016 18:30, clement.david at scilab-enterprises.com a ?crit : > >? > > Hello Rafael, > >? > > Currently there is a only the detailed CHANGES.md file with key > > modifications described in a specific section. > >? > > I guess it might also be good to have something like a wiki page > > describing the modifications "from a user point of view". Maybe an > > advanced user or contributor already started something. > >? > ? > Better than that: You have dreamt about it, Pierre-Aim? did it : > https://wiki.scilab.org/FromScilab5ToScilab6 > :) > ? > _______________________________________________ > 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 clement.david at scilab-enterprises.com Thu Sep 29 10:03:40 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Thu, 29 Sep 2016 10:03:40 +0200 Subject: [Scilab-users] scilab 6 and vectorization In-Reply-To: <2085233186.324859183.1474995534559.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <2085233186.324859183.1474995534559.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1475136220.2015.14.camel@scilab-enterprises.com> Hello Paul, Thanks for your comment. The Scilab 6 version does not have a memory limitation anymore *but*, depending on the algorithm you applied, you might not notice that. Could you detail your use-case please ? ?What "does not work" ? ?Is it crashing ? ?Do you have an error ? FYI the new memory allocation scheme just allow you to access all the memory available on your computer ; if you try to load more data, it may not behave as expected. -- Cl?ment Le mardi 27 septembre 2016 ? 18:58 +0200, paul.carrico at free.fr a ?crit?: > Hi > > I cannot say if this topic has ever been discussed so far, but I installed Scilab 6.0 in order to > work with a huge amount of data ; unlike the current stable data that is limited to 2 Go, the 6.0 > one is announced to not be limited ... > ... I tried a code using vectorization and I've been disappointed to notice that it doesn't work > > Is there a document summarizing the changes regarding this topic? > > Regards > > Paul > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From paul.carrico at free.fr Thu Sep 29 12:29:02 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 29 Sep 2016 12:29:02 +0200 (CEST) Subject: [Scilab-users] shift phase in fft In-Reply-To: <416712931.332369557.1475144467532.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <210036937.332390938.1475144942766.JavaMail.root@zimbra5-e1.priv.proxad.net> Dear all I'm sorry about asking a so basic question, but I do not understand how to make a shift phase in a fft ; There's something I do not catch what ? Regards Paul ###################################################### mode(0) clear all f = 10; // frequency omega = 2*%pi*f; // circular frequency nb_T = 5; // number of periods t1 = 0; t2 = (nb_T / f); n = 10; t = linspace(t1,t2,2^n)'; // must be a power of 2 nl = size(t,"*"); s1 = 2*sin(omega*t); // original signal plot(t,s1,"r"); phi = %pi/3; s2 = 2*sin(omega*t + phi); // targetted signal to be rebuilt plot(t,s2,"b"); // shift phase in the fft s1_fft = fft(s1); s1_fft = clean(s1_fft); //s1_fft = s1_fft. * exp(-%i*phi/nl); s1_fft = s1_fft. * exp(-%i*phi); s1_new = ifft(s1_fft); plot(t,s1_new,"g"); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Sep 29 13:38:09 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 29 Sep 2016 11:38:09 +0000 Subject: [Scilab-users] shift phase in fft In-Reply-To: <210036937.332390938.1475144942766.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <416712931.332369557.1475144467532.JavaMail.root@zimbra5-e1.priv.proxad.net> <210036937.332390938.1475144942766.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: Hi Paul, Your phase rotation seems to be working fine but the fft output is complex and only the real part is plotted by Scilab and that is why the resulting amplitude seems to be smaller. If you want to have your output real, one way is may be to handle separately the positive and negative frequencies as follows: clf(); f = 10; // frequency omega = 2*%pi*f; // circular frequency nb_T = 5; // number of periods t1 = 0; t2 = (nb_T / f); n = 10; t = linspace(t1,t2,2^n)'; // must be a power of 2 nl = size(t,"*"); s1 = 2*sin(omega*t); // original signal plot(t,s1,"r"); phi = %pi/3; s2 = 2*sin(omega*t + phi); // targetted signal to be rebuilt plot(t,s2,"b"); // shift phase in the fft s1_fft = fft(s1); s1_fft(1:nl/2) = s1_fft(1:nl/2) .* exp(%i*phi); s1_fft(nl/2:$) = s1_fft(nl/2:$) .* exp(-%i*phi); s1_new = ifft(s1_fft); plot(t,s1_new,"--g"); Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Thu Sep 29 13:18:36 2016 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 29 Sep 2016 13:18:36 +0200 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBzaGlmdCBwaGFzZSBpbiBm?= =?utf-8?q?ft?= In-Reply-To: <210036937.332390938.1475144942766.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <4859-57ecf880-5-5e22c880@4525515> Hi Paul, What are you trying to achieve exactly? If you apply a phase shift, you actually just multiple your signal by exp(i*phi), both in the time and frequency domain. Not much to see actually. Now, if you apply a linear a phase shift in time ie S1(t)->S1(t)*exp(i*Omega*t), this will result in a spectral shift: S1fft(nu)->S1fft(nu+/-Omega/2Pi). Hope it helps, Antoine Le Jeudi, Septembre 29, 2016 12:29 CEST, paul.carrico at free.fr a ?crit: > Dear all > > > I'm sorry about asking a so basic question, but I do not understand how to make a shift phase in a fft ; There's something I do not catch what ? > > > Regards > > > Paul > > > > > ###################################################### > > mode(0) > clear all > > > f = 10; // frequency > omega = 2*%pi*f; // circular frequency > nb_T = 5; // number of periods > t1 = 0; > t2 = (nb_T / f); > n = 10; > t = linspace(t1,t2,2^n)'; // must be a power of 2 > nl = size(t,"*"); > > > s1 = 2*sin(omega*t); // original signal > plot(t,s1,"r"); > > > phi = %pi/3; > s2 = 2*sin(omega*t + phi); // targetted signal to be rebuilt > plot(t,s2,"b"); > > > // shift phase in the fft > s1_fft = fft(s1); > s1_fft = clean(s1_fft); > > //s1_fft = s1_fft. * exp(-%i*phi/nl); > s1_fft = s1_fft. * exp(-%i*phi); > s1_new = ifft(s1_fft); > plot(t,s1_new,"g"); > > From paul.carrico at free.fr Thu Sep 29 13:46:42 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 29 Sep 2016 13:46:42 +0200 (CEST) Subject: [Scilab-users] shift phase in fft In-Reply-To: Message-ID: <1309949105.332664735.1475149602918.JavaMail.root@zimbra5-e1.priv.proxad.net> Thanks Rafael (and Antoine as well) Now I think I understand what went wrong Paul ----- Mail original ----- De: "Rafael Guerra" ?: "Users mailing list for Scilab" Envoy?: Jeudi 29 Septembre 2016 13:38:09 Objet: Re: [Scilab-users] shift phase in fft Hi Paul, Your phase rotation seems to be working fine but the fft output is complex and only the real part is plotted by Scilab and that is why the resulting amplitude seems to be smaller. If you want to have your output real, one way is may be to handle separately the positive and negative frequencies as follows: clf () ; f = 10 ; // frequency omega = 2 * %pi * f; // circular frequency nb_T = 5 ; // number of periods t1 = 0 ; t2 = ( nb_T / f ) ; n = 10 ; t = linspace ( t1,t2, 2 ^ n ) ' ; // must be a power of 2 nl = size ( t, "*" ) ; s1 = 2 * sin ( omega * t ) ; // original signal plot ( t,s1, "r" ) ; phi = %pi / 3 ; s2 = 2 * sin ( omega * t + phi ) ; // targetted signal to be rebuilt plot ( t,s2, "b" ) ; // shift phase in the fft s1_fft = fft ( s1 ) ; s1_fft ( 1 : nl / 2 ) = s1_fft ( 1 : nl / 2 ) .* exp ( % i * phi ) ; s1_fft ( nl / 2 :$ ) = s1_fft ( nl / 2 :$ ) .* exp ( - % i * phi ) ; s1_new = ifft ( s1_fft ) ; plot ( t,s1_new, "--g" ) ; Regards, Rafael _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From noguchi.japan at gmail.com Thu Sep 29 16:09:25 2016 From: noguchi.japan at gmail.com (Fukashiimo) Date: Thu, 29 Sep 2016 07:09:25 -0700 (MST) Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <1474993894.3107.6.camel@Servo> References: <1474725577246-4034608.post@n3.nabble.com> <1474830435.2826.25.camel@Servo> <4a0a58e0-e9ca-4aa1-bfa2-4a3436bc9ff9@bvec34483> <1474993894.3107.6.camel@Servo> Message-ID: <39e0ac49-08b6-4625-9d8f-4f91743b5bd4@bvec34483> Dear Tim, Thank you for your reply. First, you're not doing what I recommended you do. Why? <== As I informed you that my inut u is not periodic. I thought that it is not practical to use fft to my problem. Is my understanding not right? Is fft the recomeded method for my problem? In addition to that I am not familiar with fft. Best Regards, ----- ??????? ----- ???: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" ??: "Fukashiimo" ????: 2016?9?28?(???) 01:32:24 ??: Re: System Identification for First order delay and dead time First, you're not doing what I recommended you do. ?Yet you are addressing me for help with your solution, when I've already suggested two. ?Why? Second, your prototype transfer function is 11th order, and you instruct time_id to find the best fit to a second-order transfer function. ?You are surprised that get a transfer function in return that's not a good fit. ?Why? Third, you've been told that Scilab does not have a pre-packaged way of doing a fit to a system with pure time delay, and you've been given more than one suggestion for how to roll your own. ?You don't seem to have taken any of these suggestions. ?Why? On Tue, 2016-09-27 at 07:30 -0700, Fukashiimo wrote: > Dear Tim, > > Thank you for yor advise. > > However, u is the step signal, such as 50% ==>60% ==> 50%. > u and y are sampled with constant interval, such as one second. > > > > I made following Scilabe code, using time_id: > > // > z=poly(0,'z'); > h=(0.065/(z-0.934))*(1/z^10)// ? ?<== 10 Sampling period dead time > u=zeros(1,100); > for i=10:1:100 > ? ? u(1,i)=2.0; > end > t=1:1:100; > rep=flts(u,tf2ss(h)); > plot(t,rep,t,u)// ?<== We can see the step type process input with > amplitude=2 and its process response with 10 sampling period dead > time. > k=find(rep<>0,1) //here the threshold has to be improved in case of > noisy signal > //H=time_id(1,"step",rep(k:$)) > H=time_id(2,u,rep) > rep=flts(u,tf2ss(H)); ? ? > plot(t,rep,'.r')// <== We can see the process response by identified > model. > H > > > h ?= > ? > ? ? ? ?0.065 ? ? ? > ? ? ----------- ? > ? ? ? ? ? 10 ?11 ? > ? - 0.934z + z > > > H ?= > ? > ? ? ? 0.0265880 ? ? > ? ? ------------- ? > ? - 0.9779092 + z > > > h is the discreate transfer function to provide operation data. > H is the identified transfer function obtained from the opeartion data > using time_id. > > I have two issues. > 1. H is not similar to h even the data doesn't include any noise. How > I can obtain transfer function nearly same as h? > 2. I would like to have continuous transfer function. How I should > convert the discreate transfer function to continuous transfer > function. > > > I am lokking for a solution for these two issues. > May I ask your advise again? > > > Thanks. > > > ----- ??????? ----- > ???: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" > <[hidden email]> > ??: "Fukashiimo" <[hidden email]> > ????: 2016?9?26?(???) 04:07:52 > ??: Re: System Identification for First order delay and dead time > > Heh. ?I just realized a better way to do this: > > I assume that you've sampled u and y at a constant rate, and that you > have captured some reasonable amount of the response. ?This will be > perfect if u is periodic. > > If u is periodic, then for some integer number of periods, take U = > fft(u) and Y = fft(y). ?If u isn't periodic, then take FFT's of u and > y > after windowing them both with identical windows. > > Now calculate the frequencies for each bin of the above fft's. > > Define H(w) = ( K ./ (%i * tau * w + 1) ) .* exp(-%i * w * T). > > Calculate Ymodel = U .* H(w) > > Now, thanks to the magic of Parseval's Theorem, > norm(Y - Ymodel) is the same as, or just a constant multiplier away > from > being, norm(y - ymodel) -- but you never actually have to compute > ymodel. > > So optimize on tau and T as described before. ?You should only have > to > take your FFTs once at the beginning -- the rest will be repeatedly > calculating H(w) for the various values of tau and T (and K, if you > want > to be lazy and just toss it into optim, although it'll be much faster > to > determine it using least-squares fit). > > On Sun, 2016-09-25 at 01:07 -0700, Fukashiimo wrote: > > > Thank you for your suggestion. However, I am not sure how I should > > formulate my Laplace domain equation. Could you please advise me > more > > specifically? > > > > Thanks. > > > > > > 2016/09/25 ??9:33 "Tim Wescott [via Scilab / Xcos - Mailing Lists > > Archives]" <[hidden email]>: > > ? ? ? ? I suggest that you roll your own cost function, and use > > ? ? ? ? optim. > > ? ? ? ? > > ? ? ? ? Where possible, with optim, if part of the problem is > > ? ? ? ? nonlinear and part > > ? ? ? ? is linear, it's good to use a plain old linear > least-squares > > ? ? ? ? fit for the > > ? ? ? ? plain old linear part. ?In your case, that's K. ?Tau and Td > > ? ? ? ? will have to > > ? ? ? ? be determined by optim. > > ? ? ? ? > > ? ? ? ? The cost function should generate a vector for ymodel with K > = > > ? ? ? ? 1, then > > ? ? ? ? find the best fit for K with > > ? ? ? ? > > ? ? ? ? K = y / ymodel; > > ? ? ? ? > > ? ? ? ? then return a cost > > ? ? ? ? > > ? ? ? ? cost = norm(y - K * ymodel); > > ? ? ? ? > > ? ? ? ? wrap that all up in NDCost and then optim, and away you'll > > ? ? ? ? go. > > ? ? ? ? > > ? ? ? ? On 2016-09-24 06:59, Fukashiimo wrote: > > ? ? ? ? > > ? ? ? ? > Hello, > > ? ? ? ? > > > ? ? ? ? > I am looking for a Scilab software which is similar to > > ? ? ? ? Matlab System ID > > ? ? ? ? > tool > > ? ? ? ? > box. > > ? ? ? ? > > > ? ? ? ? > I would like to obtain values of parameters, Tau, K and > Td > > ? ? ? ? for > > ? ? ? ? > following > > ? ? ? ? > first order delay + Dead time model from time series > data. > > ? ? ? ? > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > > ? ? ? ? > ymodel: process output, u: process input > > ? ? ? ? > SISO continuous time > > ? ? ? ? > > > ? ? ? ? > Object function: Min ( (y-ymodel)^2) > > ? ? ? ? > > > ? ? ? ? > Could you please tell me which package I should use to > solve > > ? ? ? ? this > > ? ? ? ? > issue? > > ? ? ? ? > > > ? ? ? ? > Best Regards, > > ? ? ? ? > > > ? ? ? ? > > > ? ? ? ? > > > ? ? ? ? > -- > > ? ? ? ? > View this message in context: > > ? ? ? ? > > > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html ? > > ? ? ? ? > Sent from the Scilab users - Mailing Lists Archives > mailing > > ? ? ? ? list > > ? ? ? ? > archive at Nabble.com. > > ? ? ? ? > _______________________________________________ > > ? ? ? ? > users mailing list > > ? ? ? ? > [hidden email] > > ? ? ? ? > http://lists.scilab.org/mailman/listinfo/users ? > > ? ? ? ? _______________________________________________ > > ? ? ? ? users mailing list > > ? ? ? ? [hidden email] > > ? ? ? ? http://lists.scilab.org/mailman/listinfo/users ? > > ? ? ? ? > > ? ? ? ? > > ? ? ? ? > > > ______________________________________________________________ > > ? ? ? ? If you reply to this email, your message will be added to > the > > ? ? ? ? discussion below: > > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html ? ? > > ? ? ? ? To unsubscribe from System Identification for First order > > ? ? ? ? delay and dead time, click here. > > ? ? ? ? NAML > > > > > > > ______________________________________________________________________ > > View this message in context: Re: System Identification for First > > order delay and dead time > > 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 ? > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: ?503.349.8432 > > > _______________________________________________ > 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034622.html ? > To unsubscribe from System Identification for First order delay and > dead time, click here . > NAML > > > ______________________________________________________________________ > View this message in context: Re: System Identification for First > order delay and dead time > 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 -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: ?503.349.8432 _______________________________________________ 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034654.html To unsubscribe from System Identification for First order delay and dead time, click here . NAML -- View this message in context: http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034688.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Thu Sep 29 18:26:31 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 29 Sep 2016 09:26:31 -0700 Subject: [Scilab-users] System Identification for First order delay and dead time In-Reply-To: <39e0ac49-08b6-4625-9d8f-4f91743b5bd4@bvec34483> References: <1474725577246-4034608.post@n3.nabble.com> <1474830435.2826.25.camel@Servo> <4a0a58e0-e9ca-4aa1-bfa2-4a3436bc9ff9@bvec34483> <1474993894.3107.6.camel@Servo> <39e0ac49-08b6-4625-9d8f-4f91743b5bd4@bvec34483> Message-ID: <1475166391.2813.21.camel@Servo> The FFT will work. It is only exact for periodic signals, but it's a reasonable approximation for a whole lot of signals of infinite extent. If you can arrange for a test input that's got the same value at beginning and end (like a step-up followed by a step-down), and then measure long enough so that your system under test has settled close to its final value, then you can just use the FFT as is. If you can't do that (for instance, if your input is random, or if you can only do a step up), then take a good long measurement around the event and window. On Thu, 2016-09-29 at 07:09 -0700, Fukashiimo wrote: > Dear Tim, > > > Thank you for your reply. > > > First, you're not doing what I recommended you do. Why? <== As I > informed you that my inut u is not periodic. I thought that it is not > practical to use fft to my problem. Is my understanding not right? Is > fft the recomeded method for my problem? > In addition to that I am not familiar with fft. > > > Best Regards, > > > ----- ??????? ----- > ???: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" > <[hidden email]> > ??: "Fukashiimo" <[hidden email]> > ????: 2016?9?28?(???) 01:32:24 > ??: Re: System Identification for First order delay and dead time > > First, you're not doing what I recommended you do. Yet you are > addressing me for help with your solution, when I've already > suggested > two. Why? > > Second, your prototype transfer function is 11th order, and you > instruct > time_id to find the best fit to a second-order transfer function. > You > are surprised that get a transfer function in return that's not a > good > fit. Why? > > Third, you've been told that Scilab does not have a pre-packaged way > of > doing a fit to a system with pure time delay, and you've been given > more > than one suggestion for how to roll your own. You don't seem to have > taken any of these suggestions. Why? > > On Tue, 2016-09-27 at 07:30 -0700, Fukashiimo wrote: > > > Dear Tim, > > > > Thank you for yor advise. > > > > However, u is the step signal, such as 50% ==>60% ==> 50%. > > u and y are sampled with constant interval, such as one second. > > > > > > > > I made following Scilabe code, using time_id: > > > > // > > z=poly(0,'z'); > > h=(0.065/(z-0.934))*(1/z^10)// <== 10 Sampling period dead time > > u=zeros(1,100); > > for i=10:1:100 > > u(1,i)=2.0; > > end > > t=1:1:100; > > rep=flts(u,tf2ss(h)); > > plot(t,rep,t,u)// <== We can see the step type process input with > > amplitude=2 and its process response with 10 sampling period dead > > time. > > k=find(rep<>0,1) //here the threshold has to be improved in case of > > noisy signal > > //H=time_id(1,"step",rep(k:$)) > > H=time_id(2,u,rep) > > rep=flts(u,tf2ss(H)); > > plot(t,rep,'.r')// <== We can see the process response by > identified > > model. > > H > > > > > > h = > > > > 0.065 > > ----------- > > 10 11 > > - 0.934z + z > > > > > > H = > > > > 0.0265880 > > ------------- > > - 0.9779092 + z > > > > > > h is the discreate transfer function to provide operation data. > > H is the identified transfer function obtained from the opeartion > data > > using time_id. > > > > I have two issues. > > 1. H is not similar to h even the data doesn't include any noise. > How > > I can obtain transfer function nearly same as h? > > 2. I would like to have continuous transfer function. How I should > > convert the discreate transfer function to continuous transfer > > function. > > > > > > I am lokking for a solution for these two issues. > > May I ask your advise again? > > > > > > Thanks. > > > > > > ----- ??????? ----- > > ???: "Tim Wescott [via Scilab / Xcos - Mailing Lists Archives]" > > <[hidden email]> > > ??: "Fukashiimo" <[hidden email]> > > ????: 2016?9?26?(???) 04:07:52 > > ??: Re: System Identification for First order delay and dead time > > > > Heh. I just realized a better way to do this: > > > > I assume that you've sampled u and y at a constant rate, and that > you > > have captured some reasonable amount of the response. This will be > > perfect if u is periodic. > > > > If u is periodic, then for some integer number of periods, take U = > > fft(u) and Y = fft(y). If u isn't periodic, then take FFT's of u > and > > y > > after windowing them both with identical windows. > > > > Now calculate the frequencies for each bin of the above fft's. > > > > Define H(w) = ( K ./ (%i * tau * w + 1) ) .* exp(-%i * w * T). > > > > Calculate Ymodel = U .* H(w) > > > > Now, thanks to the magic of Parseval's Theorem, > > norm(Y - Ymodel) is the same as, or just a constant multiplier away > > from > > being, norm(y - ymodel) -- but you never actually have to compute > > ymodel. > > > > So optimize on tau and T as described before. You should only have > > to > > take your FFTs once at the beginning -- the rest will be repeatedly > > calculating H(w) for the various values of tau and T (and K, if you > > want > > to be lazy and just toss it into optim, although it'll be much > faster > > to > > determine it using least-squares fit). > > > > On Sun, 2016-09-25 at 01:07 -0700, Fukashiimo wrote: > > > > > Thank you for your suggestion. However, I am not sure how I > should > > > formulate my Laplace domain equation. Could you please advise me > > more > > > specifically? > > > > > > Thanks. > > > > > > > > > 2016/09/25 ??9:33 "Tim Wescott [via Scilab / Xcos - Mailing > Lists > > > Archives]" <[hidden email]>: > > > I suggest that you roll your own cost function, and use > > > optim. > > > > > > Where possible, with optim, if part of the problem is > > > nonlinear and part > > > is linear, it's good to use a plain old linear > > least-squares > > > fit for the > > > plain old linear part. In your case, that's K. Tau and > Td > > > will have to > > > be determined by optim. > > > > > > The cost function should generate a vector for ymodel with > K > > = > > > 1, then > > > find the best fit for K with > > > > > > K = y / ymodel; > > > > > > then return a cost > > > > > > cost = norm(y - K * ymodel); > > > > > > wrap that all up in NDCost and then optim, and away > you'll > > > go. > > > > > > On 2016-09-24 06:59, Fukashiimo wrote: > > > > > > > Hello, > > > > > > > > I am looking for a Scilab software which is similar to > > > Matlab System ID > > > > tool > > > > box. > > > > > > > > I would like to obtain values of parameters, Tau, K and > > Td > > > for > > > > following > > > > first order delay + Dead time model from time series > > data. > > > > ymodel = (K/(Tau*s+1))*exp(-Td*s)*u > > > > ymodel: process output, u: process input > > > > SISO continuous time > > > > > > > > Object function: Min ( (y-ymodel)^2) > > > > > > > > Could you please tell me which package I should use to > > solve > > > this > > > > issue? > > > > > > > > Best Regards, > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > > > > > > > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608.html > > > > Sent from the Scilab users - Mailing Lists Archives > > mailing > > > list > > > > archive at Nabble.com. > > > > _______________________________________________ > > > > users mailing list > > > > [hidden email] > > > > http://lists.scilab.org/mailman/listinfo/users > > > _______________________________________________ > > > users mailing list > > > [hidden email] > > > http://lists.scilab.org/mailman/listinfo/users > > > > > > > > > > > > > > ______________________________________________________________ > > > If you reply to this email, your message will be added to > > the > > > discussion below: > > > > > > http://mailinglists.scilab.org/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034619.html > > > To unsubscribe from System Identification for First order > > > delay and dead time, click here. > > > NAML > > > > > > > > > > > > ______________________________________________________________________ > > > View this message in context: Re: System Identification for First > > > order delay and dead time > > > 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 > > -- > > > > Tim Wescott > > www.wescottdesign.com > > Control & Communications systems, circuit & software design. > > Phone: 503.631.7815 > > Cell: 503.349.8432 > > > > > > _______________________________________________ > > 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034622.html > > To unsubscribe from System Identification for First order delay and > > dead time, click here . > > NAML > > > > > > > ______________________________________________________________________ > > View this message in context: Re: System Identification for First > > order delay and dead time > > 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 > -- > > Tim Wescott > www.wescottdesign.com > Control & Communications systems, circuit & software design. > Phone: 503.631.7815 > Cell: 503.349.8432 > > > _______________________________________________ > 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/System-Identification-for-First-order-delay-and-dead-time-tp4034608p4034654.html > To unsubscribe from System Identification for First order delay and > dead time, click here . > NAML > > > ______________________________________________________________________ > View this message in context: Re: System Identification for First > order delay and dead time > 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 -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From tim at wescottdesign.com Thu Sep 29 18:35:33 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 29 Sep 2016 09:35:33 -0700 Subject: [Scilab-users] shift phase in fft In-Reply-To: <210036937.332390938.1475144942766.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <210036937.332390938.1475144942766.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1475166933.2813.29.camel@Servo> Hey Paul: Just a comment, and I hope that neither you nor the rest of the crew on this list take it as being negative: The last few questions you've been asking have been in the context of Scilab, but for the most part they seem to be questions about signal processing, not about Scilab itself. One of the distressing trends I see in DSP forums is the tendency for people -- mostly people who are self-taught -- to have trouble separating DSP knowledge from which buttons to push in Scilab (or Matlab, if they happen to have it available). Scilab is a great numerical tool, and if I didn't have it I couldn't do my work nearly as efficiently as I do. But much of DSP is purely math, and not numerical at all -- you can use Scilab to shine a light on it, but Scilab isn't the thing itself. There's plenty of people on this list who know signal processing and who will be happy to help you, so if you don't want to step outside of it I hope you continue posting questions here. However, for your purely DSP questions, you may want to consider posting on the USENET group comp.dsp, or on www.dsprelated.com. You'll get a wide range of DSP minds concentrated on your questions, and they'll mostly be people who will be willing to help you understand the principles independently from any tools (like Scilab). Again -- I wish to apologize in advance if I'm stepping on any toes, or making anyone feel unwelcome. It is certainly not my intent. On Thu, 2016-09-29 at 12:29 +0200, paul.carrico at free.fr wrote: > Dear all > > > I'm sorry about asking a so basic question, but I do not understand > how to make a shift phase in a fft ; There's something I do not catch > what ? > > > Regards > > > Paul > > > > > ###################################################### > mode(0) > clear all > > > f = 10; // frequency > omega = 2*%pi*f; // circular frequency > nb_T = 5; // number of periods > t1 = 0; > t2 = (nb_T / f); > n = 10; > t = linspace(t1,t2,2^n)'; // must be a power of 2 > nl = size(t,"*"); > > > s1 = 2*sin(omega*t); // original signal > plot(t,s1,"r"); > > > phi = %pi/3; > s2 = 2*sin(omega*t + phi); // targetted signal to be rebuilt > plot(t,s2,"b"); > > > // shift phase in the fft > s1_fft = fft(s1); > s1_fft = clean(s1_fft); > //s1_fft = s1_fft. * exp(-%i*phi/nl); > s1_fft = s1_fft. * exp(-%i*phi); > s1_new = ifft(s1_fft); > plot(t,s1_new,"g"); > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From Frieder.Nikolaisen at student.hs-rm.de Fri Sep 30 11:17:12 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Fri, 30 Sep 2016 11:17:12 +0200 Subject: [Scilab-users] plotxxyyy In-Reply-To: <148536990.993122198.1475058944012.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <148536990.993122198.1475058944012.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: Hello everybody, with you help I got my programm so far running pretty well. Now I have trouble again with the plotting. I used the demos_gui plotyyy, but want now the plotxxyyy. How to implement xx? I attach my minimal example with a random Matrix, instead of the real one I use. This programm will be used at my theses. So I want to do correct quotes. I am used how to do this a text, but how is it done in a programm? I do get Errors, if I do not open the example plotyyy - is this really necessary? " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " Best regards Frieder Nikolaisen The minimal Code: //Write your callback for Diagramm here A=rand(15,50) //Dieser Code und geistiges Eigentum von Samuel GOUGEON wird ge?ndert und angepasst von Frieder Nikolaisen (FN), bleibt in seinen Grundz?gen jedoch erhalten // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab // Copyright (C) 2010 Samuel GOUGEON // Copyright (C) 2010 - DIGITEO - Allan CORNET // // This file is released under the 3-clause BSD license. See COPYING-BSD. function demo_plotyyy() plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von FN (changed by Frieder Nikolaisen) mopen(plotyyy) // hinzugef?gt von FN // DEMO START // A plotyyy() example: //http://bugzilla.scilab.org/show_bug.cgi?id=6070 my_handle = scf(100000); clf(my_handle); // Preparing data x = A(:,1); //Serial Date Number ge?ndert durch FN (changed by Frieder Nikolaisen) y2 = A(:,5); //Leistung ge?ndert durch FN y3 = A(:,7) //Beschleunigung ge?ndert durch FN drawlater() demo_viewCode("plotyyy.dem.sce"); // Axis y1 y1=A(:,4); //Drehzahl ge?ndert durch FN plot2d(x,y1) xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" "],.. gettext("Serial Date Numbers"),gettext("Drehzahl in U/min")); // ge?ndert durch FN // Axis y2 c=color("blue"); na=newaxes(); na.foreground=c; na.font_color=c; plot2d(x,y2,style=c) ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert durch FN na.children(1).children(1).thickness=2; na.filled="off"; na.axes_visible(1)="off"; // na.axes_reverse(2)="on"; na.y_location="middle"; // Axis y3 c=color("red"); na=newaxes(); na.foreground=c; // Axis and ticks color na.font_color=c; // Labels's color plot2d(x,y3,style=c); ylabel("Beschleunigung in m/s","color",[1 0 0]) // ge?ndert durch FN na.filled="off"; // Transparent background, letting the first plot appearing na.axes_visible(1)="off"; // Masking the x axis (useless overlay) na.y_location="right"; // Y axis on the right side na.children(1).children(1).thickness=2; // Curve thickness drawnow() // DEMO END mclose(plotyyy) endfunction demo_plotyyy(); clear demo_plotyyy; // Code von Samuel GOUGEON endet set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') From Frieder.Nikolaisen at student.hs-rm.de Fri Sep 30 11:27:27 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Fri, 30 Sep 2016 11:27:27 +0200 Subject: [Scilab-users] Fwd: plotxxyyy Message-ID: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> I did forgott one Point: My data Looks like: Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 1 0 0 0 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 0 1 0 0 0 ... 04.04.2012 12:13:15.910 46482.9710 15.10 1344.19 0.49 1 1 1 1 1 0 1 I want to plot some paramters over the time. I used datenum - but then the Diagramm cant be read easy. How could I print the time instead of Serial date number on the axes as well as the row number? (plotxxyyy x1=real time in DD MM YY HH MM SS, x2=row number and yyy) I do read These file in a Matrix, I add some more paramters and print: Zeit Distanz Geschwindigkeit 1 Drehzahl Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 0 0 0 0 1 0 0 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 0 1 0 0 ... For beeing used in a secound Programm. Best regards -------- Originalnachricht -------- Betreff: [Scilab-users] plotxxyyy Datum: 30.09.2016 11:17 Absender: Frieder Nikolaisen Empf?nger: Users mailing list for Scilab Antwort an: Users mailing list for Scilab Hello everybody, with you help I got my programm so far running pretty well. Now I have trouble again with the plotting. I used the demos_gui plotyyy, but want now the plotxxyyy. How to implement xx? I attach my minimal example with a random Matrix, instead of the real one I use. This programm will be used at my theses. So I want to do correct quotes. I am used how to do this a text, but how is it done in a programm? I do get Errors, if I do not open the example plotyyy - is this really necessary? " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " Best regards Frieder Nikolaisen The minimal Code: //Write your callback for Diagramm here A=rand(15,50) //Dieser Code und geistiges Eigentum von Samuel GOUGEON wird ge?ndert und angepasst von Frieder Nikolaisen (FN), bleibt in seinen Grundz?gen jedoch erhalten // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab // Copyright (C) 2010 Samuel GOUGEON // Copyright (C) 2010 - DIGITEO - Allan CORNET // // This file is released under the 3-clause BSD license. See COPYING-BSD. function demo_plotyyy() plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von FN (changed by Frieder Nikolaisen) mopen(plotyyy) // hinzugef?gt von FN // DEMO START // A plotyyy() example: //http://bugzilla.scilab.org/show_bug.cgi?id=6070 my_handle = scf(100000); clf(my_handle); // Preparing data x = A(:,1); //Serial Date Number ge?ndert durch FN (changed by Frieder Nikolaisen) y2 = A(:,5); //Leistung ge?ndert durch FN y3 = A(:,7) //Beschleunigung ge?ndert durch FN drawlater() demo_viewCode("plotyyy.dem.sce"); // Axis y1 y1=A(:,4); //Drehzahl ge?ndert durch FN plot2d(x,y1) xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" "],.. gettext("Serial Date Numbers"),gettext("Drehzahl in U/min")); // ge?ndert durch FN // Axis y2 c=color("blue"); na=newaxes(); na.foreground=c; na.font_color=c; plot2d(x,y2,style=c) ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert durch FN na.children(1).children(1).thickness=2; na.filled="off"; na.axes_visible(1)="off"; // na.axes_reverse(2)="on"; na.y_location="middle"; // Axis y3 c=color("red"); na=newaxes(); na.foreground=c; // Axis and ticks color na.font_color=c; // Labels's color plot2d(x,y3,style=c); ylabel("Beschleunigung in m/s","color",[1 0 0]) // ge?ndert durch FN na.filled="off"; // Transparent background, letting the first plot appearing na.axes_visible(1)="off"; // Masking the x axis (useless overlay) na.y_location="right"; // Y axis on the right side na.children(1).children(1).thickness=2; // Curve thickness drawnow() // DEMO END mclose(plotyyy) endfunction demo_plotyyy(); clear demo_plotyyy; // Code von Samuel GOUGEON endet set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From j.s.strom at hslmg.de Fri Sep 30 11:48:02 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 30 Sep 2016 11:48:02 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> Message-ID: <57EE34D2.10006@hslmg.de> Dear Frieder, It looks like you would like to put plenty of information into one single diagram. This tends to become confusing and difficult to read. It would help your helpers if you enclosed a (manual) sketch how the final result of your visualisation should look like. And perhaps that could trigger you to review the layout of what you plan to plot. Regards Jens ------------------------------------------------------------------------------------ Am 30.09.2016 11:27, schrieb Frieder Nikolaisen: > I did forgott one Point: > > > My data Looks like: > > Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse > l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt > Bremsen aktiv > > 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 > 0 0 0 1 0 0 0 > 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 > 0 0 0 1 0 0 0 > ... > 04.04.2012 12:13:15.910 46482.9710 15.10 1344.19 0.49 > 1 1 1 1 1 0 1 > > I want to plot some paramters over the time. I used datenum - but then > the Diagramm cant be read easy. How could I print the time instead of > Serial date number on the axes as well as the row number? (plotxxyyy > x1=real time in DD MM YY HH MM SS, x2=row number and yyy) > > I do read These file in a Matrix, I add some more paramters and print: > > Zeit Distanz Geschwindigkeit 1 Drehzahl > Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung > [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse > l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt > Bremsen aktiv > 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 > 0 0 0 0 1 0 0 > 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 > 0 0 1 0 1 0 0 > ... > > For beeing used in a secound Programm. > > Best regards > > > -------- Originalnachricht -------- > Betreff: [Scilab-users] plotxxyyy > Datum: 30.09.2016 11:17 > Absender: Frieder Nikolaisen > Empf?nger: Users mailing list for Scilab > Antwort an: Users mailing list for Scilab > > Hello everybody, > > with you help I got my programm so far running pretty well. Now I have > trouble again with the plotting. I used the demos_gui plotyyy, but > want now the plotxxyyy. How to implement xx? I attach my minimal > example with a random Matrix, instead of the real one I use. > > This programm will be used at my theses. So I want to do correct > quotes. I am used how to do this a text, but how is it done in a > programm? > > I do get Errors, if I do not open the example plotyyy - is this really > necessary? > " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " > > > Best regards > Frieder Nikolaisen > > > > > The minimal Code: > > //Write your callback for Diagramm here > > A=rand(15,50) > > //Dieser Code und geistiges Eigentum von Samuel GOUGEON wird ge?ndert > und angepasst von Frieder Nikolaisen (FN), bleibt in seinen Grundz?gen > jedoch erhalten > > // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab > // Copyright (C) 2010 Samuel GOUGEON > // Copyright (C) 2010 - DIGITEO - Allan CORNET > // > // This file is released under the 3-clause BSD license. See COPYING-BSD. > > function demo_plotyyy() > > plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von FN > (changed by Frieder Nikolaisen) > mopen(plotyyy) // hinzugef?gt von FN > > // DEMO START > // A plotyyy() example: > //http://bugzilla.scilab.org/show_bug.cgi?id=6070 > > my_handle = scf(100000); > clf(my_handle); > > // Preparing data > x = A(:,1); //Serial Date Number ge?ndert durch FN > (changed by Frieder Nikolaisen) > y2 = A(:,5); //Leistung ge?ndert durch FN > y3 = A(:,7) //Beschleunigung ge?ndert durch FN > > > drawlater() > demo_viewCode("plotyyy.dem.sce"); > > // Axis y1 > y1=A(:,4); //Drehzahl ge?ndert durch FN > plot2d(x,y1) > xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" "],.. > gettext("Serial Date Numbers"),gettext("Drehzahl in U/min")); > // ge?ndert durch FN > > // Axis y2 > c=color("blue"); > na=newaxes(); > na.foreground=c; > na.font_color=c; > plot2d(x,y2,style=c) > ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert durch FN > na.children(1).children(1).thickness=2; > na.filled="off"; > na.axes_visible(1)="off"; > // na.axes_reverse(2)="on"; > na.y_location="middle"; > > // Axis y3 > c=color("red"); > na=newaxes(); > na.foreground=c; // Axis and ticks color > na.font_color=c; // Labels's color > plot2d(x,y3,style=c); > ylabel("Beschleunigung in m/s","color",[1 0 0]) // ge?ndert durch FN > na.filled="off"; // Transparent background, > letting the first plot appearing > na.axes_visible(1)="off"; // Masking the x axis > (useless overlay) > na.y_location="right"; // Y axis on the right side > na.children(1).children(1).thickness=2; // Curve thickness > > drawnow() > > // DEMO END > mclose(plotyyy) > > endfunction > > demo_plotyyy(); > clear demo_plotyyy; > > // Code von Samuel GOUGEON endet > > set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') > > > _______________________________________________ > 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 Frieder.Nikolaisen at student.hs-rm.de Fri Sep 30 13:23:26 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Fri, 30 Sep 2016 13:23:26 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57EE34D2.10006@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> Message-ID: Dear Jens, there is not much to be confused about. I have attached my Diagramms with that Code but real data. The mininmal example is just crap, because of the random Matrix A. The Grafik-Fenster Nummer 100000 is only for choosing the Intervall of intrest. The 100001 is the detail to look at. It's just about a vehicle dooing shunting. I will include the possiblilty to choose the paramater you want to look at. Right now turn per minute and power arn't that useful. Best regards Frieder Am 30.09.2016 11:48, schrieb Jens Simon Strom: > Dear Frieder, > It looks like you would like to put plenty of information into one > single diagram. This tends to become confusing and difficult to read. > It would help your helpers if you enclosed a (manual) sketch how the > final result of your visualisation should look like. And perhaps that > could trigger you to review the layout of what you plan to plot. > Regards > Jens > > ------------------------------------------------------------------------------------ > Am 30.09.2016 11:27, schrieb Frieder Nikolaisen: >> I did forgott one Point: >> >> >> My data Looks like: >> >> Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse >> l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt >> Bremsen aktiv >> >> 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 >> 0 0 1 0 0 0 >> 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 >> 0 0 1 0 0 0 >> ... >> 04.04.2012 12:13:15.910 46482.9710 15.10 1344.19 0.49 1 >> 1 1 1 1 0 1 >> >> I want to plot some paramters over the time. I used datenum - but >> then the Diagramm cant be read easy. How could I print the time >> instead of Serial date number on the axes as well as the row number? >> (plotxxyyy x1=real time in DD MM YY HH MM SS, x2=row number and yyy) >> >> I do read These file in a Matrix, I add some more paramters and >> print: >> >> Zeit Distanz Geschwindigkeit 1 Drehzahl >> Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung >> [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse >> l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt >> Bremsen aktiv >> 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 >> 0 0 0 0 1 0 0 >> 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 >> 0 0 1 0 1 0 0 >> ... >> >> For beeing used in a secound Programm. >> >> Best regards >> >> >> -------- Originalnachricht -------- >> Betreff: [Scilab-users] plotxxyyy >> Datum: 30.09.2016 11:17 >> Absender: Frieder Nikolaisen >> Empf?nger: Users mailing list for Scilab >> Antwort an: Users mailing list for Scilab >> >> Hello everybody, >> >> with you help I got my programm so far running pretty well. Now I >> have trouble again with the plotting. I used the demos_gui plotyyy, >> but want now the plotxxyyy. How to implement xx? I attach my minimal >> example with a random Matrix, instead of the real one I use. >> >> This programm will be used at my theses. So I want to do correct >> quotes. I am used how to do this a text, but how is it done in a >> programm? >> >> I do get Errors, if I do not open the example plotyyy - is this >> really necessary? >> " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " >> >> >> Best regards >> Frieder Nikolaisen >> >> >> >> >> The minimal Code: >> >> //Write your callback for Diagramm here >> >> A=rand(15,50) >> >> //Dieser Code und geistiges Eigentum von Samuel GOUGEON wird >> ge?ndert und angepasst von Frieder Nikolaisen (FN), bleibt in seinen >> Grundz?gen jedoch erhalten >> >> // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab >> // Copyright (C) 2010 Samuel GOUGEON >> // Copyright (C) 2010 - DIGITEO - Allan CORNET >> // >> // This file is released under the 3-clause BSD license. See >> COPYING-BSD. >> >> function demo_plotyyy() >> >> plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von FN >> (changed by Frieder Nikolaisen) >> mopen(plotyyy) // hinzugef?gt von FN >> >> // DEMO START >> // A plotyyy() example: >> //http://bugzilla.scilab.org/show_bug.cgi?id=6070 >> >> my_handle = scf(100000); >> clf(my_handle); >> >> // Preparing data >> x = A(:,1); //Serial Date Number ge?ndert durch >> FN (changed by Frieder Nikolaisen) >> y2 = A(:,5); //Leistung ge?ndert durch >> FN >> y3 = A(:,7) //Beschleunigung ge?ndert durch >> FN >> >> >> drawlater() >> demo_viewCode("plotyyy.dem.sce"); >> >> // Axis y1 >> y1=A(:,4); //Drehzahl ge?ndert durch >> FN >> plot2d(x,y1) >> xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" "],.. >> gettext("Serial Date Numbers"),gettext("Drehzahl in U/min")); >> // ge?ndert durch FN >> >> // Axis y2 >> c=color("blue"); >> na=newaxes(); >> na.foreground=c; >> na.font_color=c; >> plot2d(x,y2,style=c) >> ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert durch FN >> na.children(1).children(1).thickness=2; >> na.filled="off"; >> na.axes_visible(1)="off"; >> // na.axes_reverse(2)="on"; >> na.y_location="middle"; >> >> // Axis y3 >> c=color("red"); >> na=newaxes(); >> na.foreground=c; // Axis and ticks color >> na.font_color=c; // Labels's color >> plot2d(x,y3,style=c); >> ylabel("Beschleunigung in m/s","color",[1 0 0]) // ge?ndert >> durch FN >> na.filled="off"; // Transparent >> background, letting the first plot appearing >> na.axes_visible(1)="off"; // Masking the x axis >> (useless overlay) >> na.y_location="right"; // Y axis on the right >> side >> na.children(1).children(1).thickness=2; // Curve thickness >> >> drawnow() >> >> // DEMO END >> mclose(plotyyy) >> >> endfunction >> >> demo_plotyyy(); >> clear demo_plotyyy; >> >> // Code von Samuel GOUGEON endet >> >> set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') >> >> >> _______________________________________________ >> 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 -------------- A non-text attachment was scrubbed... Name: Grafik-Fenster Nummer 100001.gif Type: image/gif Size: 14869 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Grafik-Fenster Nummer 100000.gif Type: image/gif Size: 23758 bytes Desc: not available URL: From Christophe.Dang at sidel.com Fri Sep 30 15:15:35 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 30 Sep 2016 13:15:35 +0000 Subject: [Scilab-users] plotxxyyy Message-ID: Hello, > De : Frieder Nikolaisen > Envoy? : vendredi 30 septembre 2016 11:17 > > but want now the plotxxyyy. How to implement xx Does something like drawaxis(x=..., val = ..., dir="u") fulfill your wish? https://help.scilab.org/docs/6.0.0/en_US/drawaxis.html If you only have a limited number of graphic to draw, you may considere processing them graphically e.g. with Inkscape (save as SVG from the graphical window) which is a quick and dirty way to get whatever you want. Of course, if you have dozens of graphics, forget it! -- 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 j.s.strom at hslmg.de Fri Sep 30 16:33:55 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 30 Sep 2016 16:33:55 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> Message-ID: <57EE77D3.8040100@hslmg.de> Dear Frieder, My first reflex is to dodge the questions you are asking and to use a simpler approach instead: Call the y-axis 'n/(10^3U/min), P/MW, a/(10m/s^2)' and plot the values into one *single* diagram over 't/h' which is calculated as (T-int(T))*24. Note that dividing the quantity by its unit gives the number shown at the axis. This is a widely accepted convention to draw axes and clearer than 'P in MW' oder 'P [MW]'. I think the diagram would look quite nice. Regards Jens ------------------------------------------------------- Am 30.09.2016 13:23, schrieb Frieder Nikolaisen: > Dear Jens, > > there is not much to be confused about. I have attached my Diagramms > with that Code but real data. The mininmal example is just crap, > because of the random Matrix A. > > The Grafik-Fenster Nummer 100000 is only for choosing the Intervall of > intrest. The 100001 is the detail to look at. It's just about a > vehicle dooing shunting. I will include the possiblilty to choose the > paramater you want to look at. Right now turn per minute and power > arn't that useful. > > Best regards > Frieder > > > > Am 30.09.2016 11:48, schrieb Jens Simon Strom: >> Dear Frieder, >> It looks like you would like to put plenty of information into one >> single diagram. This tends to become confusing and difficult to read. >> It would help your helpers if you enclosed a (manual) sketch how the >> final result of your visualisation should look like. And perhaps that >> could trigger you to review the layout of what you plan to plot. >> Regards >> Jens >> >> ------------------------------------------------------------------------------------ >> >> Am 30.09.2016 11:27, schrieb Frieder Nikolaisen: >>> I did forgott one Point: >>> >>> >>> My data Looks like: >>> >>> Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse >>> l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt >>> Bremsen aktiv >>> >>> 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 >>> 0 0 1 0 0 0 >>> 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 >>> 0 0 1 0 0 0 >>> ... >>> 04.04.2012 12:13:15.910 46482.9710 15.10 1344.19 0.49 1 >>> 1 1 1 1 0 1 >>> >>> I want to plot some paramters over the time. I used datenum - but >>> then the Diagramm cant be read easy. How could I print the time >>> instead of Serial date number on the axes as well as the row number? >>> (plotxxyyy x1=real time in DD MM YY HH MM SS, x2=row number and yyy) >>> >>> I do read These file in a Matrix, I add some more paramters and print: >>> >>> Zeit Distanz Geschwindigkeit 1 Drehzahl >>> Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung >>> [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen >>> Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv >>> 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 >>> 0 0 0 0 1 0 0 >>> 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 >>> 0 0 1 0 1 0 0 >>> ... >>> >>> For beeing used in a secound Programm. >>> >>> Best regards >>> >>> >>> -------- Originalnachricht -------- >>> Betreff: [Scilab-users] plotxxyyy >>> Datum: 30.09.2016 11:17 >>> Absender: Frieder Nikolaisen >>> Empf?nger: Users mailing list for Scilab >>> Antwort an: Users mailing list for Scilab >>> >>> Hello everybody, >>> >>> with you help I got my programm so far running pretty well. Now I >>> have trouble again with the plotting. I used the demos_gui plotyyy, >>> but want now the plotxxyyy. How to implement xx? I attach my minimal >>> example with a random Matrix, instead of the real one I use. >>> >>> This programm will be used at my theses. So I want to do correct >>> quotes. I am used how to do this a text, but how is it done in a >>> programm? >>> >>> I do get Errors, if I do not open the example plotyyy - is this >>> really necessary? >>> " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " >>> >>> >>> Best regards >>> Frieder Nikolaisen >>> >>> >>> >>> >>> The minimal Code: >>> >>> //Write your callback for Diagramm here >>> >>> A=rand(15,50) >>> >>> //Dieser Code und geistiges Eigentum von Samuel GOUGEON wird >>> ge?ndert und angepasst von Frieder Nikolaisen (FN), bleibt in seinen >>> Grundz?gen jedoch erhalten >>> >>> // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab >>> // Copyright (C) 2010 Samuel GOUGEON >>> // Copyright (C) 2010 - DIGITEO - Allan CORNET >>> // >>> // This file is released under the 3-clause BSD license. See >>> COPYING-BSD. >>> >>> function demo_plotyyy() >>> >>> plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von FN >>> (changed by Frieder Nikolaisen) >>> mopen(plotyyy) // hinzugef?gt von FN >>> >>> // DEMO START >>> // A plotyyy() example: >>> //http://bugzilla.scilab.org/show_bug.cgi?id=6070 >>> >>> my_handle = scf(100000); >>> clf(my_handle); >>> >>> // Preparing data >>> x = A(:,1); //Serial Date Number ge?ndert durch >>> FN (changed by Frieder Nikolaisen) >>> y2 = A(:,5); //Leistung ge?ndert durch FN >>> y3 = A(:,7) //Beschleunigung ge?ndert durch FN >>> >>> >>> drawlater() >>> demo_viewCode("plotyyy.dem.sce"); >>> >>> // Axis y1 >>> y1=A(:,4); //Drehzahl ge?ndert durch FN >>> plot2d(x,y1) >>> xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" "],.. >>> gettext("Serial Date Numbers"),gettext("Drehzahl in U/min")); >>> // ge?ndert durch FN >>> >>> // Axis y2 >>> c=color("blue"); >>> na=newaxes(); >>> na.foreground=c; >>> na.font_color=c; >>> plot2d(x,y2,style=c) >>> ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert durch FN >>> na.children(1).children(1).thickness=2; >>> na.filled="off"; >>> na.axes_visible(1)="off"; >>> // na.axes_reverse(2)="on"; >>> na.y_location="middle"; >>> >>> // Axis y3 >>> c=color("red"); >>> na=newaxes(); >>> na.foreground=c; // Axis and ticks color >>> na.font_color=c; // Labels's color >>> plot2d(x,y3,style=c); >>> ylabel("Beschleunigung in m/s","color",[1 0 0]) // ge?ndert >>> durch FN >>> na.filled="off"; // Transparent >>> background, letting the first plot appearing >>> na.axes_visible(1)="off"; // Masking the x axis >>> (useless overlay) >>> na.y_location="right"; // Y axis on the right side >>> na.children(1).children(1).thickness=2; // Curve thickness >>> >>> drawnow() >>> >>> // DEMO END >>> mclose(plotyyy) >>> >>> endfunction >>> >>> demo_plotyyy(); >>> clear demo_plotyyy; >>> >>> // Code von Samuel GOUGEON endet >>> >>> set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') >>> >>> >>> _______________________________________________ >>> 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: