From berns.buenaobra at gmail.com Tue Jan 1 11:22:01 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Tue, 1 Jan 2013 18:22:01 +0800 Subject: [Scilab-users] Scilab 5.4 ls and dir command In-Reply-To: <1356633523945-4025595.post@n3.nabble.com> References: <1356633523945-4025595.post@n3.nabble.com> Message-ID: Hi Germaingondor: Well I have both 64-bit 5.3.3 and 5.4.0 installed on a legit Windows 7 Home Premium on a i7-3610QM Intel CPU Laptop and ls and dir works. Have you did a clean install? Have you activated your Windows OS? Regards, Dr.Bernz On Fri, Dec 28, 2012 at 2:38 AM, germaingondor wrote: > Hi, > > since I moved from Scilab 5.33 to 5.4, ls command used to work. I've tried > ls, dir and listfiles example. None of them works on my Scilab 5.4. > > I'm working on Windows 7. Could someone give me the way to solve the > problem > ? Thanks > > > > -- > View this message in context: > http://mailinglists.scilab.org/Scilab-5-4-ls-and-dir-command-tp4025595.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 germaingondor at yahoo.fr Tue Jan 1 11:34:45 2013 From: germaingondor at yahoo.fr (germaingondor) Date: Tue, 1 Jan 2013 02:34:45 -0800 (PST) Subject: [Scilab-users] Scilab 5.4 ls and dir command In-Reply-To: References: <1356633523945-4025595.post@n3.nabble.com> Message-ID: <1357036472.64855.YahooMailNeo@web132104.mail.ird.yahoo.com> Thanks for your answer ! I've solved my problem by removing the clear() function at the begining of my program. If clear() is writen, ls and dir don't work. Thank you and...happy new year ! Best Regards, Dr Gondor ________________________________ De?: Berns Buenaobra [via Scilab / Xcos - Mailing Lists Archives] ??: germaingondor Envoy? le : Mardi 1 janvier 2013 11h22 Objet?: Re: Scilab 5.4 ls and dir command Hi Germaingondor: Well I have both 64-bit 5.3.3 and 5.4.0 installed on a legit Windows 7 Home Premium on a i7-3610QM Intel CPU Laptop and ls and dir works. Have you did a clean install? Have you activated your Windows OS? Regards, Dr.Bernz On Fri, Dec 28, 2012 at 2:38 AM, germaingondor <[hidden email]> wrote: Hi, > >since I moved from Scilab 5.33 to 5.4, ls command used to work. I've tried >ls, dir and listfiles example. None of them works on my Scilab 5.4. > >I'm working on Windows 7. Could someone give me the way to solve the problem >? Thanks > > > >-- >View this message in context: http://mailinglists.scilab.org/Scilab-5-4-ls-and-dir-command-tp4025595.html >Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. >_______________________________________________ >users mailing list >[hidden email] >http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users ________________________________ If you reply to this email, your message will be added to the discussion below:http://mailinglists.scilab.org/Scilab-5-4-ls-and-dir-command-tp4025595p4025600.html To unsubscribe from Scilab 5.4 ls and dir command, click here. NAML -- View this message in context: http://mailinglists.scilab.org/Scilab-5-4-ls-and-dir-command-tp4025595p4025601.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 Wed Jan 2 08:45:30 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 2 Jan 2013 08:45:30 +0100 Subject: [Scilab-users] Generalised eigenvalues In-Reply-To: <50D47614.4060506@inria.fr> References: <3B5FFC67498DFF49AE7271A584867D16F105FA736D@301EX00100.sidel.com> <50D47614.4060506@inria.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10604D4B8@301EX00100.sidel.com> >> geval = al./be >> >> but this is a bit beyond my math skills. > You are right. but Scilab returns the generalized eigenvalues under a > factorized form because some generalized eigenvalue problems may have > eigenvalue at infinity. Thanks for this explanation Serge. (And my best wishes to everybody) -- Christophe Dang Ngoc Chan This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From Christophe.Dang at sidel.com Wed Jan 2 10:48:53 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 2 Jan 2013 10:48:53 +0100 Subject: [Scilab-users] uicontrol in a function Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10604D652@301EX00100.sidel.com> Hello, I'm starting with my first graphical user interfaces. It seems OK until I try to encapsulate it into a function. Here is a minimal complete example: // ********** function []=test(h) text = uicontrol(h, "style", "edit", ... "string", "foo",... "position", [50 100 100 20]); bouton = uicontrol(h, "string", "OK",... "position", [50 50 50 20], ... "callback", "text.string = string(0);"); endfunction fig = figure(0); test(fig); // ********** When I run the script, nothing happens. And if I first run execute the script without encapsulation then the script with encapsulation (without clear() inbetween), I get !--error 999 set : The handle is no more valid. at line 4 of function generic_i_h called by : at line 2 of function %c_i_h called by : bject(251);text.string = string(0);;if exists("%oldgcbo") then gcbo while executing a callback So, I can I encapsulate? -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From Serge.Steer at inria.fr Wed Jan 2 14:29:43 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 02 Jan 2013 14:29:43 +0100 Subject: [Scilab-users] uicontrol in a function In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F10604D652@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F10604D652@301EX00100.sidel.com> Message-ID: <50E43647.2060305@inria.fr> You must modify your test function as given below, because the test function creates the widgets and then exits, so when you click on the ok button the text variable is no more defined. The solution below saves the texte handle into the userdata field of the control bouton data structure so it can be retreived by gcbo.userdata by the callback. function []=test(h) text = uicontrol(h, "style", "edit", ... "string", "foo",... "position", [50 100 100 20]); bouton = uicontrol(h, "string", "OK",... "position", [50 50 50 20], ... "userdata",text,... "callback", "gcbo.userdata.string = string(0);"); endfunction fig = figure(0); test(fig); Serge Steer Le 02/01/2013 10:48, Dang, Christophe a ?crit : > Hello, > > I'm starting with my first graphical user interfaces. > It seems OK until I try to encapsulate it into a function. > > Here is a minimal complete example: > > // ********** > function []=test(h) > text = uicontrol(h, "style", "edit", ... > "string", "foo",... > "position", [50 100 100 20]); > bouton = uicontrol(h, "string", "OK",... > "position", [50 50 50 20], ... > "callback", "text.string = string(0);"); > endfunction > > fig = figure(0); > test(fig); > // ********** > > When I run the script, nothing happens. > > And if I first run execute the script without encapsulation > then the script with encapsulation (without clear() inbetween), > I get > !--error 999 > set : The handle is no more valid. > at line 4 of function generic_i_h called by : > at line 2 of function %c_i_h called by : > bject(251);text.string = string(0);;if exists("%oldgcbo") then gcbo > while executing a callback > > So, I can I encapsulate? > From Christophe.Dang at sidel.com Wed Jan 2 14:56:45 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 2 Jan 2013 14:56:45 +0100 Subject: [Scilab-users] uicontrol in a function In-Reply-To: <50E43647.2060305@inria.fr> References: <3B5FFC67498DFF49AE7271A584867D16F10604D652@301EX00100.sidel.com> <50E43647.2060305@inria.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10604D97C@301EX00100.sidel.com> > The solution below saves the texte handle into the userdata field Thanks Serge. -- Christophe Dang Ngoc Chan 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 scheiber at unitbv.ro Wed Jan 2 18:14:22 2013 From: scheiber at unitbv.ro (scheiber) Date: Wed, 2 Jan 2013 09:14:22 -0800 (PST) Subject: [Scilab-users] How to develop a Scilab-java application using apache-ant/apache-maven? Message-ID: <1357146862213-4025606.post@n3.nabble.com> How to develop a Scilab-java application using apache-ant/apache-maven? Let us consider the following sample: import org.scilab.modules.javasci.Scilab; import org.scilab.modules.types.ScilabType; import org.scilab.modules.types.ScilabDouble; public class TstJavaSci1{ public static void main(String[] args){ try{ Scilab sci=new Scilab(); if(sci.open()){ sci.exec(new String[]{"u=1","v=u+1","disp(v)"}); sci.close(); } else{ System.out.println("Could not start Scilab "); } } catch(org.scilab.modules.javasci.JavasciException e) { System.err.println("An exception occured: " + e.getLocalizedMessage()); } } } The execution may be carried out successfully with the following script (Windows) set SCILAB_HOME=c:\Program Files\scilab-5.4.0 set SCILAB_PATH=%SCILAB_HOME%\modules\javasci\jar\org.scilab.modules.javasci.jar;%SCILAB_HOME%\modules\types\jar\org.scilab.modules.types.jar set classpath=build;%SCILAB_PATH%; rm build md build javac -d build src\TstJavaSci1.java java TstJavaSci1 set SCILAB_HOME=c:\Program Files\scilab-5.4.0 set SCILAB_PATH=%SCILAB_HOME%\modules\javasci\jar\org.scilab.modules.javasci.jar;%SCILAB_HOME%\modules\types\jar\org.scilab.modules.types.jar set classpath=build;%SCILAB_PATH%; rm build md build javac -d build src\TstJavaSci1.java java TstJavaSci1 But if I tried to run with the apache-ant with the build.xml file I get the following errors Compile: [javac] Compiling 1 source file to d:\mk\NumerJava\NumerJavaX\Cap_2\Scilabv540\ant\build Run: [java] The native library javasci does not exist or cannot be found. [java] java.lang.UnsatisfiedLinkError: C:\Program Files\scilab-5.4.0\bin\javasci.dll: The specified procedure could not be found [java] at java.lang.ClassLoader$NativeLibrary.load(Native Method) [java] at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939) [java] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864) [java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854) [java] at java.lang.Runtime.loadLibrary0(Runtime.java:845) [java] at java.lang.System.loadLibrary(System.java:1084) [java] at org.scilab.modules.javasci.Call_ScilabJNI.(Unknown Source) [java] at org.scilab.modules.javasci.Call_Scilab.SetFromJavaToON(Unknown Source) [java] at org.scilab.modules.javasci.Scilab.initScilab(Unknown Source) [java] at org.scilab.modules.javasci.Scilab.(Unknown Source) [java] at org.scilab.modules.javasci.Scilab.(Unknown Source) [java] at TstJavaSci1.main(Unknown Source) [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: org.scilab.modules.javasci.Call_ScilabJNI.SetFromJavaToON()V [java] at org.scilab.modules.javasci.Call_ScilabJNI.SetFromJavaToON(Native Method) [java] at org.scilab.modules.javasci.Call_Scilab.SetFromJavaToON(Unknown Source) [java] at org.scilab.modules.javasci.Scilab.initScilab(Unknown Source) [java] at org.scilab.modules.javasci.Scilab.(Unknown Source) [java] at org.scilab.modules.javasci.Scilab.(Unknown Source) [java] at TstJavaSci1.main(Unknown Source). The PATH of the system contains the reference ?C:\Program Files\scilab-5.4.0\bin?, while the lib folder contains the two required jars. The same errors are obtained using apache-maven. -- View this message in context: http://mailinglists.scilab.org/How-to-develop-a-Scilab-java-application-using-apache-ant-apache-maven-tp4025606.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From samad13 at hotmail.de Thu Jan 3 09:35:09 2013 From: samad13 at hotmail.de (samy) Date: Thu, 3 Jan 2013 00:35:09 -0800 (PST) Subject: [Scilab-users] Dot Notation Message-ID: <1357202109323-4025607.post@n3.nabble.com> Hello everyone, i want to read a text file with the following Output: ASY.Pr.VER = 2.0 ASY.Pr.NAME = Samy ASY.Pr.REKE = XY ASY.Pr.LOG and give it as a tlist in scilab for example tlist(['Pr,'VER','NAME','REKE','LOG'],2.0,Samy, XY) it's possible? i have a large file I thank you in advance for any help. -- View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sylvestre.ledru at scilab-enterprises.com Thu Jan 3 17:37:26 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Thu, 03 Jan 2013 17:37:26 +0100 Subject: [Scilab-users] How to develop a Scilab-java application using apache-ant/apache-maven? In-Reply-To: <1357146862213-4025606.post@n3.nabble.com> References: <1357146862213-4025606.post@n3.nabble.com> Message-ID: <50E5B3C6.5010508@scilab-enterprises.com> Hello, On 02/01/2013 18:14, scheiber wrote: > [java] The native library javasci does not exist or cannot be found. > [java] java.lang.UnsatisfiedLinkError: C:\Program This is documented here: http://help.scilab.org/docs/5.4.0/en_US/javasci_faq_v2.html Basically, this usually means that you have not set up the PATH variable correctly. Sylvestre From Serge.Steer at inria.fr Thu Jan 3 18:50:17 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 03 Jan 2013 18:50:17 +0100 Subject: [Scilab-users] Dot Notation In-Reply-To: <1357202109323-4025607.post@n3.nabble.com> References: <1357202109323-4025607.post@n3.nabble.com> Message-ID: <50E5C4D9.3030203@inria.fr> It would be easy if your file contained something like ASY.Pr.VER = 2.0 ASY.Pr.NAME = "Samy" ASY.Pr.REKE = "XY" ASY.Pr.LOG=[] Because in such a case you may have only to exec it. If you cannot produce such a file maybe you can proceed as follow * **digits=string(0:9);** **txt=stripblanks(mgetl('your file'));** **txt(txt=='')=[]; //remove blank lines** **n=size(txt,1); //the number of lines** **I=[];** **for k=1:n** ** t=tokens(txt(k),"=");** ** if size(t,'*')==2 then** ** t2=stripblanks(t(2));** ** if or(part(t2,1)==digits) then** ** I=[I;txt(k)];** ** else** ** I=[I;t(1)+"="""+t2+""""];** ** end** ** else** ** I=[I;txt(k)+"=[]"];** ** end** **end** **clear ASY** **execstr(I)** **//here ASY is a struct with one field named Pr and ASY.Pr is a struct** **ASY.Pr** * Serge Steer Le 03/01/2013 09:35, samy a ?crit : > Hello everyone, > > i want to read a text file with the following Output: > > ASY.Pr.VER = 2.0 > > ASY.Pr.NAME = Samy > > ASY.Pr.REKE = XY > > ASY.Pr.LOG > > and give it as a tlist in scilab for example > tlist(['Pr,'VER','NAME','REKE','LOG'],2.0,Samy, XY) > > it's possible? > > i have a large file > > I thank you in advance for any help. > > > > -- > View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607.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 lukasz.kocot at sosnowa40.pl Thu Jan 3 20:55:19 2013 From: lukasz.kocot at sosnowa40.pl (lukasz_kocot) Date: Thu, 3 Jan 2013 11:55:19 -0800 (PST) Subject: [Scilab-users] parallel_run on linux with 8 cores problem with nb_workers Message-ID: <1357242919791-4025610.post@n3.nabble.com> Hi all, Did any one can explain why example from scilab help are executed only once? function a=g(arg1) disp("called on "+string(arg1)); a=arg1*arg1; disp("computed "+string(a)); endfunction res=parallel_run(1:6, g); If i change to parallel_run(1:24,g) execution occure only 3 times. Situation is changed only if i set 'nb_workers' to 8 - then it work on all cores, and when i set it to 1, the it work only on 1 core. Regarding to help, default value should be 0 and it should mean to use all cores i have in system. Behaviour is same even if i manually set nb_workers to 0. (Now i know solution, But i don't know reason of it, is it a problem with my instalation ort system or mistake in help. I decide to place here this post becouse maybe someone else have similar problem and waste a lot of time for it liki i have done). -- View this message in context: http://mailinglists.scilab.org/parallel-run-on-linux-with-8-cores-problem-with-nb-workers-tp4025610.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From vogt at centre-cired.fr Fri Jan 4 14:16:05 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Fri, 04 Jan 2013 14:16:05 +0100 Subject: [Scilab-users] return current line in the current file Message-ID: <50E6D615.70304@centre-cired.fr> hi i have a file, myscript.sce i'd like to call a function inside myscript.sce which would return the line in the file myscript.sce where the function is called. Does that exist? happy new year -- Adrien Vogt-Schilb (Cired) Tel: (+33) 1 43 94 *73 83* -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jan 4 15:12:20 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 04 Jan 2013 15:12:20 +0100 Subject: [Scilab-users] return current line in the current file In-Reply-To: <50E6D615.70304@centre-cired.fr> References: <50E6D615.70304@centre-cired.fr> Message-ID: <50E6E344.7010805@free.fr> Hello Adrien, Le 04/01/2013 14:16, Adrien Vogt-Schilb a ?crit : > > > i'd like to call a function inside myscript.sce which would return the > line in the file myscript.sce where the function is called. > Does that exist? Yes, you might use where() inside the function which calls must be located: // script testy_foo.sce function Ln =foo() b = 2 [Ln,F] = where() Ln = Ln($) endfunction a = 1; disp(foo()) Best wishes for 2013! Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt at centre-cired.fr Fri Jan 4 16:31:46 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Fri, 04 Jan 2013 16:31:46 +0100 Subject: [Scilab-users] return current line in the current file In-Reply-To: <50E6E344.7010805@free.fr> References: <50E6D615.70304@centre-cired.fr> <50E6E344.7010805@free.fr> Message-ID: <50E6F5E2.1000002@centre-cired.fr> On 04/01/2013 15:12, Samuel Gougeon wrote: > Hello Adrien, > > Le 04/01/2013 14:16, Adrien Vogt-Schilb a ?crit : >> >> >> i'd like to call a function inside myscript.sce which would return >> the line in the file myscript.sce where the function is called. >> Does that exist? > Yes, you might use where() inside the function which calls must be > located: > > // script testy_foo.sce > > function Ln =foo() > b = 2 > [Ln,F] = where() > Ln = Ln($) > endfunction > > a = 1; > disp(foo()) > > Best wishes for 2013! > Samuel Thank you Samuel, that is what I was looking for Happy new year > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From communication at scilab-enterprises.com Fri Jan 4 17:03:03 2013 From: communication at scilab-enterprises.com (Communication) Date: Fri, 04 Jan 2013 17:03:03 +0100 Subject: [Scilab-users] Best Wishes 2013 Message-ID: <50E6FD37.4000806@scilab-enterprises.com> *Scilab Enterprises wishes you a happy new year 2013* Best Wishes This message is not displayed properly? View it here: http://www.scilab.org/community/news/20130102 --------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles (France) http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 89937 bytes Desc: not available URL: From grocer.toolbox at gmail.com Sat Jan 5 12:44:39 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Sat, 5 Jan 2013 12:44:39 +0100 Subject: [Scilab-users] plot a tree Message-ID: Hello and happy new year to all! I am looking for a graphic function plotting a tree (in the spirit of, but not nessarily strictly equivalent to, matlab function treeplot). I have neither found it in Scilab, in St?phane MOTTELET's plotting library, nor on the web. Does nevertheless such a function exist? Thanks! ?ric. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chukonvilla at yahoo.com Mon Jan 7 01:26:28 2013 From: chukonvilla at yahoo.com (smartygol) Date: Sun, 6 Jan 2013 16:26:28 -0800 (PST) Subject: [Scilab-users] (no subject) Message-ID: <1357518388.85912.YahooMailNeo@web120802.mail.ne1.yahoo.com> http://erkek-parfumu.com/images/wmnhl.php?toqc=toqc -------------- next part -------------- An HTML attachment was scrubbed... URL: From samad13 at hotmail.de Tue Jan 8 09:30:47 2013 From: samad13 at hotmail.de (samy) Date: Tue, 8 Jan 2013 00:30:47 -0800 (PST) Subject: [Scilab-users] Dot Notation In-Reply-To: <50E5C4D9.3030203@inria.fr> References: <1357202109323-4025607.post@n3.nabble.com> <50E5C4D9.3030203@inria.fr> Message-ID: hi serge, thanks for you answer i will try it . Date: Thu, 3 Jan 2013 09:50:32 -0800 From: ml-node+s994242n4025609h62 at n3.nabble.com To: samad13 at hotmail.de Subject: Re: Dot Notation It would be easy if your file contained something like ASY.Pr.VER = 2.0 ASY.Pr.NAME = "Samy" ASY.Pr.REKE = "XY" ASY.Pr.LOG=[] Because in such a case you may have only to exec it. If you cannot produce such a file maybe you can proceed as follow digits=string(0:9); txt=stripblanks(mgetl('your file')); txt(txt=='')=[]; //remove blank lines n=size(txt,1); //the number of lines I=[]; for k=1:n t=tokens(txt(k),"="); if size(t,'*')==2 then t2=stripblanks(t(2)); if or(part(t2,1)==digits) then I=[I;txt(k)]; else I=[I;t(1)+"="""+t2+""""]; end else I=[I;txt(k)+"=[]"]; end end clear ASY execstr(I) //here ASY is a struct with one field named Pr and ASY.Pr is a struct ASY.Pr Serge Steer Le 03/01/2013 09:35, samy a ?crit : Hello everyone, i want to read a text file with the following Output: ASY.Pr.VER = 2.0 ASY.Pr.NAME = Samy ASY.Pr.REKE = XY ASY.Pr.LOG and give it as a tlist in scilab for example tlist(['Pr,'VER','NAME','REKE','LOG'],2.0,Samy, XY) it's possible? i have a large file I thank you in advance for any help. -- View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607.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/Dot-Notation-tp4025607p4025609.html To unsubscribe from Dot Notation, click here. NAML -- View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607p4025625.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From samad13 at hotmail.de Tue Jan 8 10:03:14 2013 From: samad13 at hotmail.de (samy) Date: Tue, 8 Jan 2013 01:03:14 -0800 (PST) Subject: [Scilab-users] Dot Notation In-Reply-To: <50E5C4D9.3030203@inria.fr> References: <1357202109323-4025607.post@n3.nabble.com> <50E5C4D9.3030203@inria.fr> Message-ID: hi serge, the example work fine, but i have a question can you explain the individual steps. i understand what the code do, but not completely. thanks. Date: Thu, 3 Jan 2013 09:50:32 -0800 From: ml-node+s994242n4025609h62 at n3.nabble.com To: samad13 at hotmail.de Subject: Re: Dot Notation It would be easy if your file contained something like ASY.Pr.VER = 2.0 ASY.Pr.NAME = "Samy" ASY.Pr.REKE = "XY" ASY.Pr.LOG=[] Because in such a case you may have only to exec it. If you cannot produce such a file maybe you can proceed as follow digits=string(0:9); txt=stripblanks(mgetl('your file')); txt(txt=='')=[]; //remove blank lines n=size(txt,1); //the number of lines I=[]; for k=1:n t=tokens(txt(k),"="); if size(t,'*')==2 then t2=stripblanks(t(2)); if or(part(t2,1)==digits) then I=[I;txt(k)]; else I=[I;t(1)+"="""+t2+""""]; end else I=[I;txt(k)+"=[]"]; end end clear ASY execstr(I) //here ASY is a struct with one field named Pr and ASY.Pr is a struct ASY.Pr Serge Steer Le 03/01/2013 09:35, samy a ?crit : Hello everyone, i want to read a text file with the following Output: ASY.Pr.VER = 2.0 ASY.Pr.NAME = Samy ASY.Pr.REKE = XY ASY.Pr.LOG and give it as a tlist in scilab for example tlist(['Pr,'VER','NAME','REKE','LOG'],2.0,Samy, XY) it's possible? i have a large file I thank you in advance for any help. -- View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607.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/Dot-Notation-tp4025607p4025609.html To unsubscribe from Dot Notation, click here. NAML -- View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607p4025626.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gordonc53 at gmail.com Tue Jan 8 13:00:00 2013 From: gordonc53 at gmail.com (Jokerman) Date: Tue, 8 Jan 2013 04:00:00 -0800 (PST) Subject: [Scilab-users] Running Scilab scripts In-Reply-To: References: Message-ID: <1357646400803-4025627.post@n3.nabble.com> Anyone?!? -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Running-Scilab-scripts-tp4025597p4025627.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Tue Jan 8 17:20:00 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 08 Jan 2013 17:20:00 +0100 Subject: [Scilab-users] Dot Notation In-Reply-To: References: <1357202109323-4025607.post@n3.nabble.com> <50E5C4D9.3030203@inria.fr> Message-ID: <50EC4730.2030500@inria.fr> Le 08/01/2013 10:03, samy a ?crit : > hi serge, > the example work fine, but i have a question can you explain the > individual steps. > i understand what the code do, but not completely. > thanks. > > ------------------------------------------------------------------------ > > ***digits=string(0:9);** > **txt=stripblanks(mgetl('your file'));**//read the file and remove the > leading and trailing blanks of each line > **txt(txt=='')=[]; //remove blank lines** > **n=size(txt,1); //the number of lines** > **I=[];** > **for k=1:n**//loop on each line > ** t=tokens(txt(k),"=");** > * *//if txt(k) contains something like *ASY.Pr.VER = 2.0 the variable t will be equal to ["ASY.Pr.VER","2.0"] > *** if size(t,'*')==2 then**//there is an = sign in the line > ** t2=stripblanks(t(2));** > ** if or(part(t2,1)==digits) then**//check if the first character of > t(2) is a digit > * *//t2 begins with a digit, I assume t2 contains the representation of a number , the associated line is not modified* //because ASY.Pr.VER = 2.0 is a valid Scilab instruction > *** I=[I;txt(k)];** > ** else** > * *//t2 does not represent a numbe, expression like ASY.Pr.NAME= Samy is not a valid Scilab instrution // (at least is Samy is not a defined variable) //such lines are transformed into ***ASY.Pr.NAME= "Samy"* * > ***I=[I;t(1)+"="""+t2+""""];** > ** end** > ** else** > * *//if txt(k) does not contains an = sign, like ***ASY.Pr.LOG **this does not represent an assignment *//such lines are transformed into ***ASY.Pr.LOG= [] (empty matrix assigned to ****ASY.Pr.LOG)** > ***I=[I;txt(k)+"=[]"];** > ** end** > **end** > **clear ASY** > * *//here I contains a sequence of valid Scilab instruction*s that can be used to defined a struct > ***execstr(I)**//evaluate it > **//here ASY is a struct with one field named Pr and ASY.Pr is a struct** > **ASY.Pr** > * > > Serge Steer > > Le 03/01/2013 09:35, samy a ?crit : > > Hello everyone, > > i want to read a text file with the following Output: > > ASY.Pr.VER = 2.0 > > ASY.Pr.NAME = Samy > > ASY.Pr.REKE = XY > > ASY.Pr.LOG > > and give it as a tlist in scilab for example > tlist(['Pr,'VER','NAME','REKE','LOG'],2.0,Samy, XY) > > it's possible? > > i have a large file > > I thank you in advance for any help. > > > > -- > View this message in context:http://mailinglists.scilab.org/Dot-Notation-tp4025607.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/Dot-Notation-tp4025607p4025609.html > To unsubscribe from Dot Notation, click here. > NAML > > > > ------------------------------------------------------------------------ > View this message in context: RE: Dot Notation > > 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 Serge.Steer at inria.fr Tue Jan 8 17:22:38 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 08 Jan 2013 17:22:38 +0100 Subject: [Scilab-users] Running Scilab scripts In-Reply-To: References: Message-ID: <50EC47CE.7010003@inria.fr> Le 30/12/2012 06:18, Gordon Clarke a ?crit : > I've recently loaded Scilab 5.4.0 onto my Mac. > > Initially converted a couple of MATLAB M scripts over to SCI scripts. > After several hours of work and having to undo most of what the Scilab > conversion process implemented I managed to get the SCI scripts to > work. Next I created an SCI/SCE script from scratch similar to one of > the converted MATLAB scripts and every time I exec it I was just given > the prompt -->. > > Then I created a 2 line Hello World SCI script and same again only get > the prompt back. After several hours of trying numerous things, like > linking the SCI/SCE script to Scilab, checking permissions etc still > nothing. It doesn't matter from where I exec the script, command line > or via the editor. Always same result nothing. > > Anybody have any ideas? Please can you send us your Hello World SCI script and how do you exec it. Serge Steer > > The 2 line script was: > s="Hello World!"; > disp(s); > > cheers > Gordon > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From samad13 at hotmail.de Tue Jan 8 18:54:42 2013 From: samad13 at hotmail.de (samy) Date: Tue, 8 Jan 2013 09:54:42 -0800 (PST) Subject: [Scilab-users] Dot Notation In-Reply-To: <50EC4730.2030500@inria.fr> References: <1357202109323-4025607.post@n3.nabble.com> <50E5C4D9.3030203@inria.fr> <50EC4730.2030500@inria.fr> Message-ID: thanks serge , i have one more question, i wrote a vb.net application, that give this output from a xml file BHCurve=tlist(['BHCurve';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point']); BHCurve.Point=tlist(['Point';'B';'H'],0,0); BHCurve.Point=tlist(['Point';'B';'H'],0.05,32); BHCurve.Point=tlist(['Point';'B';'H'],0.1,55); BHCurve.Point=tlist(['Point';'B';'H'],0.15,71); BHCurve.Point=tlist(['Point';'B';'H'],0.2,82); BHCurve.Point=tlist(['Point';'B';'H'],0.25,90); BHCurve.Point=tlist(['Point';'B';'H'],0.3,96); BHCurve.Point=tlist(['Point';'B';'H'],0.35,101.5); Now i want to make a a helplist function in scilab, that i can load in vb.net with the exec('Fullpath\function.sci'); for example function[]= zlist(argument) zlist(str); ztlist = tlist(['Typ';]) // empty tlist ztlist(1)(2:size(argument(1,2)) finally the output will change BHCurve=ztlist(['BHCurve';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point';'Point']); BHCurve.Point=ztlist(['Point';'B';'H'],0,0); BHCurve.Point=ztlist(['Point';'B';'H'],0.05,32); BHCurve.Point=ztlist(['Point';'B';'H'],0.1,55);......... Can you understand what i want ?? thank you for you help Date: Tue, 8 Jan 2013 08:20:22 -0800 From: ml-node+s994242n4025628h51 at n3.nabble.com To: samad13 at hotmail.de Subject: Re: Dot Notation Le 08/01/2013 10:03, samy a ?crit : hi serge, the example work fine, but i have a question can you explain the individual steps. i understand what the code do, but not completely. thanks. digits=string(0:9); txt=stripblanks(mgetl('your file')); //read the file and remove the leading and trailing blanks of each line txt(txt=='')=[]; //remove blank lines n=size(txt,1); //the number of lines I=[]; for k=1:n //loop on each line t=tokens(txt(k),"="); //if txt(k) contains something like ASY.Pr.VER = 2.0 the variable t will be equal to ["ASY.Pr.VER","2.0"] if size(t,'*')==2 then //there is an = sign in the line t2=stripblanks(t(2)); if or(part(t2,1)==digits) then //check if the first character of t(2) is a digit //t2 begins with a digit, I assume t2 contains the representation of a number , the associated line is not modified //because ASY.Pr.VER = 2.0 is a valid Scilab instruction I=[I;txt(k)]; else //t2 does not represent a numbe, expression like ASY.Pr.NAME= Samy is not a valid Scilab instrution // (at least is Samy is not a defined variable) //such lines are transformed into ASY.Pr.NAME= "Samy" I=[I;t(1)+"="""+t2+""""]; end else //if txt(k) does not contains an = sign, like ASY.Pr.LOG this does not represent an assignment //such lines are transformed into ASY.Pr.LOG= [] (empty matrix assigned to ASY.Pr.LOG) I=[I;txt(k)+"=[]"]; end end clear ASY //here I contains a sequence of valid Scilab instructions that can be used to defined a struct execstr(I) //evaluate it //here ASY is a struct with one field named Pr and ASY.Pr is a struct ASY.Pr Serge Steer Le 03/01/2013 09:35, samy a ?crit : Hello everyone, i want to read a text file with the following Output: ASY.Pr.VER = 2.0 ASY.Pr.NAME = Samy ASY.Pr.REKE = XY ASY.Pr.LOG and give it as a tlist in scilab for example tlist(['Pr,'VER','NAME','REKE','LOG'],2.0,Samy, XY) it's possible? i have a large file I thank you in advance for any help. -- View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607.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/Dot-Notation-tp4025607p4025609.html To unsubscribe from Dot Notation, click here. NAML View this message in context: RE: Dot Notation 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/Dot-Notation-tp4025607p4025628.html To unsubscribe from Dot Notation, click here. NAML -- View this message in context: http://mailinglists.scilab.org/Dot-Notation-tp4025607p4025630.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pranav8iisc at gmail.com Wed Jan 9 07:59:02 2013 From: pranav8iisc at gmail.com (pranav) Date: Tue, 8 Jan 2013 22:59:02 -0800 (PST) Subject: [Scilab-users] Reference grid in a 3D plot Message-ID: <1357714742580-4025631.post@n3.nabble.com> Hi, I want to plot 3D data with reference grid along all X-Y,Y-Z,X-Z planes. Is there any function for this or i have to create grids on these planes explicitly? -- View this message in context: http://mailinglists.scilab.org/Reference-grid-in-a-3D-plot-tp4025631.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Wed Jan 9 09:05:35 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 09 Jan 2013 09:05:35 +0100 Subject: [Scilab-users] Reference grid in a 3D plot In-Reply-To: <1357714742580-4025631.post@n3.nabble.com> References: <1357714742580-4025631.post@n3.nabble.com> Message-ID: <50ED24CF.5020300@inria.fr> You can use the xgrid function or something like ax=gca(); ax.grid=ones(1,3)*color("lightgray"); Serge Steer Le 09/01/2013 07:59, pranav a ?crit : > Hi, > I want to plot 3D data with reference grid along all X-Y,Y-Z,X-Z planes. > Is there any function for this or i have to create grids on these planes > explicitly? > > > > -- > View this message in context: http://mailinglists.scilab.org/Reference-grid-in-a-3D-plot-tp4025631.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 pranav8iisc at gmail.com Wed Jan 9 10:19:31 2013 From: pranav8iisc at gmail.com (pranav) Date: Wed, 9 Jan 2013 01:19:31 -0800 (PST) Subject: [Scilab-users] Reference grid in a 3D plot In-Reply-To: <50ED24CF.5020300@inria.fr> References: <1357714742580-4025631.post@n3.nabble.com> <50ED24CF.5020300@inria.fr> Message-ID: <1357723171665-4025633.post@n3.nabble.com> Thanks it worked!! -- View this message in context: http://mailinglists.scilab.org/Reference-grid-in-a-3D-plot-tp4025631p4025633.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From samad13 at hotmail.de Wed Jan 9 15:56:04 2013 From: samad13 at hotmail.de (samy) Date: Wed, 9 Jan 2013 06:56:04 -0800 (PST) Subject: [Scilab-users] tlist function Message-ID: <1357743364066-4025634.post@n3.nabble.com> hi everybody, i build in vb.net application from a large xml file a tlist which contains all nodes from xml in form of tlist, because i work with scicoslab and this canot parse a xml file. now i have a problem i will make a function in scilab, when i get for example a output like this: BHCurve=tlist(['BHCurve';'Point';'Point';'Point';'Point';'']); BHCurve.Point=tlist(['Point';'B';'H'],0,0); BHCurve.Point=tlist(['Point';'B';'H'],0.05,32); BHCurve.Point=tlist(['Point';'B';'H'],0.1,55); i want to have all the points information without manipulating the point i try it in vb.net with numbers Point1,Point2 but this is not the very fine solution. thanks -- View this message in context: http://mailinglists.scilab.org/tlist-function-tp4025634.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From serge.steer at inria.fr Wed Jan 9 21:00:33 2013 From: serge.steer at inria.fr (Serge Steer) Date: Wed, 9 Jan 2013 21:00:33 +0100 (CET) Subject: [Scilab-users] tlist function In-Reply-To: <1357743364066-4025634.post@n3.nabble.com> Message-ID: <945960156.24059348.1357761633473.JavaMail.root@inria.fr> ----- Mail original ----- > De: "samy" > ?: users at lists.scilab.org > Envoy?: Mercredi 9 Janvier 2013 15:56:04 > Objet: [Scilab-users] tlist function > > hi everybody, > i build in vb.net application from a large xml file a tlist which > contains > all nodes from xml in form of tlist, because i work with scicoslab > and this > canot parse a xml file. now i have a problem i will make a function > in > scilab, when i get for example a output like this: > BHCurve=tlist(['BHCurve';'Point';'Point';'Point';'Point';'']); > BHCurve.Point=tlist(['Point';'B';'H'],0,0); > BHCurve.Point=tlist(['Point';'B';'H'],0.05,32); > BHCurve.Point=tlist(['Point';'B';'H'],0.1,55); > i want to have all the points information without manipulating the > point i > try it in vb.net with numbers Point1,Point2 but this is not the very > fine > solution. > thanks > A tlist with several equal field names will not work as you expect: when you write BHCurve.Point=xxx there is no reason for Scilab to know it has to change the assigned field is it possible for you to generate something like BHCurve=tlist(['BHCurve';'Points'],mlist(["Points","B","H"],[],[])); BHCurve.Points($+1)=[0 0] BHCurve.Points($+1)=[0.05 32] If yes you can make such a syntax work by defining function P=%s_i_Points(i,v,P) P.B(i)=v(1) P.H(i)=v(2) endfunction Serge Steer > > -- > View this message in context: > http://mailinglists.scilab.org/tlist-function-tp4025634.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 geofyss at gmail.com Wed Jan 9 22:35:01 2013 From: geofyss at gmail.com (constantina) Date: Wed, 9 Jan 2013 13:35:01 -0800 (PST) Subject: [Scilab-users] How replace symbols and letters in a matrix Message-ID: <1357767301918-4025637.post@n3.nabble.com> Hello everyone (first of all, sorry 4 my poor english), im newbie in scilab. Im trying to process data, it includes a header and a matrix with numbers, letters and symbols. I used Data=fscanfMat(flist(file)) to read the matrix without the header; but i can read only the first line (and till the 8 column) then I obtain zeros... i have problems with the symbol * and the letter S. I cant use linux for replace the caracters... The form of the data is: /Gem Systems GSM-19W 2065231 v7.0 12 IX 2011 M ew3fl.v7o /ID 1 file 02survey.wm 04 VII12 / /X Y elevation nT sq cor-nT sat time picket-x picket-y line 000000 0369875.71 7435000.99 000780 23623.80 99 000000.00 08 S 141058.0 0 0 0369875.71 7435000.99 000780 23623.91 99 000000.00 08 S 141058.5 * * 0369875.71 7435000.99 000780 23623.60 99 000000.00 08 S 141059.0 * * 0369875.71 7435000.99 000780 23623.01 99 000000.00 08 S 141059.5 * * 0369875.71 7435000.99 000780 23623.99 99 000000.00 08 S 141100.0 * * I have to replace the S and * for a zero How can I do it??? -- View this message in context: http://mailinglists.scilab.org/How-replace-symbols-and-letters-in-a-matrix-tp4025637.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From ericdoblasargentina at yahoo.com.ar Wed Jan 9 18:57:13 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Wed, 9 Jan 2013 09:57:13 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model Message-ID: <1357754233557-4025635.post@n3.nabble.com> Hello all, I am using Markov Switching Model (MSM) to detect turning points. I can?t use Bry Boschan or Harding Pagan. I must use MSM. I don?t understand the manual?s instructions for Grocer. Specifically, I don?t understand all steps of the routine on grocer. So, I need a routine for MSM on Grocer. Thank you very much who can help me Eric Doblas Argentina This is the data: Date GDP LGDP I 93 216370,1113 12,2847457 II 93 241871,8584 12,39616335 III 93 242645,5224 12,3993569 IV 93 245132,4288 12,40955387 I 94 232945,3257 12,35855905 II 94 257476,8946 12,45868527 III 94 253467,7781 12,44299199 IV 94 257341,5437 12,45815945 I 95 237968,1031 12,37989192 II 95 248093,6393 12,42156153 III 95 242214,6991 12,3975798 IV 95 244467,9646 12,40683956 I 96 236566,0366 12,37398267 II 96 260751,9252 12,47132476 III 96 262166,9638 12,47673685 IV 96 267020,0467 12,49507902 I 97 256387,8567 12,45444664 II 97 281769,8008 12,54884571 III 97 284092,2675 12,55705435 IV 97 287515,3456 12,56903151 I 98 271702,3677 12,51246251 II 98 301207,5978 12,615555 III 98 293315,4036 12,58900377 IV 98 286267,8493 12,56468319 I 99 265024,6359 12,48757807 II 99 286412,3269 12,56518775 III 99 278472,6935 12,53707528 IV 99 283566,3992 12,55520159 I 00 264555,9181 12,48580792 II 00 285275,1759 12,56120952 III 00 276767,971 12,53093478 IV 00 278091,6764 12,53570611 I 01 259199,8739 12,46535476 II 01 284795,7629 12,55952758 III 01 263126,5054 12,4803902 IV 01 248864,5552 12,42466407 I 02 216849,495 12,28695882 II 02 246314,6332 12,41436499 III 02 237416,8668 12,37757281 IV 02 240361,3921 12,38989887 I 03 228595,8824 12,33971102 II 03 265402,4777 12,48900274 III 03 261534,5226 12,47432157 IV 03 268560,9668 12,50083323 I 04 254330,4234 12,44638958 II 04 284375,6106 12,55805122 III 04 284392,0599 12,55810906 IV 04 293467,0606 12,58952068 I 05 274594,5026 12,52305075 II 05 313927,2903 12,65691668 III 05 310593,0805 12,64623891 IV 05 319939,2408 12,67588638 I 06 298695,5617 12,60718015 II 06 338243,7275 12,731522 III 06 337741,8852 12,73003723 IV 06 347578,7074 12,75874641 I 07 322448,8712 12,68369986 II 07 367492,3517 12,81445779 III 07 367538,7276 12,81458397 IV 07 379199,6613 12,84581816 I 08 349945,3229 12,7655322 II 08 396227,2401 12,88974316 III 08 393039,23 12,88166471 IV 08 394564,9401 12,88553902 I 09 357096,4155 12,7857611 II 09 393181,2789 12,88202605 III 09 391678,8883 12,87819762 IV 09 404860,9562 12,91129897 I 10 381221,6341 12,8511362 II 10 439766,5937 12,9939994 III 10 425323,1724 12,96060456 IV 10 442208,8085 12,99953747 I 11 419023,1666 12,94568149 II 11 479963,6782 13,08146571 III 11 464882,753 13,04954051 IV 11 474414,821 13,06983737 I 12 440884,2806 12,99653772 -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Thu Jan 10 09:30:18 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 10 Jan 2013 09:30:18 +0100 Subject: [Scilab-users] How replace symbols and letters in a matrix In-Reply-To: <1357767301918-4025637.post@n3.nabble.com> References: <1357767301918-4025637.post@n3.nabble.com> Message-ID: <50EE7C1A.7070400@inria.fr> You can substitute the "*" using Scilab t=mgetl('your file'); t=strsubst(strsubst(t," *" ," 0 ")," S "," 0 ") Le 09/01/2013 22:35, constantina a ?crit : mputl(t,'your file') Serge Steer > Hello everyone (first of all, sorry 4 my poor english), im newbie in scilab. > Im trying to process data, it includes a header and a matrix with numbers, > letters and symbols. I used Data=fscanfMat(flist(file)) to read the matrix > without the header; but i can read only the first line (and till the 8 > column) then I obtain zeros... i have problems with the symbol * and the > letter S. I cant use linux for replace the caracters... The form of the > data is: > > /Gem Systems GSM-19W 2065231 v7.0 12 IX 2011 M ew3fl.v7o > /ID 1 file 02survey.wm 04 VII12 > / > /X Y elevation nT sq cor-nT sat time picket-x picket-y > line 000000 > 0369875.71 7435000.99 000780 23623.80 99 000000.00 08 S 141058.0 0 0 > 0369875.71 7435000.99 000780 23623.91 99 000000.00 08 S 141058.5 * * > 0369875.71 7435000.99 000780 23623.60 99 000000.00 08 S 141059.0 * * > 0369875.71 7435000.99 000780 23623.01 99 000000.00 08 S 141059.5 * * > 0369875.71 7435000.99 000780 23623.99 99 000000.00 08 S 141100.0 * * > > I have to replace the S and * for a zero > How can I do it??? > > > > > > -- > View this message in context: http://mailinglists.scilab.org/How-replace-symbols-and-letters-in-a-matrix-tp4025637.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 grocer.toolbox at gmail.com Thu Jan 10 09:52:25 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Thu, 10 Jan 2013 09:52:25 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357754233557-4025635.post@n3.nabble.com> References: <1357754233557-4025635.post@n3.nabble.com> Message-ID: Dear Eric. Could be more precise on the model you want to estimate? (The term "Markov-switching model" is a generic one: you have to define the law of your data under the regimes as well as the number of regimes you want to estimate). Anyway, there is another Scilab toolbox performing Markov-switching models (HMM), but it does not seem to be maintained. And I think you will not find other Scilab ressources corresponding to this kind of models. ?ric. 2013/1/9 ericdoblas > Hello all, > > I am using Markov Switching Model (MSM) to detect turning points. I can?t > use Bry Boschan or Harding Pagan. I must use MSM. I don?t understand the > manual?s instructions for Grocer. Specifically, I don?t understand all > steps > of the routine on grocer. So, I need a routine for MSM on Grocer. > > Thank you very much who can help me > Eric Doblas > Argentina > > > This is the data: > > Date GDP LGDP > I 93 216370,1113 12,2847457 > II 93 241871,8584 12,39616335 > III 93 242645,5224 12,3993569 > IV 93 245132,4288 12,40955387 > I 94 232945,3257 12,35855905 > II 94 257476,8946 12,45868527 > III 94 253467,7781 12,44299199 > IV 94 257341,5437 12,45815945 > I 95 237968,1031 12,37989192 > II 95 248093,6393 12,42156153 > III 95 242214,6991 12,3975798 > IV 95 244467,9646 12,40683956 > I 96 236566,0366 12,37398267 > II 96 260751,9252 12,47132476 > III 96 262166,9638 12,47673685 > IV 96 267020,0467 12,49507902 > I 97 256387,8567 12,45444664 > II 97 281769,8008 12,54884571 > III 97 284092,2675 12,55705435 > IV 97 287515,3456 12,56903151 > I 98 271702,3677 12,51246251 > II 98 301207,5978 12,615555 > III 98 293315,4036 12,58900377 > IV 98 286267,8493 12,56468319 > I 99 265024,6359 12,48757807 > II 99 286412,3269 12,56518775 > III 99 278472,6935 12,53707528 > IV 99 283566,3992 12,55520159 > I 00 264555,9181 12,48580792 > II 00 285275,1759 12,56120952 > III 00 276767,971 12,53093478 > IV 00 278091,6764 12,53570611 > I 01 259199,8739 12,46535476 > II 01 284795,7629 12,55952758 > III 01 263126,5054 12,4803902 > IV 01 248864,5552 12,42466407 > I 02 216849,495 12,28695882 > II 02 246314,6332 12,41436499 > III 02 237416,8668 12,37757281 > IV 02 240361,3921 12,38989887 > I 03 228595,8824 12,33971102 > II 03 265402,4777 12,48900274 > III 03 261534,5226 12,47432157 > IV 03 268560,9668 12,50083323 > I 04 254330,4234 12,44638958 > II 04 284375,6106 12,55805122 > III 04 284392,0599 12,55810906 > IV 04 293467,0606 12,58952068 > I 05 274594,5026 12,52305075 > II 05 313927,2903 12,65691668 > III 05 310593,0805 12,64623891 > IV 05 319939,2408 12,67588638 > I 06 298695,5617 12,60718015 > II 06 338243,7275 12,731522 > III 06 337741,8852 12,73003723 > IV 06 347578,7074 12,75874641 > I 07 322448,8712 12,68369986 > II 07 367492,3517 12,81445779 > III 07 367538,7276 12,81458397 > IV 07 379199,6613 12,84581816 > I 08 349945,3229 12,7655322 > II 08 396227,2401 12,88974316 > III 08 393039,23 12,88166471 > IV 08 394564,9401 12,88553902 > I 09 357096,4155 12,7857611 > II 09 393181,2789 12,88202605 > III 09 391678,8883 12,87819762 > IV 09 404860,9562 12,91129897 > I 10 381221,6341 12,8511362 > II 10 439766,5937 12,9939994 > III 10 425323,1724 12,96060456 > IV 10 442208,8085 12,99953747 > I 11 419023,1666 12,94568149 > II 11 479963,6782 13,08146571 > III 11 464882,753 13,04954051 > IV 11 474414,821 13,06983737 > I 12 440884,2806 12,99653772 > > > > -- > View this message in context: > http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635.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 vogt at centre-cired.fr Thu Jan 10 12:28:03 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Thu, 10 Jan 2013 12:28:03 +0100 Subject: [Scilab-users] How replace symbols and letters in a matrix In-Reply-To: <50EE7C1A.7070400@inria.fr> References: <1357767301918-4025637.post@n3.nabble.com> <50EE7C1A.7070400@inria.fr> Message-ID: <50EEA5C3.8040304@centre-cired.fr> You can also have a look at help csv_read which as an optional argument "substitute" designes for these type of cases I believe On 10/01/2013 09:30, Serge Steer wrote: > You can substitute the "*" using Scilab > t=mgetl('your file'); > t=strsubst(strsubst(t," *" ," 0 ")," S "," 0 ") > Le 09/01/2013 22:35, constantina a ?crit : > mputl(t,'your file') > > Serge Steer >> Hello everyone (first of all, sorry 4 my poor english), im newbie in >> scilab. >> Im trying to process data, it includes a header and a matrix with >> numbers, >> letters and symbols. I used Data=fscanfMat(flist(file)) to read the >> matrix >> without the header; but i can read only the first line (and till the 8 >> column) then I obtain zeros... i have problems with the symbol * and the >> letter S. I cant use linux for replace the caracters... The form of the >> data is: >> >> /Gem Systems GSM-19W 2065231 v7.0 12 IX 2011 M ew3fl.v7o >> /ID 1 file 02survey.wm 04 VII12 >> / >> /X Y elevation nT sq cor-nT sat time picket-x picket-y >> line 000000 >> 0369875.71 7435000.99 000780 23623.80 99 000000.00 08 S 141058.0 0 0 >> 0369875.71 7435000.99 000780 23623.91 99 000000.00 08 S 141058.5 * * >> 0369875.71 7435000.99 000780 23623.60 99 000000.00 08 S 141059.0 * * >> 0369875.71 7435000.99 000780 23623.01 99 000000.00 08 S 141059.5 * * >> 0369875.71 7435000.99 000780 23623.99 99 000000.00 08 S 141100.0 * * >> >> I have to replace the S and * for a zero >> How can I do it??? >> >> >> >> >> >> -- >> View this message in context: >> http://mailinglists.scilab.org/How-replace-symbols-and-letters-in-a-matrix-tp4025637.html >> Sent from the Scilab users - Mailing Lists Archives mailing list >> archive at Nabble.com. >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ericdoblasargentina at yahoo.com.ar Thu Jan 10 13:35:51 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Thu, 10 Jan 2013 04:35:51 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357754233557-4025635.post@n3.nabble.com> Message-ID: <1357821351653-4025642.post@n3.nabble.com> Dear ?ric, Thank you for your answer. Specifically, I need estimate a MSM as in Hamilton (1989), as follows: (page 7). Thank you very much! Greetings from Argentina! Eric Doblas -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025642.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grocer.toolbox at gmail.com Thu Jan 10 14:12:08 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Thu, 10 Jan 2013 14:12:08 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357821351653-4025642.post@n3.nabble.com> References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> Message-ID: Sorry, but maybe you could be a little bit more explicit: I have not the paper immediately available and Hamilton (1989) page 7 does not as such speak very much... ?ric. 2013/1/10 ericdoblas > Dear ?ric, > > Thank you for your answer. Specifically, I need estimate a MSM as in > Hamilton (1989), as follows: > > (page 7). > > Thank you very much! > > Greetings from Argentina! > > Eric Doblas > > > > -- > View this message in context: > http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025642.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 geofyss at gmail.com Thu Jan 10 14:50:31 2013 From: geofyss at gmail.com (constantina) Date: Thu, 10 Jan 2013 05:50:31 -0800 (PST) Subject: [Scilab-users] How replace symbols and letters in a matrix In-Reply-To: <50EE7C1A.7070400@inria.fr> References: <1357767301918-4025637.post@n3.nabble.com> <50EE7C1A.7070400@inria.fr> Message-ID: <1357825831921-4025644.post@n3.nabble.com> Thank u so much Serge it works perfect! but i used an specific file , I have to program an "authomatic" process, and and have some doubts , if you could help me would be awesome: ========================================================================== stacksize('max'); clf;clear; ieee(2); // //READ DATA exedir=pwd(); // path=tk_getdir(title='Select your folder with .txt files'); chdir(path); fpath=strcat(path+"/*.txt"); flist=listfiles(fpath); nf=max(size(flist)); for ii=1:nf; d(1:2,ii)=strsplit(flist(ii),length(fpath)-5); dflist(ii)=d(2,ii); end; rep=x_choose(dflist,'Select your file'); In this part the program fails *t=mgetl('rep'); t=strsubst(strsubst(t," *" ," 0 ")," S "," 0 ") mputl(t,'rep') Data=fscanfMat('rep') * If you could help me Ill be so thankful! Constantina -- View this message in context: http://mailinglists.scilab.org/How-replace-symbols-and-letters-in-a-matrix-tp4025637p4025644.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From ericdoblasargentina at yahoo.com.ar Thu Jan 10 15:01:47 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Thu, 10 Jan 2013 06:01:47 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> Message-ID: <1357826507167-4025645.post@n3.nabble.com> That?s ok ?ric. Thank you! I will try to be more specific. In the chapter 23 (Grocer?s Manual) you wrote about MSM. I need estimate the most general model (ms_reg) and the two particulars cases: ms_mean and ms_var, for data sent in the first mail... Excuse me if the consultation is very elemental, but recently I am starting with Grocer MSM. I think that is a excellent tool for Scilab. Rigth now, I am investing time to learn . Thank you very much! Eric Doblas CONICET - Argentina -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025645.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grocer.toolbox at gmail.com Thu Jan 10 17:59:50 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Thu, 10 Jan 2013 17:59:50 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357826507167-4025645.post@n3.nabble.com> References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> Message-ID: Dear Eric. I have done my best to make Grocer ms programs use easy (help files, manual and demos: did you have a look at the ms_reg_d.sci, ms_var_d.sci demos?). So tell me what you do not understand? ?ric. 2013/1/10 ericdoblas > That?s ok ?ric. Thank you! > > I will try to be more specific. In the chapter 23 (Grocer?s Manual) you > wrote about MSM. I need estimate the most general model (ms_reg) and the > two > particulars cases: ms_mean and ms_var, for data sent in the first mail... > > Excuse me if the consultation is very elemental, but recently I am starting > with Grocer MSM. I think that is a excellent tool for Scilab. Rigth now, I > am investing time to learn . > > Thank you very much! > > Eric Doblas > CONICET - Argentina > > > > -- > View this message in context: > http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025645.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 ericdoblasargentina at yahoo.com.ar Thu Jan 10 22:29:18 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Thu, 10 Jan 2013 13:29:18 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> Message-ID: <1357853358677-4025647.post@n3.nabble.com> Dear ?ric, Thank you so much! Any doubts, I will write again. Best regards Eric Doblas -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025647.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From serge.steer at inria.fr Thu Jan 10 23:18:00 2013 From: serge.steer at inria.fr (Serge Steer) Date: Thu, 10 Jan 2013 23:18:00 +0100 (CET) Subject: [Scilab-users] How replace symbols and letters in a matrix In-Reply-To: <1357825831921-4025644.post@n3.nabble.com> Message-ID: <1356286256.24475570.1357856280135.JavaMail.root@inria.fr> ----- Mail original ----- > De: "constantina" > ?: users at lists.scilab.org > Envoy?: Jeudi 10 Janvier 2013 14:50:31 > Objet: Re: [Scilab-users] How replace symbols and letters in a matrix > > Thank u so much Serge it works perfect! but i used an specific file , > I have > to program an "authomatic" process, and and have some doubts , if you > could > help me would be awesome: > > ========================================================================== > > stacksize('max'); > clf;clear; > ieee(2); > // > > //READ DATA > > exedir=pwd(); > // > path=tk_getdir(title='Select your folder with .txt files'); > chdir(path); > fpath=strcat(path+"/*.txt"); > flist=listfiles(fpath); > nf=max(size(flist)); > for ii=1:nf; > d(1:2,ii)=strsplit(flist(ii),length(fpath)-5); > dflist(ii)=d(2,ii); > end; > rep=x_choose(dflist,'Select your file'); > > In this part the program fails > > *t=mgetl('rep'); > t=strsubst(strsubst(t," *" ," 0 ")," S "," 0 ") > mputl(t,'rep') > Data=fscanfMat('rep') > You should use dflist(rep) (without quotes) because rep is the index of the selected file fpath=dflist(rep) t=mgetl(fpath); t=strsubst(strsubst(t," *" ," 0 ")," S "," 0 "); mputl(t,fpath) Data=fscanfMat(fpath) > * > > > > If you could help me Ill be so thankful! > > Constantina > > > > -- > View this message in context: > http://mailinglists.scilab.org/How-replace-symbols-and-letters-in-a-matrix-tp4025637p4025644.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 ericdoblasargentina at yahoo.com.ar Thu Jan 10 23:29:34 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Thu, 10 Jan 2013 14:29:34 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> Message-ID: <1357856974308-4025649.post@n3.nabble.com> Dear ?ric, The following information is in you example, but I have a lot of doubts, for exmple: ----- How to load the data? ----- How indicate it is MSM? I hope you can help me!! Thank you very much! Eric Doblas function [bcp,bct] = turnpoints(y,k) // PURPOSE: rough selection of peaks and troughs indexes //--------------------------------------------------------------------- // INPUT: // . y = vector of data // . k = x(t-i)>x(t) & x(t+i)>x(t), i=1:k defines a trough at t // x(t-i)y(i-1))"; s_do = "(y(i)y(i-%d))",step),'+'); s_do = joinstr(s_do,msprintf("&(y(i)y(i+%d))",step),'+'); s_do = joinstr(s_do,msprintf("&(y(i)0)'; // selects indexes such that a peak occurs // ------------------------------------------ // III. Defines troughs // ------------------------------------------ v = zeros(T,n); // reinitializes v for i = k+1:T-k if evstr(s_do) then v(i) = 1 ; end; end; bct = find(v>0)'; // selects indexes such that a trough occurs endfunction -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025649.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From ericdoblasargentina at yahoo.com.ar Thu Jan 10 23:52:39 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Thu, 10 Jan 2013 14:52:39 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357856974308-4025649.post@n3.nabble.com> References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> Message-ID: <1357858359085-4025650.post@n3.nabble.com> function r=ms_reg_d() global GROCERDIR; // demo of ms_reg I sorry ?ric, this is the routine. How I can conditioning the var-cov matrix?? Thank you!! Eric load(GROCERDIR+'\data\us_revu.dat') bounds('1967m4','2004m2') nb_states=2 switch_var=2 // variances are switching var_opt=3 // unrestricted var-cov matrix r=ms_reg('100*(log(us_revu)-lagts(2,log(us_revu)))',['100*(lagts(1,log(us_revu))-lagts(3,log(us_revu)))';... '100*(lagts(2,log(us_revu))-lagts(4,log(us_revu)))';'100*(lagts(3,log(us_revu))-lagts(5,log(us_revu)))'],'cte',nb_states,switch_var,var_opt,'transf=stud',... 'prt=initial;final') endfunction -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025650.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grocer.toolbox at gmail.com Fri Jan 11 09:17:22 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Fri, 11 Jan 2013 09:17:22 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357856974308-4025649.post@n3.nabble.com> References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> Message-ID: To load data, you have many solutions. For time series I recommend to store your data in a .txt file, transform the dates in a suitable format (that is 1993q1, 1993q2, etc.), set the name of the corresponding column to "dates" and use impexc2bd (see impexc2bd). And have a look at chapter 5 of the manual (as well as chapters 1, 2 and 3 which can also be helpful before starting any econometric estimation). For the second question, using one of the functions ms_var, ms_reg or ms_mean indicates that you are estimating a Markov-switching model: there rare not other steps inovolved! Lastly, I do not understand what you mean by "conditioning the var-cov matrix"; if by this, you mean that the var-cov matrix is different according to the state of the economy, then give as 3rd argument of function ms_mean of 5th argument of function ms_reg the number of states you assumes the economy can experience (this is what is done in the example provided in ms_reg_d() with the instruction :"switch_var=2 // variances are switching"). ?ric. PS : turnpoints is a subroutine used by the brybos program, therefore not relevant for Markov-switching estimation 2013/1/10 ericdoblas > Dear ?ric, > > The following information is in you example, but I have a lot of doubts, > for exmple: > > > ----- How to load the data? > ----- How indicate it is MSM? > > > I hope you can help me!! > > Thank you very much! > > Eric Doblas > > > function [bcp,bct] = turnpoints(y,k) > > // PURPOSE: rough selection of peaks and troughs indexes > //--------------------------------------------------------------------- > // INPUT: > // . y = vector of data > // . k = x(t-i)>x(t) & x(t+i)>x(t), i=1:k defines a trough at t > // x(t-i) //--------------------------------------------------------------------- > // OUTPUTS : > // . bcp = vector of peak indexes > // . bct = vector of trough indexes > //--------------------------------------------------------------------- > // Translated to Scilab by E. Michaux (2005) > // from Julien Matheron > // Banque de France, centre de recherche, sept. 2002 > > [T,n] = size(y); > if T y = y'; > [T,n] = size(y); > end; > v = zeros(T,n); > > // ------------------------------------------ > // I. Defines the k-dependent logical > // argument of the following "if-loops" > // ------------------------------------------ > > s_up = "(y(i)>y(i-1))"; > s_do = "(y(i) > for step = 2:k; > s_up = joinstr(s_up,msprintf("&(y(i)>y(i-%d))",step),'+'); > s_do = joinstr(s_do,msprintf("&(y(i) end; > > for step=1:k > s_up = joinstr(s_up,msprintf("&(y(i)>y(i+%d))",step),'+'); > s_do = joinstr(s_do,msprintf("&(y(i) end; > > > // ------------------------------------------ > // II. Defines peaks > // ------------------------------------------ > > for i = k+1:T-k ; > if evstr(s_up) then > v(i) = 1; > end; > end > bcp = find(v>0)'; // selects indexes such that a peak occurs > > // ------------------------------------------ > // III. Defines troughs > // ------------------------------------------ > > v = zeros(T,n); // reinitializes v > > for i = k+1:T-k > if evstr(s_do) then > v(i) = 1 ; > end; > end; > bct = find(v>0)'; // selects indexes such that a trough occurs > endfunction > > > > > -- > View this message in context: > http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025649.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 ericdoblasargentina at yahoo.com.ar Fri Jan 11 12:43:55 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Fri, 11 Jan 2013 03:43:55 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> Message-ID: <1357904635535-4025653.post@n3.nabble.com> Thank you ?ric! Tha last consulting: Could you give me a example (or routine) to load my data (the first mail)? Best Regards Eric Doblas -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025653.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grocer.toolbox at gmail.com Fri Jan 11 13:38:18 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Fri, 11 Jan 2013 13:38:18 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357904635535-4025653.post@n3.nabble.com> References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> Message-ID: Take the file transformed as joined, store it say in folder c:/gdp and run unde scilab -->impexc2bd('c:\gdp\exemple.txt',';','c:\gdp\exemple.dat') and do not forget to load the database: --> load('c:\gdp\exemple.dat') and run: -->GDP ?ric. 2013/1/11 ericdoblas > Thank you ?ric! > > Tha last consulting: Could you give me a example (or routine) to load my > data (the first mail)? > > Best Regards > > Eric Doblas > > > > > -- > View this message in context: > http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025653.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: -------------- next part -------------- dates;GDP;LGDP 1993Q1;216370.1113;12.2847457 1993Q2;241871.8584;12.39616335 1993Q3;242645.5224;12.3993569 1993Q4;245132.4288;12.40955387 1994Q1;232945.3257;12.35855905 1994Q2;257476.8946;12.45868527 1994Q3;253467.7781;12.44299199 1994Q4;257341.5437;12.45815945 1995Q1;237968.1031;12.37989192 1995Q2;248093.6393;12.42156153 1995Q3;242214.6991;12.3975798 1995Q4;244467.9646;12.40683956 1996Q1;236566.0366;12.37398267 1996Q2;260751.9252;12.47132476 1996Q3;262166.9638;12.47673685 1996Q4;267020.0467;12.49507902 1997Q1;256387.8567;12.45444664 1997Q2;281769.8008;12.54884571 1997Q3;284092.2675;12.55705435 1997Q4;287515.3456;12.56903151 1998Q1;271702.3677;12.51246251 1998Q2;301207.5978;12.615555 1998Q3;293315.4036;12.58900377 1998Q4;286267.8493;12.56468319 1999Q1;265024.6359;12.48757807 1999Q2;286412.3269;12.56518775 1999Q3;278472.6935;12.53707528 1999Q4;283566.3992;12.55520159 2000Q1;264555.9181;12.48580792 2000Q2;285275.1759;12.56120952 2000Q3;276767.971;12.53093478 2000Q4;278091.6764;12.53570611 2001Q1;259199.8739;12.46535476 2001Q2;284795.7629;12.55952758 2001Q3;263126.5054;12.4803902 2001Q4;248864.5552;12.42466407 2002Q1;216849.495;12.28695882 2002Q2;246314.6332;12.41436499 2002Q3;237416.8668;12.37757281 2002Q4;240361.3921;12.38989887 2003Q1;228595.8824;12.33971102 2003Q2;265402.4777;12.48900274 2003Q3;261534.5226;12.47432157 2003Q4;268560.9668;12.50083323 2004Q1;254330.4234;12.44638958 2004Q2;284375.6106;12.55805122 2004Q3;284392.0599;12.55810906 2004Q4;293467.0606;12.58952068 2005Q1;274594.5026;12.52305075 2005Q2;313927.2903;12.65691668 2005Q3;310593.0805;12.64623891 2005Q4;319939.2408;12.67588638 2006Q1;298695.5617;12.60718015 2006Q2;338243.7275;12.731522 2006Q3;337741.8852;12.73003723 2006Q4;347578.7074;12.75874641 2007Q1;322448.8712;12.68369986 2007Q2;367492.3517;12.81445779 2007Q3;367538.7276;12.81458397 2007Q4;379199.6613;12.84581816 2008Q1;349945.3229;12.7655322 2008Q2;396227.2401;12.88974316 2008Q3;393039.23;12.88166471 2008Q4;394564.9401;12.88553902 2009Q1;357096.4155;12.7857611 2009Q2;393181.2789;12.88202605 2009Q3;391678.8883;12.87819762 2009Q4;404860.9562;12.91129897 2010Q1;381221.6341;12.8511362 2010Q2;439766.5937;12.9939994 2010Q3;425323.1724;12.96060456 2010Q4;442208.8085;12.99953747 2011Q1;419023.1666;12.94568149 2011Q2;479963.6782;13.08146571 2011Q3;464882.753;13.04954051 2011Q4;474414.821;13.06983737 2012Q1;440884.2806;12.99653772 From geofyss at gmail.com Fri Jan 11 13:59:29 2013 From: geofyss at gmail.com (constantina) Date: Fri, 11 Jan 2013 04:59:29 -0800 (PST) Subject: [Scilab-users] How replace symbols and letters in a matrix In-Reply-To: <1356286256.24475570.1357856280135.JavaMail.root@inria.fr> References: <1357767301918-4025637.post@n3.nabble.com> <50EE7C1A.7070400@inria.fr> <1357825831921-4025644.post@n3.nabble.com> <1356286256.24475570.1357856280135.JavaMail.root@inria.fr> Message-ID: <1357909169903-4025655.post@n3.nabble.com> Thank u so much again. It worked perfect!!!! -- View this message in context: http://mailinglists.scilab.org/How-replace-symbols-and-letters-in-a-matrix-tp4025637p4025655.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From ericdoblasargentina at yahoo.com.ar Fri Jan 11 14:25:58 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Fri, 11 Jan 2013 05:25:58 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> Message-ID: <1357910758853-4025656.post@n3.nabble.com> Hello ?ric, I need only one step, because I was able to replicate your example. I can load the data: "Dates;LnPBI" "1993q1;12,2847456986185" "1993q2;12,3961633542544" "1993q3;12,3993569016157" .............................. so on............. Then, I used impexc2bd, and after that, I loaded .dat file. But, I can?t run LnPBI. Thank you! Eric -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025656.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jaqueline_molina at msn.com Fri Jan 11 14:57:32 2013 From: jaqueline_molina at msn.com (Jaquelineanbarr) Date: Fri, 11 Jan 2013 05:57:32 -0800 (PST) Subject: [Scilab-users] "Re-sampling" data and making 2 vectors Message-ID: <1357912652046-4025657.post@n3.nabble.com> Hello, Im working with matrices with different samplings. First data //time Temp sq *091532.0 23220.37 96 * 091535.0 23221.34 95 091538.0 23220.64 95 Second data //X Y elevation Tem sq corrTem sat time massx mssy line 0375716.06 7436112.26 001179 22837.15 99 000000.00 10 135924.5 0 0 0375716.06 7436112.24 001179 22834.21 99 000000.00 10 135925.0 0 0 0375716.06 7436112.23 001179 22834.92 99 000000.00 10 135925.5 0 0 0375716.06 7436112.23 001179 22833.72 99 000000.00 10 135926.0 0 0 0375716.05 7436112.23 001179 22834.02 99 000000.00 10 135926.5 0 0 0375716.05 7436112.22 001179 22833.26 99 000000.00 10 135927.0 0 0 0375716.09 7436112.27 001179 22822.27 99 000000.00 10 135927.5 0 0 0375716.21 7436112.44 001179 22798.54 99 000000.00 10 135928.0 0 0 (is not the complete data, is an example) My problem is data1 is longer than data2. With data 1 i have one value of temperature each 3 seconds, meanwhile in data 2 I have one value of temperature each half second. I have to "cut" the matrixes, they should have the same lenght (because I need Data2-(Data1-mean(Data1)) , and starts at the comun hour. I dont know how do it, Any suggest? The format of the time is for example 072301 (07:23:01) -- View this message in context: http://mailinglists.scilab.org/Re-sampling-data-and-making-2-vectors-tp4025657.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grocer.toolbox at gmail.com Fri Jan 11 15:41:59 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Fri, 11 Jan 2013 15:41:59 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357910758853-4025656.post@n3.nabble.com> References: <1357754233557-4025635.post@n3.nabble.com> <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> <1357910758853-4025656.post@n3.nabble.com> Message-ID: What if you change the comma in your file into a dot (the dot is the decimal separator in Scilab)? ?ric. PS: 1) if you use the file I have sent to you, then LPIB is equivalent to LnPBI you want to load into Scilab 2) and log(GDP) too! 2013/1/11 ericdoblas > Hello ?ric, > > I need only one step, because I was able to replicate your example. > > I can load the data: > > "Dates;LnPBI" > "1993q1;12,2847456986185" > "1993q2;12,3961633542544" > "1993q3;12,3993569016157" .............................. so on............. > > Then, I used impexc2bd, and after that, I loaded .dat file. But, I can?t > run > LnPBI. > > Thank you! > > Eric > > > > -- > View this message in context: > http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025656.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 ericdoblasargentina at yahoo.com.ar Fri Jan 11 16:06:37 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Fri, 11 Jan 2013 07:06:37 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> <1357910758853-4025656.post@n3.nabble.com> Message-ID: <1357916797292-4025659.post@n3.nabble.com> Dear ?ric, I appreciate your great help. I can load the data!! I just need the last step. When I run r=ms_reg('100*lpbi-lagts(2,lpbi))','['100*(lagts(1,lpbi)-lagts(3,lpbi))';'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud','prt=initial;final') I have !--error 276 Falta operador, coma o punto y coma. (English: missing operator, comma or dot and comma) Thank you! Best regards Eric -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025659.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Fri Jan 11 16:10:59 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 11 Jan 2013 16:10:59 +0100 Subject: [Scilab-users] "Re-sampling" data and making 2 vectors In-Reply-To: <1357912652046-4025657.post@n3.nabble.com> References: <1357912652046-4025657.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1061EDB32@301EX00100.sidel.com> Hello Jacqueline, > I have to "cut" the matrixes, they should have the same lenght (because > I need Data2-(Data1-mean(Data1)) , and starts at the comun hour. I dont > know how do it, Any suggest? Do you have a problem with the resampling algorithm or with the data handling? Concerning the algorithm, I suggest you perform a kind of Savitzky-Golay smoothing of the biggest matrix : 1- define a, say 3rd degree polynomial by regression on a sliding of 5 points (must be an odd number), 2- keep the value of the polynomial corresponding to the data in the 1st matrix that lay in the sliding window. You cannot use the Savitzky-Golay convolution coefficients, as you are not necessarilly interested in the middle value. You can have an example of implementation here http://commons.wikimedia.org/wiki/File:Savitzky-golay_pic_gaussien_bruite.svg (look at the last solution; the first one uses the convolution coefficients). Hope this helps. -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From webadmin at scilab.org Fri Jan 11 16:12:04 2013 From: webadmin at scilab.org (Web Admin) Date: Fri, 11 Jan 2013 16:12:04 +0100 Subject: [Scilab-users] Maintenance information Message-ID: <50F02BC4.50308@scilab.org> Dear Scilab users, Due to maintenance processes, our servers won't be available for an undefined period of time on monday the 14th in the morning (GMT +1). Please accept our apologies for the inconvenience, Best regards, The Scilab Team From ericdoblasargentina at yahoo.com.ar Fri Jan 11 16:14:53 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Fri, 11 Jan 2013 07:14:53 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357916797292-4025659.post@n3.nabble.com> References: <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> <1357910758853-4025656.post@n3.nabble.com> <1357916797292-4025659.post@n3.nabble.com> Message-ID: <1357917293399-4025666.post@n3.nabble.com> Dear ?ric, I can solve all Thank you so much for your help, and thank you for Grocer!!! It?s a fantastic toolbox!! Best regards from Argentina Eric Doblas -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025666.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From denis.crete at thalesgroup.com Fri Jan 11 16:20:46 2013 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Fri, 11 Jan 2013 16:20:46 +0100 Subject: [Scilab-users] "Re-sampling" data and making 2 vectors In-Reply-To: <1357912652046-4025657.post@n3.nabble.com> References: <1357912652046-4025657.post@n3.nabble.com> Message-ID: <12301_1357917639_50F02DC7_12301_5463_1_908CBC9017354841B2F32BBEC70A05A101C387487E2C@THSONEA01CMS01P.one.grp> Hello, If I understand correctly, this should do the job // select rows corresponding at the same (exact) time in col 1 for Data1 and col.8 for Data2 [v,k1,k2]=intersect(Data1(:,1), Data2(:,8)); // Extract the desired values of temperature (in col. 2 for Data1 and col. 4 for Data2) Temp1=Data1(k1,2); Temp2=Data2(k2,4); Disp([v,Temp1,Temp2,Temp2-(Temp1-mean(Temp1))]); // (or mean(Data1), up to you) It is also possible to interpolate the values of Data2 for the time values in Data1(:,1) with interp1 (cf. Scilab help) HTH Denis -----Message d'origine----- De?: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Jaquelineanbarr Envoy??: vendredi 11 janvier 2013 14:58 ??: users at lists.scilab.org Objet?: [Scilab-users] "Re-sampling" data and making 2 vectors Hello, Im working with matrices with different samplings. First data //time Temp sq 091532.0 23220.37 96 091535.0 23221.34 95 091538.0 23220.64 95 Second data //X Y elevation Tem sq corrTem sat time massx mssy line 0375716.06 7436112.26 001179 22837.15 99 000000.00 10 135924.5 0 0 0375716.06 7436112.24 001179 22834.21 99 000000.00 10 135925.0 0 0 0375716.06 7436112.23 001179 22834.92 99 000000.00 10 135925.5 0 0 0375716.06 7436112.23 001179 22833.72 99 000000.00 10 135926.0 0 0 0375716.05 7436112.23 001179 22834.02 99 000000.00 10 135926.5 0 0 0375716.05 7436112.22 001179 22833.26 99 000000.00 10 135927.0 0 0 0375716.09 7436112.27 001179 22822.27 99 000000.00 10 135927.5 0 0 0375716.21 7436112.44 001179 22798.54 99 000000.00 10 135928.0 0 0 (is not the complete data, is an example) My problem is data1 is longer than data2. With data 1 i have one value of temperature each 3 seconds, meanwhile in data 2 I have one value of temperature each half second. I have to "cut" the matrixes, they should have the same lenght (because I need Data2-(Data1-mean(Data1)) , and starts at the comun hour. I dont know how do it, Any suggest? The format of the time is for example 072301 (07:23:01) -- View this message in context: http://mailinglists.scilab.org/Re-sampling-data-and-making-2-vectors-tp4025657.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 grocer.toolbox at gmail.com Fri Jan 11 16:39:36 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Fri, 11 Jan 2013 16:39:36 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: <1357916797292-4025659.post@n3.nabble.com> References: <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> <1357910758853-4025656.post@n3.nabble.com> <1357916797292-4025659.post@n3.nabble.com> Message-ID: try: -->r=ms_reg('100*lpbi-lagts(2,lpbi)',['100*(lagts(1,lpbi)-lagts(3,lpbi))';'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud','prt=initial;final') (you had 2 typos in your command) ?ric. 2013/1/11 ericdoblas > > r=ms_reg('100*lpbi-lagts(2,lpbi))','['100*(lagts(1,lpbi)-lagts(3,lpbi))';'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud','prt=initial;final') > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Jan 11 17:06:50 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 11 Jan 2013 17:06:50 +0100 Subject: [Scilab-users] "Re-sampling" data and making 2 vectors In-Reply-To: <12301_1357917639_50F02DC7_12301_5463_1_908CBC9017354841B2F32BBEC70A05A101C387487E2C@THSONEA01CMS01P.one.grp> References: <1357912652046-4025657.post@n3.nabble.com> <12301_1357917639_50F02DC7_12301_5463_1_908CBC9017354841B2F32BBEC70A05A101C387487E2C@THSONEA01CMS01P.one.grp> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1061EDBFA@301EX00100.sidel.com> Hello Denis > intersect(Data1(:,1)) with this solution, you loose the information. > It is also possible to interpolate the values of Data2 for the time > values in Data1(:,1) with interp1 I'm not familiar with this function, and have a question about the way it works. I have the feeling that it creates polynomial arcs (splines) that goes through all the data points, am I right? If yes, then it is sensitive to noise. Is there a function that does a smoothing on several data points so you can reduce the noise? Best regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From grocer.toolbox at gmail.com Fri Jan 11 17:19:54 2013 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Fri, 11 Jan 2013 17:19:54 +0100 Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357821351653-4025642.post@n3.nabble.com> <1357826507167-4025645.post@n3.nabble.com> <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> <1357910758853-4025656.post@n3.nabble.com> <1357916797292-4025659.post@n3.nabble.com> Message-ID: Correction: what I propose is correct from a syntaxical point a view but nonsensical from an economic one. Run rather: --> r=ms_reg('100*(lpbi-lagts(2,lpbi))',['100*(lagts(1,lpbi)-lagts(3,lpbi))';'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud','prt=initial;final') ?ric. 2013/1/11 Eric Dubois > try: > > -->r=ms_reg('100*lpbi-lagts(2,lpbi)',['100*(lagts(1,lpbi)-lagts(3,lpbi))';'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud','prt=initial;final') > > (you had 2 typos in your command) > > ?ric. > > 2013/1/11 ericdoblas > >> >> r=ms_reg('100*lpbi-lagts(2,lpbi))','['100*(lagts(1,lpbi)-lagts(3,lpbi))';'100*(lagts(2,lpbi)-lagts(4,lpbi))';'100*(lagts(3,lpbi)-lagts(5,lpbi))'],'cte',nb_states,switch_var,var_opt,'transf=stud','prt=initial;final') >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.crete at thalesgroup.com Fri Jan 11 17:35:04 2013 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Fri, 11 Jan 2013 17:35:04 +0100 Subject: [Scilab-users] "Re-sampling" data and making 2 vectors In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F1061EDBFA@301EX00100.sidel.com> References: <1357912652046-4025657.post@n3.nabble.com> <12301_1357917639_50F02DC7_12301_5463_1_908CBC9017354841B2F32BBEC70A05A101C387487E2C@THSONEA01CMS01P.one.grp> <3B5FFC67498DFF49AE7271A584867D16F1061EDBFA@301EX00100.sidel.com> Message-ID: <27388_1357922097_50F03F30_27388_4785_1_908CBC9017354841B2F32BBEC70A05A101C387488160@THSONEA01CMS01P.one.grp> Hello Christophe, Regarding noise, I have the feeling that "lsq_splin" can do a better job than interp1, which just interpolates linearly in its default operation. However, "smooth" might be the best choice for this task. Regarding "intersect", I considered that the data provided were representative of the case study, and taking into account only EXACT correspondence would - in this particular case - not miss any data. Cdlt Denis PS: last line should have been: disp([v',Temp1,Temp2,Temp2-(Temp1-mean(Temp1))]); -----Message d'origine----- De?: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Dang, Christophe Envoy??: vendredi 11 janvier 2013 17:07 ??: International users mailing list for Scilab. Objet?: Re: [Scilab-users] "Re-sampling" data and making 2 vectors Hello Denis > intersect(Data1(:,1)) with this solution, you loose the information. > It is also possible to interpolate the values of Data2 for the time > values in Data1(:,1) with interp1 I'm not familiar with this function, and have a question about the way it works. I have the feeling that it creates polynomial arcs (splines) that goes through all the data points, am I right? If yes, then it is sensitive to noise. Is there a function that does a smoothing on several data points so you can reduce the noise? Best regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From Christophe.Dang at sidel.com Fri Jan 11 17:48:46 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 11 Jan 2013 17:48:46 +0100 Subject: [Scilab-users] "Re-sampling" data and making 2 vectors In-Reply-To: <27388_1357922097_50F03F30_27388_4785_1_908CBC9017354841B2F32BBEC70A05A101C387488160@THSONEA01CMS01P.one.grp> References: <1357912652046-4025657.post@n3.nabble.com> <12301_1357917639_50F02DC7_12301_5463_1_908CBC9017354841B2F32BBEC70A05A101C387487E2C@THSONEA01CMS01P.one.grp> <3B5FFC67498DFF49AE7271A584867D16F1061EDBFA@301EX00100.sidel.com> <27388_1357922097_50F03F30_27388_4785_1_908CBC9017354841B2F32BBEC70A05A101C387488160@THSONEA01CMS01P.one.grp> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1061EDC6D@301EX00100.sidel.com> > Regarding noise, I have the feeling that "lsq_splin" can do a better job The example in the description page looks good, I'll try to understand what they exactly mean by "breakpoints". But the fact it performs regression is a good point imho. > "smooth" might be the best choice for this task. The example that is provided here for smoooth http://help.scilab.org/docs/5.4.0/en_US/smooth.html create a smooth line, that goes away from a mean value. And using the same step for the function (i.e. replacing 0.1 by 10) also increases the amplitude. Anyway, thanks for your advice. -- 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 naasikhendricks at yahoo.com Fri Jan 11 17:20:17 2013 From: naasikhendricks at yahoo.com (Naasik Hendricks) Date: Fri, 11 Jan 2013 08:20:17 -0800 (PST) Subject: [Scilab-users] please help me correct this file? Message-ID: <1357921217.97375.YahooMailClassic@web142601.mail.bf1.yahoo.com> Hello All Many thanks for reading this mail, I need help to correct my script. I am teaching myself programming, so I have no official programming background. I have read all the documents for scilab and even purchased a book. could you please help fix the attached script. it is a basic program just to test my logic interlocking and my basic math functions of scilab. kind regards Naasik -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: script.sce Type: application/octet-stream Size: 3850 bytes Desc: not available URL: From arpisan at tin.it Fri Jan 11 18:23:29 2013 From: arpisan at tin.it (Armando Pisani) Date: Fri, 11 Jan 2013 18:23:29 +0100 Subject: [Scilab-users] Can you help me? Message-ID: <3292426C-3CAB-4771-8538-34F93153671E@tin.it> Dear Sir, I am a scilab user since years (version 2.0) I recently have moved to scilab on a macbook and when I draw a plot, in order to change its properties, I get the following message of error: ATTENZIONE: L'interfaccia Tcl/Tk non ? installata meaning that the Tcl/Tk interface is not installed. What can I do to get rid of this problem? Thank you very much, yours, Armando Pisani. From ericdoblasargentina at yahoo.com.ar Fri Jan 11 21:01:09 2013 From: ericdoblasargentina at yahoo.com.ar (ericdoblas) Date: Fri, 11 Jan 2013 12:01:09 -0800 (PST) Subject: [Scilab-users] Grocer / Markov Switching Model In-Reply-To: References: <1357856974308-4025649.post@n3.nabble.com> <1357904635535-4025653.post@n3.nabble.com> <1357910758853-4025656.post@n3.nabble.com> <1357916797292-4025659.post@n3.nabble.com> Message-ID: <1357934469679-4025675.post@n3.nabble.com> Thank you very much ?ric!! Best regards Eric -- View this message in context: http://mailinglists.scilab.org/Grocer-Markov-Switching-Model-tp4025635p4025675.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Fri Jan 11 21:14:20 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 11 Jan 2013 21:14:20 +0100 Subject: [Scilab-users] Can you help me? In-Reply-To: <3292426C-3CAB-4771-8538-34F93153671E@tin.it> References: <3292426C-3CAB-4771-8538-34F93153671E@tin.it> Message-ID: <50F0729C.2020404@free.fr> Hello, Le 11/01/2013 18:23, Armando Pisani a ?crit : > Dear Sir, > > I am a scilab user since years (version 2.0) I recently have moved to scilab on a macbook and when I draw a plot, in order to change its properties, I get the following message of error: > > ATTENZIONE: L'interfaccia Tcl/Tk non ? installata > > meaning that the Tcl/Tk interface is not installed. TcL/Tk cannot be run on Mac OSes. AFAIK, the Graphical editor GED is being to be rewritten in Java, in order to get ride of this limitation [1]. So, i am afraid that the solution is either to stay with Mac and be patient... or to go back to Windows or Linux and use GED in it current TcL/Tk release. Regards Samuel [1] for instance https://codereview.scilab.org/#/q/status:merged,n,0022444e0000275e (2-7/1/2013) From sylvestre.ledru at scilab-enterprises.com Fri Jan 11 22:11:05 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Fri, 11 Jan 2013 22:11:05 +0100 Subject: [Scilab-users] Can you help me? In-Reply-To: <50F0729C.2020404@free.fr> References: <3292426C-3CAB-4771-8538-34F93153671E@tin.it> <50F0729C.2020404@free.fr> Message-ID: <50F07FE9.8010308@scilab-enterprises.com> On 11/01/2013 21:14, Samuel Gougeon wrote: > Hello, > > Le 11/01/2013 18:23, Armando Pisani a ?crit : >> Dear Sir, >> >> I am a scilab user since years (version 2.0) I recently have moved >> to scilab on a macbook and when I draw a plot, in order to change its >> properties, I get the following message of error: >> >> ATTENZIONE: L'interfaccia Tcl/Tk non ? installata >> >> meaning that the Tcl/Tk interface is not installed. > TcL/Tk cannot be run on Mac OSes. > AFAIK, the Graphical editor GED is being to be rewritten in Java, > in order to get ride of this limitation [1]. > So, i am afraid that the solution is either to stay with Mac and be > patient... > or to go back to Windows or Linux and use GED in it current TcL/Tk > release. Samuel is right. The new implementation should be available with Scilab 5.5.0. Sylvestre From merlinna.malkavian at gmail.com Sat Jan 12 04:46:16 2013 From: merlinna.malkavian at gmail.com (CristobalAgurto) Date: Fri, 11 Jan 2013 19:46:16 -0800 (PST) Subject: [Scilab-users] Finding "extreme values" Message-ID: <1357962376181-4025679.post@n3.nabble.com> If I have a row with 10000 values, I have to divide the row in "groups", with each group i obtain a representative mean and then apply a criteria "if one value is less than 10% of the mean or 90% superior to the mean (eliminate extreme values), i have to put in a new matrix and delete it from the original group.... Any suggestion?? -- View this message in context: http://mailinglists.scilab.org/Finding-extreme-values-tp4025679.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From merlinna.malkavian at gmail.com Sat Jan 12 04:41:02 2013 From: merlinna.malkavian at gmail.com (CristobalAgurto) Date: Fri, 11 Jan 2013 19:41:02 -0800 (PST) Subject: [Scilab-users] Heeeeelp Message-ID: <1357962062526-4025678.post@n3.nabble.com> If I have a row with 10000 values, I have to divide the row in "groups", with each group i obtain a representative mean and then apply a criteria "if one value is less than 10% of the mean or 90% superior to the mean, i have to put in a new matrix and delete it from the original group.... Any suggestion?? -- View this message in context: http://mailinglists.scilab.org/Heeeeelp-tp4025678.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Jan 12 11:30:03 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 12 Jan 2013 11:30:03 +0100 Subject: [Scilab-users] Heeeeelp In-Reply-To: <1357962062526-4025678.post@n3.nabble.com> References: <1357962062526-4025678.post@n3.nabble.com> Message-ID: <50F13B2B.6010800@free.fr> Le 12/01/2013 04:41, CristobalAgurto a ?crit : > If I have a row with 10000 values, I have to divide the row in "groups", Do they all have the same number of elements? From merlinna.malkavian at gmail.com Sat Jan 12 14:36:08 2013 From: merlinna.malkavian at gmail.com (=?ISO-8859-1?Q?Mar=EDa_jos=E9_Vera?=) Date: Sat, 12 Jan 2013 10:36:08 -0300 Subject: [Scilab-users] Heeeeelp In-Reply-To: <50F13B2B.6010800@free.fr> References: <1357962062526-4025678.post@n3.nabble.com> <50F13B2B.6010800@free.fr> Message-ID: No necessary, sometimes i have even number of elements or somethim 2013/1/12 Samuel Gougeon > Le 12/01/2013 04:41, CristobalAgurto a ?crit : > > If I have a row with 10000 values, I have to divide the row in "groups", >> > Do they all have the same number of elements? > > ______________________________**_________________ > 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 Mon Jan 14 09:34:20 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 14 Jan 2013 09:34:20 +0100 Subject: [Scilab-users] please help me correct this file? In-Reply-To: <1357921217.97375.YahooMailClassic@web142601.mail.bf1.yahoo.com> References: <1357921217.97375.YahooMailClassic@web142601.mail.bf1.yahoo.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1061EE0AC@301EX00100.sidel.com> Hello Naasik, > could you please help fix the attached script. it is a basic program > just to test my logic interlocking and my basic math functions of scilab. Hello, If I may give some advice: > for a=input("select your shape?") > end I would simply write a=input("select your shape?") > horner(d,x) horner is to evaluate a polynomial, and you did not define a polynomial in Scilab sense. When you write > [d]=(x) you juste define a matrix -- [...] -- containing d, and say its equal to x. You should write something like x = poly(0, 'x') d = x meaning that the variable "x" is the polynomial built on the indeterminate x with the root 0, i.e. P(x) = x, then d = P(x) ( = x) When you write > function e(c)=c^2 > endfunction You should write it at the beginning of the script, in the following way : function [y] = e(x) y = x^2 endfunction (here, x is a local variable, not the monomial defined above) and then use in the main program body e(c) or,if you want to use horner, define a polynomial as above e = x^2 horner(x, c) (remember x was already defined) Hope this helps. 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 samad13 at hotmail.de Mon Jan 14 09:35:21 2013 From: samad13 at hotmail.de (samy) Date: Mon, 14 Jan 2013 00:35:21 -0800 (PST) Subject: [Scilab-users] tlist function In-Reply-To: <945960156.24059348.1357761633473.JavaMail.root@inria.fr> References: <1357743364066-4025634.post@n3.nabble.com> <945960156.24059348.1357761633473.JavaMail.root@inria.fr> Message-ID: <1358152521145-4025684.post@n3.nabble.com> hi serge, thanks for your Reply i want to make it without mlist, for example with a function in scicoslab such if tlist much element with equal field names then give me the first element of tlist., or the second.... with this command: for the first elemnt BHCurve.Point(1)(1)= 0 thank you very much -- View this message in context: http://mailinglists.scilab.org/tlist-function-tp4025634p4025684.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Mon Jan 14 09:43:14 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 14 Jan 2013 09:43:14 +0100 Subject: [Scilab-users] Finding "extreme values" In-Reply-To: <1357962376181-4025679.post@n3.nabble.com> References: <1357962376181-4025679.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1061EE107@301EX00100.sidel.com> Hello Cristobal, > and then apply a criteria "if one value is less than 10% of the mean > or 90% superior to the mean (eliminate extreme values) If you look for an algorithm, maybe you should have a look at http://en.wikipedia.org/wiki/Selection_algorithm Best regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From antseabra at gmail.com Tue Jan 15 03:20:20 2013 From: antseabra at gmail.com (=?ISO-8859-1?Q?Ant=F3nio_Seabra?=) Date: Tue, 15 Jan 2013 02:20:20 +0000 Subject: [Scilab-users] Dockable windows Message-ID: Hi In MS Windows version of Scilab-5.4.0 (64-bit), Scilab windows don't seem to be dockable. However the un-dock facility works fine. Actually in my case, all too well, since I un-docked some of the windows and now I'm unable to dock them again. Even if I uninstall and install again Scilab, the Scilab windows maintain the same un-docked appearance. I wonder if there is some sort of config file with information about windows dock/undock status that I may change to get the Scilab desktop appearance I want. Or perhaps there is a better alternative? Many thanks Antonio -------------- next part -------------- An HTML attachment was scrubbed... URL: From serge.steer at inria.fr Tue Jan 15 12:14:10 2013 From: serge.steer at inria.fr (Serge Steer) Date: Tue, 15 Jan 2013 12:14:10 +0100 (CET) Subject: [Scilab-users] Dockable windows In-Reply-To: Message-ID: <274869861.25715645.1358248450867.JavaMail.root@inria.fr> If inside Scilab you type SCIHOME You will get the path of the directory where Scilab saves the owner config files. Serge Steer ----- Mail original ----- > De: "Ant?nio Seabra" > ?: users at lists.scilab.org > Envoy?: Mardi 15 Janvier 2013 03:20:20 > Objet: [Scilab-users] Dockable windows > Hi > In MS Windows version of Scilab-5.4.0 (64-bit), Scilab windows don't > seem to be dockable. However the un-dock facility works fine. > Actually in my case, all too well, since I un-docked some of the > windows and now I'm unable to dock them again. Even if I uninstall > and install again Scilab, the Scilab windows maintain the same > un-docked appearance. I wonder if there is some sort of config file > with information about windows dock/undock status that I may change > to get the Scilab desktop appearance I want. Or perhaps there is a > better alternative? > Many thanks > Antonio > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Jan 15 20:28:15 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 15 Jan 2013 20:28:15 +0100 Subject: [Scilab-users] Dockable windows In-Reply-To: References: Message-ID: <50F5ADCF.50407@free.fr> Le 15/01/2013 03:20, Ant?nio Seabra a ?crit : > Hi > > In MS Windows version of Scilab-5.4.0 (64-bit), Scilab windows don't > seem to be dockable. > .../... Strange... There are several bars, but only one being a handle enabling to dock: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jafiidba.png Type: image/png Size: 29835 bytes Desc: not available URL: From antseabra at gmail.com Tue Jan 15 23:36:04 2013 From: antseabra at gmail.com (AntonSeab) Date: Tue, 15 Jan 2013 14:36:04 -0800 (PST) Subject: [Scilab-users] Dockable windows In-Reply-To: References: Message-ID: <1358289364118-4025690.post@n3.nabble.com> Oh, ok, I see now. I was pressing the wrong handle. Docking/un-docking is now working like a charm! Perfect! Thanks Antonio -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Dockable-windows-tp4025687p4025690.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From david.cheze at cea.fr Wed Jan 16 11:00:08 2013 From: david.cheze at cea.fr (=?UTF-8?Q?David_Ch=C3=A8ze?=) Date: Wed, 16 Jan 2013 02:00:08 -0800 (PST) Subject: [Scilab-users] user experience with moving average Message-ID: <1358330408892-4025691.post@n3.nabble.com> Hi, i've recently used the new function "conv" introduced since 5.4 version : that's fine and easy to use, for example to apply simple filtering to experimental data (sample time greater than 1s typically) with (arithmetic) moving average (like in MS excel, where the use of this feature was quite intuitiv while prior to 5.4 and conv function it was not so immediate for people non skilled in signal processing and no simple test case were given on the web). Moving average is a convolution product of the signal with door function (see http://fr.wikipedia.org/wiki/Moyenne_mobile ). Then it's easy with Scilab to compute this moving average and this basic but common use may be mentionned in the help page for context search. A=1:10; // experimental data N=3; //number of samples over which you want to average B=ones(N,1); // "door function" C=1/N*conv(A,B); //resulting filtered data : /!\ check the size and beginning/end of the result and truncate for your need David -- View this message in context: http://mailinglists.scilab.org/user-experience-with-moving-average-tp4025691.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Richard.Davey at fugro-robertson.com Wed Jan 16 17:12:54 2013 From: Richard.Davey at fugro-robertson.com (Richard Davey) Date: Wed, 16 Jan 2013 16:12:54 +0000 Subject: [Scilab-users] Bulk conversion of matlab files Message-ID: <4727A463E44BC744B13F2850EECF5C0D449AD697@FRLEXCHANGE2.FRL.Local> Hi all, I have tried the GUI for the bulk conversion of matlab to scilab in a single folder but it does not work. Instead, I tried the following script below but this crashes Scilab! Does anyone have a solution for either problem? I am using Scilab 5.4.0. // read each .m file and run matfile2sci host('S:') cd ("S:\somepath\matlab") if getos() == 'Windows' then filelist=unix_g('dir /B *.m') else filelist=unix_g('ls *.m') end n=size(filelist,1); for i = 1:n, outputfile = filelist(i); m = length(outputfile); outputfile = part(outputfile,1:(m-1))+".conv"; matfile2sci(filelist(i),outputfile), end; end; Thanks, Richard --- Fugro Robertson Limited Tyn y Coed Llanrhos Llandudno North Wales LL30 1SA United Kingdom Tel: +44 (0)1492 581811 Fax: +44 (0)1492 583416 General Email: info at fugro-robertson.com Website: www.fugro-robertson.com This email communication (including any attachments) may contain confidential and privileged information intended solely for the individual to whom it is addressed. If you are not the intended recipient, you are hereby notified that any dissemination, disclosure, distribution or copying is strictly prohibited and any reliance on this email (including any attachments), or on any information contained in it or use of any information contained in it, is strictly prohibited and may be unlawful. The sender of this email communication is not an officer of the Company and therefore has no authority whatsoever to bind the company legally to any contractual arrangements. If you have received this communication in error, please notify the sender by telephone and delete the communication. Fugro Robertson Limited is a limited company registered in England and Wales (Reg No. 3006207) at Tyn y Coed, Pentwyn Road, Llanrhos, Conwy, LL30 1SA. VAT No. GB682004360. -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurent.berger at univ-lemans.fr Wed Jan 16 21:08:10 2013 From: laurent.berger at univ-lemans.fr (laurent berger) Date: Wed, 16 Jan 2013 12:08:10 -0800 (PST) Subject: [Scilab-users] Finding "extreme values" In-Reply-To: <1357962376181-4025679.post@n3.nabble.com> References: <1357962376181-4025679.post@n3.nabble.com> Message-ID: <1358366890112-4025693.post@n3.nabble.com> I'm not sure that I have understood your question but may be : X=rand(10000,1); mx=mean(X); ind1=find(X>mx*1.1); ind2=find(X Hi All, I would like to change the background color in Scinotes for Scilab 5.4, but the only available interface allows me to change only the desktop backgroung (and cursor) color. This feature was available in 5.3 version. As a Scilab user, is there an other way to force the Scinotes background color? Thanks for your assistance. Giulio -- View this message in context: http://mailinglists.scilab.org/Scinotes-for-Scilab-5-4-Background-color-tp4025694.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sdr at durietz.se Thu Jan 17 11:00:20 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Thu, 17 Jan 2013 11:00:20 +0100 Subject: [Scilab-users] Scinotes for Scilab 5.4 - Background color In-Reply-To: <1358410048204-4025694.post@n3.nabble.com> References: <1358410048204-4025694.post@n3.nabble.com> Message-ID: <50F7CBB4.2070305@durietz.se> And to remove the toolbar, please? /Stefan On 2013-01-17 09:07, Giulio wrote: -------------------- > Hi All, > I would like to change the background color in Scinotes for Scilab 5.4, but > the only available interface allows me to change only the desktop backgroung > (and cursor) color. > This feature was available in 5.3 version. > > As a Scilab user, is there an other way to force the Scinotes background > color? > > Thanks for your assistance. > > Giulio > > > > > -- > View this message in context: http://mailinglists.scilab.org/Scinotes-for-Scilab-5-4-Background-color-tp4025694.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Fri Jan 18 00:49:21 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 18 Jan 2013 00:49:21 +0100 Subject: [Scilab-users] Scinotes for Scilab 5.4 - Background color In-Reply-To: <1358410048204-4025694.post@n3.nabble.com> References: <1358410048204-4025694.post@n3.nabble.com> Message-ID: <50F88E01.6060600@free.fr> Le 17/01/2013 09:07, Giulio a ?crit : > Hi All, > I would like to change the background color in Scinotes for Scilab 5.4, but > the only available interface allows me to change only the desktop backgroung > (and cursor) color. > This feature was available in 5.3 version. > > As a Scilab user, is there an other way to force the Scinotes background > color? * close Scinotes * Edit the file SCIHOME\scinotesConfiguration.xml * Look for the section * Change value for backgroundColor * Save the change * Restart Scinotes : it should be ok -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jan 18 01:02:31 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 18 Jan 2013 01:02:31 +0100 Subject: [Scilab-users] Scinotes for Scilab 5.4 - Background color In-Reply-To: <50F7CBB4.2070305@durietz.se> References: <1358410048204-4025694.post@n3.nabble.com> <50F7CBB4.2070305@durietz.se> Message-ID: <50F89117.9060106@free.fr> Le 17/01/2013 11:00, Stefan Du Rietz a ?crit : > And to remove the toolbar, please? * close Scilab * edit SCI\modules\scinotes\etc\scinotesGUIConfiguration.xml * put in comment the content between ... Beware: 2 comments are needed, since the content contains itself a comment * Save the change: admin rights are needed * Restart Scilab and scinotes : it should be ok From antseabra at gmail.com Fri Jan 18 05:11:40 2013 From: antseabra at gmail.com (AntonSeab) Date: Thu, 17 Jan 2013 20:11:40 -0800 (PST) Subject: [Scilab-users] Puzzling behaviour ignoring 'Invalid index' error Message-ID: <1358482300090-4025701.post@n3.nabble.com> Hi, I'm finding the following behaviour puzzling. When running the following code that has one typing error 'lambda(t-t_z)' instead of 'lambda*(t-t_z)': lambda = -0.9; function exch=e(t,t_z) exch = exp(lambda(t-t_z)); endfunction e(4.999,3) we get unexpectedly: -->e(4.999,3) ans = 0.4065697 This problem happens for other values t < 5. But for e(5.000,3), or other values t > 5, we get as expected an error message: -->e(5.000,3) !--error 21 Invalid index. at line 2 of function e called by : e(5.000,3) at line 7 of exec file called by : exec('C:\Users\Anton\AppData\Local\Temp\SCI_TMP_5144_\LOAD_INTO_SCILAB-6477721663385113459.sce', 1) while executing a callback -- View this message in context: http://mailinglists.scilab.org/Puzzling-behaviour-ignoring-Invalid-index-error-tp4025701.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From giuliogandini.gg at gmail.com Fri Jan 18 08:34:21 2013 From: giuliogandini.gg at gmail.com (Giulio) Date: Thu, 17 Jan 2013 23:34:21 -0800 (PST) Subject: [Scilab-users] Scinotes for Scilab 5.4 - Background color In-Reply-To: <50F88E01.6060600@free.fr> References: <1358410048204-4025694.post@n3.nabble.com> <50F88E01.6060600@free.fr> Message-ID: Thank you, Samuel. It works perfectly. Thanks! 2013/1/18 Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives] < ml-node+s994242n4025699h28 at n3.nabble.com> > Le 17/01/2013 09:07, Giulio a ?crit : > > Hi All, > I would like to change the background color in Scinotes for Scilab 5.4, but > the only available interface allows me to change only the desktop backgroung > (and cursor) color. > This feature was available in 5.3 version. > > As a Scilab user, is there an other way to force the Scinotes background > color? > > * close Scinotes > > * Edit the file SCIHOME\scinotesConfiguration.xml > * Look for the section > > > > > > * Change value for backgroundColor > * Save the change > * Restart Scinotes : it should be ok > > > _______________________________________________ > 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/Scinotes-for-Scilab-5-4-Background-color-tp4025694p4025699.html > To unsubscribe from Scinotes for Scilab 5.4 - Background color, click > here > . > NAML > -- View this message in context: http://mailinglists.scilab.org/Scinotes-for-Scilab-5-4-Background-color-tp4025694p4025702.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Fri Jan 18 13:13:40 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 18 Jan 2013 13:13:40 +0100 Subject: [Scilab-users] Scinotes for Scilab 5.4 - Background color In-Reply-To: <50F89117.9060106@free.fr> References: <1358410048204-4025694.post@n3.nabble.com> <50F7CBB4.2070305@durietz.se> <50F89117.9060106@free.fr> Message-ID: <50F93C74.10104@durietz.se> On 2013-01-18 01:02, Samuel Gougeon wrote: -------------------- > Le 17/01/2013 11:00, Stefan Du Rietz a ?crit : >> And to remove the toolbar, please? > * close Scilab > * edit SCI\modules\scinotes\etc\scinotesGUIConfiguration.xml > * put in comment the content between ... > Beware: 2 comments are needed, since the content contains itself a > comment > * Save the change: admin rights are needed > * Restart Scilab and scinotes : it should be ok Thank you very much! Is it also possible to remove the extra title bar in graphics windows? Stefan From vogt at centre-cired.fr Fri Jan 18 14:24:12 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Fri, 18 Jan 2013 14:24:12 +0100 Subject: [Scilab-users] Puzzling behaviour ignoring 'Invalid index' error In-Reply-To: <1358482300090-4025701.post@n3.nabble.com> References: <1358482300090-4025701.post@n3.nabble.com> Message-ID: <50F94CFC.9030506@centre-cired.fr> Hi can you rpovide the full code that makes the bug ? in your example, for instance, t_z is not defined On 18/01/2013 05:11, AntonSeab wrote: > Hi, > > I'm finding the following behaviour puzzling. When running the following > code that has one typing error 'lambda(t-t_z)' instead of 'lambda*(t-t_z)': > > lambda = -0.9; > function exch=e(t,t_z) > exch = exp(lambda(t-t_z)); > endfunction > e(4.999,3) > > we get unexpectedly: > > -->e(4.999,3) > ans = > > 0.4065697 > > This problem happens for other values t < 5. But for e(5.000,3), or other > values t > 5, we get as expected an error message: > > -->e(5.000,3) > > !--error 21 > Invalid index. > at line 2 of function e called by : > e(5.000,3) > at line 7 of exec file called by : > exec('C:\Users\Anton\AppData\Local\Temp\SCI_TMP_5144_\LOAD_INTO_SCILAB-6477721663385113459.sce', > 1) > while executing a callback > > > > > > > > -- > View this message in context: http://mailinglists.scilab.org/Puzzling-behaviour-ignoring-Invalid-index-error-tp4025701.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 antseabra at gmail.com Fri Jan 18 15:34:23 2013 From: antseabra at gmail.com (AntonSeab) Date: Fri, 18 Jan 2013 06:34:23 -0800 (PST) Subject: [Scilab-users] Puzzling behaviour ignoring 'Invalid index' error In-Reply-To: <1358482300090-4025701.post@n3.nabble.com> References: <1358482300090-4025701.post@n3.nabble.com> Message-ID: <1358519663988-4025712.post@n3.nabble.com> t and t_z are the arguments of the function e(t,t_z) -- View this message in context: http://mailinglists.scilab.org/Puzzling-behaviour-ignoring-Invalid-index-error-tp4025701p4025712.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Fri Jan 18 18:50:42 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 18 Jan 2013 15:50:42 -0200 Subject: [Scilab-users] Puzzling behaviour ignoring 'Invalid index' error In-Reply-To: <1358519663988-4025712.post@n3.nabble.com> References: <1358482300090-4025701.post@n3.nabble.com> <1358519663988-4025712.post@n3.nabble.com> Message-ID: lambda = lambda(1); after rounding off of index errors occur therefore for lambda(>=2) or lambda(<=2) Rgds Rafael -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of AntonSeab Sent: Friday, January 18, 2013 12:34 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Puzzling behaviour ignoring 'Invalid index' error t and t_z are the arguments of the function e(t,t_z) -- View this message in context: http://mailinglists.scilab.org/Puzzling-behaviour-ignoring-Invalid-index-err or-tp4025701p4025712.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 jrafaelbguerra at hotmail.com Fri Jan 18 18:52:43 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 18 Jan 2013 15:52:43 -0200 Subject: [Scilab-users] RE(2): Puzzling behaviour ignoring 'Invalid index' error References: <1358482300090-4025701.post@n3.nabble.com> <1358519663988-4025712.post@n3.nabble.com> Message-ID: Sorry, now with typos corrected: lambda = lambda(1); after taking the integer part of the index errors occur therefore for lambda(>=2) or lambda(<1) Rgds Rafael G. -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of AntonSeab Sent: Friday, January 18, 2013 12:34 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Puzzling behaviour ignoring 'Invalid index' error t and t_z are the arguments of the function e(t,t_z) -- View this message in context: http://mailinglists.scilab.org/Puzzling-behaviour-ignoring-Invalid-index-err or-tp4025701p4025712.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Fri Jan 18 22:48:54 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 18 Jan 2013 22:48:54 +0100 Subject: [Scilab-users] Scinotes for Scilab 5.4 - Background color In-Reply-To: <50F93C74.10104@durietz.se> References: <1358410048204-4025694.post@n3.nabble.com> <50F7CBB4.2070305@durietz.se> <50F89117.9060106@free.fr> <50F93C74.10104@durietz.se> Message-ID: <50F9C346.4020204@free.fr> Le 18/01/2013 13:13, Stefan Du Rietz a ?crit : > > Is it also possible to remove the extra title bar in graphics windows? edit SCI\modules\gui\etc\graphics_menubar.xml in the same way From bedouin.poster at gmail.com Sun Jan 20 00:06:20 2013 From: bedouin.poster at gmail.com (bedouin.poster) Date: Sat, 19 Jan 2013 15:06:20 -0800 (PST) Subject: [Scilab-users] Discrete time simulation Message-ID: <1358636780716-4025717.post@n3.nabble.com> Hi All, How can I model a control logic involving simple AND OR gates and simulate it in discrete time (example, each 2 msec)? Is there any configuration available in Xcos to select discrete time simulation? Please guide me to tutorial page/ demo. I am new to Scilab. Thanks, Bedouin -- View this message in context: http://mailinglists.scilab.org/Discrete-time-simulation-tp4025717.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From iai at axelspace.com Mon Jan 21 03:07:51 2013 From: iai at axelspace.com (Iai Masafumi ax) Date: Mon, 21 Jan 2013 11:07:51 +0900 Subject: [Scilab-users] How to interpret date strings? Message-ID: <50FCA2F7.6010408@axelspace.com> Hi all, How do you convert date strings into the serial date number? For example, a date string like: Tue Jan 15 13:17:09.914 2013 Especially, is there an easy way to convert month names to numbers? Like "Jan" to 1, etc. Thanks, Iai From jrafaelbguerra at hotmail.com Mon Jan 21 14:33:03 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 21 Jan 2013 05:33:03 -0800 (PST) Subject: [Scilab-users] Some questions about Scilab Optim function Message-ID: <1358775183036-4025722.post@n3.nabble.com> Hello, I am using Scilab 5.4 Windows7 optim function to find parameters in a non-linear model to fit experimental data and I have some questions about the method used in Scilab. I am running optim with very good results despite a bit slowly, with the following function call (x is a vector of length 3 in my case): [f,xopt]= optim(list(NDcost,costfun,param1,..,paramN),x0) ... function f = costfun(x,param1,...,paramN) ... The questions I have regarding optim are: 1. When using the NDcost option to compute numerically the derivatives is optim using the quasi-Newton method without constraints? 2. Is this NDcost option equivalent in terms of run time and accuracy to estimating numerically the derivatives with the dedicate Scilab functions (derivative or numdiff)? 3. Can the NDcost option be run with constraints? 4. How can we have an idea of the accuracy of the parameters estimated by optim, or at least of the stability of the solution found? Thanks in advance and regards, Rafael Guerra -- View this message in context: http://mailinglists.scilab.org/Some-questions-about-Scilab-Optim-function-tp4025722.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From ridder.peter at googlemail.com Mon Jan 21 17:34:32 2013 From: ridder.peter at googlemail.com (windkraft) Date: Mon, 21 Jan 2013 08:34:32 -0800 (PST) Subject: [Scilab-users] Getting started with Scicos Message-ID: <1358786072307-4025723.post@n3.nabble.com> Hello When I try to run Xcos examples i get the error message: '.... A Fortran or C compiler is required. ! -->bOK=haveacompiler() bOK = F ....' I tried to install a compiler but got the same Have i to put down path information somewhere? I would be happy if someone could tell me what's the way to fix this Thanks Peter -- View this message in context: http://mailinglists.scilab.org/Getting-started-with-Scicos-tp4025723.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From serge.steer at inria.fr Mon Jan 21 18:33:04 2013 From: serge.steer at inria.fr (Serge Steer) Date: Mon, 21 Jan 2013 18:33:04 +0100 (CET) Subject: [Scilab-users] Some questions about Scilab Optim function In-Reply-To: <1358775183036-4025722.post@n3.nabble.com> Message-ID: <438507643.28117966.1358789584409.JavaMail.root@inria.fr> ----- Mail original ----- > De: "Rafael Guerra" > ?: users at lists.scilab.org > Envoy?: Lundi 21 Janvier 2013 14:33:03 > Objet: [Scilab-users] Some questions about Scilab Optim function > > Hello, > > I am using Scilab 5.4 Windows7 optim function to find parameters in a > non-linear model to fit experimental data and I have some questions > about > the method used in Scilab. > > I am running optim with very good results despite a bit slowly, with > the > following function call (x is a vector of length 3 in my case): > > [f,xopt]= optim(list(NDcost,costfun,param1,..,paramN),x0) > ... > function f = costfun(x,param1,...,paramN) > ... > > The questions I have regarding optim are: > > 1. When using the NDcost option to compute numerically the > derivatives is > optim using the quasi-Newton method without constraints? The NDcost functio is just a way to give optim a function able to compute the cost and/or the gradient. So all optim options are available in this context. The quality and efficiency will depend on the quality of the estimated derivative > 2. Is this NDcost option equivalent in terms of run time and accuracy > to > estimating numerically the derivatives with the dedicate Scilab > functions > (derivative or numdiff)? Yes > > 3. Can the NDcost option be run with constraints? > Yes, under the assumption the numericall derivative is precise enough > 4. How can we have an idea of the accuracy of the parameters > estimated by > optim, or at least of the stability of the solution found? You can look at the gradient or projected gradient norm Serge Steer From lukasz.kocot at sosnowa40.pl Mon Jan 21 19:50:18 2013 From: lukasz.kocot at sosnowa40.pl (lukasz_kocot) Date: Mon, 21 Jan 2013 10:50:18 -0800 (PST) Subject: [Scilab-users] parallel_run on linux with 8 cores problem with nb_workers In-Reply-To: <1357242919791-4025610.post@n3.nabble.com> References: <1357242919791-4025610.post@n3.nabble.com> Message-ID: <1358794218132-4025725.post@n3.nabble.com> Hi all, I need help. I was thinging that I understand this, but still not. It not work as i suppose it should. Why following example only 3 times call function a(), -->lines(0); -->function a=g(arg1) -->disp("called on "+string(arg1)); -->//for i=1:1000000, --> a=arg1*arg1; -->// end; -->disp("computed "+string(a)); -->endfunction -->res=parallel_run(1:24, g, init_param('nb_workers', 8)); called on 1 computed 1 called on 2 computed 4 called on 3 computed 9 ...... and following example call it all 24 times: -->lines(0); -->function a=g(arg1) -->disp("called on "+string(arg1)); -->//for i=1:1000000, --> a=arg1*arg1; -->// end; -->disp("computed "+string(a)); -->endfunction -->res=parallel_run(1:24, g, init_param('nb_workers', 1)); called on 1 computed 1 called on 2 computed 4 called on 3 computed 9 called on 4 computed 16 called on 5 computed 25 called on 6 computed 36 called on 7 computed 49 called on 8 computed 64 called on 9 computed 81 called on 10 computed 100 called on 11 computed 121 called on 12 computed 144 called on 13 computed 169 called on 14 computed 196 called on 15 computed 225 called on 16 computed 256 called on 17 computed 289 called on 18 computed 324 called on 19 computed 361 called on 20 computed 400 called on 21 computed 441 called on 22 computed 484 called on 23 computed 529 called on 24 computed 576 Please help me understund it and implement it in my projekt. I have 8 core processor. -- View this message in context: http://mailinglists.scilab.org/parallel-run-on-linux-with-8-cores-problem-with-nb-workers-tp4025610p4025725.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Mon Jan 21 20:38:07 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 21 Jan 2013 20:38:07 +0100 Subject: [Scilab-users] How to interpret date strings? In-Reply-To: <50FCA2F7.6010408@axelspace.com> References: <50FCA2F7.6010408@axelspace.com> Message-ID: <50FD991F.6080209@free.fr> Hello, Le 21/01/2013 03:07, Iai Masafumi ax a ?crit : > How do you convert date strings into the serial date number? For > example, a date string like: > Tue Jan 15 13:17:09.914 2013 > > Especially, is there an easy way to convert month names to numbers? Like > "Jan" to 1, etc. you may have a look at datenum() and datevec() from there: http://help.scilab.org/docs/5.4.0/en_US/section_8d3a5b8b1e06deb6ed458509a08aba32.html moreover: months = ["jan" "feb" "mar" "april" "may" "june" "july" "aug" "sept" "oct" "nov" "dec"]; months(3) find(months=="april") HTH Samuel From paul.carrico at esterline.com Tue Jan 22 12:13:25 2013 From: paul.carrico at esterline.com (Carrico, Paul) Date: Tue, 22 Jan 2013 12:13:25 +0100 Subject: [Scilab-users] Code protection Message-ID: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77710@exchsrv.auxitrol.ad> Hi All How can I protect Scilab source code for a third part (development in progress) ? Typically it concerns a sub-routine I've been developping ... Regards Paul -------------------------------------------------------------------------------- Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt at centre-cired.fr Tue Jan 22 12:41:25 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Tue, 22 Jan 2013 12:41:25 +0100 Subject: [Scilab-users] Code protection In-Reply-To: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77710@exchsrv.auxitrol.ad> References: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77710@exchsrv.auxitrol.ad> Message-ID: <50FE7AE5.7090908@centre-cired.fr> On 22/01/2013 12:13, Carrico, Paul wrote: > Hi All > How can I protect Scilab source code for a third part (development in > progress) ? > Typically it concerns a sub-routine I've been developping ... > Regards > Paul Hi As far as i know, you cannot. This is because nothing is really compiled in scilab. Try for instance the function fun2string(yourfunction), it will show the "source code" of your function. But hey, information and knowledge wants to be free! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Tue Jan 22 17:55:19 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 22 Jan 2013 17:55:19 +0100 Subject: [Scilab-users] Code protection In-Reply-To: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77710@exchsrv.auxitrol.ad> References: <55A12CBC06A8C9459DCE0BBEF8122FDC08B77710@exchsrv.auxitrol.ad> Message-ID: <50FEC477.1000401@inria.fr> It is quite impossible to protect Scilab function source code because Scilab code is open, so it is possible to modify it to be able to trace the operations performed. Serge Le 22/01/2013 12:13, Carrico, Paul a ?crit : > Hi All > How can I protect Scilab source code for a third part (development in > progress) ? > Typically it concerns a sub-routine I've been developping ... > Regards > Paul > -------------------------------------------------------------------------------- > > > Le pr?sent mail et ses pi?ces jointes sont confidentiels et destin?s ? la personne ou aux personnes vis?e(s) ci-dessus. Si vous avez re?u cet e-mail par erreur, veuillez contacter imm?diatement l'exp?diteur et effacer le message de votre syst?me. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite. > > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email. > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hshackford at yahoo.com Tue Jan 22 17:53:51 2013 From: hshackford at yahoo.com (hobie) Date: Tue, 22 Jan 2013 08:53:51 -0800 (PST) Subject: [Scilab-users] Installation Problem Message-ID: <1358873631660-4025732.post@n3.nabble.com> I am unable to install Scilab on my Windows 7 workstation (32 bit). I get the following error when the installation program is just about completed: Internal error: Failed to expand Shell folder constant "userdocs" I have tried downloading the install program to my desktop and running from the web site with the same results. Any help would be appreciated. Thanks Hobie Shackford Providence, RI -- View this message in context: http://mailinglists.scilab.org/Installation-Problem-tp4025732.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From arnaud.miege at gmail.com Wed Jan 23 10:20:01 2013 From: arnaud.miege at gmail.com (amiege) Date: Wed, 23 Jan 2013 01:20:01 -0800 (PST) Subject: [Scilab-users] Setting up a C compiler in Scilab 5.4.0 Message-ID: <1358932801761-4025736.post@n3.nabble.com> Hello,I have only just recently started to use Scilab (Win XP SP2, x64). I have used ATOMS to install COSELICA and managed to create a model with it. However, when I tried to simulate it, I got the following error message:I have looked in the documentation on "Supported and compatible compilers" and have tried setting up lcc-win32 with ATOMS, which seemed to work, but Scilab still doesn't find a compiler:I also looked at the wiki page How can I set up Microsoft Visual Studio 2008/2010 C++ Express Edition for use with Scilab x64 on 64-bit Windows ? and before I ask IT to install MSVC 2010 C++ Express (I don't have admin rights), is there a way to tell whether I am using a 32-bit or 64-bit version of Scilab? It is installed in Program Files (x86), so that suggests to me it is the 32-bit version. In that case, are the instructions on the wiki page still relevant?Any suggestions welcome.Many thanks in advance,Arnaud -- View this message in context: http://mailinglists.scilab.org/Setting-up-a-C-compiler-in-Scilab-5-4-0-tp4025736.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbrumm at ieee.org Thu Jan 24 01:17:58 2013 From: dbrumm at ieee.org (ledlighter) Date: Wed, 23 Jan 2013 16:17:58 -0800 (PST) Subject: [Scilab-users] Help files seem to be missing. Message-ID: <1358986678428-4025741.post@n3.nabble.com> I have recently installed version 5.4.0 on my 64-bit Windows Pro system. All attempts to use the resident help system fail. Neither F1 nor typing help in the console does anything. The Link to Scilab Online Help works fine, but I can't find any Scilab help files resident on my computer. Neither can I find this problem in the mailing list archives. What is the problem? Thank you. -- View this message in context: http://mailinglists.scilab.org/Help-files-seem-to-be-missing-tp4025741.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From tirelli85 at gmail.com Wed Jan 23 20:08:51 2013 From: tirelli85 at gmail.com (Tiger) Date: Wed, 23 Jan 2013 11:08:51 -0800 (PST) Subject: [Scilab-users] Compatibility With MAC OS Mountain Lion In-Reply-To: <1350747687002-4025047.post@n3.nabble.com> References: <503F1809.1000702@scilab-enterprises.com> <1350747687002-4025047.post@n3.nabble.com> Message-ID: <1358968131151-4025740.post@n3.nabble.com> Hi, I've got a problem with mountain lion, and scilab plot it always crash. I can only calculate but never plot. -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Compatibility-With-MAC-OS-Mountain-Lion-tp4024747p4025740.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Thu Jan 24 11:38:25 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Thu, 24 Jan 2013 11:38:25 +0100 Subject: [Scilab-users] Subplot and isoview Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1063FA39D@301EX00100.sidel.com> Hello, isoview does not work the way I expect to in a subplot. E.g. the following script draws an ellipse instead of a circle. clf; subplot(2, 1, 1) theta = linspace(0, 2*%pi, 20); plot(cos(theta), sin(theta)); a = get('current_axes'); a.isoview = 'on'; How can I get a circle? -- 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 calixte.denizet at scilab-enterprises.com Thu Jan 24 11:51:44 2013 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Thu, 24 Jan 2013 11:51:44 +0100 Subject: [Scilab-users] Subplot and isoview In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F1063FA39D@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F1063FA39D@301EX00100.sidel.com> Message-ID: <51011240.50207@scilab-enterprises.com> On 24/01/2013 11:38, Dang, Christophe wrote: > Hello, > > isoview does not work the way I expect to in a subplot. > > E.g. the following script draws an ellipse instead of a circle. > > clf; > subplot(2, 1, 1) > theta = linspace(0, 2*%pi, 20); > plot(cos(theta), sin(theta)); > a = get('current_axes'); > a.isoview = 'on'; > > How can I get a circle? > Hi Christophe, We fixed this bug yesterday: http://gitweb.scilab.org/?p=scilab.git;a=commit;h=7ff0bb9e3b7d7f25cfa5c3d7a06b6c69fac38a79 So the fix will be in a next nightly-built. Thanks Calixte -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Thu Jan 24 11:47:01 2013 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 24 Jan 2013 11:47:01 +0100 Subject: [Scilab-users] Subplot and isoview In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F1063FA39D@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F1063FA39D@301EX00100.sidel.com> Message-ID: <51011125.2050300@laas.fr> On 24/01/2013 11:38, Dang, Christophe wrote: > Hello, > > isoview does not work the way I expect to in a subplot. > > E.g. the following script draws an ellipse instead of a circle. > > clf; > subplot(2, 1, 1) > theta = linspace(0, 2*%pi, 20); > plot(cos(theta), sin(theta)); > a = get('current_axes'); > a.isoview = 'on'; > > How can I get a circle? add either: a.axes_bounds(3)=0.5 or: a.axes_bounds(4)=1 you'll get a circle, but you'll also mess up with the subplot layout. Antoine > From Christophe.Dang at sidel.com Thu Jan 24 13:29:54 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Thu, 24 Jan 2013 13:29:54 +0100 Subject: [Scilab-users] Subplot and isoview In-Reply-To: <51011240.50207@scilab-enterprises.com> References: <3B5FFC67498DFF49AE7271A584867D16F1063FA39D@301EX00100.sidel.com> <51011240.50207@scilab-enterprises.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1063FA54D@301EX00100.sidel.com> On 24/01/2013 11:52, Calixte Denizet wrote: > We fixed this bug yesterday: Fine. On 24/01/2013 11:47, Antoine Monmayrant wrote: > add either: > a.axes_bounds(3)=0.5 > or: > a.axes_bounds(4)=1 Thanks for the tip. Regards to all. -- 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 corrales.lucas at gmail.com Fri Jan 25 15:33:36 2013 From: corrales.lucas at gmail.com (torta) Date: Fri, 25 Jan 2013 06:33:36 -0800 (PST) Subject: [Scilab-users] commande portrait In-Reply-To: <4A311B21.5060806@ec-marseille.fr> References: <4A311B21.5060806@ec-marseille.fr> Message-ID: <1359124416947-4025756.post@n3.nabble.com> I also need to use de ?portrait? function. Someone knows if is still avaliable with a different name? Considering that this question was made in 2009. Should I open a new topic? -- View this message in context: http://mailinglists.scilab.org/commande-portrait-tp2616021p4025756.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From arnaud.miege at gmail.com Fri Jan 25 16:24:51 2013 From: arnaud.miege at gmail.com (amiege) Date: Fri, 25 Jan 2013 07:24:51 -0800 (PST) Subject: [Scilab-users] Setting up a C compiler in Scilab 5.4.0 In-Reply-To: <1358932801761-4025736.post@n3.nabble.com> References: <1358932801761-4025736.post@n3.nabble.com> Message-ID: <1359127491423-4025758.post@n3.nabble.com> Now sorted, see the comments I left on the ATOMS module details page . Thanks, Arnaud -- View this message in context: http://mailinglists.scilab.org/Setting-up-a-C-compiler-in-Scilab-5-4-0-tp4025736p4025758.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From corrales.lucas at gmail.com Fri Jan 25 15:40:12 2013 From: corrales.lucas at gmail.com (torta) Date: Fri, 25 Jan 2013 06:40:12 -0800 (PST) Subject: [Scilab-users] !--error 2 Invalid factor using ODE solver Message-ID: <1359124812655-4025757.post@n3.nabble.com> Hi! I?m argentinian, sorry for my english. I?m having an ?Invaild factor? error when using the ODE solver. Here is my code: ------------------------------------------------------------------------- a1 = 0.5618; a2 = 1; a3 = 0; b1 = 0.00484; b2 = 0.00264; b3 = 0.37451; b4 = 0.1181; b5 = 0; function wdot = f(t,w) wdot = [a1*w(1) - a2*w(1)*w(2); b1*w(1)*w(2) - b2*w(1)*w(1)*w(2) - b3*w(2) + b4] endfunction function Jw = Jacobianf(t,w) Jw = [a1 - a2*w(2), -a2*w(1); b1*w(2) - 2*b2*w(1)*w(2), b1*w(1) - b2*w(1)*w(1) - b3] endfunction t0 = 0; w0 = [300, 1.5]; h = 0.1; t = (0:h:1); w = ode(w0, t0, t, f); ------------------------------------------------------------------------- Thanks! Lucas -- View this message in context: http://mailinglists.scilab.org/error-2-Invalid-factor-using-ODE-solver-tp4025757.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Fri Jan 25 17:06:20 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 25 Jan 2013 17:06:20 +0100 Subject: [Scilab-users] !--error 2 Invalid factor using ODE solver In-Reply-To: <1359124812655-4025757.post@n3.nabble.com> References: <1359124812655-4025757.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10643604E@301EX00100.sidel.com> Hello, > function wdot = f(t,w) > wdot = [a1*w(1) - a2*w(1)*w(2); b1*w(1)*w(2) - b2*w(1)*w(1)*w(2) - > b3*w(2) + b4] > endfunction "t" is not used in your function. Apart from this, the line is cut by an end of line, better use a line break after the semi-colon ";" or use the continuation points "..." e.g. wdot = [a1*w(1) - a2*w(1)*w(2); b1*w(1)*w(2) - b2*w(1)*w(1)*w(2) - b3*w(2) + b4] same for the definition of Jw Hope this helps -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From antseabra at gmail.com Fri Jan 25 18:18:25 2013 From: antseabra at gmail.com (AntonSeab) Date: Fri, 25 Jan 2013 09:18:25 -0800 (PST) Subject: [Scilab-users] Identification Toolbox Documentation Message-ID: <1359134305531-4025760.post@n3.nabble.com> Hi It would be great if you could point me to some documentation for the Identification Toolbox. Searched Scilab website and googled Scilab Identification Toolbox but couldn't get any documentation results Antonio -- View this message in context: http://mailinglists.scilab.org/Identification-Toolbox-Documentation-tp4025760.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From arnaud.miege at gmail.com Fri Jan 25 18:26:08 2013 From: arnaud.miege at gmail.com (amiege) Date: Fri, 25 Jan 2013 09:26:08 -0800 (PST) Subject: [Scilab-users] Linearizing a model with COSELICA blocks Message-ID: <1359134768048-4025761.post@n3.nabble.com> Hi,I am trying to linearize a model that I built using COSELICA blocks in Scilab 5.4.0. All the COSELICA blocks are encapsulated in a superblock, which has standard xcos inputs and outputs. I followed the example shown in the documentation for lincos, but I am getting the following error:Can anybody help? Is it even possible to linearize a model with COSELICA blocks?Thanks,Arnaud -- View this message in context: http://mailinglists.scilab.org/Linearizing-a-model-with-COSELICA-blocks-tp4025761.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ezequielsoule at gmail.com Fri Jan 25 19:42:49 2013 From: ezequielsoule at gmail.com (ezequiel soule) Date: Fri, 25 Jan 2013 10:42:49 -0800 (PST) Subject: [Scilab-users] modifying a variable changes the value of another variable!!! Message-ID: <1359139369968-4025762.post@n3.nabble.com> Hello, I am using some iterative algorithm defined as a function in a .sci file, and I have the following problem: the iterations in the algorithm are controlled by a given variable. Now, if I define another variable, (which DO NOT affect the values of the control variable nor the way it is calculated) in the function, the number of iterations to converge changes! What happens is that the value of the control variable, for some reason, is modified. It is not a very significant modification, actually the difference is in the order of 10^-15... the problem is that this difference propagates exponentially as the iterations advance, and the total number of iterations and the final result (which is not unique) can be modified drastically! My question is, why the value of the control variable is modifyied by the definition a completely independent variable. I saw this problem in scilab 5.4.0 and 5.2.2. I also saw a similar, but worse, problem, before with a similar algorithm. I just added a command "pause" in the function, and this command was even OUTSIDE the while loop that defined the iterations... and the number of iterations was modyfied. How can this happen? -- View this message in context: http://mailinglists.scilab.org/modifying-a-variable-changes-the-value-of-another-variable-tp4025762.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From peter.balazovic at yahoo.com Sat Jan 26 10:39:07 2013 From: peter.balazovic at yahoo.com (pepe) Date: Sat, 26 Jan 2013 01:39:07 -0800 (PST) Subject: [Scilab-users] Non-linear ODE uder xcos and integration using C Message-ID: <1359193147790-4025763.post@n3.nabble.com> Hello all, I wonder how to do an inegration under xcos. I want to have this encapsulated within C function which is model function for user-defined block. Other words I want to create my own model of system. I want to solve its nonlinear ODE of system. /example:/ #include "scicos_block4.h" #define U ((SCSREAL_COP *)GetRealInPortPtrs(blk, 1)) #define Y ((SCSREAL_COP *)GetRealOutPortPtrs(blk, 1)) #define X ((SCSREAL_COP *)GetState(blk)) #define dX ((SCSREAL_COP *)GetDerState(blk)) #define Xk ((SCSREAL_COP *)GetDstate(blk)) #define W ((SCSREAL_COP *)GetWorkPtrs(blk)) #define G (GetGPtrs(blk)) #define J (GetJrootPtrs(blk)) #define M (GetModePtrs(blk)) void model(scicos_block *blk, int flag) { int i; switch (flag) { case Initialization: break; case Ending: break; case DerivativeState: break; case StateUpdate: break; case OutputUpdate: break; default: break; } } I am not familiar with scilab/xcos possibilities, I am looking for more insights and understand how it works. Which block to use for this from the palette? How to add a C function to the block? How to pass inputs,ouputs,parameters? Is there simple example (Van Der Pool)? Possibilities to solve non-linear ODE equation? Thank you very much for your help! Best regards, Peter -- View this message in context: http://mailinglists.scilab.org/Non-linear-ODE-uder-xcos-and-integration-using-C-tp4025763.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From geofyss at gmail.com Sat Jan 26 17:00:01 2013 From: geofyss at gmail.com (constantina) Date: Sat, 26 Jan 2013 08:00:01 -0800 (PST) Subject: [Scilab-users] Peaks and positions Message-ID: <1359216001776-4025764.post@n3.nabble.com> Sorry, I know is a basic question, i now the answer in matlab but not in scilab.... What is the function that let me find "peaks " in a matrix and the position of the peaks??? Thankss!!! -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Jan 26 17:46:35 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 26 Jan 2013 17:46:35 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: <1359216001776-4025764.post@n3.nabble.com> References: <1359216001776-4025764.post@n3.nabble.com> Message-ID: <5104086B.7010206@free.fr> Le 26/01/2013 17:00, constantina a ?crit : > Sorry, I know is a basic question, i now the answer in matlab but not in > scilab.... What is the function that let me find "peaks " in a matrix and > the position of the peaks??? Here is a possible solution, including peaks on the borders: m = rand(6,6) M = [m(2,:) ; m ; m($-1,:) ]; M = [M(:,2) M M(:,$-1)]; pC = M(2:$-1,2:$-1)>M(1:$-2,2:$-1) & M(2:$-1,2:$-1)>M(3:$,2:$-1); pR = M(2:$-1,2:$-1)>M(2:$-1,1:$-2) & M(2:$-1,2:$-1)>M(2:$-1,3:$); isPeak = pC & pR find(isPeak) // returns linearized indices of peaks m(~isPeak) = 0 // to show only peaks giving: -->m = rand(6,6) m = 0.0437334 0.7783129 0.8415518 0.5618661 0.3873779 0.2615761 0.4818509 0.2119030 0.4062025 0.5896177 0.9222899 0.4993494 0.2639556 0.1121355 0.4094825 0.6853980 0.9488184 0.2638578 0.4148104 0.6856896 0.8784126 0.8906225 0.3435337 0.5253563 0.2806498 0.1531217 0.1138360 0.5042213 0.3760119 0.5376230 0.1280058 0.6970851 0.1998338 0.3493615 0.7340941 0.1199926 -->M = [m(2,:) ; m ; m($-1,:) ]; -->M = [M(:,2) M M(:,$-1)]; -->pC = M(2:$-1,2:$-1)>M(1:$-2,2:$-1) & M(2:$-1,2:$-1)>M(3:$,2:$-1); -->pR = M(2:$-1,2:$-1)>M(2:$-1,1:$-2) & M(2:$-1,2:$-1)>M(2:$-1,3:$); -->isPeak = pC & pR isPeak = F F T F F F T F F F F F F F F F T F F F F T F F F F F F F T F T F F T F -->find(isPeak) // returns linearized indices of peaks ans = 2. 12. 13. 22. 27. 30. 35. -->m(~isPeak) = 0 // to show only peaks m = 0. 0. 0.8415518 0. 0. 0. 0.4818509 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.9488184 0. 0. 0. 0. 0.8906225 0. 0. 0. 0. 0. 0. 0. 0.5376230 0. 0.6970851 0. 0. 0.7340941 0. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From haasejos at web.de Sat Jan 26 19:44:28 2013 From: haasejos at web.de (haasejos) Date: Sat, 26 Jan 2013 10:44:28 -0800 (PST) Subject: [Scilab-users] using "intg" in a function Message-ID: <1359225868714-4025769.post@n3.nabble.com> hello, I wont to write a little programm like the example below. When I use /function [wert] = in(x(1) , x($)); wert = intg(x(1),x($),quad); endfunction;/ (what I want to do!) it does not work. What am I doing wrong? thanks a lot! *clear; clc; xdel; function y = linear(x); y = 2*x; endfunction; function yy = quad(x); yy = (linear(x))^2; endfunction; function [wert] = in(x(1) , x($)); wert = intg(x(1),x($),quad); endfunction; x = [0:4]; wert = intg(x(1) , x($) , quad); //this works* -- View this message in context: http://mailinglists.scilab.org/using-intg-in-a-function-tp4025769.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Sat Jan 26 22:27:35 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 26 Jan 2013 13:27:35 -0800 (PST) Subject: [Scilab-users] using "intg" in a function In-Reply-To: <1359225868714-4025769.post@n3.nabble.com> References: <1359225868714-4025769.post@n3.nabble.com> Message-ID: <1359235655975-4025770.post@n3.nabble.com> Hi, Invalid syntax for the input variable names in: function [wert] = in(x(1) , x($)). Write instead: function wert = in(x); wert = intg(x(1),x($),quad); endfunction; x = [0:4]; wert = in(x); //should work now Regards Rafael -- View this message in context: http://mailinglists.scilab.org/using-intg-in-a-function-tp4025769p4025770.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Sun Jan 27 03:51:01 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 26 Jan 2013 18:51:01 -0800 (PST) Subject: [Scilab-users] Scilab 5.4 createdir Message-ID: <1359255061279-4025773.post@n3.nabble.com> Hello, In Scilab 5.4 (Windows 7) if one creates a folder with the command: status= createdir('D:\OUTPUT'); and the folder already exists, then a warning message will be issued in Scilab's Console: createdir: Warning: Directory 'D:\OUTPUT' already exists. How can one check in Scilab if a directory already exists? How to disable the warning message above? Thanks and regards, Rafael G. -- View this message in context: http://mailinglists.scilab.org/Scilab-5-4-createdir-tp4025773.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sun Jan 27 06:05:26 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 27 Jan 2013 06:05:26 +0100 Subject: [Scilab-users] Scilab 5.4 createdir In-Reply-To: <1359255061279-4025773.post@n3.nabble.com> References: <1359255061279-4025773.post@n3.nabble.com> Message-ID: <5104B596.8000507@free.fr> Hello Rafael, Le 27/01/2013 03:51, Rafael Guerra a ?crit : > ../.. > In Scilab 5.4 (Windows 7) if one creates a folder with the command: > status= createdir('D:\OUTPUT'); > > and the folder already exists, then a warning message will be issued in > Scilab's Console: > createdir: Warning: Directory 'D:\OUTPUT' already exists. > > How can one check in Scilab if a directory already exists? with fileinfo("myDir_or_file_with_path")~= [ ] > How to disable the warning message above? AFAIK, there is no switch Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Sun Jan 27 09:23:44 2013 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sun, 27 Jan 2013 09:23:44 +0100 Subject: [Scilab-users] Scilab 5.4 createdir In-Reply-To: <5104B596.8000507@free.fr> References: <1359255061279-4025773.post@n3.nabble.com> <5104B596.8000507@free.fr> Message-ID: <5104E410.6030502@scilab-enterprises.com> On 27/01/2013 06:05, Samuel Gougeon wrote: > Hello Rafael, > > Le 27/01/2013 03:51, Rafael Guerra a ?crit : >> ../.. >> In Scilab 5.4 (Windows 7) if one creates a folder with the command: >> status= createdir('D:\OUTPUT'); >> >> and the folder already exists, then a warning message will be issued in >> Scilab's Console: >> createdir: Warning: Directory 'D:\OUTPUT' already exists. >> >> How can one check in Scilab if a directory already exists? > with > fileinfo("myDir_or_file_with_path")~= [ ] isdir("foo") does the work too. http://help.scilab.org/isdir >> How to disable the warning message above? -->createdir("/tmp") createdir : Attention : Le r?pertoire '/tmp' existe d?j?. ans = T -->warning("off") -->createdir("/tmp") ans = T http://help.scilab.org/warning S From vogt at centre-cired.fr Sun Jan 27 13:59:51 2013 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Sun, 27 Jan 2013 13:59:51 +0100 Subject: [Scilab-users] Scilab 5.4 createdir In-Reply-To: <5104E410.6030502@scilab-enterprises.com> References: <1359255061279-4025773.post@n3.nabble.com> <5104B596.8000507@free.fr> <5104E410.6030502@scilab-enterprises.com> Message-ID: <510524C7.9090601@centre-cired.fr> guy guys mkdir does what you want does not issue a warning when the dir already existed, instead returns a status that you can ignore: -->mkdir foo ans = 1. -->mkdir foo ans = 2. -->mkdir foo ans = 2. -->mkdir "this%???$^? wont work" ans = 0. help mkdir kind regards On 27/01/2013 09:23, Sylvestre Ledru wrote: > On 27/01/2013 06:05, Samuel Gougeon wrote: >> Hello Rafael, >> >> Le 27/01/2013 03:51, Rafael Guerra a ?crit : >>> ../.. >>> In Scilab 5.4 (Windows 7) if one creates a folder with the command: >>> status= createdir('D:\OUTPUT'); >>> >>> and the folder already exists, then a warning message will be issued in >>> Scilab's Console: >>> createdir: Warning: Directory 'D:\OUTPUT' already exists. >>> >>> How can one check in Scilab if a directory already exists? >> with >> fileinfo("myDir_or_file_with_path")~= [ ] > isdir("foo") does the work too. > http://help.scilab.org/isdir > >>> How to disable the warning message above? > > -->createdir("/tmp") > createdir : Attention : Le r?pertoire '/tmp' existe d?j?. > ans = > > T > > -->warning("off") > > -->createdir("/tmp") > ans = > > T > > http://help.scilab.org/warning > > S > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From haasejos at web.de Sun Jan 27 14:55:36 2013 From: haasejos at web.de (haasejos) Date: Sun, 27 Jan 2013 05:55:36 -0800 (PST) Subject: [Scilab-users] using "intg" in a function In-Reply-To: <1359235655975-4025770.post@n3.nabble.com> References: <1359225868714-4025769.post@n3.nabble.com> <1359235655975-4025770.post@n3.nabble.com> Message-ID: <1359294936772-4025778.post@n3.nabble.com> hello Rafael, yes indeed, it works!!! *Thank you very much* Josef -- View this message in context: http://mailinglists.scilab.org/using-intg-in-a-function-tp4025769p4025778.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sun Jan 27 15:05:31 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 27 Jan 2013 15:05:31 +0100 Subject: [Scilab-users] Scilab 5.4 createdir In-Reply-To: <5104E410.6030502@scilab-enterprises.com> References: <1359255061279-4025773.post@n3.nabble.com> <5104B596.8000507@free.fr> <5104E410.6030502@scilab-enterprises.com> Message-ID: <5105342B.6090704@free.fr> Le 27/01/2013 09:23, Sylvestre Ledru a ?crit : >>> How to disable the warning message above? > > -->createdir("/tmp") > createdir : Attention : Le r?pertoire '/tmp' existe d?j?. > ans = > > T > > -->warning("off") right, but this turn off all warnings from any command, not only for createdir(). This is clearly efficient, but a bit hard ;) For instance, warnings coming from commands that are turned obsolete should not be ignored... From dositheus41 at gmail.com Sun Jan 27 22:54:26 2013 From: dositheus41 at gmail.com (=?ISO-8859-1?Q?Ren=E9_Grognard?=) Date: Mon, 28 Jan 2013 08:54:26 +1100 Subject: [Scilab-users] Problem with ATOMS Message-ID: In my professional work I had access and used MATLAB for many years. Now retired I have to switch to some free/less expensive equivalent software and I just downloaded Scilab that seems to offer more toolboxes. However ATOMS does not seem to work. My PC is a HP ProBook 4730s running Windows 7. (Cygwin 1.7 is installed and coud be used to run WScilex.exe.) When I started Scilab-5.4.0 all appeared to be well: Startup execution: loading initial environment -->atomsSetConfig('Verbose','True') ans = 1. -->atomsGetConfig() ans = downloadTool: "curl" Verbose: "True" The window Main categories - ATOMS was functional and allowed me to install say the Plotting library particularly promising to a MATLAB ex-user --- I get the message: Installation done! Please restart Scilab to take changes into account. OK restarting: Startup execution: loading initial environment Start plotlib toolbox 0.43 Load macros Load help !--error 999 'background' property does not exist for this handle. at line 46 of function uicontrol called by : at line 207 of function atomsGui called by : ms") then atomsGui(); else disp(gettext(" while executing a callback The error message itself seems garbled! The next one seems clearer: -->atomsGui() !--error 999 'background' property does not exist for this handle. at line 46 of function uicontrol called by : at line 207 of function atomsGui called by : atomsGui() The window Main categories - ATOMS which appears is now empty and indeed as "dead" as a dodo. I checked that I have full control over the SCIHOME folder and its contents. I regularly update the free JAVA which I believe is used by Scilab. What did I do wrong/missed in installing Scilab-5.4.0? Any help/info will be appreciated. Regards, Ren?. From jrafaelbguerra at hotmail.com Mon Jan 28 01:11:09 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 27 Jan 2013 16:11:09 -0800 (PST) Subject: [Scilab-users] Scilab 5.4 createdir In-Reply-To: <510524C7.9090601@centre-cired.fr> References: <1359255061279-4025773.post@n3.nabble.com> <5104B596.8000507@free.fr> <5104E410.6030502@scilab-enterprises.com> <510524C7.9090601@centre-cired.fr> Message-ID: <1359331869739-4025781.post@n3.nabble.com> Thanks Adrien and others for the very helpful responses. The mkdir function has indeed all the functionality required, seeming more useful than the more basic createdir function. Best regards, Rafael G. -- View this message in context: http://mailinglists.scilab.org/Scilab-5-4-createdir-tp4025773p4025781.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From geofyss at gmail.com Mon Jan 28 02:01:21 2013 From: geofyss at gmail.com (constantina) Date: Sun, 27 Jan 2013 17:01:21 -0800 (PST) Subject: [Scilab-users] Peaks and positions In-Reply-To: <5104086B.7010206@free.fr> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> Message-ID: <1359334881397-4025782.post@n3.nabble.com> thank uso much!!! it helped me alot :) -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764p4025782.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From vincent.couvert at scilab-enterprises.com Mon Jan 28 08:52:39 2013 From: vincent.couvert at scilab-enterprises.com (Vincent COUVERT) Date: Mon, 28 Jan 2013 08:52:39 +0100 Subject: [Scilab-users] Problem with ATOMS In-Reply-To: References: Message-ID: <51062E47.8040708@scilab-enterprises.com> Hello, It seems that this error is due to plotlib since the error message indicates that the error occurred at line 46 of uicontrol and this line does not exists in Sciab uicontrol function (which is a C function). Can you report this issue to the author (http://atoms.scilab.org/toolboxes/plotlib)? Regards. Le 27/01/13 22:54, Ren? Grognard a ?crit : > In my professional work I had access and used MATLAB for many years. > Now retired I have to switch to some free/less expensive equivalent > software and I just downloaded Scilab that seems to offer more > toolboxes. > > However ATOMS does not seem to work. > > My PC is a HP ProBook 4730s running Windows 7. (Cygwin 1.7 is > installed and coud be used to run WScilex.exe.) > > When I started Scilab-5.4.0 all appeared to be well: > > Startup execution: > loading initial environment > -->atomsSetConfig('Verbose','True') > ans = > 1. > -->atomsGetConfig() > ans = > downloadTool: "curl" > Verbose: "True" > > The window Main categories - ATOMS was functional and allowed me to > install say the Plotting library particularly promising to a MATLAB > ex-user --- I get the message: > > Installation done! Please restart Scilab to take changes into account. > > OK restarting: > > Startup execution: > loading initial environment > > Start plotlib toolbox 0.43 > Load macros > Load help > > !--error 999 > 'background' property does not exist for this handle. > at line 46 of function uicontrol called by : > at line 207 of function atomsGui called by : > ms") then atomsGui(); else disp(gettext(" > while executing a callback > > The error message itself seems garbled! > > The next one seems clearer: > > -->atomsGui() > !--error 999 > 'background' property does not exist for this handle. > at line 46 of function uicontrol called by : > at line 207 of function atomsGui called by : > atomsGui() > > The window Main categories - ATOMS which appears is now empty and > indeed as "dead" as a dodo. > > I checked that I have full control over the SCIHOME folder and its contents. > > I regularly update the free JAVA which I believe is used by Scilab. > > What did I do wrong/missed in installing Scilab-5.4.0? > > Any help/info will be appreciated. > > Regards, > > Ren?. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From clement.david at scilab-enterprises.com Mon Jan 28 09:00:31 2013 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 28 Jan 2013 09:00:31 +0100 Subject: [Scilab-users] Linearizing a model with COSELICA blocks In-Reply-To: <1359134768048-4025761.post@n3.nabble.com> References: <1359134768048-4025761.post@n3.nabble.com> Message-ID: <1359360031.2451.6.camel@paros> Hello, It is possible to linearize a modelica model however I should compile (in the sense of producing an Xcos block from a modelica diagram) first. Just define "needcompile=4" before calling lincos and open a non-documented bug. -- Cl?ment Le vendredi 25 janvier 2013 ? 09:26 -0800, amiege a ?crit : > Hi, I am trying to linearize a model that I built using COSELICA > blocks in Scilab 5.4.0. All the COSELICA blocks are encapsulated in a > superblock, which has standard xcos inputs and outputs. I followed the > example shown in the documentation for lincos, but I am getting the > following error: > -->importXcosDiagram("DC_motor.zcos") > ans = > > T > > -->for i=1:length(scs_m.objs) > --> if typeof(scs_m.objs(i))=="Block" & scs_m.objs(i).gui=="SUPER_f" then > --> temp = scs_m.objs(i).model.rpar; > --> disp("Superblock found") > --> break; > --> end > -->end > > Superblock found > > -->sys = lincos(temp) > --------------------------------------------\ > Main Modelica : C:\DOCUME~1\ajpm\LOCALS~1\Temp\SCI_TMP_3704_\_im.mo > > !--error 4 > Undefined variable: needcompile > at line 42 of function compile_modelica called by : > at line 40 of function build_modelica_block called by : > at line 230 of function c_pass1 called by : > at line 118 of function lincos called by : > sys = lincos(temp) > Can anybody help? Is it even possible to linearize a model with > COSELICA blocks? Thanks, Arnaud > > ______________________________________________________________________ > View this message in context: Linearizing a model with COSELICA blocks > Sent from the Scilab users - Mailing Lists Archives mailing list > archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Mon Jan 28 09:51:33 2013 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Mon, 28 Jan 2013 09:51:33 +0100 Subject: [Scilab-users] Problem with ATOMS In-Reply-To: <51062E47.8040708@scilab-enterprises.com> References: <51062E47.8040708@scilab-enterprises.com> Message-ID: <51063C15.6040901@utc.fr> Hello, this problem is fixed in the current developpement version of the plotlib, a new version will be released this week. S. Le 28/01/13 08:52, Vincent COUVERT a ?crit : > Hello, > > It seems that this error is due to plotlib since the error message > indicates that the error occurred at line 46 of uicontrol and this > line does not exists in Sciab uicontrol function (which is a C function). > > Can you report this issue to the author > (http://atoms.scilab.org/toolboxes/plotlib)? > > Regards. > > > Le 27/01/13 22:54, Ren? Grognard a ?crit : >> In my professional work I had access and used MATLAB for many years. >> Now retired I have to switch to some free/less expensive equivalent >> software and I just downloaded Scilab that seems to offer more >> toolboxes. >> >> However ATOMS does not seem to work. >> >> My PC is a HP ProBook 4730s running Windows 7. (Cygwin 1.7 is >> installed and coud be used to run WScilex.exe.) >> >> When I started Scilab-5.4.0 all appeared to be well: >> >> Startup execution: >> loading initial environment >> -->atomsSetConfig('Verbose','True') >> ans = >> 1. >> -->atomsGetConfig() >> ans = >> downloadTool: "curl" >> Verbose: "True" >> >> The window Main categories - ATOMS was functional and allowed me to >> install say the Plotting library particularly promising to a MATLAB >> ex-user --- I get the message: >> >> Installation done! Please restart Scilab to take changes into account. >> >> OK restarting: >> >> Startup execution: >> loading initial environment >> >> Start plotlib toolbox 0.43 >> Load macros >> Load help >> >> !--error 999 >> 'background' property does not exist for this handle. >> at line 46 of function uicontrol called by : >> at line 207 of function atomsGui called by : >> ms") then atomsGui(); else disp(gettext(" >> while executing a callback >> >> The error message itself seems garbled! >> >> The next one seems clearer: >> >> -->atomsGui() >> !--error 999 >> 'background' property does not exist for this handle. >> at line 46 of function uicontrol called by : >> at line 207 of function atomsGui called by : >> atomsGui() >> >> The window Main categories - ATOMS which appears is now empty and >> indeed as "dead" as a dodo. >> >> I checked that I have full control over the SCIHOME folder and its >> contents. >> >> I regularly update the free JAVA which I believe is used by Scilab. >> >> What did I do wrong/missed in installing Scilab-5.4.0? >> >> Any help/info will be appreciated. >> >> Regards, >> >> Ren?. >> _______________________________________________ >> 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 Serge.Steer at inria.fr Mon Jan 28 09:54:53 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 28 Jan 2013 09:54:53 +0100 Subject: [Scilab-users] Identification Toolbox Documentation In-Reply-To: <1359134305531-4025760.post@n3.nabble.com> References: <1359134305531-4025760.post@n3.nabble.com> Message-ID: <51063CDD.3050905@inria.fr> The identification functions help pages can be found in the CACSD chapter look at findABCD, findBD, findAC,... but also imprep2ss, armax, ... Serge Steer Le 25/01/2013 18:18, AntonSeab a ?crit : > Hi > > It would be great if you could point me to some documentation for the > Identification Toolbox. Searched Scilab website and googled Scilab > Identification Toolbox but couldn't get any documentation results > > Antonio > > > > > -- > View this message in context: http://mailinglists.scilab.org/Identification-Toolbox-Documentation-tp4025760.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 arnaud.miege at gmail.com Mon Jan 28 13:04:17 2013 From: arnaud.miege at gmail.com (amiege) Date: Mon, 28 Jan 2013 04:04:17 -0800 (PST) Subject: [Scilab-users] Linearizing a model with COSELICA blocks In-Reply-To: <1359360031.2451.6.camel@paros> References: <1359134768048-4025761.post@n3.nabble.com> <1359360031.2451.6.camel@paros> Message-ID: <1359374657610-4025795.post@n3.nabble.com> Cl?ment David-2 wrote > Hello,It is possible to linearize a modelica model however I should > compile(in the sense of producing an Xcos block from a modelica diagram) > first.Just define "needcompile=4" before calling lincos and open > anon-documented bug. Thank you, that works indeed. I have opened bug #12256.Arnaud -- View this message in context: http://mailinglists.scilab.org/Linearizing-a-model-with-COSELICA-blocks-tp4025761p4025795.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ezequielsoule at gmail.com Mon Jan 28 13:14:01 2013 From: ezequielsoule at gmail.com (Ezequiel Soule) Date: Mon, 28 Jan 2013 09:14:01 -0300 Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: <1359139369968-4025762.post@n3.nabble.com> References: <1359139369968-4025762.post@n3.nabble.com> Message-ID: <51066B89.2020304@gmail.com> Hello, I am using some iterative algorithm defined as a function in a .sci file, and I have the following problem: the iterations in the algorithm are controlled by a given variable. Now, if I define another variable, (which DO NOT affect the values of the control variable nor the way it is calculated) in the function, the number of iterations to converge changes! What happens is that the value of the control variable, for some reason, is modified. It is not a very significant modification, actually the difference is in the order of 10^-15... the problem is that this difference propagates exponentially as the iterations advance, and the total number of iterations and the final result (which is not unique) can be modified drastically! My question is, why the value of the control variable is modifyied by the definition a completely independent variable. I saw this problem in scilab 5.4.0 and 5.2.2. I also had a similar, but worse, problem, before with a similar algorithm. I just added a command "pause" in the function, and this command was even OUTSIDE the while loop that defined the iterations... and the number of iterations was modyfied. How can this happen? From Christophe.Dang at sidel.com Mon Jan 28 14:18:01 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 28 Jan 2013 14:18:01 +0100 Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: <51066B89.2020304@gmail.com> References: <1359139369968-4025762.post@n3.nabble.com> <51066B89.2020304@gmail.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10647E731@301EX00100.sidel.com> Hello, > Now, if I define another variable, > the number of iterations to converge changes! [...] > the problem is that this difference propagates exponentially Maybe you could send us a "minimal" script reproducing the problem? 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 jrafaelbguerra at hotmail.com Mon Jan 28 14:26:45 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 28 Jan 2013 11:26:45 -0200 Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: <51066B89.2020304@gmail.com> References: <1359139369968-4025762.post@n3.nabble.com> <51066B89.2020304@gmail.com> Message-ID: Ezequiel, I recommend you to create a minimal code example which reproduces the problem you have at hands and to submit it to the users list for evaluation. It will be easier to help you. Best regards. Rafael G. -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] On Behalf Of Ezequiel Soule Sent: Monday, January 28, 2013 10:14 AM To: users at lists.scilab.org Subject: [Scilab-users] modifying a variable changes the value of another variable!!! Hello, I am using some iterative algorithm defined as a function in a .sci file, and I have the following problem: the iterations in the algorithm are controlled by a given variable. Now, if I define another variable, (which DO NOT affect the values of the control variable nor the way it is calculated) in the function, the number of iterations to converge changes! What happens is that the value of the control variable, for some reason, is modified. It is not a very significant modification, actually the difference is in the order of 10^-15... the problem is that this difference propagates exponentially as the iterations advance, and the total number of iterations and the final result (which is not unique) can be modified drastically! My question is, why the value of the control variable is modifyied by the definition a completely independent variable. I saw this problem in scilab 5.4.0 and 5.2.2. I also had a similar, but worse, problem, before with a similar algorithm. I just added a command "pause" in the function, and this command was even OUTSIDE the while loop that defined the iterations... and the number of iterations was modyfied. How can this happen? _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From geofyss at gmail.com Mon Jan 28 15:07:23 2013 From: geofyss at gmail.com (constantina) Date: Mon, 28 Jan 2013 06:07:23 -0800 (PST) Subject: [Scilab-users] Peaks and positions In-Reply-To: <5104086B.7010206@free.fr> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> Message-ID: <1359382043635-4025799.post@n3.nabble.com> If I have a vector , por example M= rand(418,1) , how can I implement the same procediment?? -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764p4025799.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Mon Jan 28 15:21:32 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Mon, 28 Jan 2013 15:21:32 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: <1359382043635-4025799.post@n3.nabble.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> Hello, > If I have a vector , por example M= rand(418,1) Just a question of vocabulary, are you lookng for peaks with a given width, such as or for "one-pixel" wide peaks, which are sometimes refered to as "spikes"? For spikes, you can use the cade given by Samuel, just removing the "pC". If the peaks have a given width, you can locate the minima of the second derivative, best after smoothing, e.g. http://commons.wikimedia.org/wiki/File:Desommation_trois_pics_gaussiens_21pts.svg (source code here : http://commons.wikimedia.org/wiki/File:Detection_pic_savitzky_Golay.svg#Scilab_source ) Best regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From ezequielsoule at gmail.com Mon Jan 28 16:18:41 2013 From: ezequielsoule at gmail.com (=?ISO-8859-1?Q?Ezequiel_Soul=E9?=) Date: Mon, 28 Jan 2013 12:18:41 -0300 Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: References: <1359139369968-4025762.post@n3.nabble.com> <51066B89.2020304@gmail.com> Message-ID: The algorithm essentially starts with a set of spheres in random positions and in a relatively dense state, and runs an iterative process where the spheres are moved in each iteration in order to reduce the overlaps. The core of the script is more or less like this superp=calc_D_superp_dobcel(pos); //this line uses an external function to calculate a matrix with the overlap between paritcles, defined as superp(i,j)=max(R(i)+R(j)-D(i,j),0) . D(i,j) is the distance between the spheres and R is the radius. pos is a 3-colum matrix containging the coordinates of the position of each sphere control=0; //number of iterationssup_2(int(control/max_mov*20)+1)=sumsupant/max_mov*20; // this defines a third control system as will be described bellow. ** while max(superp)>tol // the maximum value of superp controls when the system is considered overlap-free and the algorithm is finished ... // Several lines where the positions of each sphere are modified, acording to the values of the matrix superp ... superp=calc_D_superp_dobcel(pos); //matrix superp is re-calculated with the new positions control=control+1; if control>max_mov then break; end // control by maximum number of iterations //the following belongs to the third control system: if length(sup_2)==int(control/max_mov*20) then sup_2(int(control/max_mov*20)+1)=sum(superp)/max_mov*20; //** else //** sup_2(int(control/max_mov*20)+1)=sup_2(int(control/max_mov*20)+1) + sum(superp)/max_mov*20; //** end //** if length(sup_2)>4.5 then //** if sup_2($-1)>0.85*sup_2($-2) & sup_2($-2)>0.85*sup_2($-3) then break; end //** if sup_2($-1)>0.7*sup_2($-2) & sup_2($-2)>0.7*sup_2($-3) & sup_2($-3)>0.6*sup_2($-4) then break; end //** end //** end //ends while loop The third control system essentially controls if the overlap is decreasing as the iterations proceed. It defines a new variable, sup_2, that stores the average value of sum(superp) in max_mov/20 iterations. If this average does not decrease fast enough (>15% decrease in two or >30%decrease in three consecutive groups of max_mov/20 iterations), it considers that it will not converge and breaks. Now, this third control system seems to be problem. As you can see, non of its lines (marked with ** for more clarity), affects the values of superp (at least, it shouldn?t). But still, the value of superp is modified when I include this control system. The other problem I had was with a similar algorithm, without the third control system, but just adding a "pause" rigth after the last end. This will also modify the values of superp and the number of iterations. As I said, the error in superp is not important (it is in the order of 1.d-15), but this difference propagates exponentially through the iterations and can significantly modify (like a 30%) the total number of iterations (I was trying to evaluate if the third control really worked, but I couldn?t do it because the algortihm CONVERGES with a different number of iterations...) -------------- next part -------------- An HTML attachment was scrubbed... URL: From geofyss at gmail.com Mon Jan 28 16:29:08 2013 From: geofyss at gmail.com (constantina) Date: Mon, 28 Jan 2013 07:29:08 -0800 (PST) Subject: [Scilab-users] Peaks and positions In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> Message-ID: <1359386948086-4025809.post@n3.nabble.com> yes, you're right, the correct word is "spike". My problem consist: a matrix like [v,k1,k2], the first letter is "time", k1 and k2 are "values" of a time series. So... if I plot the values, Im gonna find "spikes" that means "errors, happens the same with "zero" values... I have to eliminate the wrong values, and I dont know how to do it, my teacher said that one way is find the spikes and erase from the matrix, but I dont know how to do it , im newbie with scilab and I tried with the method of Samuel, but I have problems with the size of the matrix (is evident in his example is 6x6) :/ , please any suggestion? -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764p4025809.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Mon Jan 28 18:07:53 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 28 Jan 2013 18:07:53 +0100 Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: References: <1359139369968-4025762.post@n3.nabble.com> <51066B89.2020304@gmail.com> Message-ID: <5106B069.3010807@inria.fr> If the initial position of your sphere are randomly set, it can be normal than you do not have the same number of iteration from one simulation to an other one. can you check using rand("seed",0) to force identical initial points for your various tests. Serge Steer Le 28/01/2013 16:18, Ezequiel Soul? a ?crit : > The algorithm essentially starts with a set of spheres in random > positions and in a relatively dense state, and runs an iterative > process where the spheres are moved in each iteration in order to > reduce the overlaps. > The core of the script is more or less like this > > superp=calc_D_superp_dobcel(pos); //this line uses an external function to calculate a matrix with the overlap between paritcles, defined as superp(i,j)=max(R(i)+R(j)-D(i,j),0) . D(i,j) is the distance between the spheres and R is the radius. pos is a 3-colum matrix containging the coordinates of the position of each sphere > > control=0; //number of iterations > > sup_2(int(control/max_mov*20)+1)=sumsupant/max_mov*20; // this defines a third control system as will be described bellow. ** > > while max(superp)>tol // the maximum value of superp controls when the system is considered overlap-free and the algorithm is finished > > > ... > // Several lines where the positions of each sphere are modified, acording to the values of the matrix superp > ... > > superp=calc_D_superp_dobcel(pos); //matrix superp is re-calculated with the new positions > > > control=control+1; > > if control>max_mov then break; end // control by maximum number of iterations > > //the following belongs to the third control system: > > if length(sup_2)==int(control/max_mov*20) then sup_2(int(control/max_mov*20)+1)=sum(superp)/max_mov*20; //** > else//** > sup_2(int(control/max_mov*20)+1)=sup_2(int(control/max_mov*20)+1) + sum(superp)/max_mov*20; //** > end //** > > if length(sup_2)>4.5 then //** > if sup_2($-1)>0.85*sup_2($-2) & sup_2($-2)>0.85*sup_2($-3) then break; end //** > if sup_2($-1)>0.7*sup_2($-2) & sup_2($-2)>0.7*sup_2($-3) & sup_2($-3)>0.6*sup_2($-4) then break; end //** > end //** > > end//ends while loop > > The third control system essentially controls if the overlap is > decreasing as the iterations proceed. It defines a new variable, > sup_2, that stores the average value of sum(superp) in max_mov/20 > iterations. If this average does not decrease fast enough (>15% > decrease in two or >30%decrease in three consecutive groups of > max_mov/20 iterations), it considers that it will not converge and breaks. > Now, this third control system seems to be problem. As you can see, > non of its lines (marked with ** for more clarity), affects the values > of superp (at least, it shouldn?t). But still, the value of superp is > modified when I include this control system. > The other problem I had was with a similar algorithm, without the > third control system, but just adding a "pause" rigth after the last > end. This will also modify the values of superp and the number of > iterations. > As I said, the error in superp is not important (it is in the order of > 1.d-15), but this difference propagates exponentially through the > iterations and can significantly modify (like a 30%) the total number > of iterations (I was trying to evaluate if the third control really > worked, but I couldn?t do it because the algortihm CONVERGES with a > different number of iterations...) > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From tirelli85 at gmail.com Mon Jan 28 18:30:01 2013 From: tirelli85 at gmail.com (Giovanni Tirelli) Date: Mon, 28 Jan 2013 18:30:01 +0100 Subject: [Scilab-users] Problem with ATOMS In-Reply-To: References: Message-ID: Hi, i've got the same error type in function "plot" of "scilab 5.4" running over "mountain lion" e.g. (scilab help ode exampe) function ydot=f(t, y) ydot=y^2-y*sin(t)+cos(t) endfunction y0=0; t0=0; t=0:0.1:%pi; y=ode(y0,t0,t,f); plot(y,t) executing with echo: -->function ydot=f(t, y) --> ydot=y^2-y*sin(t)+cos(t) -->endfunction -->y0=0; -->t0=0; -->t=0:0.1:%pi; -->y=ode(y0,t0,t,f); -->plot(y,t) !--error 42 Oups. A fatal error has been detected by Scilab. Your instance will probably crash soon. Please report a bug on http://bugzilla.scilab.org/ with: * a sample code which reproduces the issue * the result of [a, b] = getdebuginfo() * the following information: [MacBook-2:50896] Signal: Abort trap: 6 (6) [MacBooki-2:50896] Signal code: (0) Call stack: 1: ? ? (?) 2: 0x59dce (/usr/lib/system/libsystem_c.dylib) 3: 0x3a17 (/usr/lib/libc++abi.dylib) 4: 0x13c6 <_ZL17default_terminatev> (/usr/lib/libc++abi.dylib) 5: 0x11887 <_ZL15_objc_terminatev> (/usr/lib/libobjc.A.dylib) 6: 0x13f5 <_ZL19safe_handler_callerPFvvE> (/usr/lib/libc++abi.dylib) 7: 0x1450 <__cxa_bad_typeid> (/usr/lib/libc++abi.dylib) 8: 0x25b7 <_ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception> (/usr/lib/libc++abi.dylib) 9: 0x3c9d <_ZN34org_scilab_modules_graphic_objects21CallGraphicController18cloneGraphicObjectEP7JavaVM_PKc> (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscigraphic_objects.5.dylib) 10: 0x2b3c7 (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscigraphics.5.dylib) 11: 0x14a07 (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscigraphics.5.dylib) 12: 0xb564 (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscigraphics.5.dylib) 13: 0xd1e7 (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscigraphics.5.dylib) 14: 0x1120a4 (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscilab-cli.0.dylib) 15: 0x124be6 (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscilab-cli.0.dylib) 16: 0x1200c2 (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libscilab-cli.0.dylib) 17: 0x1f4d (/Applications/scilab-5.4.0.app/Contents/MacOS/lib/scilab/libsciconsole.5.dylib) 18: 0x14742 <_pthread_start> (/usr/lib/system/libsystem_c.dylib) 19: 0x1181 (/usr/lib/system/libsystem_c.dylib) Fine dello stack at line 2 of function gcf called by : at line 156 of function plot called by : plot(y,t) at line 9 of exec file called by : 2079060681937290.sce', 1 while executing a callback !--error 999 Annullamento del calcolo attuale Is it also a version problem or did I miss something in installation? Il giorno 27/gen/2013, alle ore 22:54, Ren? Grognard ha scritto: > In my professional work I had access and used MATLAB for many years. > Now retired I have to switch to some free/less expensive equivalent > software and I just downloaded Scilab that seems to offer more > toolboxes. > > However ATOMS does not seem to work. > > My PC is a HP ProBook 4730s running Windows 7. (Cygwin 1.7 is > installed and coud be used to run WScilex.exe.) > > When I started Scilab-5.4.0 all appeared to be well: > > Startup execution: > loading initial environment > -->atomsSetConfig('Verbose','True') > ans = > 1. > -->atomsGetConfig() > ans = > downloadTool: "curl" > Verbose: "True" > > The window Main categories - ATOMS was functional and allowed me to > install say the Plotting library particularly promising to a MATLAB > ex-user --- I get the message: > > Installation done! Please restart Scilab to take changes into account. > > OK restarting: > > Startup execution: > loading initial environment > > Start plotlib toolbox 0.43 > Load macros > Load help > > !--error 999 > 'background' property does not exist for this handle. > at line 46 of function uicontrol called by : > at line 207 of function atomsGui called by : > ms") then atomsGui(); else disp(gettext(" > while executing a callback > > The error message itself seems garbled! > > The next one seems clearer: > > -->atomsGui() > !--error 999 > 'background' property does not exist for this handle. > at line 46 of function uicontrol called by : > at line 207 of function atomsGui called by : > atomsGui() > > The window Main categories - ATOMS which appears is now empty and > indeed as "dead" as a dodo. > > I checked that I have full control over the SCIHOME folder and its contents. > > I regularly update the free JAVA which I believe is used by Scilab. > > What did I do wrong/missed in installing Scilab-5.4.0? > > Any help/info will be appreciated. > > Regards, > > Ren?. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ezequielsoule at gmail.com Mon Jan 28 19:11:17 2013 From: ezequielsoule at gmail.com (Ezequiel Soule) Date: Mon, 28 Jan 2013 15:11:17 -0300 Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: <5106B069.3010807@inria.fr> References: <1359139369968-4025762.post@n3.nabble.com> <51066B89.2020304@gmail.com> <5106B069.3010807@inria.fr> Message-ID: <5106BF45.7090903@gmail.com> Sorry I didn't clarify that: I define the initial random positions, I store them in a variable, say pos_in, and then I call the functions (the different versions) with pos_in as input, so the initial positions are the same in every case. On 28/01/13 14:07, Serge Steer wrote: > If the initial position of your sphere are randomly set, it can be > normal than you do not have the same number of iteration from one > simulation to an other one. > can you check using > rand("seed",0) > to force identical initial points for your various tests. > > Serge Steer > Le 28/01/2013 16:18, Ezequiel Soul? a ?crit : >> The algorithm essentially starts with a set of spheres in random >> positions and in a relatively dense state, and runs an iterative >> process where the spheres are moved in each iteration in order to >> reduce the overlaps. >> The core of the script is more or less like this >> >> superp=calc_D_superp_dobcel(pos); //this line uses an external function to calculate a matrix with the overlap between paritcles, defined as superp(i,j)=max(R(i)+R(j)-D(i,j),0) . D(i,j) is the distance between the spheres and R is the radius. pos is a 3-colum matrix containging the coordinates of the position of each sphere >> >> control=0; //number of iterations >> >> sup_2(int(control/max_mov*20)+1)=sumsupant/max_mov*20; // this defines a third control system as will be described bellow. ** >> >> while max(superp)>tol // the maximum value of superp controls when the system is considered overlap-free and the algorithm is finished >> >> >> ... >> // Several lines where the positions of each sphere are modified, acording to the values of the matrix superp >> ... >> >> superp=calc_D_superp_dobcel(pos); //matrix superp is re-calculated with the new positions >> >> >> control=control+1; >> >> if control>max_mov then break; end // control by maximum number of iterations >> >> //the following belongs to the third control system: >> >> if length(sup_2)==int(control/max_mov*20) then sup_2(int(control/max_mov*20)+1)=sum(superp)/max_mov*20; //** >> else//** >> sup_2(int(control/max_mov*20)+1)=sup_2(int(control/max_mov*20)+1) + sum(superp)/max_mov*20; //** >> end //** >> >> if length(sup_2)>4.5 then //** >> if sup_2($-1)>0.85*sup_2($-2) & sup_2($-2)>0.85*sup_2($-3) then break; end //** >> if sup_2($-1)>0.7*sup_2($-2) & sup_2($-2)>0.7< >> span styl >> e="color:rgb(92,92,92)">*sup_2($-3) & sup_2($-3)>0.6*sup_2($-4) then break; end //** >> end //** >> >> end//ends while loop >> >> The third control system essentially controls if the overlap is >> decreasing as the iterations proceed. It defines a new variable, >> sup_2, that stores the average value of sum(superp) in max_mov/20 >> iterations. If this average does not decrease fast enough (>15% >> decrease in two or >30%decrease in three consecutive groups of >> max_mov/20 iterations), it considers that it will not converge and >> breaks. >> Now, this third control system seems to be problem. As you can see, >> non of its lines (marked with ** for more clarity), affects the >> values of superp (at least, it shouldn?t). But still, the value of >> superp is modified when I include this control system. >> The other problem I had was with a similar algorithm, without the >> third control system, but just adding a "pause" rigth after the last >> end. This will also modify the values of superp and the number of >> iterations. >> As I said, the error in superp is not important (it is in the order >> of 1.d-15), but this difference propagates exponentially through the >> iterations and can significantly modify (like a 30%) the total number >> of iterations (I was trying to evaluate if the third control really >> worked, but I couldn?t do it because the algortihm CONVERGES with a >> different number of iterations...) >> >> >> _______________________________________________ >> 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 dbrumm at ieee.org Mon Jan 28 22:21:36 2013 From: dbrumm at ieee.org (ledlighter) Date: Mon, 28 Jan 2013 13:21:36 -0800 (PST) Subject: [Scilab-users] Help files seem to be missing. In-Reply-To: <1358986678428-4025741.post@n3.nabble.com> References: <1358986678428-4025741.post@n3.nabble.com> Message-ID: <1359408096528-4025815.post@n3.nabble.com> I reinstalled Scilab and everything works fine now. The new features and environment in this version are very nice. Thanks to all those who contributed to its development. As a user only, I am grateful. Best regards. -- View this message in context: http://mailinglists.scilab.org/Help-files-seem-to-be-missing-tp4025741p4025815.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From berns.buenaobra at gmail.com Mon Jan 28 22:30:02 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Tue, 29 Jan 2013 05:30:02 +0800 Subject: [Scilab-users] Peaks and positions In-Reply-To: <5104086B.7010206@free.fr> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> Message-ID: Hi Samuel: I'd like to understand the "$" inside the would mean from the script? Thanks, Berns B. On Sun, Jan 27, 2013 at 12:46 AM, Samuel Gougeon wrote: > Le 26/01/2013 17:00, constantina a ?crit : > > Sorry, I know is a basic question, i now the answer in matlab but not in > scilab.... What is the function that let me find "peaks " in a matrix and > the position of the peaks??? > > Here is a possible solution, including peaks on the borders: > > m = rand(6,6) > M = [m(2,:) ; m ; m($-1,:) ]; > M = [M(:,2) M M(:,$-1)]; > pC = M(2:$-1,2:$-1)>M(1:$-2,2:$-1) & M(2:$-1,2:$-1)>M(3:$,2:$-1); > pR = M(2:$-1,2:$-1)>M(2:$-1,1:$-2) & M(2:$-1,2:$-1)>M(2:$-1,3:$); > isPeak = pC & pR > find(isPeak) // returns linearized indices of peaks > m(~isPeak) = 0 // to show only peaks > > giving: > > -->m = rand(6,6) > m = > 0.0437334 0.7783129 0.8415518 0.5618661 0.3873779 > 0.2615761 > 0.4818509 0.2119030 0.4062025 0.5896177 0.9222899 > 0.4993494 > 0.2639556 0.1121355 0.4094825 0.6853980 0.9488184 > 0.2638578 > 0.4148104 0.6856896 0.8784126 0.8906225 0.3435337 > 0.5253563 > 0.2806498 0.1531217 0.1138360 0.5042213 0.3760119 > 0.5376230 > 0.1280058 0.6970851 0.1998338 0.3493615 0.7340941 > 0.1199926 > > -->M = [m(2,:) ; m ; m($-1,:) ]; > -->M = [M(:,2) M M(:,$-1)]; > -->pC = M(2:$-1,2:$-1)>M(1:$-2,2:$-1) & M(2:$-1,2:$-1)>M(3:$,2:$-1); > -->pR = M(2:$-1,2:$-1)>M(2:$-1,1:$-2) & M(2:$-1,2:$-1)>M(2:$-1,3:$); > -->isPeak = pC & pR > isPeak = > F F T F F F > T F F F F F > F F F F T F > F F F T F F > F F F F F T > F T F F T F > > -->find(isPeak) // returns linearized indices of peaks > ans = > 2. 12. 13. 22. 27. 30. 35. > > -->m(~isPeak) = 0 // to show only peaks > m = > 0. 0. 0.8415518 0. 0. > 0. > 0.4818509 0. 0. 0. 0. > 0. > 0. 0. 0. 0. 0.9488184 > 0. > 0. 0. 0. 0.8906225 0. > 0. > 0. 0. 0. 0. 0. > 0.5376230 > 0. 0.6970851 0. 0. 0.7340941 0. > > > Regards > Samuel > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Mon Jan 28 22:35:32 2013 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 28 Jan 2013 22:35:32 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> Message-ID: <5106EF24.9080805@durietz.se> It means the last element of the vector/matrix. /Stefan On 2013-01-28 22:30, Berns Buenaobra wrote: -------------------- > Hi Samuel: > > I'd like to understand the "$" inside the would mean from the script? > > Thanks, > Berns B. > > > On Sun, Jan 27, 2013 at 12:46 AM, Samuel Gougeon > wrote: > > Le 26/01/2013 17:00, constantina a ?crit : >> Sorry, I know is a basic question, i now the answer in matlab but not in >> scilab.... What is the function that let me find "peaks " in a matrix and >> the position of the peaks??? > Here is a possible solution, including peaks on the borders: > > m = rand(6,6) > M = [m(2,:) ; m ; m($-1,:) ]; > M = [M(:,2) M M(:,$-1)]; > pC = M(2:$-1,2:$-1)>M(1:$-2,2:$-1) & M(2:$-1,2:$-1)>M(3:$,2:$-1); > pR = M(2:$-1,2:$-1)>M(2:$-1,1:$-2) & M(2:$-1,2:$-1)>M(2:$-1,3:$); > isPeak = pC & pR > find(isPeak) // returns linearized indices of peaks > m(~isPeak) = 0 // to show only peaks > > giving: > > -->m = rand(6,6) > m = > 0.0437334 0.7783129 0.8415518 0.5618661 0.3873779 > 0.2615761 > 0.4818509 0.2119030 0.4062025 0.5896177 0.9222899 > 0.4993494 > 0.2639556 0.1121355 0.4094825 0.6853980 0.9488184 > 0.2638578 > 0.4148104 0.6856896 0.8784126 0.8906225 0.3435337 > 0.5253563 > 0.2806498 0.1531217 0.1138360 0.5042213 0.3760119 > 0.5376230 > 0.1280058 0.6970851 0.1998338 0.3493615 0.7340941 > 0.1199926 > > -->M = [m(2,:) ; m ; m($-1,:) ]; > -->M = [M(:,2) M M(:,$-1)]; > -->pC = M(2:$-1,2:$-1)>M(1:$-2,2:$-1) & M(2:$-1,2:$-1)>M(3:$,2:$-1); > -->pR = M(2:$-1,2:$-1)>M(2:$-1,1:$-2) & M(2:$-1,2:$-1)>M(2:$-1,3:$); > -->isPeak = pC & pR > isPeak = > F F T F F F > T F F F F F > F F F F T F > F F F T F F > F F F F F T > F T F F T F > > -->find(isPeak) // returns linearized indices of peaks > ans = > 2. 12. 13. 22. 27. 30. 35. > > -->m(~isPeak) = 0 // to show only peaks > m = > 0. 0. 0.8415518 0. 0. 0. > 0.4818509 0. 0. 0. 0. 0. > 0. 0. 0. 0. 0.9488184 0. > 0. 0. 0. 0.8906225 0. 0. > 0. 0. 0. 0. 0. 0.5376230 > 0. 0.6970851 0. 0. 0.7340941 0. > > > Regards > 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 > From sgougeon at free.fr Mon Jan 28 23:03:45 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 28 Jan 2013 23:03:45 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> Message-ID: <5106F5C1.209@free.fr> Le 28/01/2013 22:30, Berns Buenaobra a ?crit : > Hi Samuel: > > I'd like to understand the "$" inside the would mean from the script? This is the size of the object along the related direction: http://help.scilab.org/docs/5.4.0/en_US/dollar.html after a = ones(7,3) a(:,$) // is equivalent to a(:,3) a($-2,:) // is equivalent to a(5,:) $ can be used for any type of object: lists, structures, cells, and obviously matrices and hypermatrices: L = list("Hello", %pi, (%z-1)^2) L($) // returns the polynomial (%z-1)^2 = the last element of L // To append a element to L, just use(for instance) L($+1) = %T $ can also be seen as a measurement of the money that you save when using Scilab. But this is another undocumented story ;) Samuel From jrafaelbguerra at hotmail.com Tue Jan 29 01:50:51 2013 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 28 Jan 2013 16:50:51 -0800 (PST) Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: <5106BF45.7090903@gmail.com> References: <1359139369968-4025762.post@n3.nabble.com> <51066B89.2020304@gmail.com> <5106B069.3010807@inria.fr> <5106BF45.7090903@gmail.com> Message-ID: <1359420651725-4025819.post@n3.nabble.com> >From the code excerpt provided it is difficult to see from where errors of magnitude~=1e-15 might come from. Could they be due to some round-off errors in the function: calc_D_superp_dobcel? Please check the function details. Have you run the code with a "clear" at the beginning of the program to clean all variables? // Could you please define before your 3rd control system: superp0= superp; // and after your 3rd control system: superp1= superp; printf("%i...delta(superp) = %e", control, max(abs(superp1-superp0)) ) // and tell us what values do you get? Do the errors of 1e-15 magnitude occur and at which "control" iterations? // Non related to your problem, herebelow are some suggestions, if you will, to make your code more easy to read: //define additional variables to simplify the code: m = int(control/max_mov*20); N = length(sup_2); s = sum(superp); // write: while max(superp)>tol & control<=max_mov // moving "control=control+1" to the end of the while loop PS: "sumsupant" // this variable is not defined in the code excerpt, looks like =sum(superp) Regards, Rafael G. -- View this message in context: http://mailinglists.scilab.org/modifying-a-variable-changes-the-value-of-another-variable-tp4025762p4025819.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From berns.buenaobra at gmail.com Tue Jan 29 01:56:00 2013 From: berns.buenaobra at gmail.com (Berns Buenaobra) Date: Tue, 29 Jan 2013 08:56:00 +0800 Subject: [Scilab-users] Peaks and positions In-Reply-To: <5106F5C1.209@free.fr> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <5106F5C1.209@free.fr> Message-ID: Thanks! Understood much better to ask some experienced fellow than dig in the pile of hay. Berms B. On Tue, Jan 29, 2013 at 6:03 AM, Samuel Gougeon wrote: > Le 28/01/2013 22:30, Berns Buenaobra a ?crit : > > Hi Samuel: >> >> I'd like to understand the "$" inside the would mean from the script? >> > This is the size of the object along the related direction: > http://help.scilab.org/docs/5.**4.0/en_US/dollar.html > > after > a = ones(7,3) > a(:,$) // is equivalent to a(:,3) > a($-2,:) // is equivalent to a(5,:) > > $ can be used for any type of object: lists, structures, cells, > and obviously matrices and hypermatrices: > > L = list("Hello", %pi, (%z-1)^2) > L($) // returns the polynomial (%z-1)^2 = the last element of L > // To append a element to L, just use(for instance) > L($+1) = %T > > $ can also be seen as a measurement of the money that you save when > using Scilab. But this is another undocumented story ;) > > > Samuel > ______________________________**_________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/**mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Tue Jan 29 09:09:58 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 29 Jan 2013 09:09:58 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: <1359386948086-4025809.post@n3.nabble.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> <1359386948086-4025809.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10647EF3F@301EX00100.sidel.com> Hello, > My problem consist: a matrix like [v,k1,k2] [...] > if I plot the values, Im gonna find "spikes" that means "errors OK, I guess that a spike is a steep change in the value, a huge derivative. IMHO, you should compare 2 consecutive values in a column. This can be done by subtracting M(i+1, j) - M(i, j) (slope between 2 points) then compare the absolute value with a given threshold. Mind that a spike gives 2 consecutive high slopes, one up and one down. I suggest: // ******************* // constants, to be adjusted according to your case lowerthreshold = 0; upperthreshold = 3; // data with spikes v = [1;2;3;4;10;6;7;8;9;10]; k1 = [1;2;3;4;5;6;7;0;9;10]; M = [v, k1]; disp(M); // display the initial matrix clf; plot(M(:,1), M(:,2), 'b-+'); // locate the zeros (or very small values if upperthreshold not 0) [izeros, jzeros] = find(M <= lowerthreshold); M(izeros, :) = []; // shrink the lines with zeros disp(M); // display the matrix without zeros // Detect the spikes slope = M(2:$, :) - M(1:$-1,:); // Difference btw consecutive values k = 0; // initialisation, k is the number of spikes so far ispikes = []; // in case no spike is detected for i = 1:size(slope, 'r') if abs(slope(i)) >= upperthreshold then k = k+1; ispikes(k) = i; i = i+1 // skip next slope which is also high end end M(ispikes, :) = [];; // shrink the lines with zeros disp(M); // display the matrix without spikes plot(M(:,1), M(:,2), 'r'); // ******************* 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 Jan 29 09:20:11 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 29 Jan 2013 09:20:11 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F10647EF3F@301EX00100.sidel.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> <1359386948086-4025809.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647EF3F@301EX00100.sidel.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10647EFA4@301EX00100.sidel.com> Sorry, I'm not sure the code source was well displayed (MS Outlook seems to get rid of some carriage return). Please see the script attached. 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: test_spikes.sce Type: application/octet-stream Size: 965 bytes Desc: test_spikes.sce URL: From Christophe.Dang at sidel.com Tue Jan 29 09:31:48 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 29 Jan 2013 09:31:48 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F10647EFA4@301EX00100.sidel.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> <1359386948086-4025809.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647EF3F@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647EFA4@301EX00100.sidel.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10647F014@301EX00100.sidel.com> Sorry again, I didn't scope the result with enough attention, the i = i+1 in for...end loop does not seem to work as I thought it would, (replaced by a while...end loop) and I forgot the offset between the indices of the slope and M matrices. New script attached, should work better. HTH, regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -------------- next part -------------- A non-text attachment was scrubbed... Name: test_spikes.sce Type: application/octet-stream Size: 1013 bytes Desc: test_spikes.sce URL: From Christophe.Dang at sidel.com Tue Jan 29 09:47:19 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 29 Jan 2013 09:47:19 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F10647F014@301EX00100.sidel.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> <1359386948086-4025809.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647EF3F@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647EFA4@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647F014@301EX00100.sidel.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F10647F0A7@301EX00100.sidel.com> One more (rather big) detail, the script I sent only works when the spike is in the 1st column (which is the case of the data I use). please replace line 22 : slope = abs(M(2:$, :) - M(1:$-1,:)); line 29 : if max(slope(i, :)) >= upperthreshold then 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 Jan 29 10:39:39 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 29 Jan 2013 10:39:39 +0100 Subject: [Scilab-users] figure exported before graphical refresh Message-ID: <3B5FFC67498DFF49AE7271A584867D16F1064B9930@301EX00100.sidel.com> Hello, while trying to make an animation, I noticed that some figures were exported with the wrong scale. The scale is set by setting the data_bound axes property. I supposed that the file was created before the scale was set, so I introduced a sleep(100) and it solved the problem. Here is a minimal code reproducing the problem; the image is empty when the scale is not set. Do I have to report any bug anywhere? Regards // ******************** f0 = scf(0); xmin = 10; xmax = 60; ymin = 0; ymax = 10; for i = 10:60 clf; xpoly([i, i+10, i], [0, 10, 20]); a = get('current_axes'); a.data_bounds = [xmin, ymin ; xmax, ymax]; // sleep(100); name=('test-anim'+string(i)+'.gif'); xs2gif(0, name); end // ******************** -- 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 antoine.monmayrant at laas.fr Tue Jan 29 11:06:27 2013 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Tue, 29 Jan 2013 11:06:27 +0100 Subject: [Scilab-users] figure exported before graphical refresh In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F1064B9930@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F1064B9930@301EX00100.sidel.com> Message-ID: <51079F23.1050302@laas.fr> On 29/01/2013 10:39, Dang, Christophe wrote: > Hello, > > while trying to make an animation, > I noticed that some figures were exported with the wrong scale. > > The scale is set by setting the data_bound axes property. > > I supposed that the file was created before the scale was set, > so I introduced a sleep(100) and it solved the problem. > > Here is a minimal code reproducing the problem; > the image is empty when the scale is not set. > > Do I have to report any bug anywhere? Hi, I would say yes, but anyway if you wait ~10 minutes, you'll Get Sylvestre answer ;) By the way, I also experienced this race condition some times ago but I did not have time to write a demo to reproduce this bug reliably. Antoine > > Regards > > // ******************** > > f0 = scf(0); > > xmin = 10; xmax = 60; > > ymin = 0; ymax = 10; > > for i = 10:60 > > clf; > > xpoly([i, i+10, i], [0, 10, 20]); > > a = get('current_axes'); > > a.data_bounds = [xmin, ymin ; xmax, ymax]; > > // sleep(100); > > name=('test-anim'+string(i)+'.gif'); > > xs2gif(0, name); > > end > > // ******************** > From arnaud.miege at gmail.com Tue Jan 29 12:11:00 2013 From: arnaud.miege at gmail.com (amiege) Date: Tue, 29 Jan 2013 03:11:00 -0800 (PST) Subject: [Scilab-users] Getting rid of Modelica info pop-up window in Xcos Message-ID: <1359457860037-4025830.post@n3.nabble.com> Hi, I am running an Xcos model which contains some COSELICA blocks. Every time I run it, the following window pops up: This is fine for interactive simulation, but I am trying to run the model iteratively as part of an optimization routine, which means that I end with a lot of Java pop-up windows to close. So far, I have limited the amount of iterations in the optimization to avoid crashing the software with too many windows, but I would now like to increase it. Does anybody know to turn this pop-up window off for scripted simulations, given that COSELICA is undocumented? Thanks in advance, Arnaud -- View this message in context: http://mailinglists.scilab.org/Getting-rid-of-Modelica-info-pop-up-window-in-Xcos-tp4025830.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnaud.miege at gmail.com Tue Jan 29 12:41:50 2013 From: arnaud.miege at gmail.com (amiege) Date: Tue, 29 Jan 2013 03:41:50 -0800 (PST) Subject: [Scilab-users] Using context values with scicos_simulate Message-ID: <1359459710575-4025831.post@n3.nabble.com> Hi, I am trying to run scripted simulations of an Xcos model using scicos_simulate. I have defined the following values: However, when I run the scicos_simuate command (using scilab 5.4.0), I get following: and the response of the model is not what it should be. If I then run the same model interactively from the Xcos window, I get a completely different response (the correct one). In the model I have following under Simulation -> Set Context These variables are also correctly defined in the workspace: Am I doing anything wrong or is there a bug? Thanks, Arnaud -- View this message in context: http://mailinglists.scilab.org/Using-context-values-with-scicos-simulate-tp4025831.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From ezequielsoule at gmail.com Tue Jan 29 16:52:27 2013 From: ezequielsoule at gmail.com (Ezequiel Soule) Date: Tue, 29 Jan 2013 12:52:27 -0300 Subject: [Scilab-users] modifying a variable changes the value of another variable!!! In-Reply-To: <1359420651725-4025819.post@n3.nabble.com> References: <1359139369968-4025762.post@n3.nabble.com> <51066B89.2020304@gmail.com> <5106B069.3010807@inria.fr> <5106BF45.7090903@gmail.com> <1359420651725-4025819.post@n3.nabble.com> Message-ID: <5107F03B.9010306@gmail.com> Hi Rafael, thank you for your answer. I'm running the code with the minimum variables required for it (positions, radius, number of spheres). it can be some sort of error generating in the output (or in some internal calculation) of calc_D_superp_dobcel, but I don't think it is roundoff, why would that change when defining a different variable or adding a command with no connection? superp0 and superp1, as you told me to define them, are the same (superp0-superp1=0), so the error is not produced in those lines, it is something less direct. I'm not expert, but I guess what is happenning here is that, using a section of the RAM, the stack, the space where variables are stored, or whatever it is, is sligthly modifying OTHER sections of the RAM or wathever. Some bug of scilab, or maybe it is a common thing in every program but usually goes unnoticed (which would be understandable, it is a 1e-15 error, most of the times it will be not significant). Right after writting this, and remembering some issues like the division by zero... I had an idea (is "epiphany" too pretencious?), and I ran it on ubuntu... the problem is gone! There is no error under ubuntu. So the problem is in Windows (it is Windows server, I can check Windows Vista in a few days...). the question is: Is it a Windows bug, or a Scilab-for-Windows bug? By the way, the obvious solution for me would not work. I cannot run my simulations in my ubuntu machine, we have the workstation for large calculations so we don't overload our personal computers, and the worstations runs with Windows server... Well, I can test my control system in my ubuntu machine, but not run the real thing... On 28/01/13 21:50, Rafael Guerra wrote: > From the code excerpt provided it is difficult to see from where errors of > magnitude~=1e-15 might come from. > > Could they be due to some round-off errors in the function: > calc_D_superp_dobcel? Please check the function details. > > Have you run the code with a "clear" at the beginning of the program to > clean all variables? > > // Could you please define before your 3rd control system: > superp0= superp; > // and after your 3rd control system: > superp1= superp; > printf("%i...delta(superp) = %e", control, max(abs(superp1-superp0)) ) > // and tell us what values do you get? Do the errors of 1e-15 magnitude > occur and at which "control" iterations? > > > // Non related to your problem, herebelow are some suggestions, if you will, > to make your code more easy to read: > > //define additional variables to simplify the code: > m = int(control/max_mov*20); > N = length(sup_2); > s = sum(superp); > > // write: > while max(superp)>tol & control<=max_mov // moving "control=control+1" to > the end of the while loop > > > PS: "sumsupant" // this variable is not defined in the code excerpt, looks > like =sum(superp) > > > Regards, > Rafael G. > > > > -- > View this message in context: http://mailinglists.scilab.org/modifying-a-variable-changes-the-value-of-another-variable-tp4025762p4025819.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 Patrick.Blee at invista.com Tue Jan 29 18:30:03 2013 From: Patrick.Blee at invista.com (Pat) Date: Tue, 29 Jan 2013 09:30:03 -0800 (PST) Subject: [Scilab-users] Simple Date & Time Plotting Message-ID: <1359480603013-4025833.post@n3.nabble.com> Hi All, I would like to find a simple plotting function to enable a plot of numeric data against *date/time * to be obtained. I have read numerous workarounds to this problem from input over the years - usually involving manually manipulating X-Tick Text Data. I'm just not sure how the graph would show X-axes labels if you zoomed on into the plot from, say, a 12-month time period right into a 24-hr time window within it.? Would I have to run another script to help the plotter out? In summary: I would like to plot data Vs Date/Time such that it can automatically re-adjust the x-axis minor tick marks given the time span when zooming in - (X-axis in Date-Time format throughout). Thanks in advance, Patrick -- View this message in context: http://mailinglists.scilab.org/Simple-Date-Time-Plotting-tp4025833.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at inria.fr Tue Jan 29 19:58:20 2013 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 29 Jan 2013 19:58:20 +0100 Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: <1359480603013-4025833.post@n3.nabble.com> References: <1359480603013-4025833.post@n3.nabble.com> Message-ID: <51081BCC.5010901@inria.fr> I'm afraid it is yet not possible with the default zoom tool becausefor this behavior it should be necessary to have the possibility to attach a callback function that responds to the zoom the resize actions But you can develop your own zoom menu for zooming time s?ries.... Serge Steer Le 29/01/2013 18:30, Pat a ?crit : > Hi All, > > I would like to find a simple plotting function to enable a plot of numeric > data against *date/time * to be obtained. > > I have read numerous workarounds to this problem from input over the years - > usually involving manually manipulating X-Tick Text Data. > I'm just not sure how the graph would show X-axes labels if you zoomed on > into the plot from, say, a 12-month time period right into a 24-hr time > window within it.? > Would I have to run another script to help the plotter out? > > In summary: > I would like to plot data Vs Date/Time such that it can automatically > re-adjust the x-axis minor tick marks given the time span when zooming in - > (X-axis in Date-Time format throughout). > > Thanks in advance, > > Patrick > > > > -- > View this message in context: http://mailinglists.scilab.org/Simple-Date-Time-Plotting-tp4025833.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 todisoa at net2dev.com Wed Jan 30 08:02:20 2013 From: todisoa at net2dev.com (rtodymic) Date: Tue, 29 Jan 2013 23:02:20 -0800 (PST) Subject: [Scilab-users] javasci on Netbeans Message-ID: <1359529340236-4025838.post@n3.nabble.com> hello scilab users, i want to use javasci on NetBeans 6.5 but i have some problems: the output displays anything when i run the application. This is my java code: import org.scilab.modules.javasci.Scilab; import org.scilab.modules.types.ScilabType; import org.scilab.modules.types.ScilabDouble; public class Example { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here try { Scilab sci = new Scilab(); System.out.println("hello world!"); if (sci.open()) { /* Send a Scilab instruction */ sci.exec("foo = [ 2, 4, 6; 4, 0, 10; 6, 10, 12 ];"); /* Retrieve the variable foo */ ScilabType foo = sci.get("foo"); /* Display the variable */ System.out.println("Representation of : "+ foo); /* Get the data and retrieve the 2,2 value */ double[][] aReal = ((ScilabDouble)foo).getRealPart(); System.out.println("foo[1,1] = " + aReal[1][1]); /* Change the value of 2,2 */ aReal[1][1] = Math.PI; /* Create a new variable */ ScilabDouble bar = new ScilabDouble(aReal); /* Send it to Scilab */ sci.put("bar",bar); /* Display it through Scilab */ sci.exec("disp(bar)"); sci.close(); } else { System.out.println("Could not start Scilab "); } /* Can be improved by other exceptions: AlreadyRunningException, * InitializationException, UndefinedVariableException, * UnknownTypeException, etc */ } catch (org.scilab.modules.javasci.JavasciException e) { System.err.println("An exception occurred: " + e.getLocalizedMessage()); } } } the output displays the "hello word" but there are anythings after that!! (I have no problems when i run the project on the line command) So, what is the problems whit Netbans and what should i do? I use : - NetBeans 6.5 RC2 - scilab 5.4.0 - jre 1.7 Thank your for your help, PS: Sorry for my english! -- View this message in context: http://mailinglists.scilab.org/javasci-on-Netbeans-tp4025838.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Patrick.Blee at invista.com Wed Jan 30 09:45:45 2013 From: Patrick.Blee at invista.com (Pat) Date: Wed, 30 Jan 2013 00:45:45 -0800 (PST) Subject: [Scilab-users] Simple Date & Time Plotting In-Reply-To: <51081BCC.5010901@inria.fr> References: <1359480603013-4025833.post@n3.nabble.com> <51081BCC.5010901@inria.fr> Message-ID: <34E7EE1AC743E9429A60C23C105149ED1332D69323@MSGIICTC.dtinet.net> Thanks for the prompt response Serge, I'm afraid that type of function would be well beyond me! Will be interested to see if anyone on the forum has tried to develop something similar in recent times. Thanks again, Patrick From: Serge Steer [via Scilab / Xcos - Mailing Lists Archives] [mailto:ml-node+s994242n4025834h36 at n3.nabble.com] Sent: 29 January 2013 18:59 To: Blee, Patrick Subject: Re: Simple Date & Time Plotting I'm afraid it is yet not possible with the default zoom tool because for this behavior it should be necessary to have the possibility to attach a callback function that responds to the zoom the resize actions But you can develop your own zoom menu for zooming time s?ries.... Serge Steer Le 29/01/2013 18:30, Pat a ?crit : Hi All, I would like to find a simple plotting function to enable a plot of numeric data against *date/time * to be obtained. I have read numerous workarounds to this problem from input over the years - usually involving manually manipulating X-Tick Text Data. I'm just not sure how the graph would show X-axes labels if you zoomed on into the plot from, say, a 12-month time period right into a 24-hr time window within it.? Would I have to run another script to help the plotter out? In summary: I would like to plot data Vs Date/Time such that it can automatically re-adjust the x-axis minor tick marks given the time span when zooming in - (X-axis in Date-Time format throughout). Thanks in advance, Patrick -- View this message in context: http://mailinglists.scilab.org/Simple-Date-Time-Plotting-tp4025833.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/Simple-Date-Time-Plotting-tp4025833p4025834.html To unsubscribe from Simple Date & Time Plotting, click here. NAML -- View this message in context: http://mailinglists.scilab.org/Simple-Date-Time-Plotting-tp4025833p4025840.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.balazovic at yahoo.com Wed Jan 30 11:11:12 2013 From: peter.balazovic at yahoo.com (pepe) Date: Wed, 30 Jan 2013 02:11:12 -0800 (PST) Subject: [Scilab-users] c_block function Message-ID: <1359540672629-4025841.post@n3.nabble.com> Dear all, I wonder how to use c_block function under xcos. Can please help me or point me how to work with this block? how to define c function, compile it and use it within this block? Best regards, Peter -- View this message in context: http://mailinglists.scilab.org/c-block-function-tp4025841.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From clement.david at scilab-enterprises.com Thu Jan 31 15:31:42 2013 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Thu, 31 Jan 2013 15:31:42 +0100 Subject: [Scilab-users] Getting rid of Modelica info pop-up window in Xcos In-Reply-To: <1359457860037-4025830.post@n3.nabble.com> References: <1359457860037-4025830.post@n3.nabble.com> Message-ID: <1359642702.2623.6.camel@paros> Hello, We can not support 'silent' modelica compilation however some of our internal non-regression test re-define messagebox to silent any popup window using the following snip. -- function btn = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal) btn = 0; endfunction importXcosDiagram(SCI + "/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.xcos"); xcos_simulate(scs_m, 4); -- Cl?ment David Scilab Enterprises Le mardi 29 janvier 2013 ? 03:11 -0800, amiege a ?crit : > Hi, > > I am running an Xcos model which contains some COSELICA blocks. Every > time I run it, the following window pops up: > ... > This is fine for interactive simulation, but I am trying to run the > model iteratively as part of an optimization routine, which means that > I end with a lot of Java pop-up windows to close. So far, I have > limited the amount of iterations in the optimization to avoid crashing > the software with too many windows, but I would now like to increase > it. Does anybody know to turn this pop-up window off for scripted > simulations, given that COSELICA is undocumented? From arnaud.miege at gmail.com Thu Jan 31 16:12:51 2013 From: arnaud.miege at gmail.com (amiege) Date: Thu, 31 Jan 2013 07:12:51 -0800 (PST) Subject: [Scilab-users] Getting rid of Modelica info pop-up window in Xcos In-Reply-To: <1359642702.2623.6.camel@paros> References: <1359457860037-4025830.post@n3.nabble.com> <1359642702.2623.6.camel@paros> Message-ID: <1359645171124-4025846.post@n3.nabble.com> Cl?ment David-2 wrote > Hello,We can not support 'silent' modelica compilation however some of > ourinternal non-regression test re-define messagebox to silent any > popupwindow using the following snip.--function btn = messagebox(msg, > msgboxtitle, msgboxicon, buttons,ismodal) btn = > 0;endfunctionimportXcosDiagram(SCI > +"/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.xcos");xcos_simulate(scs_m, > 4);--Cl?ment DavidScilab Enterprises Thanks, I have since then switched to a "normal" Xcos model so the problem has gone away. However, I will definitely try the messagebox function you suggest if I ever revert to using a COSELICA model. Arnaud -- View this message in context: http://mailinglists.scilab.org/Getting-rid-of-Modelica-info-pop-up-window-in-Xcos-tp4025830p4025846.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ezequielsoule at gmail.com Thu Jan 31 16:20:50 2013 From: ezequielsoule at gmail.com (Ezequiel Soule) Date: Thu, 31 Jan 2013 12:20:50 -0300 Subject: [Scilab-users] voronoi in 3D space In-Reply-To: <1359642702.2623.6.camel@paros> References: <1359457860037-4025830.post@n3.nabble.com> <1359642702.2623.6.camel@paros> Message-ID: <510A8BD2.4000506@gmail.com> Hello, does anyone one if there is any tool to calculate voronoi diagrams in a 3D space? I coulnd't find anything for scilab, but it exists in matlab, so maybe I just missed it... From arnaud.miege at gmail.com Thu Jan 31 16:27:47 2013 From: arnaud.miege at gmail.com (amiege) Date: Thu, 31 Jan 2013 07:27:47 -0800 (PST) Subject: [Scilab-users] Same model, different results Message-ID: <1359646067865-4025848.post@n3.nabble.com> Hi,Can anybody tell me why the two attached models give different results? The "first principles" subsystem in the DC_motor_compare model settles to a steady-state value of 0.61 (red trace), whereas the same subsystem in the DC_motor_first_principles model goes to 0.95. I am using Scilab 5.4.0 with lcc-win32 on Windows XP if that makes a difference. The model DC_motor_compare uses COSELICA blocks. Thanks, Arnaud DC_motor_compare.zcos DC_motor_compare.jpg DC_motor_first_principles.zcos DC_motor_first_principles.jpg -- View this message in context: http://mailinglists.scilab.org/Same-model-different-results-tp4025848.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From geofyss at gmail.com Thu Jan 31 16:57:15 2013 From: geofyss at gmail.com (constantina) Date: Thu, 31 Jan 2013 07:57:15 -0800 (PST) Subject: [Scilab-users] Peaks and positions In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F10647F0A7@301EX00100.sidel.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> <1359386948086-4025809.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647EF3F@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647EFA4@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647F014@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647F0A7@301EX00100.sidel.com> Message-ID: <1359647835497-4025849.post@n3.nabble.com> Hi guys, this my problem data... if I plot one column of data I obtain the first plot, and similar case with the second plot... as you can see, theres two horribles "spikes" in the first plot... and I tried elimite them... but i cant! i tried with cristophe program, maybe im doing something bad with the threshold... or so. How can indicate in the plot with "dashes lines".... "heeeeere theres a spike" , or with a circle, the correct location of the spike??? -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764p4025849.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From geofyss at gmail.com Thu Jan 31 16:58:19 2013 From: geofyss at gmail.com (constantina) Date: Thu, 31 Jan 2013 07:58:19 -0800 (PST) Subject: [Scilab-users] Peaks and positions In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F10647F0A7@301EX00100.sidel.com> References: <1359216001776-4025764.post@n3.nabble.com> <5104086B.7010206@free.fr> <1359382043635-4025799.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647E8C6@301EX00100.sidel.com> <1359386948086-4025809.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F10647EF3F@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647EFA4@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647F014@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F10647F0A7@301EX00100.sidel.com> Message-ID: <1359647899202-4025850.post@n3.nabble.com> Hi guys, this my problem data... if I plot one column of data I obtain the first plot, and similar case with the second plot... as you can see, theres two horribles "spikes" in the first plot... and I tried elimite them... but i cant! i tried with cristophe program, maybe im doing something bad with the threshold... or so. How can indicate in the plot with "dashes lines".... "heeeeere theres a spike" , or with a circle, the correct location of the spike??? -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764p4025850.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From geofyss at gmail.com Thu Jan 31 16:59:53 2013 From: geofyss at gmail.com (constantina) Date: Thu, 31 Jan 2013 07:59:53 -0800 (PST) Subject: [Scilab-users] Peaks and positions In-Reply-To: <1359216001776-4025764.post@n3.nabble.com> References: <1359216001776-4025764.post@n3.nabble.com> Message-ID: <1359647993736-4025851.post@n3.nabble.com> Hi guys, this my problem data... if I plot one column of data I obtain the first plot, and similar case with the second plot... as you can see, theres two horribles "spikes" in the first plot... and I tried elimite them... but i cant! i tried with cristophe program, maybe im doing something bad with the threshold... or so. How can indicate in the plot with "dashes lines".... "heeeeere theres a spike" , or with a circle, the correct location of the spike??? -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764p4025851.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Thu Jan 31 17:11:26 2013 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Thu, 31 Jan 2013 17:11:26 +0100 Subject: [Scilab-users] Peaks and positions In-Reply-To: <1359647993736-4025851.post@n3.nabble.com> References: <1359216001776-4025764.post@n3.nabble.com> <1359647993736-4025851.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F106536990@301EX00100.sidel.com> Hello, > and I tried elimite them... but i cant! If the data are not confidential, you might provide a text file so we can try... 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 geofyss at gmail.com Thu Jan 31 18:45:17 2013 From: geofyss at gmail.com (constantina) Date: Thu, 31 Jan 2013 09:45:17 -0800 (PST) Subject: [Scilab-users] Peaks and positions In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F106536990@301EX00100.sidel.com> References: <1359216001776-4025764.post@n3.nabble.com> <1359647993736-4025851.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F106536990@301EX00100.sidel.com> Message-ID: <1359654317525-4025853.post@n3.nabble.com> // //DB: BASE DATA --> DB(:,1)= time DBF(:,2)=data [nT] //DM: MOVIL DATA --> DM(:,4)=data nT ; DMF(:,9)=time // //"crossover" // //Buscamos los valores en que ambos registros tienen la misma hora [v,k1,k2]=intersect(DM(:,9), DB(:,1)); //So the data [nT] // // movil nTM=DM(k1,4) ; //base nTB=DB(k2,2) ; //======================================================================================== // time=v'; M=[ nTM nTB ]; // //PLOTS subplot(221) plot(v',M(:,1)) title('Movile data') subplot(222) plot(v',M(:,2)) title('Base station data') // // --------------------------------------------------------------------------------------------- //As you can see, theres "spikes" in the data. My mission is identify the values of the spikes (values are in nTM) in the movile data and their position (DB(:,1),DB(:,2) (latitude, longitude) ) and if is posible show in the plot , "here theres a spike" base040712_112.raw.TXT movil040712_231.raw.TXT -- View this message in context: http://mailinglists.scilab.org/Peaks-and-positions-tp4025764p4025853.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Thu Jan 31 22:38:06 2013 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 31 Jan 2013 22:38:06 +0100 Subject: [Scilab-users] voronoi in 3D space In-Reply-To: <510A8BD2.4000506@gmail.com> References: <1359457860037-4025830.post@n3.nabble.com> <1359642702.2623.6.camel@paros> <510A8BD2.4000506@gmail.com> Message-ID: <510AE43E.2050106@free.fr> Hello, Le 31/01/2013 16:20, Ezequiel Soule a ?crit : > Hello, does anyone one if there is any tool to calculate voronoi > diagrams in a 3D space? I coulnd't find anything for scilab, but it > exists in matlab, so maybe I just missed it... The nearest Scilab package that i know about that would be CGLAB: http://atoms.scilab.org/toolboxes/cglab http://atoms.scilab.org/toolboxes/cglab/2.1/filelist/cglab-2.1-1-src.tar.gz http://cglab.gforge.inria.fr/ but it is not yet extended to support voronoi diagrams. You may also have a look at the scilab forge: http://forge.scilab.org/index.php/projects/ Regards Samuel