From calixte.denizet at scilab-enterprises.com Thu Nov 1 09:06:12 2012 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Thu, 01 Nov 2012 09:06:12 +0100 Subject: [Scilab-Dev] Please help me to fix bug 12039 In-Reply-To: <509185F4.3070804@tudelft.nl> References: <509185F4.3070804@tudelft.nl> Message-ID: <50922D74.1090508@scilab-enterprises.com> Hi Uwe, Are you sure that a Fortran compiler is installed on your machine ? C On 31/10/2012 21:11, Uwe Fechner wrote: > Hello, > > I am trying to solve the following bug: > http://bugzilla.scilab.org/show_bug.cgi?id=12039 > > I installed the binary version of Scilab for Linux 32 bit on > four machines now (all Ubuntu 12.04). > > On one machine the simulations, that need Fortran run > fine. > > On all other machines they fail, even if I compile Scilab > from source without any ./configure problem. > > Which kind of information shall I collect to investigate the > difference between these installations? > > Best regards: > > Uwe Fechner > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com From u.fechner at tudelft.nl Thu Nov 1 09:20:20 2012 From: u.fechner at tudelft.nl (Uwe Fechner) Date: Thu, 01 Nov 2012 09:20:20 +0100 Subject: [Scilab-Dev] Please help me to fix bug 12039 In-Reply-To: <50922D74.1090508@scilab-enterprises.com> References: <509185F4.3070804@tudelft.nl> <50922D74.1090508@scilab-enterprises.com> Message-ID: <509230C4.7060203@tudelft.nl> Yes, it is, and the examples work fine with Scilab 5.3.3. I tried both gfortran and fort77. No change. Uwe On 01.11.2012 09:06, Calixte Denizet wrote: > Hi Uwe, > > Are you sure that a Fortran compiler is installed on your machine ? > > C > > On 31/10/2012 21:11, Uwe Fechner wrote: >> Hello, >> >> I am trying to solve the following bug: >> http://bugzilla.scilab.org/show_bug.cgi?id=12039 >> >> I installed the binary version of Scilab for Linux 32 bit on >> four machines now (all Ubuntu 12.04). >> >> On one machine the simulations, that need Fortran run >> fine. >> >> On all other machines they fail, even if I compile Scilab >> from source without any ./configure problem. >> >> Which kind of information shall I collect to investigate the >> difference between these installations? >> >> Best regards: >> >> Uwe Fechner >> _______________________________________________ >> dev mailing list >> dev at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/dev > -- ---------------------------------------- Uwe Fechner, M.Sc. Delft University of Technology Faculty of Aerospace Engineering/ASSET Kluyverweg 1, 2629 HS Delft, The Netherlands Phone: +31-15-27-88902 From u.fechner at tudelft.nl Thu Nov 1 10:25:01 2012 From: u.fechner at tudelft.nl (Uwe Fechner) Date: Thu, 01 Nov 2012 10:25:01 +0100 Subject: [Scilab-Dev] Please help me to fix bug 12039 In-Reply-To: <509185F4.3070804@tudelft.nl> References: <509185F4.3070804@tudelft.nl> Message-ID: <50923FED.6090704@tudelft.nl> Is it anywhere documented which Fortran compilers are compatible to Scilab on Linux32? Perhaps I need the Intel Fortran compiler, or should the package fort77 work, too? Best regards: Uwe Fechner Am 31.10.2012 21:11, schrieb Uwe Fechner: > Hello, > > I am trying to solve the following bug: > http://bugzilla.scilab.org/show_bug.cgi?id=12039 > > I installed the binary version of Scilab for Linux 32 bit on > four machines now (all Ubuntu 12.04). > > On one machine the simulations, that need Fortran run > fine. > > On all other machines they fail, even if I compile Scilab > from source without any ./configure problem. > > Which kind of information shall I collect to investigate the > difference between these installations? > > Best regards: > > Uwe Fechner > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From u.fechner at tudelft.nl Thu Nov 1 20:18:08 2012 From: u.fechner at tudelft.nl (Uwe Fechner) Date: Thu, 01 Nov 2012 20:18:08 +0100 Subject: [Scilab-Dev] Please help me to fix bug 12039 - SOLVED - In-Reply-To: <509185F4.3070804@tudelft.nl> References: <509185F4.3070804@tudelft.nl> Message-ID: <5092CAF0.7060707@tudelft.nl> Ok, this problem is solved. My solution: $ sudo apt-get remove fort77 $ sudo apt-get autoremove $ sudo apt-get install gfortran $ rm ~/00Software/scilab-5.4.0/share/scilab/modules/dynamic_link/src/scripts/Makefile.orig I would like to document this in the Scilab wiki. How could I get write access to the wiki? Best regards: Uwe Fechner Am 31.10.2012 21:11, schrieb Uwe Fechner: > Hello, > > I am trying to solve the following bug: > http://bugzilla.scilab.org/show_bug.cgi?id=12039 > > I installed the binary version of Scilab for Linux 32 bit on > four machines now (all Ubuntu 12.04). > > On one machine the simulations, that need Fortran run > fine. > > On all other machines they fail, even if I compile Scilab > from source without any ./configure problem. > > Which kind of information shall I collect to investigate the > difference between these installations? > > Best regards: > > Uwe Fechner > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From Jean-Pierre.Dussault at USherbrooke.ca Fri Nov 2 18:50:07 2012 From: Jean-Pierre.Dussault at USherbrooke.ca (Jean-Pierre Dussault) Date: Fri, 02 Nov 2012 13:50:07 -0400 Subject: [Scilab-Dev] Release of Scilab 5.4.0 In-Reply-To: <50697294.5080800@scilab-enterprises.com> References: <50697294.5080800@scilab-enterprises.com> Message-ID: <509407CF.2080902@USherbrooke.ca> Le 2012-10-01 06:38, Communication a ?crit : > Dear Scilab Users, > > Scilab Enterprises is pleased to announce the release of Scilab 5.4.0. > > Download and information can be found at: > http://www.scilab.org/products/scilab/download > > We also invite you to consult the video explaining the major new > functionalities at: > http://www.youtube.com/scilabchannel > > Best Regards > > Hi! is there a simple way to upgrade from, say, 5.3.3 and to automatically reinstall all the (eventually upgraded) toolboxes I had installed in 5.3.3 using the ATOMS facility, but also others I grabbed elsewhere and installed manually (the old builder/loader way)? For the moment, I manually reinstall everything everytime a new Scilab version becomes available --- cumbersome. Thank you, JPD From sylvestre.ledru at scilab-enterprises.com Sun Nov 4 12:58:18 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sun, 04 Nov 2012 12:58:18 +0100 Subject: [Scilab-Dev] Please help me to fix bug 12039 In-Reply-To: <50923FED.6090704@tudelft.nl> References: <509185F4.3070804@tudelft.nl> <50923FED.6090704@tudelft.nl> Message-ID: <5096585A.3040601@scilab-enterprises.com> On 01/11/2012 10:25, Uwe Fechner wrote: > Is it anywhere documented which Fortran compilers are compatible > to Scilab on Linux32? Most of the fortran compilers should work. gfortran and ifc (intel fortran) are working. I haven't tested with other but I would be happy to help if you want to try. > Perhaps I need the Intel Fortran compiler, or should the package > fort77 work, too? fort77 is not a fortran compiler. It is likely that it is failing because the tests in the configure are not linked against -lf2c. You will find some information in config.log. About the wiki, you just have to create an account. If you want to help regarding 12039, you can write a patch to provide this information in the Scilab documentation. Sylvestre From sylvestre.ledru at scilab-enterprises.com Sun Nov 4 13:06:06 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sun, 04 Nov 2012 13:06:06 +0100 Subject: [Scilab-Dev] bitset function In-Reply-To: <508B8735.2040606@gmail.com> References: <508B8735.2040606@gmail.com> Message-ID: <50965A2E.8080401@scilab-enterprises.com> On 27/10/2012 09:03, ????????? wrote: > Hi. > I have reported an issue about bitset function (see bug #12013). > > I have changed the code of function. My solution is not brilliant but it > works good for me. > > The bitset function does not have a test-file so I have wrote it. > I am going to write a SEP-file which will include description of: > 1) algorithm of work when pos is more than 32 or/and x is more than 2^32-1; > 2) algorithm of work when x is an uint8, uint16 or uint32 value and pos > is more than 8 (bitset works wrong if x is uint8 and pos is 9); > 3) change of type of x in different cases. > > If someone is working on bitset function let we discuss it. AFAIK, nobody is working on this function. Let me know when you have progress on the code. I will be happy to review your patches. Thanks, Sylvestre From sylvestre.ledru at scilab-enterprises.com Sun Nov 4 14:08:34 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sun, 04 Nov 2012 14:08:34 +0100 Subject: [Scilab-Dev] Compiling Scilab 5.4.0 from source fails on Ubuntu 12.04 32 bit In-Reply-To: <50918438.8010305@tudelft.nl> References: <508C4426.70105@tudelft.nl> <5090161E.3020503@scilab-enterprises.com> <50918438.8010305@tudelft.nl> Message-ID: <509668D2.9070906@scilab-enterprises.com> On 31/10/2012 21:04, Uwe Fechner wrote: > Hello, > > thanks for your help. Atlas was not installed. > > But I found a workaround for the configure problem (bug 10646): > > cd ~/00Software/arpack-ng_3.1.2/ > sudo make uninstall > sudo apt-get install libarpack++2-dev > sudo apt-get remove libarpack2 > cd ~/00Software/ > cd ~/00Software/scilab-5.4.0 > make distclean > ./configure > make > > This worked now. But this also means that I cannot > have Octave installed at the same time. Octave depends > on libarpack2. And as soon as I install libarpack2 > ./configure fails. > > Is this a bug in the packaging of Ubuntu or in the > ./configure script of Scilab 5.4.0? I don't know. You should have a look to the actual error in the config.log file to find out. Sylvestre From krotersv at gmail.com Mon Nov 5 06:05:20 2012 From: krotersv at gmail.com (=?UTF-8?B?0KHRgtCw0L3QuNGB0LvQsNCy?=) Date: Mon, 05 Nov 2012 11:05:20 +0600 Subject: [Scilab-Dev] bitset function In-Reply-To: <50965A2E.8080401@scilab-enterprises.com> References: <508B8735.2040606@gmail.com> <50965A2E.8080401@scilab-enterprises.com> Message-ID: <50974910.20201@gmail.com> 04.11.2012 18:06, Sylvestre Ledru ?????: > On 27/10/2012 09:03, ????????? wrote: >> Hi. >> I have reported an issue about bitset function (see bug #12013). >> >> I have changed the code of function. My solution is not brilliant but it >> works good for me. >> >> The bitset function does not have a test-file so I have wrote it. >> I am going to write a SEP-file which will include description of: >> 1) algorithm of work when pos is more than 32 or/and x is more than 2^32-1; >> 2) algorithm of work when x is an uint8, uint16 or uint32 value and pos >> is more than 8 (bitset works wrong if x is uint8 and pos is 9); >> 3) change of type of x in different cases. >> >> If someone is working on bitset function let we discuss it. > AFAIK, nobody is working on this function. > > Let me know when you have progress on the code. I will be happy to > review your patches. > > Thanks, > Sylvestre > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev Hi. I have wrote bitseb.tst. But it is not final result. Now I am working on problem "Input variable v is not a scalar and its entries have different values." I have reported bug#12054. I am goingalso to change help page of bitset function. See SEP. I do not know what is *.dia.ref file for. So I did not write it. Stanislav -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bitset.7z Type: application/x-7z-compressed Size: 42803 bytes Desc: not available URL: From sylvestre.ledru at scilab-enterprises.com Mon Nov 5 08:09:55 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Mon, 05 Nov 2012 08:09:55 +0100 Subject: [Scilab-Dev] bitset function In-Reply-To: <50974910.20201@gmail.com> References: <508B8735.2040606@gmail.com> <50965A2E.8080401@scilab-enterprises.com> <50974910.20201@gmail.com> Message-ID: <50976643.40005@scilab-enterprises.com> On 05/11/2012 06:05, ????????? wrote: > 04.11.2012 18:06, Sylvestre Ledru ?????: >> On 27/10/2012 09:03, ????????? wrote: >>> Hi. >>> I have reported an issue about bitset function (see bug #12013). >>> >>> I have changed the code of function. My solution is not brilliant but it >>> works good for me. >>> >>> The bitset function does not have a test-file so I have wrote it. >>> I am going to write a SEP-file which will include description of: >>> 1) algorithm of work when pos is more than 32 or/and x is more than 2^32-1; >>> 2) algorithm of work when x is an uint8, uint16 or uint32 value and pos >>> is more than 8 (bitset works wrong if x is uint8 and pos is 9); >>> 3) change of type of x in different cases. >>> >>> If someone is working on bitset function let we discuss it. >> AFAIK, nobody is working on this function. >> >> Let me know when you have progress on the code. I will be happy to >> review your patches. >> >> Thanks, >> Sylvestre >> Hi. > I have wrote bitseb.tst. But it is not final result. Now I am working on > problem "Input variable v is not a scalar and its entries have different > values." I have reported bug#12054. You should not try to tackle every problem at once. We prefer to have "a commit = a modification/bug fix" > I am goingalso to change help page of bitset function. See SEP. > I do not know what is *.dia.ref file for. So I did not write it. To create a ref, you have to call the test_run function with the argument: test_run("elementary_functions","bitset","create_ref") Thanks, Sylvestre From ludo.wag at laposte.net Tue Nov 6 11:56:38 2012 From: ludo.wag at laposte.net (Orbeman) Date: Tue, 6 Nov 2012 02:56:38 -0800 (PST) Subject: [Scilab-Dev] Intersection of two vectors In-Reply-To: <1351669714862-4025117.post@n3.nabble.com> References: <1351448715744-4025092.post@n3.nabble.com> <948A2045-047D-46C9-B15A-CC9574118DAB@softube.com> <1351669714862-4025117.post@n3.nabble.com> Message-ID: <1352199398960-4025170.post@n3.nabble.com> Maybe my interrogation is not understable due to my bad english. So, the answer of Arvid Ros?n work good but not with my huge vectors. Does anyone have an other suggestion to have the positions of all occurences of the intersections of two vecotrs. I wonder if can do it with a interface with an other langage like C or VBScript. I've already used the VBScript duplicates files... -- View this message in context: http://mailinglists.scilab.org/Intersection-of-two-vectors-tp4025092p4025170.html Sent from the Scilab developers - Mailing Lists Archives mailing list archive at Nabble.com. From Serge.Steer at scilab.org Wed Nov 7 13:40:04 2012 From: Serge.Steer at scilab.org (Serge Steer) Date: Wed, 07 Nov 2012 13:40:04 +0100 Subject: [Scilab-Dev] Intersection of two vectors In-Reply-To: <1352199398960-4025170.post@n3.nabble.com> References: <1351448715744-4025092.post@n3.nabble.com> <948A2045-047D-46C9-B15A-CC9574118DAB@softube.com> <1351669714862-4025117.post@n3.nabble.com> <1352199398960-4025170.post@n3.nabble.com> Message-ID: <509A56A4.7050306@scilab.org> Why you do not use the intersect function? Serge Steer Le 06/11/2012 11:56, Orbeman a ?crit : > Maybe my interrogation is not understable due to my bad english. > > So, the answer of Arvid Ros?n work good but not with my huge vectors. Does > anyone have an other suggestion to have the positions of all occurences of > the intersections of two vecotrs. > > I wonder if can do it with a interface with an other langage like C or > VBScript. I've already used the VBScript duplicates files... > > > > -- > View this message in context: http://mailinglists.scilab.org/Intersection-of-two-vectors-tp4025092p4025170.html > Sent from the Scilab developers - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From du.k at neusoft.com Sun Nov 11 08:25:20 2012 From: du.k at neusoft.com (=?gb2312?B?tsW/7Q==?=) Date: Sun, 11 Nov 2012 15:25:20 +0800 Subject: [Scilab-Dev] call function in java language Message-ID: <001e01cdbfdd$b554e5d0$1ffeb170$@neusoft.com> Hi, I want to call a function created by myself in using java language, so how can do ? thanks very much! *********************** ?? du.k at neusoft.com Mobile?13464181474 ?????????? ????? ???????? *********************** --------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yjlee123 at gmail.com Sun Nov 11 17:13:55 2012 From: yjlee123 at gmail.com (Yung-Jang Lee) Date: Mon, 12 Nov 2012 00:13:55 +0800 Subject: [Scilab-Dev] call function in java language In-Reply-To: <001e01cdbfdd$b554e5d0$1ffeb170$@neusoft.com> References: <001e01cdbfdd$b554e5d0$1ffeb170$@neusoft.com> Message-ID: Scilab ????? Java ?? call scilab ????? ?????????? 1. ?? Scilab ????????? Java ??????? 2. ?? Scilab ???? Java ??, ?? Java ???? Scilab help javasci ???????????? 3. ????????????????? Scilab ???? (workspace)???? Scilab -Java ???? Java ????Java ?? ???? SCI\bin ????? PATH ?????, ?????????? CLASSPATH ? , ????? ? help compile_and_run_javasci_v2 ?? ? scilab-5.4.0\modules\javasci\examples\v2 ??????, ????????? build.bat ?? --------------build.bat------------- echo offrem Path to Scilab dataset SCI=C:\ADE\programs\scilab-5.4.0<--------- ?????????? Scilab ????set oPath=%PATH%set PATH=%SCI%\bin;%oPath%rem Java APIset CLASSPATH=%SCI%/modules/javasci/jar/org.scilab.modules.javasci.jar;%SCI%/modules/types/jar/org.scilab.modules.types.jar;%SCI%/jarrem Path to native libsjavac -cp %CLASSPATH% Example1.javajava -cp %CLASSPATH%;. Example1 set PATH=%oPath% ----- end of build.bat---------------------------------- ???? DOS ??, cd ? scilab-5.4.0\modules\javasci\examples\v2 ??? build ??????? ......\scilab-5.4.0\modules\javasci\examples\v2>echo off 2. 4. 6. 4. 3.1415927 10. 6. 10. 12. ?? Java code ???????? : ---------------Example1.java ??--------------- // ????? Java package ? Scilab ????import org.scilab.modules.javasci.Scilab;import org.scilab.modules.types.ScilabType;import org.scilab.modules.types.ScilabDouble; class Example1 { public static void main(String[] args) { try { Scilab sci = new Scilab(); // ???? Scilab ?? if (sci.open()) { /* Send a Scilab instruction */ sci.exec("foo = [ 2, 4, 6; 4, 0, 10; 6, 10, 12 ];"); //???????? Scilab ?? /* Retrieve the variable foo */ ScilabType foo = sci.get("foo"); // ?? scilab ?? foo /* Display the variable */ System.out.println("Representation of : " + foo); // ?? Scilab ?? foo /* Get the data and retrieve the 2,2 value */ double[][] aReal = ((ScilabDouble)foo).getRealPart(); // ?? foo(2,2) ????? Java ?? aReal System.out.println("foo[1,1] = " + aReal[1][1]); // ?? aReal /* Change the value of 2,2 */ aReal[1][1] = Math.PI; // ?? aReal(1,1) ?? /* Create a new variable */ ScilabDouble bar = new ScilabDouble(aReal); // ? aReal ?????? Scilab ????? Java ?? bar /* Send it to Scilab */ sci.put("bar", bar); // ? Java ?? bar ?? Scilab ?? Scilab ?? bar /* Display it through Scilab */ sci.exec("disp(bar)"); // ? Scilab ???? 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()); } }} ---------------------------------------------------- ??????????? (Scilab-5.4 ) ????? ??????? bug, ???????????? ???????????? ???? 5.3 ? ?? bug ??????????? Scilab ??????????????? 2012/11/11 ?? > Hi,**** > > I want to call a function created by myself in using java > language, so how can do ? thanks very much!**** > > ** ** > > *************************** > > ?? du.k at neusoft.com**** > > Mobile?13464181474**** > > ??????????**** > > ?????**** > > ????????**** > > *************************** > > ** ** > > > --------------------------------------------------------------------------------------------------- > Confidentiality Notice: The information contained in this e-mail and any > accompanying attachment(s) > is intended only for the use of the intended recipient and may be > confidential and/or privileged of > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader > of this communication is > not the intended recipient, unauthorized use, forwarding, printing, > storing, disclosure or copying > is strictly prohibited, and may be unlawful.If you have received this > communication in error,please > immediately notify the sender by return e-mail, and delete the original > message and all copies from > your system. Thank you. > > --------------------------------------------------------------------------------------------------- > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yjlee123 at gmail.com Sun Nov 11 17:35:15 2012 From: yjlee123 at gmail.com (Yung-Jang Lee) Date: Mon, 12 Nov 2012 00:35:15 +0800 Subject: [Scilab-Dev] call function in java language In-Reply-To: References: <001e01cdbfdd$b554e5d0$1ffeb170$@neusoft.com> Message-ID: Sory. It is my mistake to send mail in chinese to reply this question. I thought someone ask question in a chinese Scilab Google group that I joined. Yung-Jang Lee 2012/11/12 Yung-Jang Lee > Scilab ????? Java ?? call scilab ????? > ?????????? > > 1. ?? Scilab ????????? Java ??????? > 2. ?? Scilab ???? Java ??, ?? Java ???? Scilab > > help javasci ???????????? > > 3. ????????????????? Scilab ???? (workspace)???? Scilab -Java ???? > Java ????Java ?? > > > > ???? SCI\bin ????? PATH ?????, ?????????? CLASSPATH ? , ????? > ? help compile_and_run_javasci_v2 > ?? > > > ? scilab-5.4.0\modules\javasci\examples\v2 ??????, ????????? build.bat ?? > > > --------------build.bat------------- > > echo offrem Path to Scilab dataset SCI=C:\ADE\programs\scilab-5.4.0<--------- ?????????? Scilab ????set oPath=%PATH%set PATH=%SCI%\bin;%oPath%rem Java APIset CLASSPATH=%SCI%/modules/javasci/jar/org.scilab.modules.javasci.jar;%SCI%/modules/types/jar/org.scilab.modules.types.jar;%SCI%/jarrem Path to native libsjavac -cp %CLASSPATH% Example1.javajava -cp %CLASSPATH%;. Example1 > set PATH=%oPath% > ----- end of build.bat---------------------------------- > > > ???? DOS ??, cd ? scilab-5.4.0\modules\javasci\examples\v2 ??? > > build > > ??????? > > ......\scilab-5.4.0\modules\javasci\examples\v2>echo off > > 2. 4. 6. > 4. 3.1415927 10. > 6. 10. 12. > > ?? Java code ???????? : > > ---------------Example1.java ??--------------- > > > // ????? Java package ? Scilab ????import org.scilab.modules.javasci.Scilab;import org.scilab.modules.types.ScilabType;import org.scilab.modules.types.ScilabDouble; > class Example1 { > > public static void main(String[] args) { > try { > > Scilab sci = new Scilab(); // ???? Scilab ?? > > if (sci.open()) { > /* Send a Scilab instruction */ > sci.exec("foo = [ 2, 4, 6; 4, 0, 10; 6, 10, 12 ];"); //???????? Scilab ?? > > /* Retrieve the variable foo */ > ScilabType foo = sci.get("foo"); // ?? scilab ?? foo > > /* Display the variable */ > System.out.println("Representation of : " + foo); // ?? Scilab ?? foo > > /* Get the data and retrieve the 2,2 value */ > double[][] aReal = ((ScilabDouble)foo).getRealPart(); // ?? foo(2,2) ????? Java ?? aReal > System.out.println("foo[1,1] = " + aReal[1][1]); // ?? aReal > > /* Change the value of 2,2 */ > aReal[1][1] = Math.PI; // ?? aReal(1,1) ?? > > /* Create a new variable */ > ScilabDouble bar = new ScilabDouble(aReal); // ? aReal ?????? Scilab ????? Java ?? bar > > /* Send it to Scilab */ > sci.put("bar", bar); // ? Java ?? bar ?? Scilab ?? Scilab ?? bar > > /* Display it through Scilab */ > sci.exec("disp(bar)"); // ? Scilab ???? 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()); > } > > }} > ---------------------------------------------------- > > > ??????????? (Scilab-5.4 ) ????? ??????? bug, ???????????? > > > ???????????? ???? 5.3 ? > > ?? bug ??????????? Scilab ??????????????? > > > > 2012/11/11 ?? > >> Hi,**** >> >> I want to call a function created by myself in using java >> language, so how can do ? thanks very much!**** >> >> ** ** >> >> *************************** >> >> ?? du.k at neusoft.com**** >> >> Mobile?13464181474**** >> >> ??????????**** >> >> ?????**** >> >> ????????**** >> >> *************************** >> >> ** ** >> >> >> --------------------------------------------------------------------------------------------------- >> Confidentiality Notice: The information contained in this e-mail and any >> accompanying attachment(s) >> is intended only for the use of the intended recipient and may be >> confidential and/or privileged of >> Neusoft Corporation, its subsidiaries and/or its affiliates. If any >> reader of this communication is >> not the intended recipient, unauthorized use, forwarding, printing, >> storing, disclosure or copying >> is strictly prohibited, and may be unlawful.If you have received this >> communication in error,please >> immediately notify the sender by return e-mail, and delete the original >> message and all copies from >> your system. Thank you. >> >> --------------------------------------------------------------------------------------------------- >> >> _______________________________________________ >> dev mailing list >> dev at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/dev >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jean-Pierre.Dussault at Usherbrooke.CA Fri Nov 16 00:34:42 2012 From: Jean-Pierre.Dussault at Usherbrooke.CA (Jean-Pierre Dussault) Date: Thu, 15 Nov 2012 18:34:42 -0500 Subject: [Scilab-Dev] _gfortran_transfer_character_write Message-ID: <50A57C12.6020305@Usherbrooke.CA> Hi, I try to interface L-BFGS-B and I am stuck with the following error after compiling the Fortran code: link : La biblioth?que partag?e n'a pas ?t? charg?e: /home/import/Trucs_essayes/Lbfgsb.2.1/libsetulb.so: undefined symbol: _gfortran_transfer_character_write Any idea to fix this? I absolutely don't know where this symbol comes from... The executable files produced by L-BFGS-B run without problem. Thx, JPD -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jean-Pierre.Dussault at Usherbrooke.CA Fri Nov 16 00:34:16 2012 From: Jean-Pierre.Dussault at Usherbrooke.CA (Jean-Pierre Dussault) Date: Thu, 15 Nov 2012 18:34:16 -0500 Subject: [Scilab-Dev] Fwd: Optimization In-Reply-To: <50A57A73.4040505@Usherbrooke.CA> References: <50A57A73.4040505@Usherbrooke.CA> Message-ID: <50A57BF8.2010302@Usherbrooke.CA> Reposted with pdf figure instead of too big scg JPD -------- Message original -------- Sujet: Optimization Date : Thu, 15 Nov 2012 18:27:47 -0500 De : Jean-Pierre Dussault Pour : dev at lists.scilab.org Hi all, I am preparing examples for an optimization course for students in image science. I use an example from http://www.ceremade.dauphine.fr/~peyre/numerical-tour/tours/optim_1_gradient_descent/ to promote the use of better algorithms than the simple gradient descent. I attach the convergence plot of the norm of the gradient for 5 variants of the optim command: gc unconstrained, gc with bounds [-%inf,%inf], gc with bounds [0,1], gc with bounds [0,%inf] and nd. I also include the gradient descent. Except for the [0,%inf] variant, the solution has all components strictly in [0,1] as displayed here: -->[max(xoptS),max(xoptGC),max(xoptGCB),max(xoptGCBinf),max(xoptGCB0inf),max(xoptND)] ans = 0.9249840 0.9211455 0.9216067 0.9213056 1.0402906 0.9212348 -->[min(xoptS),min(xoptGC),min(xoptGCB),min(xoptGCBinf),min(xoptGCB0inf),min(xoptND)] ans = 0.0671743 0.0718204 0.0678885 0.0714951 0.0772300 0.0714255 On the convergence plot, we clearly see that the gradient norm of the gc with [0,1] bounds stalls away from zero while with no bounds or infinite bounds, it converges to zero. This is even more severe for the variant with bounds [0.%inf], which no more approaches the solution, making virtually no progress at all after some 30 function evaluations. Is it a Scilab bug or a bad example for the gcbd underlying routine? The cost function is strongly convex of dimension 65536. Has someone experienced a similar behavior? This is unfortunate since I wish to convince my students to use suitably constrained models instead of enforcing constraints afterward. Thanks for any suggestion to work around this troublesome situation. JPD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Comp.pdf Type: application/pdf Size: 29178 bytes Desc: not available URL: From sylvestre.ledru at scilab-enterprises.com Fri Nov 16 08:28:45 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Fri, 16 Nov 2012 08:28:45 +0100 Subject: [Scilab-Dev] _gfortran_transfer_character_write In-Reply-To: <50A57C12.6020305@Usherbrooke.CA> References: <50A57C12.6020305@Usherbrooke.CA> Message-ID: <50A5EB2D.5060500@scilab-enterprises.com> On 16/11/2012 00:34, Jean-Pierre Dussault wrote: > Hi, > > I try to interface L-BFGS-B and I am stuck with the following error > after compiling the Fortran code: > > link : La biblioth?que partag?e n'a pas ?t? charg?e: > /home/import/Trucs_essayes/Lbfgsb.2.1/libsetulb.so: undefined > symbol: _gfortran_transfer_character_write > > > Any idea to fix this? I absolutely don't know where this symbol comes > from... The executable files produced by L-BFGS-B run without problem. Looks like a -lgfortran in the LDFLAGS is missing somewhere. Sylvestre From guillaume.horel at gmail.com Mon Nov 26 05:53:22 2012 From: guillaume.horel at gmail.com (Guillaume Horel) Date: Sun, 25 Nov 2012 23:53:22 -0500 Subject: [Scilab-Dev] eigs woes Message-ID: This is a rather long email about my fight with the eigs function in scilab. It might be better suited for a bug report, but I wanted to try out this list first. It's a boundary problem for the helmholtz equation: http://bpaste.net/show/60377/ On scilab-5.4.0, the code fails with the following error message: eigs: Impossible to invert complex sparse matrix. at line 333 of function speigs called by : at line 112 of function eigs called by : [D V] = eigs(A, [], M2,'SM'); at line 54 of exec file called by : exec('/home/guillaume/test-eigs.sce', -1) In the code of the eigs function, it turns out that there is a test to check if the factors of the LU decomposition of A-sigma I are complex (which is the majority of cases if you start from a complex matrix), and the code fails with this error. Is there any reason to have such a test in there? I also realized that the code was computing the inverse by actually calling inv(L) and inv(U), which completely defeats the purpose of doing a LU decomposition. Long story short, the following patch fixes the two aforementionned issues: http://bpaste.net/show/60375/ I still have two questions: - I'm still unsure about why the code needs two different lu solvers: lufact and mf_lufact. Unless lufact is really faster than umf_lufact for real numbers, I think that just using umf_lufact should be enough and would further simplify the code. - after applying this patch scilab computes my eigenfunctions fine. However the performance is pretty disappointing. On my laptop, scilab takes around 15s to compute 100 eigenvalues, but on the same machine octave takes less than 3s. I checked the octave eigs function and it's all written in C. However I would think the computation time is dominated by the calls to the various arpack functions and lu solvers rather than all the plumbing, but maybe I'm wrong... Any thoughts? Thanks for your insights, Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From lremmerswaal at revolutioncontrols.com Mon Nov 26 16:12:43 2012 From: lremmerswaal at revolutioncontrols.com (Len Remmerswaal) Date: Mon, 26 Nov 2012 16:12:43 +0100 Subject: [Scilab-Dev] xcos blocks showing dynamic parameters Message-ID: Hi all, I used to have scicos blocks that were able to show some parameters on their instantiations. This was how: - In the "define" case of the interface function: in the gr_i string to be displayed: reference some variable names. - In the "set" case of the interface function: assign new values to these variables and store them in the arg1.graphics.exprs list. - In the "plot" case of the interface function: unpack the same variables from arg1.graphics.exprs and call standard_draw. Worked like a charm in scicos 4.3. Stopped working in Scilab 5.3.3. I do see blocks like CONST_m displaying their parameter and changing them dynamically after assigning new parameter values. What I do not see is how it is done: I do not see, after the dialog is dismissed in scicos_getvalues, where the parameter gets to be displayed on the xcos diagram. Can anyone point me in the right direction? Thanks, Len Remmerswaal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Tue Nov 27 08:50:59 2012 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Tue, 27 Nov 2012 08:50:59 +0100 Subject: [Scilab-Dev] xcos blocks showing dynamic parameters In-Reply-To: References: Message-ID: <1354002659.1986.5.camel@paros> Hello, In Xcos, we use images or text rendering to display the blocks icons. These settings can be modified using a CSS-like key-value properties on xcosPalAddBlock. Take a look at the style argument. Basically, to display the second exprs text on the block, use style="displayedLabel=%2$s". An exemple is provided on SCI/contrib/xcos_toolbox_skeleton. Le lundi 26 novembre 2012 ? 16:12 +0100, Len Remmerswaal a ?crit : > Hi all, > I used to have scicos blocks that were able to show some parameters on their instantiations. This was how: > - In the "define" case of the interface function: in the gr_i string to be displayed: reference some variable names. > - In the "set" case of the interface function: assign new values to these variables and store them in the arg1.graphics.exprs list. > - In the "plot" case of the interface function: unpack the same variables from arg1.graphics.exprs and call standard_draw. > > Worked like a charm in scicos 4.3. Stopped working in Scilab 5.3.3. > > I do see blocks like CONST_m displaying their parameter and changing them dynamically after assigning new parameter values. What I do not see is how it is done: I do not see, after the dialog is dismissed in scicos_getvalues, where the parameter gets to be displayed on the xcos diagram. > Can anyone point me in the right direction? > Thanks, > Len Remmerswaal. > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev -- Cl?ment DAVID Development Engineer / Account Manager ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com From michael.baudin at contrib.scilab.org Tue Nov 27 09:10:27 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Tue, 27 Nov 2012 09:10:27 +0100 Subject: [Scilab-Dev] eigs woes In-Reply-To: References: Message-ID: <1ed21a42ab0a3bea9a3898e13a875e09@contrib.scilab.org> Hi, I think that you are discussing the code : if(~isreal(AMSB)) Lup = umf_lufact(AMSB); [L, U, p, q, R] = umf_luget(Lup); R = diag(R); P = zeros(nA, nA); Q = zeros(nA, nA); for i = 1:nA P(i,p(i)) = 1; Q(q(i),i) = 1; end umf_ludel(Lup); else [hand, rk] = lufact(AMSB); [P, L, U, Q] = luget(hand); ludel(hand); end extracted from eigs. The lufact function is designed to be used with lusolve. The luget function was designed essentially for debugging purposes, or to communicate with other algorithms. In general, it should not be used to compute the solution. The other problem is the for loop, which should be avoided, because with large sparse matrices, this will fail for performance reasons. I'm not sure, but this loop should be vectorisable quite easily. In general, the umf functions are much faster, as shown by B. Pin?on. But there might another technical reason here that I do not see. Best regards, Micha?l Le 2012-11-26 05:53, Guillaume Horel a ?crit?: > This is a rather long email about my fight with the eigs function in > scilab. It might be better suited for a bug report, but I wanted to > try out this list first. > > It's a boundary problem for the helmholtz equation: > http://bpaste.net/show/60377/ [1] > > On scilab-5.4.0, the code fails with the following error message: > > eigs: Impossible to invert complex sparse matrix. > at line???? 333 of function speigs called by :? > at line???? 112 of function eigs called by :? > [D V] = eigs(A, [], M2,'SM'); > at line????? 54 of exec file called by :??? > exec('/home/guillaume/test-eigs.sce', -1) > > In the code of the eigs function, it turns out that there is a test > to check if the factors of the LU decomposition of A-sigma I are > complex (which is the majority of cases if you start from a complex > matrix), and the code fails with this error. Is there any reason to > have such a test in there? > I also realized that the code was computing the inverse by actually > calling inv(L) and inv(U), which completely defeats the purpose of > doing a LU decomposition. Long story short, the following patch fixes > the two aforementionned issues: http://bpaste.net/show/60375/ [2] > > I still have two questions: > - I'm still unsure about why the code needs two different lu solvers: > lufact and mf_lufact. Unless lufact is really faster than umf_lufact > for real numbers, I think that just using umf_lufact should be enough > and would further simplify the code. > - after applying this patch scilab computes my eigenfunctions fine. > However the performance is pretty disappointing. On my laptop, scilab > takes around 15s to compute 100 eigenvalues, but on the same machine > octave takes less than 3s. I checked the octave eigs function and > it's > all written in C. However I would think the computation time is > dominated by the calls to the various arpack functions and lu solvers > rather than all the plumbing, but maybe I'm wrong... Any thoughts? > > Thanks for your insights, > Guillaume > > > Links: > ------ > [1] http://bpaste.net/show/60377/ > [2] http://bpaste.net/show/60375/ > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From michael.baudin at contrib.scilab.org Tue Nov 27 09:32:45 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Tue, 27 Nov 2012 09:32:45 +0100 Subject: [Scilab-Dev] Fwd: Optimization In-Reply-To: <50A57BF8.2010302@Usherbrooke.CA> References: <50A57A73.4040505@Usherbrooke.CA> <50A57BF8.2010302@Usherbrooke.CA> Message-ID: <8ab94e8b073ee2ef4f60622d71f6fed3@contrib.scilab.org> Hi, One particular point that you may not be aware of is that the unconstrained and the constrained algorithms are different. This is not one single, constrainted, algorithm which is used either with bounds or with infinite bounds: these are two different routines. This is why setting infinite bounds such as [-inf,inf] may not have any numerical interest: the unconstrained version should be used in this case. In your message, you state that "all components are stricly in [0,1]", but I can see that 1.04>1, so that if the upper bound is set to 1, this bound will be active. On the other hand, if the bounds were not active (but they are), the difference between the unconstrained and the constrained algorithms should be insignificant. So, my guess is that the reason why the LBFGSB0inf algorithm has a nonzero gradient is because some constraint is active, which prevents the algorithm to converge to an unconstrained minimum : it has to respect some bound. My own experience with the "gc" algorithm is that there are very few cases in which this algorithm outperforms the default "qn" algorithm. More precisely, the "gc" algo. is designed to manage large problems, but I was not able to create a problem where "qn" fails because of a lack of memory, and were "gc" succeeds. I guess that this is because the implementation in Scilab uses the maximum available memory to compute the number of vectors in the L-BFGS algo. In practice, if "qn" fails because it has not enough memory, "gc" also fails, either because it requires more memory than Scilab can give, or because it does not converge at all. Best regards, Micha?l PS A document which might be of some interest to you is "Optimization in Scilab", where the chapter 2 is on nonlinear optimization : http://forge.scilab.org/index.php/p/docoptimscilab/downloads/ Le 2012-11-16 00:34, Jean-Pierre Dussault a ?crit?: > Reposted with pdf figure instead of too big scg > > JPD > > -------- Message original -------- > > SUJET: > Optimization > > DATE?: > Thu, 15 Nov 2012 18:27:47 -0500 > > DE?: > Jean-Pierre Dussault > > POUR?: > dev at lists.scilab.org > > Hi all, > > I am preparing examples for an optimization course for students in > image science. I use an example from > > http://www.ceremade.dauphine.fr/~peyre/numerical-tour/tours/optim_1_gradient_descent/ > [1] to promote the use of better algorithms than the simple gradient > descent. > > I attach the convergence plot of the norm of the gradient for 5 > variants of the optim command: gc unconstrained, gc with bounds > [-%inf,%inf], gc with bounds [0,1], gc with bounds [0,%inf] and nd. I > also include the gradient descent. > > Except for the [0,%inf] variant, the solution has all components > strictly in [0,1] as displayed here: > >> >> -->[max(xoptS),max(xoptGC),max(xoptGCB),max(xoptGCBinf),max(xoptGCB0inf),max(xoptND)] >> ans = >> >> 0.9249840 0.9211455 0.9216067 0.9213056 1.0402906 0.9212348 >> >> >> -->[min(xoptS),min(xoptGC),min(xoptGCB),min(xoptGCBinf),min(xoptGCB0inf),min(xoptND)] >> ans = >> >> 0.0671743 0.0718204 0.0678885 0.0714951 0.0772300 0.0714255 > On the convergence plot, we clearly see that the gradient norm of > the gc with [0,1] bounds stalls away from zero while with no bounds > or > infinite bounds, it converges to zero. This is even more severe for > the variant with bounds [0.%inf], which no more approaches the > solution, making virtually no progress at all after some 30 function > evaluations. > > Is it a Scilab bug or a bad example for the gcbd underlying routine? > The cost function is strongly convex of dimension 65536. Has someone > experienced a similar behavior? > > This is unfortunate since I wish to convince my students to use > suitably constrained models instead of enforcing constraints > afterward. > > Thanks for any suggestion to work around this troublesome situation. > > JPD > > > > Links: > ------ > [1] > > http://www.ceremade.dauphine.fr/%7Epeyre/numerical-tour/tours/optim_1_gradient_descent/ > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From guillaume.horel at gmail.com Tue Nov 27 17:33:45 2012 From: guillaume.horel at gmail.com (Guillaume Horel) Date: Tue, 27 Nov 2012 11:33:45 -0500 Subject: [Scilab-Dev] eigs woes In-Reply-To: <1ed21a42ab0a3bea9a3898e13a875e09@contrib.scilab.org> References: <1ed21a42ab0a3bea9a3898e13a875e09@contrib.scilab.org> Message-ID: Thanks. I'm surprised eigs shipped with code like that in the first place. I'm going to file a bug and submit a cleaned up version of the patch. It still doesn't explain why it's more than 5 times slower on my example than the octave version while it's just a wrapper around the arpack function, but that's for another day :) Guillaume On Tue, Nov 27, 2012 at 3:10 AM, wrote: > Hi, > > I think that you are discussing the code : > > if(~isreal(AMSB)) > Lup = umf_lufact(AMSB); > [L, U, p, q, R] = umf_luget(Lup); > R = diag(R); > P = zeros(nA, nA); > Q = zeros(nA, nA); > for i = 1:nA > P(i,p(i)) = 1; > Q(q(i),i) = 1; > end > umf_ludel(Lup); > else > [hand, rk] = lufact(AMSB); > [P, L, U, Q] = luget(hand); > ludel(hand); > end > > extracted from eigs. > > The lufact function is designed to be used with lusolve. > The luget function was designed essentially for debugging purposes, > or to communicate with other algorithms. > In general, it should not be used to compute the solution. > > The other problem is the for loop, which should be avoided, because > with large sparse matrices, this will fail for performance reasons. > I'm not sure, but this loop should be vectorisable quite easily. > > In general, the umf functions are much faster, as shown by B. Pin?on. > But there might another technical reason here that I do not see. > > Best regards, > > Micha?l > > Le 2012-11-26 05:53, Guillaume Horel a ?crit : > >> This is a rather long email about my fight with the eigs function in >> scilab. It might be better suited for a bug report, but I wanted to >> try out this list first. >> >> It's a boundary problem for the helmholtz equation: >> http://bpaste.net/show/60377/ [1] >> >> >> On scilab-5.4.0, the code fails with the following error message: >> >> eigs: Impossible to invert complex sparse matrix. >> at line 333 of function speigs called by : >> at line 112 of function eigs called by : >> [D V] = eigs(A, [], M2,'SM'); >> at line 54 of exec file called by : >> exec('/home/guillaume/test-**eigs.sce', -1) >> >> In the code of the eigs function, it turns out that there is a test >> to check if the factors of the LU decomposition of A-sigma I are >> complex (which is the majority of cases if you start from a complex >> matrix), and the code fails with this error. Is there any reason to >> have such a test in there? >> I also realized that the code was computing the inverse by actually >> calling inv(L) and inv(U), which completely defeats the purpose of >> doing a LU decomposition. Long story short, the following patch fixes >> the two aforementionned issues: http://bpaste.net/show/60375/ [2] >> >> >> I still have two questions: >> - I'm still unsure about why the code needs two different lu solvers: >> lufact and mf_lufact. Unless lufact is really faster than umf_lufact >> for real numbers, I think that just using umf_lufact should be enough >> and would further simplify the code. >> - after applying this patch scilab computes my eigenfunctions fine. >> However the performance is pretty disappointing. On my laptop, scilab >> takes around 15s to compute 100 eigenvalues, but on the same machine >> octave takes less than 3s. I checked the octave eigs function and it's >> all written in C. However I would think the computation time is >> dominated by the calls to the various arpack functions and lu solvers >> rather than all the plumbing, but maybe I'm wrong... Any thoughts? >> >> Thanks for your insights, >> Guillaume >> >> >> Links: >> ------ >> [1] http://bpaste.net/show/60377/ >> [2] http://bpaste.net/show/60375/ >> >> ______________________________**_________________ >> dev mailing list >> dev at lists.scilab.org >> http://lists.scilab.org/**mailman/listinfo/dev >> > > ______________________________**_________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/**mailman/listinfo/dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.baudin at contrib.scilab.org Thu Nov 29 09:15:08 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Thu, 29 Nov 2012 09:15:08 +0100 Subject: [Scilab-Dev] eigs woes In-Reply-To: References: <1ed21a42ab0a3bea9a3898e13a875e09@contrib.scilab.org> Message-ID: <322cce196c7f2f8ad950fa3d13ce0751@contrib.scilab.org> Hi, Le 2012-11-27 17:33, Guillaume Horel a ?crit?: > Thanks. I'm surprised eigs shipped with code like that in the first > place. I'm going to file a bug and submit a cleaned up version of the > patch. The eigs function is at its first version in the v5.4.0. The project involved many other topics, including the management of a large number of arguments and options, the real/complex switch, etc... For a first release, it's already excellent! Best regards, Micha?l From communication at scilab-enterprises.com Thu Nov 29 09:41:37 2012 From: communication at scilab-enterprises.com (Communication) Date: Thu, 29 Nov 2012 09:41:37 +0100 Subject: [Scilab-Dev] Job Opportunities Message-ID: <50B71FC1.1090203@scilab-enterprises.com> Scilab Enterprises is hiring software developers! All details are available online at: http://www.scilab-enterprises.com/company/career Do not hesitate to communicate on it. Best Regards -- Communications and Public Relations Department ------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com From lremmerswaal at revolutioncontrols.com Thu Nov 29 14:48:39 2012 From: lremmerswaal at revolutioncontrols.com (Len Remmerswaal) Date: Thu, 29 Nov 2012 14:48:39 +0100 Subject: [Scilab-Dev] xcos blocks showing dynamic parameters In-Reply-To: <2423F2F1A6E34960A717F9D072FF5FF3@revolutioncontrols.local> References: <2423F2F1A6E34960A717F9D072FF5FF3@revolutioncontrols.local> Message-ID: Thanks for mentioning "displayedLabels": that keyword allowed me to find the right stuff. For those interested in a longer answer: If you create a block on a palette using xcosPalAddBlock, you can give a "style" argument. If you want to create anything permanent (as in lasting over the current Scilab session), you must supply it. There are three options for "style": - It can be a string containing the path to an image file, which is then projected on a standard (empty) block. - Alternatively it can be a struct whose fieldnames are exactly the JGrapx style keys as on the xcosPalAddBlock help page. This gets to be converted to a string before being passed on. - Lastly, you can provide exactly that string being passed on. This is a string with = items, separated by semicolons, like this: "noLabel=0;displayedLabel=Your text here;align=center;" Note the final semicolon. Note also that a semicolon in any value is prohibited. The style is applied to the familiar basic block, with a rounded rectangle and a nice gradient. If you want to write a text label on the block you need at least these styles: noLabel=0; This makes your label visible. verticalLabelPosition=middle; This puts your label inside the box instead of under it (peculiar default!) displayedLabel=Your text here; Or you will just be looking at the name of your defining interface function. The text for displayedLabel has a few nice options: - It is embedded in ...... so you can put some html codes in there. One of them is
, if you want a multi-line label ("\n" will not work). Another is playing with font sizes and colors. You can even put in a small table. I am not sure how complete the html interpretation is. And there cannot be a straight semicolon anywhere in your text! - In the label text you can refer to the values that your interface function stored in the block.graphics.exprs list. The syntax is %n$s where n is an index into exprs. Like this: displayedLabel=Game: %1$s - %2$s
Score:
Home: %5$s
Guests: %6$s; where graphics.exprs might be ["BallTown", "BatCity", "0", "0", "2", "1"]; which would produce: Game: BallTown - BatCity Score: Home: 2 Guests: 1 Upon instantiation into a diagram, the block is sized to fit around the label. If you change values later (using the 'define' job of the interface function), it does not automatically resize to fit the new label. Hope this is useful for anyone. Cheers, Len. -----Original Message----- Date: Tue, 27 Nov 2012 08:50:59 +0100 From: Cl?ment David To: List dedicated to development questions Subject: Re: [Scilab-Dev] xcos blocks showing dynamic parameters Message-ID: <1354002659.1986.5.camel at paros> Content-Type: text/plain; charset="UTF-8" Hello, In Xcos, we use images or text rendering to display the blocks icons. These settings can be modified using a CSS-like key-value properties on xcosPalAddBlock. Take a look at the style argument. Basically, to display the second exprs text on the block, use style="displayedLabel=%2$s". An exemple is provided on SCI/contrib/xcos_toolbox_skeleton. Le lundi 26 novembre 2012 ? 16:12 +0100, Len Remmerswaal a ?crit : > Hi all, > I used to have scicos blocks that were able to show some parameters on their instantiations. This was how: > - In the "define" case of the interface function: in the gr_i string to be displayed: reference some variable names. > - In the "set" case of the interface function: assign new values to these variables and store them in the arg1.graphics.exprs list. > - In the "plot" case of the interface function: unpack the same variables from arg1.graphics.exprs and call standard_draw. > > Worked like a charm in scicos 4.3. Stopped working in Scilab 5.3.3. > > I do see blocks like CONST_m displaying their parameter and changing them dynamically after assigning new parameter values. What I do not see is how it is done: I do not see, after the dialog is dismissed in scicos_getvalues, where the parameter gets to be displayed on the xcos diagram. > Can anyone point me in the right direction? > Thanks, > Len Remmerswaal. > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev -- Cl?ment DAVID Development Engineer / Account Manager ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com ------------------------------ Message: 3 Date: Tue, 27 Nov 2012 09:10:27 +0100 From: michael.baudin at contrib.scilab.org To: Subject: Re: [Scilab-Dev] eigs woes Message-ID: <1ed21a42ab0a3bea9a3898e13a875e09 at contrib.scilab.org> Content-Type: text/plain; charset=UTF-8; format=flowed Hi, I think that you are discussing the code : if(~isreal(AMSB)) Lup = umf_lufact(AMSB); [L, U, p, q, R] = umf_luget(Lup); R = diag(R); P = zeros(nA, nA); Q = zeros(nA, nA); for i = 1:nA P(i,p(i)) = 1; Q(q(i),i) = 1; end umf_ludel(Lup); else [hand, rk] = lufact(AMSB); [P, L, U, Q] = luget(hand); ludel(hand); end extracted from eigs. The lufact function is designed to be used with lusolve. The luget function was designed essentially for debugging purposes, or to communicate with other algorithms. In general, it should not be used to compute the solution. The other problem is the for loop, which should be avoided, because with large sparse matrices, this will fail for performance reasons. I'm not sure, but this loop should be vectorisable quite easily. In general, the umf functions are much faster, as shown by B. Pin?on. But there might another technical reason here that I do not see. Best regards, Micha?l Le 2012-11-26 05:53, Guillaume Horel a ?crit?: > This is a rather long email about my fight with the eigs function in > scilab. It might be better suited for a bug report, but I wanted to > try out this list first. > > It's a boundary problem for the helmholtz equation: > http://bpaste.net/show/60377/ [1] > > On scilab-5.4.0, the code fails with the following error message: > > eigs: Impossible to invert complex sparse matrix. > at line???? 333 of function speigs called by :? > at line???? 112 of function eigs called by :? > [D V] = eigs(A, [], M2,'SM'); > at line????? 54 of exec file called by :??? > exec('/home/guillaume/test-eigs.sce', -1) > > In the code of the eigs function, it turns out that there is a test > to check if the factors of the LU decomposition of A-sigma I are > complex (which is the majority of cases if you start from a complex > matrix), and the code fails with this error. Is there any reason to > have such a test in there? > I also realized that the code was computing the inverse by actually > calling inv(L) and inv(U), which completely defeats the purpose of > doing a LU decomposition. Long story short, the following patch fixes > the two aforementionned issues: http://bpaste.net/show/60375/ [2] > > I still have two questions: > - I'm still unsure about why the code needs two different lu solvers: > lufact and mf_lufact. Unless lufact is really faster than umf_lufact > for real numbers, I think that just using umf_lufact should be enough > and would further simplify the code. > - after applying this patch scilab computes my eigenfunctions fine. > However the performance is pretty disappointing. On my laptop, scilab > takes around 15s to compute 100 eigenvalues, but on the same machine > octave takes less than 3s. I checked the octave eigs function and > it's > all written in C. However I would think the computation time is > dominated by the calls to the various arpack functions and lu solvers > rather than all the plumbing, but maybe I'm wrong... Any thoughts? > > Thanks for your insights, > Guillaume > > > Links: > ------ > [1] http://bpaste.net/show/60377/ > [2] http://bpaste.net/show/60375/ > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev ------------------------------ Message: 4 Date: Tue, 27 Nov 2012 09:32:45 +0100 From: michael.baudin at contrib.scilab.org To: Subject: Re: [Scilab-Dev] Fwd: Optimization Message-ID: <8ab94e8b073ee2ef4f60622d71f6fed3 at contrib.scilab.org> Content-Type: text/plain; charset=UTF-8; format=flowed Hi, One particular point that you may not be aware of is that the unconstrained and the constrained algorithms are different. This is not one single, constrainted, algorithm which is used either with bounds or with infinite bounds: these are two different routines. This is why setting infinite bounds such as [-inf,inf] may not have any numerical interest: the unconstrained version should be used in this case. In your message, you state that "all components are stricly in [0,1]", but I can see that 1.04>1, so that if the upper bound is set to 1, this bound will be active. On the other hand, if the bounds were not active (but they are), the difference between the unconstrained and the constrained algorithms should be insignificant. So, my guess is that the reason why the LBFGSB0inf algorithm has a nonzero gradient is because some constraint is active, which prevents the algorithm to converge to an unconstrained minimum : it has to respect some bound. My own experience with the "gc" algorithm is that there are very few cases in which this algorithm outperforms the default "qn" algorithm. More precisely, the "gc" algo. is designed to manage large problems, but I was not able to create a problem where "qn" fails because of a lack of memory, and were "gc" succeeds. I guess that this is because the implementation in Scilab uses the maximum available memory to compute the number of vectors in the L-BFGS algo. In practice, if "qn" fails because it has not enough memory, "gc" also fails, either because it requires more memory than Scilab can give, or because it does not converge at all. Best regards, Micha?l PS A document which might be of some interest to you is "Optimization in Scilab", where the chapter 2 is on nonlinear optimization : http://forge.scilab.org/index.php/p/docoptimscilab/downloads/ Le 2012-11-16 00:34, Jean-Pierre Dussault a ?crit?: > Reposted with pdf figure instead of too big scg > > JPD > > -------- Message original -------- > > SUJET: > Optimization > > DATE?: > Thu, 15 Nov 2012 18:27:47 -0500 > > DE?: > Jean-Pierre Dussault > > POUR?: > dev at lists.scilab.org > > Hi all, > > I am preparing examples for an optimization course for students in > image science. I use an example from > > http://www.ceremade.dauphine.fr/~peyre/numerical-tour/tours/optim_1_gradient_descent/ > [1] to promote the use of better algorithms than the simple gradient > descent. > > I attach the convergence plot of the norm of the gradient for 5 > variants of the optim command: gc unconstrained, gc with bounds > [-%inf,%inf], gc with bounds [0,1], gc with bounds [0,%inf] and nd. I > also include the gradient descent. > > Except for the [0,%inf] variant, the solution has all components > strictly in [0,1] as displayed here: > >> >> -->[max(xoptS),max(xoptGC),max(xoptGCB),max(xoptGCBinf),max(xoptGCB0inf),max(xoptND)] >> ans = >> >> 0.9249840 0.9211455 0.9216067 0.9213056 1.0402906 0.9212348 >> >> >> -->[min(xoptS),min(xoptGC),min(xoptGCB),min(xoptGCBinf),min(xoptGCB0inf),min(xoptND)] >> ans = >> >> 0.0671743 0.0718204 0.0678885 0.0714951 0.0772300 0.0714255 > On the convergence plot, we clearly see that the gradient norm of > the gc with [0,1] bounds stalls away from zero while with no bounds > or > infinite bounds, it converges to zero. This is even more severe for > the variant with bounds [0.%inf], which no more approaches the > solution, making virtually no progress at all after some 30 function > evaluations. > > Is it a Scilab bug or a bad example for the gcbd underlying routine? > The cost function is strongly convex of dimension 65536. Has someone > experienced a similar behavior? > > This is unfortunate since I wish to convince my students to use > suitably constrained models instead of enforcing constraints > afterward. > > Thanks for any suggestion to work around this troublesome situation. > > JPD > > > > Links: > ------ > [1] > > http://www.ceremade.dauphine.fr/%7Epeyre/numerical-tour/tours/optim_1_gradient_descent/ > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev ------------------------------ _______________________________________________ dev mailing list dev at lists.scilab.org http://lists.scilab.org/mailman/listinfo/dev End of dev Digest, Vol 4, Issue 14 ********************************** From blake at ee.washington.edu Fri Nov 30 22:17:52 2012 From: blake at ee.washington.edu (Blake Hannaford) Date: Fri, 30 Nov 2012 13:17:52 -0800 Subject: [Scilab-Dev] General installation problems Message-ID: I use Scilab in my teaching of Electrical Engineering. I've had great results with 50-80 students per year for the last three years who install Scilab on their PC and Mac laptops. This year, the results are different. Many students are having installation problems for 5.4.4 - especially on newer Macs. I've advised them all to stick with 5.3.3, but there are still fatal bugs on certain graphics chips. I assume these problems are from underlying Java issues that are out of Scilab's control, but unless they are resolved clearly and soon, I will no longer be able to use it for class. These are students who are used to Matlab and already have low-cost licenses they used in earlier classes so this gives the open-source software model a black eye. Blake Hannaford -- Blake Hannaford Dept. of Electrical Engineering Voice: 1 206 543 2197 University of Washington Fax: 1 206 221 5264 Seattle, WA 98195-2500 http://brl.ee.washington.edu -- -------------- next part -------------- An HTML attachment was scrubbed... URL: