From bkherbert99 at yahoo.ca Thu Nov 1 00:24:05 2012 From: bkherbert99 at yahoo.ca (bkherbert) Date: Wed, 31 Oct 2012 16:24:05 -0700 (PDT) Subject: [Scilab-users] problems with tools for accurate computation In-Reply-To: <1347371618567-4024810.post@n3.nabble.com> References: <1347371618567-4024810.post@n3.nabble.com> Message-ID: <1351725845213-4025123.post@n3.nabble.com> I am not very familiar with mupat, and the command syntax is different than qupat Xnum for scilab worked fine on scilab version 5.1 apparently the function getf is no longer used in scilab version 5.4 therefore the file would have to be edited however a quick fix is to load the file 'xnum.sci' into the editor and then choose execute file from the file menu to manually run the file. This does work and all you are doing here is just manually 'getf' (get file and execute) -- View this message in context: http://mailinglists.scilab.org/problems-with-tools-for-accurate-computation-tp4024810p4025123.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From bkherbert99 at yahoo.ca Thu Nov 1 05:10:13 2012 From: bkherbert99 at yahoo.ca (bkherbert) Date: Wed, 31 Oct 2012 21:10:13 -0700 (PDT) Subject: [Scilab-users] problems with tools for accurate computation In-Reply-To: <1351725845213-4025123.post@n3.nabble.com> References: <1347371618567-4024810.post@n3.nabble.com> <1351725845213-4025123.post@n3.nabble.com> Message-ID: <1351743013268-4025124.post@n3.nabble.com> You may be using a faulty version of Mupat this is a link to a working version of Mupat http://www.mi.kagu.tus.ac.jp/qupat/mupat_win_ver02.zip both dd(var) and qd(var) work properly (I am using Scilab 5.4) both xnum and qupat/mupat require the 32 bit version of scilab -- View this message in context: http://mailinglists.scilab.org/problems-with-tools-for-accurate-computation-tp4024810p4025124.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From roger at rwmoss.co.uk Thu Nov 1 10:39:36 2012 From: roger at rwmoss.co.uk (rm1897) Date: Thu, 1 Nov 2012 02:39:36 -0700 (PDT) Subject: [Scilab-users] Re-docking windows Message-ID: <1351762776218-4025128.post@n3.nabble.com> I have Scilab 5.4.0 on both Windows 7 and Mac OS-X Mountain Lion (I recently installed it and am just learning to use it). I have found how to undock the variable browser and command history but there seems to be no way of redocking them. I have tried (on both systems) dragging them back in the main window, and the reverse, dragging the main window (small) inside them, killing them, restarting Scilab, looking through the preferences - am I missing something? I was happy with the little "undock" arrow, why is there not a "redock" arrow in its place? Thanks Roger -- View this message in context: http://mailinglists.scilab.org/Re-docking-windows-tp4025128.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Thu Nov 1 12:20:03 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 01 Nov 2012 12:20:03 +0100 Subject: [Scilab-users] Re-docking windows In-Reply-To: <1351762776218-4025128.post@n3.nabble.com> References: <1351762776218-4025128.post@n3.nabble.com> Message-ID: <50925AE3.1070008@free.fr> Hello, The handle of a window to point, drag and dock is the bar with the question-mark, the undock arrow and the cross, instead of the main bar at the very top of the window. HTH Samuel Le 01/11/2012 10:39, rm1897 a ?crit : > I have Scilab 5.4.0 on both Windows 7 and Mac OS-X Mountain Lion (I recently > installed it and am just learning to use it). > > I have found how to undock the variable browser and command history but > there seems to be no way of redocking them. I have tried (on both systems) > dragging them back in the main window, and the reverse, dragging the main > window (small) inside them, killing them, restarting Scilab, looking through > the preferences - am I missing something? > > I was happy with the little "undock" arrow, why is there not a "redock" > arrow in its place? > > Thanks > Roger > > > > -- > View this message in context: http://mailinglists.scilab.org/Re-docking-windows-tp4025128.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 roger at rwmoss.co.uk Thu Nov 1 12:47:28 2012 From: roger at rwmoss.co.uk (rm1897) Date: Thu, 1 Nov 2012 04:47:28 -0700 (PDT) Subject: [Scilab-users] Re-docking windows In-Reply-To: <50925AE3.1070008@free.fr> References: <1351762776218-4025128.post@n3.nabble.com> <50925AE3.1070008@free.fr> Message-ID: <1351770448247-4025130.post@n3.nabble.com> Samuel, thank you. Once I have undocked a window, that bar only contains a question mark: When I click on that bar, the window will not move- the window will only move if I click and hold on the main title bar at the top, not the bar with the ? mark. Am I doing something wrong? Roger -- View this message in context: http://mailinglists.scilab.org/Re-docking-windows-tp4025128p4025130.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Thu Nov 1 13:26:39 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 01 Nov 2012 13:26:39 +0100 Subject: [Scilab-users] Re-docking windows In-Reply-To: <1351770448247-4025130.post@n3.nabble.com> References: <1351762776218-4025128.post@n3.nabble.com> <50925AE3.1070008@free.fr> <1351770448247-4025130.post@n3.nabble.com> Message-ID: <50926A7F.3050903@free.fr> Le 01/11/2012 12:47, rm1897 a ?crit : > Samuel, thank you. > > Once I have undocked a window, that bar only contains a question mark: > Yes, it is the right one. Try and see. From roger at rwmoss.co.uk Thu Nov 1 14:42:38 2012 From: roger at rwmoss.co.uk (rm1897) Date: Thu, 1 Nov 2012 06:42:38 -0700 (PDT) Subject: [Scilab-users] Re-docking windows In-Reply-To: <50926A7F.3050903@free.fr> References: <1351762776218-4025128.post@n3.nabble.com> <50925AE3.1070008@free.fr> <1351770448247-4025130.post@n3.nabble.com> <50926A7F.3050903@free.fr> Message-ID: <1351777358307-4025132.post@n3.nabble.com> Ah, I see! I thought that once a window was undocked, one could dock it again. Instead, one moves each of the still-docked windows, one by one, INTO the undocked window. My only problem now is that I have a window: that does not have the usual console menus. If I click in the "command history" window, the title bar says "command history" If I click in the "file browser" window, the title bar says "file browser" - but if I click in the "variable browser" or the "console" window, the title just keeps saying "file browser". Do I need to now undock the console window and then move all the others over to it? Thanks Roger -- View this message in context: http://mailinglists.scilab.org/Re-docking-windows-tp4025128p4025132.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From u.fechner at tudelft.nl Thu Nov 1 21:15:55 2012 From: u.fechner at tudelft.nl (Uwe Fechner) Date: Thu, 01 Nov 2012 21:15:55 +0100 Subject: [Scilab-users] Bug II of the demos using Scilab 5.4.0 on Ubuntu 12.04 32 bit - SOLVED - In-Reply-To: <1351362394987-4025084.post@n3.nabble.com> References: <507AC343.3040208@tudelft.nl> <507AC5D8.6000707@tudelft.nl> <1351362394987-4025084.post@n3.nabble.com> Message-ID: <5092D87B.4010101@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 Best regards: Uwe Fechner Am 27.10.2012 20:26, schrieb Uwe Fechner: > I created a bug report: > http://bugzilla.scilab.org/show_bug.cgi?id=12039 > > Regards: > > Uwe Fechner > > > > -- > View this message in context: http://mailinglists.scilab.org/Scilab-users-Bug-II-of-the-demos-using-Scilab-5-4-0-on-Ubuntu-12-04-32-bit-tp4025016p4025084.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 roger at rwmoss.co.uk Thu Nov 1 21:45:53 2012 From: roger at rwmoss.co.uk (rm1897) Date: Thu, 1 Nov 2012 13:45:53 -0700 (PDT) Subject: [Scilab-users] Re-docking windows In-Reply-To: <50926A7F.3050903@free.fr> References: <1351762776218-4025128.post@n3.nabble.com> <50925AE3.1070008@free.fr> <1351770448247-4025130.post@n3.nabble.com> <50926A7F.3050903@free.fr> Message-ID: <1351802753204-4025135.post@n3.nabble.com> After a bit more playing about to get a proper console window (including its menus), I tried to undock the console window. It didn't undock, instead I got a load of error messages in it. When I restarted Scilab, ALL the windows were undocked: but now, as if by magic, I AM able to drag all the ? bars and put the file browser, variable browser and command history back in the window with the console AND the console has its menus again. Hurray! I have to say, though, there seem to be several bugs here that (nearly) made me despair of Scilab. Roger -- View this message in context: http://mailinglists.scilab.org/Re-docking-windows-tp4025128p4025135.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From bkherbert99 at yahoo.ca Thu Nov 1 23:54:19 2012 From: bkherbert99 at yahoo.ca (bkherbert) Date: Thu, 1 Nov 2012 15:54:19 -0700 (PDT) Subject: [Scilab-users] problems with tools for accurate computation In-Reply-To: <1347371618567-4024810.post@n3.nabble.com> References: <1347371618567-4024810.post@n3.nabble.com> Message-ID: <1351810459372-4025136.post@n3.nabble.com> link('D:\scilab\xnum\xnum.dll','xdispacher2','c'); exec('D:\scilab\xnum\xnum.sci'); The two lines of code above can be used in Scilab 5.4 to load the xnum dll and then the xnum functions in the file xnum.sci. Note that the code does not do the check to see if the dll is already loaded (which is found in the file xnum_loader). I save this file and then load and execute the file whenever I want to use xnum. Hope this helps. Note that the file path must be the correct path location for the xnum folder on your computer (on my computer this just happens to be 'D:\scilab\xnum' ) -- View this message in context: http://mailinglists.scilab.org/problems-with-tools-for-accurate-computation-tp4024810p4025136.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From simon.gareste at scilab-enterprises.com Fri Nov 2 08:54:03 2012 From: simon.gareste at scilab-enterprises.com (Simon GARESTE) Date: Fri, 02 Nov 2012 08:54:03 +0100 Subject: [Scilab-users] How to manage Scilab external modules easily In-Reply-To: References: <4B56E575.7020503@scilab.org> <8A464598AD25E74587F3692211174FD6047B020ED9@mucse404.eu.infineon.com> <4B6C4784.3080705@scilab.org> <50913DC1.5080208@scilab-enterprises.com> Message-ID: <50937C1B.7080906@scilab-enterprises.com> Hi, Can you try deleting and re-adding your repository? How did you set it, using atomsRepositoryAdd? Or manually changing the file? Simon On 10/31/2012 05:34 PM, Victor Rodrigues wrote: > Simon GARESTE writes: > >> Hi, >> >> Pierre isn't anymore in the Scilab team, unfortunately. >> Can you give the result of *atomsGetConfig()* ? >> of *atomsRepositoryList()* >> How did you set up your local repository exactly? >> > > Hi Simon, > > thanks for your help. The results were > > > > -->atomsGetConfig() > ans = > > downloadTool: "curl" > > -->atomsRepositoryList() > ans = > > !file:///\\lab-mb\ATOMS official ! > > > > The repository server is at \\lab-mb\ATOMS and there are several clients > connected to this PC through a local network (without internet connection). > The repository structure is as follows: > > \\lab-mb\ATOMS > |-- TOOLBOXES > |-- 32 > | |-- windows.gz > | > |-- toolbox_X > | |-- version > | |-- files > | |-- ... > | > |-- ... > > The values of sourceUrl and binaryUrl written in each description files were > prepared to work with this structure. > > > > Best regards, > Victor. > > > > > > > > > >> Simon >> On 10/31/2012 02:28 PM, Victor Rodrigues wrote: >>> Hi Pierre, >>> >>> >>> Pierre MARECHAL writes: >>> >>>> Hi Martin, >>>> >>>> Le 27/01/2010 16:08, Martin.Blasczyk at ... a ?crit : >>>>> Hello, >>>>> >>>>> Great new feature, thanks! >>>>> >>>>> For Scilab-Clients connected to a local network without internet access, >>> is it possible to setup a local >>>> ATOMS-server for supplying them with additional modules? >>>> Yes. If internet (http://atoms.scilab.org) is unreachable, two things >>>> are possible: >>>> >>>> - Add a local repository : >>>> --> >>>> atomsRepositoryAdd('file:///home/bob/tmp/scene1.test.atoms.scilab.org') >>>> --> atomsRepositoryAdd('file:///E:\scene1.test.atoms.scilab.org'); >>>> >>>> - Install a local package >>>> --> atomsInstall('/home/bob/mymodule.bin.tar.gz'); >>>> --> atomsInstall('E:\mymodule.bin.tar.gz'); >>>> >>>> This only works with the current nightly builds : >>>> >>>> - >>>> http://www.scilab.org/download/index_download.php?page=nightly_builds_5.2 >>>> - http://www.scilab.org/download/index_download.php?page=nightly_builds >>>>> Is there a description available for setting up such a server? >>>> The beginning of documentation is available here : >>>> http://wiki.scilab.org/ATOMS/localrepository >>>> >>>> This documentation is a rough draft at the moment. It will be filled-out >>>> shortly >>> I have been using the solution you suggested on Scilab 5.2 to supply > several >>> clients connected to a local network without internet access with > additional >>> modules. But after updating to Scilab 5.4, this same solution do not work. >>> >>> I get the error 4: Undefined variable: winId. >>> >>> Do I have to do any modifications to my local repository or to do another >>> procedure to add this repository to the client? Is there any documentation >>> available ralated to this? >>> >>> >>>>> Best Regards, >>>>> Martin Blasczyk >>>>> >>>> Regards, >>>> >>>> Pierre >>>> >>> Thanks a lot, >>> Best regards, >>> Victor. >>> >>> >>> _______________________________________________ >>> users mailing list >>> users 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 -- Simon Gareste Support & Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.70 http://www.scilab-enterprises.com From kdl at ansto.gov.au Thu Nov 1 01:46:26 2012 From: kdl at ansto.gov.au (Klaus-Dieter Liss) Date: Thu, 1 Nov 2012 11:46:26 +1100 (EST) Subject: [Scilab-users] installation problems with scilab-5 [SEC=UNCLASSIFIED] Message-ID: Hello, working with scilab since 9 years, almost daily, and passing it on to my students... I am still working with scilab 4.2.2, since it's running! we are evaluating most of my research data on this, and it's not bad! however, scilab-5 has some features i may like, and scilab-4.2.2 does not compile anymore on newer distros. as I am orking under multiple systems, it should run under the following 3 linux distributions: Distributor ID: SUSE LINUX Release: 10.3 Codename: n/a 2. Distributor ID: SUSE LINUX Release: 12.1 Codename: Asparagus 3. Distributor ID: Debian Release: 6.0.4 Codename: squeeze there are some binaries I downloaded, however, the problem, starting scilab in -nw mode >> scilab -nw scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory although there is such a file in the distro: ./thirdparty/java/lib/i386/libjava.so compiling from scratch is eually a horror.... or better switch to python??? cheers, Klaus From v.deoliveirarodri at lantiq.com Fri Nov 2 11:15:16 2012 From: v.deoliveirarodri at lantiq.com (Victor Rodrigues) Date: Fri, 2 Nov 2012 10:15:16 +0000 (UTC) Subject: [Scilab-users] How to manage Scilab external modules easily References: <4B56E575.7020503@scilab.org> <8A464598AD25E74587F3692211174FD6047B020ED9@mucse404.eu.infineon.com> <4B6C4784.3080705@scilab.org> <50913DC1.5080208@scilab-enterprises.com> <50937C1B.7080906@scilab-enterprises.com> Message-ID: Simon GARESTE writes: > > Hi, > > Can you try deleting and re-adding your repository? How did you set it, > using atomsRepositoryAdd? Or manually changing the file? > > Simon Hi Simon, deleting and re-adding the repository did not work. At first, I have manually changed the file because it used work fine with 5.2, but by now I have tried both ways and also deleted and re-added many times the repository. Thanks, Victor. From sgougeon at free.fr Fri Nov 2 13:11:13 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 02 Nov 2012 13:11:13 +0100 Subject: [Scilab-users] Fuzzy Logic toolbox In-Reply-To: References: Message-ID: <5093B861.7070500@free.fr> Le 31/10/2012 19:02, Mauro Larrat a ?crit : > Dear friends, > > where could I find documentations about how to use this toolbox? * install and load the toolbox with the ATOMS user interface Its categories are listed on its ATOMS web page: http://atoms.scilab.org/toolboxes/sciFLT * restart scilab * close the help browser if it is already opened * type --> help This toolbox is fully documented -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eabbgfig.png Type: image/png Size: 20030 bytes Desc: not available URL: From simon.gareste at scilab-enterprises.com Fri Nov 2 13:47:37 2012 From: simon.gareste at scilab-enterprises.com (Simon GARESTE) Date: Fri, 02 Nov 2012 13:47:37 +0100 Subject: [Scilab-users] How to manage Scilab external modules easily In-Reply-To: References: <4B56E575.7020503@scilab.org> <8A464598AD25E74587F3692211174FD6047B020ED9@mucse404.eu.infineon.com> <4B6C4784.3080705@scilab.org> <50913DC1.5080208@scilab-enterprises.com> <50937C1B.7080906@scilab-enterprises.com> Message-ID: <5093C0E9.4040500@scilab-enterprises.com> Hi, Could you report a bug on bugzilla.scilab.org, setting me as the assignee? Can you give me the exact error you are getting? Also, after the error, what does *atomsRepositoryList()* answers? Would it be possible for you to send me your .gz files ? (for win 32 and 64 at least), so that I can test/debug with the same configuration as yours ? (no need for the module itself, if you can't share it). Also, did you try using Scilab 5.3.3 ? (to see if the problem is indeed coming from the 5.4, or if it's prior and you didn't have it because you didn't updated the version since 5.2) Simon On 11/02/2012 11:15 AM, Victor Rodrigues wrote: > Simon GARESTE writes: > >> Hi, >> >> Can you try deleting and re-adding your repository? How did you set it, >> using atomsRepositoryAdd? Or manually changing the file? >> >> Simon > > Hi Simon, > > deleting and re-adding the repository did not work. At first, I have manually > changed the file because it used work fine with 5.2, but by now I have tried > both ways and also deleted and re-added many times the repository. > > > Thanks, > Victor. > > > > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Simon Gareste Support & Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.70 http://www.scilab-enterprises.com From v.deoliveirarodri at lantiq.com Fri Nov 2 16:14:39 2012 From: v.deoliveirarodri at lantiq.com (Victor Rodrigues) Date: Fri, 2 Nov 2012 15:14:39 +0000 (UTC) Subject: [Scilab-users] How to manage Scilab external modules easily References: <4B56E575.7020503@scilab.org> <8A464598AD25E74587F3692211174FD6047B020ED9@mucse404.eu.infineon.com> <4B6C4784.3080705@scilab.org> <50913DC1.5080208@scilab-enterprises.com> <50937C1B.7080906@scilab-enterprises.com> <5093C0E9.4040500@scilab-enterprises.com> Message-ID: > Hi, > > Could you report a bug on bugzilla.scilab.org, setting me as the assignee? > > Can you give me the exact error you are getting? Also, after the error, > what does *atomsRepositoryList()* answers? Would it be possible for you > to send me your .gz files ? (for win 32 and 64 at least), so that I can > test/debug with the same configuration as yours ? (no need for the > module itself, if you can't share it). > > Also, did you try using Scilab 5.3.3 ? (to see if the problem is indeed > coming from the 5.4, or if it's prior and you didn't have it because you > didn't updated the version since 5.2) > > Simon > Hi Simon, We found the error. It is in the atomsDownload function. The code opens a progress bar only when it is downloading from the internet, but it always tries to close this bar. As we were never connected to the internet we were getting the undefined variable error for the winId variable. In our case we could simply solve the problem by commenting out these command lines. But, otherwise with this modification, if we did, we would have a progress bar that never closes. Thanks a lot for your help, Best regards, Victor. From sgougeon at free.fr Fri Nov 2 19:46:27 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 02 Nov 2012 19:46:27 +0100 Subject: [Scilab-users] [Scilab-Dev] Release of Scilab 5.4.0 In-Reply-To: <509407CF.2080902@USherbrooke.ca> References: <50697294.5080800@scilab-enterprises.com> <509407CF.2080902@USherbrooke.ca> Message-ID: <50941503.1080506@free.fr> Le 02/11/2012 18:50, Jean-Pierre Dussault a ?crit : > 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. Yes, this is why i fighted 2 years ago to keep being able to simply copy/paste the whole SCI\contrib + SCI\.atoms (+ SCIHOME\.atoms + SCIHOME\atoms, if any (wether you were not the admin when installing modules) from the former to the new installation : http://bugzilla.scilab.org/show_bug.cgi?id=6784 It should work, despites the long way between 5.3.3 and 5.4.0 could prevent this working. Please try and report your experience here. For non ATOMS modules set yourself in the SCI\contrib directory, the Toolboxes menu (Modules , en fran?ais) should work as usual after the overall copy. Best regards Samuel From sylvestre.ledru at scilab-enterprises.com Sun Nov 4 14:06:45 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sun, 04 Nov 2012 14:06:45 +0100 Subject: [Scilab-users] installation problems with scilab-5 [SEC=UNCLASSIFIED] In-Reply-To: References: Message-ID: <50966865.5000004@scilab-enterprises.com> On 01/11/2012 01:46, Klaus-Dieter Liss wrote: > Hello, > [...] >>> scilab -nw > scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory > > although there is such a file in the distro: > ./thirdparty/java/lib/i386/libjava.so Looks like you downloaded the 32 bits version for a 64 bit operating system. Sylvesre From paul.carrico at free.fr Sun Nov 4 16:45:59 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Sun, 4 Nov 2012 16:45:59 +0100 Subject: [Scilab-users] parallelization in scilab Message-ID: <000301cdbaa3$7d25b070$77711150$@carrico@free.fr> Dear all, I'm currently reflecting in a routine development with Scilab where the use of parallelization is possible and highly useful/powerful. The context is the following: - I've a mesh with N elements composed of 8 nodes each - For each node (completely independent from the others), I've to perform a set of iterative calculus (through functions) I had a look to "parallel_run" function, but : - is it possible to use parallelization (I'm a complete newbie) ? - is it possible to call the same (own) functions & sub-functions at the same time ? - how to proceed ? by block ? - where can I find useful documentation/tutorial ? - how to manage the number of processors ? (the code depends on that number, isn't it ?) >From my first thought, the flowchart is similar to : - processor 1 -> node 1 - . - Processor x -> node x (the number of processor is adjusted depending on the device I use : up to 8 processors on my working stations (Windows & Linux) - only 2 on my PC (Windows & Linux)) Thanks for any advice Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From ziyad.bahkali at psatri.org.sa Mon Nov 5 09:14:13 2012 From: ziyad.bahkali at psatri.org.sa (Ziyad Bahkali) Date: Mon, 5 Nov 2012 08:14:13 +0000 Subject: [Scilab-users] Impossible to load parallel.dll library !!! Message-ID: Today I installed Scilab 5.4.0 into a new workstation. OS: Windows 7 Pro x64 When I tried to run old code from my old machine I got this message { !--error 999 Impossible to load parallel.dll library: The specified module could not be found. } even if I tried to run samples from Scilab itself !!! Is anybody know what exactly the problem Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Mon Nov 5 13:13:42 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 5 Nov 2012 13:13:42 +0100 Subject: [Scilab-users] root calculation Message-ID: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> Dear all, This a stupid question, but how can I solve directly in, Scilab an equation such as : 0.403*X^(-0.121) + 60.5*X^(-0.73) - 0.1839 = 0 ? Is-it necessary to code a function ? from memory : dichotomy method, secant method, Brent one etc. . Regards Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt at centre-cired.fr Mon Nov 5 13:51:00 2012 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Mon, 05 Nov 2012 13:51:00 +0100 Subject: [Scilab-users] root calculation In-Reply-To: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> Message-ID: <5097B634.4010003@centre-cired.fr> Hi I would code the function, then plot it, then use fsolve On 05/11/2012 13:13, Paul Carrico wrote: > > Dear all, > > This a stupid question, but how can I solve directly in, Scilab an > equation such as : > > 0.403*X^(-0.121) + 60.5*X^(-0.73) -- 0.1839 = 0 > > ? > > Is-it necessary to code a function ? from memory : dichotomy method, > secant method, Brent one etc. ... > > Regards > > Paul > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.baudin at contrib.scilab.org Mon Nov 5 13:58:43 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Mon, 05 Nov 2012 13:58:43 +0100 Subject: [Scilab-users] root calculation In-Reply-To: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> Message-ID: Hi, This is a nonlinear equation, for which we are searching a zero. The fsolve function is designed for this purpose: http://help.scilab.org/fsolve Notice that there might not be a solution. This is why the algorithm is an optimization problem, where the square norm of f(x) is minimized. This method also works for a system of nonlinear equations, so that this is (much) more general than dichotomy, secant, Brent, etc... which are one-variable solvers. No 1-variable method is available at the Scilab level, to my knowledge. But the Brent method is used internally in the computation of the inverse Cumulated Distribution Function (quantile) by the DCDFLIB library (e.g. X=cdfnor("X",Mean,Std,P,Q)). Notice that Matlab has the fzero function : http://www.mathworks.fr/fr/help/matlab/ref/fzero.html which uses Brent's method. But this method is not available directy in Scilab. This is a good design choice in my opinion, since fsolve is much more general. But I guess that fzero may be faster and more robust, in some cases. Best regards, Micha?l Le 2012-11-05 13:13, Paul Carrico a ?crit?: > Dear all, > > This a stupid question, but how can I solve directly in, Scilab an > equation such as : > > 0.403*X^(-0.121) + 60.5*X^(-0.73) - 0.1839 = 0 > > ? > > Is-it necessary to code a function ? from memory : dichotomy method, > secant method, Brent one etc. ? > > Regards > > Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From paul.carrico at free.fr Mon Nov 5 14:45:47 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 5 Nov 2012 14:45:47 +0100 Subject: [Scilab-users] root calculation In-Reply-To: References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> Message-ID: <000901cdbb5b$dcc9e790$965db6b0$@carrico@free.fr> All, Thanks for the feedback ... ... a basic plot shows the curve is monotonic (see attachment) ; I should plot a 3D curve in order to study the influence of the exponents for example to verify there's one and only one root ... ... I've to code a fast function to solve this kind of equation ... hundred thousand (and maybe million) of similar equation to solve :-~ That's one of the reasons why I asked about the possible parallelization Regards Paul -----Message d'origine----- De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de michael.baudin at contrib.scilab.org Envoy? : lundi 5 novembre 2012 13:59 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] root calculation Hi, This is a nonlinear equation, for which we are searching a zero. The fsolve function is designed for this purpose: http://help.scilab.org/fsolve Notice that there might not be a solution. This is why the algorithm is an optimization problem, where the square norm of f(x) is minimized. This method also works for a system of nonlinear equations, so that this is (much) more general than dichotomy, secant, Brent, etc... which are one-variable solvers. No 1-variable method is available at the Scilab level, to my knowledge. But the Brent method is used internally in the computation of the inverse Cumulated Distribution Function (quantile) by the DCDFLIB library (e.g. X=cdfnor("X",Mean,Std,P,Q)). Notice that Matlab has the fzero function : http://www.mathworks.fr/fr/help/matlab/ref/fzero.html which uses Brent's method. But this method is not available directy in Scilab. This is a good design choice in my opinion, since fsolve is much more general. But I guess that fzero may be faster and more robust, in some cases. Best regards, Micha?l Le 2012-11-05 13:13, Paul Carrico a ?crit : > Dear all, > > This a stupid question, but how can I solve directly in, Scilab an > equation such as : > > 0.403*X^(-0.121) + 60.5*X^(-0.73) - 0.1839 = 0 > > ? > > Is-it necessary to code a function ? from memory : dichotomy method, > secant method, Brent one etc. ? > > Regards > > Paul > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: swt.jpg Type: image/jpeg Size: 30126 bytes Desc: not available URL: From vogt at centre-cired.fr Mon Nov 5 14:53:09 2012 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Mon, 05 Nov 2012 14:53:09 +0100 Subject: [Scilab-users] root calculation In-Reply-To: <000901cdbb5b$dcc9e790$965db6b0$@carrico@free.fr> References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> <000901cdbb5b$dcc9e790$965db6b0$@carrico@free.fr> Message-ID: <5097C4C5.4080007@centre-cired.fr> On 05/11/2012 14:45, Paul Carrico wrote: > All, > > Thanks for the feedback ... > ... a basic plot shows the curve is monotonic (see attachment) ; I should plot a 3D curve in order to study the influence of the exponents for example to verify there's one and only one root ... > > ... I've to code a fast function to solve this kind of equation ... hundred thousand (and maybe million) of similar equation to solve :-~ hi beware not to use one single fsolve to solve a set of independent equations; somethign like function [a b] = f(x,y) a=x^3 -1 b= y^(0.6456) +4y^.45 - .566 endfunction fsolve([0 0],f) this is a bad idea, because fsolve will systematically calculate db/dx and da/dy, this would take much longer and much more memory than just fsolving x^3 -1, and then y^(0.6456) +4y^.45 - .566 of course this is much worse when you have N outputs and N inputs to your function, in this case fsolve calculates N^2 derivatives at each step... > > That's one of the reasons why I asked about the possible parallelization > > Regards > > Paul > > > > -----Message d'origine----- > De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de michael.baudin at contrib.scilab.org > Envoy? : lundi 5 novembre 2012 13:59 > ? : International users mailing list for Scilab. > Objet : Re: [Scilab-users] root calculation > > Hi, > > This is a nonlinear equation, for which we are searching a zero. > > The fsolve function is designed for this purpose: > > http://help.scilab.org/fsolve > > Notice that there might not be a solution. This is why the algorithm is an optimization problem, where the square norm of f(x) is minimized. > This method also works for a system of nonlinear equations, so that this is (much) more general than dichotomy, secant, Brent, etc... which are one-variable solvers. > > No 1-variable method is available at the Scilab level, to my knowledge. > But the Brent method is used internally in the computation of the inverse Cumulated Distribution Function (quantile) by the DCDFLIB library (e.g. X=cdfnor("X",Mean,Std,P,Q)). Notice that Matlab has the fzero function : > > http://www.mathworks.fr/fr/help/matlab/ref/fzero.html > > which uses Brent's method. > But this method is not available directy in Scilab. This is a good design choice in my opinion, since fsolve is much more general. But I guess that fzero may be faster and more robust, in some cases. > > Best regards, > > Micha?l > > Le 2012-11-05 13:13, Paul Carrico a ?crit : >> Dear all, >> >> This a stupid question, but how can I solve directly in, Scilab an >> equation such as : >> >> 0.403*X^(-0.121) + 60.5*X^(-0.73) - 0.1839 = 0 >> >> ? >> >> Is-it necessary to code a function ? from memory : dichotomy method, >> secant method, Brent one etc. ... >> >> Regards >> >> Paul >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Nov 5 15:02:05 2012 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Mon, 05 Nov 2012 15:02:05 +0100 Subject: [Scilab-users] root calculation In-Reply-To: <5097C4C5.4080007@centre-cired.fr> References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> <000901cdbb5b$dcc9e790$965db6b0$@carrico@free.fr> <5097C4C5.4080007@centre-cired.fr> Message-ID: <5097C6DD.3020405@utc.fr> Le 05/11/12 14:53, Adrien Vogt-Schilb a ?crit : > On 05/11/2012 14:45, Paul Carrico wrote: >> All, >> >> Thanks for the feedback ... >> ... a basic plot shows the curve is monotonic (see attachment) ; I should plot a 3D curve in order to study the influence of the exponents for example to verify there's one and only one root ... >> >> ... I've to code a fast function to solve this kind of equation ... hundred thousand (and maybe million) of similar equation to solve :-~ > > hi > > beware not to use one single fsolve to solve a set of independent > equations; > > somethign like > > function [a b] = f(x,y) > a=x^3 -1 > b= y^(0.6456) +4y^.45 - .566 > endfunction > > fsolve([0 0],f) > > > this is a bad idea, because fsolve will systematically calculate db/dx > and da/dy, this would take much longer and much more memory than just > fsolving x^3 -1, and then y^(0.6456) +4y^.45 - .566 > of course this is much worse when you have N outputs and N inputs to > your function, in this case fsolve calculates N^2 derivatives at each > step... fsolve is clearly missing a "jacobian pattern" option... S. > >> That's one of the reasons why I asked about the possible parallelization >> >> Regards >> >> Paul >> >> >> >> -----Message d'origine----- >> De :users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part demichael.baudin at contrib.scilab.org >> Envoy? : lundi 5 novembre 2012 13:59 >> ? : International users mailing list for Scilab. >> Objet : Re: [Scilab-users] root calculation >> >> Hi, >> >> This is a nonlinear equation, for which we are searching a zero. >> >> The fsolve function is designed for this purpose: >> >> http://help.scilab.org/fsolve >> >> Notice that there might not be a solution. This is why the algorithm is an optimization problem, where the square norm of f(x) is minimized. >> This method also works for a system of nonlinear equations, so that this is (much) more general than dichotomy, secant, Brent, etc... which are one-variable solvers. >> >> No 1-variable method is available at the Scilab level, to my knowledge. >> But the Brent method is used internally in the computation of the inverse Cumulated Distribution Function (quantile) by the DCDFLIB library (e.g. X=cdfnor("X",Mean,Std,P,Q)). Notice that Matlab has the fzero function : >> >> http://www.mathworks.fr/fr/help/matlab/ref/fzero.html >> >> which uses Brent's method. >> But this method is not available directy in Scilab. This is a good design choice in my opinion, since fsolve is much more general. But I guess that fzero may be faster and more robust, in some cases. >> >> Best regards, >> >> Micha?l >> >> Le 2012-11-05 13:13, Paul Carrico a ?crit : >>> Dear all, >>> >>> This a stupid question, but how can I solve directly in, Scilab an >>> equation such as : >>> >>> 0.403*X^(-0.121) + 60.5*X^(-0.73) - 0.1839 = 0 >>> >>> ? >>> >>> Is-it necessary to code a function ? from memory : dichotomy method, >>> secant method, Brent one etc. ... >>> >>> Regards >>> >>> Paul >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From calixte.denizet at scilab-enterprises.com Mon Nov 5 16:09:55 2012 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Mon, 05 Nov 2012 16:09:55 +0100 Subject: [Scilab-users] root calculation In-Reply-To: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> Message-ID: <5097D6C3.1010903@scilab-enterprises.com> Hi Paul, If the exponent are always negative and the coefficients are always positive, the function is strictly decreasing (so the derivative is non-null), you can use a Newton method. function y=newton(fun, dfun, x0, eps) y=fun(x0) while abs(y) > eps x0 = x0 - y / dfun(x0); y = fun(x0) end y = x0; endfunction deff('y=foo(x)','y=0.403*x.^(-0.121)+60.5*x.^(-0.73)-0.1839') deff('y=dfoo(x)','y=0.403*-0.121*x.^(-1.121)+60.5*-0.73*x.^(-1.73)') To find a "good" starting point: If x is a solution then 0.403*x^(-0.121)<=0.1839 and 60.5*x^(-0.73)<=0.1839, so x >=max((0.1839/0.403)^(-1/0.121), (0.1839/60.5)^(-1/0.73)) newton(foo,dfoo,2806,1e-10) A faster way: function y=newton2(coeffs, expo, cste, x0, eps) y = coeffs * (x0 .^ expo)' - cste; dcoeffs = coeffs .* expo; dexpo = expo - 1; while abs(y) > eps x0 = x0 - y / (dcoeffs * (x0 .^ dexpo)'); y = coeffs * (x0 .^ expo)' - cste; end y = x0; endfunction newton2([0.403 60.5], [-0.121 -0.73],0.1839,2806,1e-10) Calixte On 05/11/2012 13:13, Paul Carrico wrote: > > Dear all, > > This a stupid question, but how can I solve directly in, Scilab an > equation such as : > > 0.403*X^(-0.121) + 60.5*X^(-0.73) -- 0.1839 = 0 > > ? > > Is-it necessary to code a function ? from memory : dichotomy method, > secant method, Brent one etc. ... > > Regards > > Paul > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Mon Nov 5 16:35:09 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 5 Nov 2012 16:35:09 +0100 Subject: [Scilab-users] root calculation In-Reply-To: <5097D6C3.1010903@scilab-enterprises.com> References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> <5097D6C3.1010903@scilab-enterprises.com> Message-ID: <000901cdbb6b$24365e10$6ca31a30$@carrico@free.fr> Hi Calixte, Your suggestion looks encouraging I?ll have a deeper look on that specific issue when all the aspects of my new project will be bracketed ! Many thanks And Yes: - The exponents are always negative - The coefficients are always positive To go ahead, in one aspect of the project, only the last constant change (it won(t be the case in a second stage), I mean : 0.403*X^(-0.121) + 60.5*X^(-0.73) ? always the same == constant ! ? 0.1839 ? it changes may be either positive or negative in a first understanding Imagine I?ve a matrix (n x1) where reach line is independent from the others, and where it?s necessary to solve such equation I?ve been thinking using a loop: For i=1:n Solve my non-linear equation End (n from hundred thousand?s to million?s) It may be interesting to slip that loop onto several processor (solving by ?blocks?), isn?t it ? Paul De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Calixte Denizet Envoy? : lundi 5 novembre 2012 16:10 ? : users at lists.scilab.org Objet : Re: [Scilab-users] root calculation Hi Paul, If the exponent are always negative and the coefficients are always positive, the function is strictly decreasing (so the derivative is non-null), you can use a Newton method. function y=newton(fun, dfun, x0, eps) y=fun(x0) while abs(y) > eps x0 = x0 - y / dfun(x0); y = fun(x0) end y = x0; endfunction deff('y=foo(x)','y=0.403*x.^(-0.121)+60.5*x.^(-0.73)-0.1839') deff('y=dfoo(x)','y=0.403*-0.121*x.^(-1.121)+60.5*-0.73*x.^(-1.73)') To find a "good" starting point: If x is a solution then 0.403*x^(-0.121)<=0.1839 and 60.5*x^(-0.73)<=0.1839, so x >=max((0.1839/0.403)^(-1/0.121), (0.1839/60.5)^(-1/0.73)) newton(foo,dfoo,2806,1e-10) A faster way: function y=newton2(coeffs, expo, cste, x0, eps) y = coeffs * (x0 .^ expo)' - cste; dcoeffs = coeffs .* expo; dexpo = expo - 1; while abs(y) > eps x0 = x0 - y / (dcoeffs * (x0 .^ dexpo)'); y = coeffs * (x0 .^ expo)' - cste; end y = x0; endfunction newton2([0.403 60.5], [-0.121 -0.73],0.1839,2806,1e-10) Calixte On 05/11/2012 13:13, Paul Carrico wrote: Dear all, This a stupid question, but how can I solve directly in, Scilab an equation such as : 0.403*X^(-0.121) + 60.5*X^(-0.73) ? 0.1839 = 0 ? Is-it necessary to code a function ? from memory : dichotomy method, secant method, Brent one etc. Regards Paul _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From calixte.denizet at scilab-enterprises.com Mon Nov 5 16:55:10 2012 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Mon, 05 Nov 2012 16:55:10 +0100 Subject: [Scilab-users] root calculation In-Reply-To: <000901cdbb6b$24365e10$6ca31a30$@carrico@free.fr> References: <000301cdbb4e$ffb38250$ff1a86f0$@carrico@free.fr> <5097D6C3.1010903@scilab-enterprises.com> <000901cdbb6b$24365e10$6ca31a30$@carrico@free.fr> Message-ID: <5097E15E.40204@scilab-enterprises.com> If only the last constant changes, you can adapt the newton algo to your particular case: function y=newton3(coeffs, expo, cste, x0, eps) y = zeros(cste); x = x0; dcoeffs = coeffs .* expo; dexpo = expo - 1; for i = 1:size(cste, "*") z = coeffs * (x .^ expo)' - cste(i); while abs(z) > eps x = x - z / (dcoeffs * (x .^ dexpo)'); z = coeffs * (x .^ expo)' - cste(i); end y(i) = x; end endfunction in supposing that cste is a decreasing row of values (last found root is used as starting value in Newton's algo). cste=10:-0.0001:0.1839; rs=newton3([0.403 60.5], [-0.121 -0.73],cste,1,1e-10); (around 2 secs on my computer) to check: deff('y=foo(x)','y=0.403*x.^(-0.121)+60.5*x.^(-0.73)') max(abs(foo(rs)-cste)) C On 05/11/2012 16:35, Paul Carrico wrote: > > Hi Calixte, > > Your suggestion looks encouraging ... I'll have a deeper look on that > specific issue when all the aspects of my new project will be > bracketed ! Many thanks ... > > And Yes: > > -The exponents are always negative > > -The coefficients are always positive > > To go ahead, in one aspect of the project, only the last constant > change (it won(t be the case in a second stage), I mean : > > 0.403*X^(-0.121) + 60.5*X^(-0.73) ?always the same == constant ! > > *-- 0.1839*?it changes ... may be either positive or negative in a > first understanding > > Imagine I've a matrix (n x1) where reach line is independent from the > others, and where it's necessary to solve such equation ... I've been > thinking using a loop: > > For i=1:n > > Solve my non-linear equation > > End > > (n from hundred thousand's to million's) > > It may be interesting to slip that loop onto several processor > (solving by "blocks"), isn't it ? > > Paul > > *De :*users-bounces at lists.scilab.org > [mailto:users-bounces at lists.scilab.org] *De la part de* Calixte Denizet > *Envoy? :* lundi 5 novembre 2012 16:10 > *? :* users at lists.scilab.org > *Objet :* Re: [Scilab-users] root calculation > > Hi Paul, > > If the exponent are always negative and the coefficients are always > positive, the function is strictly decreasing (so the derivative is > non-null), you can use a Newton method. > > function y=newton(fun, dfun, x0, eps) > y=fun(x0) > while abs(y) > eps > x0 = x0 - y / dfun(x0); > y = fun(x0) > end > y = x0; > endfunction > > deff('y=foo(x)','y=0.403*x.^(-0.121)+60.5*x.^(-0.73)-0.1839') > deff('y=dfoo(x)','y=0.403*-0.121*x.^(-1.121)+60.5*-0.73*x.^(-1.73)') > > To find a "good" starting point: > If x is a solution then 0.403*x^(-0.121)<=0.1839 and > 60.5*x^(-0.73)<=0.1839, so x >=max((0.1839/0.403)^(-1/0.121), > (0.1839/60.5)^(-1/0.73)) > > newton(foo,dfoo,2806,1e-10) > > A faster way: > function y=newton2(coeffs, expo, cste, x0, eps) > y = coeffs * (x0 .^ expo)' - cste; > dcoeffs = coeffs .* expo; > dexpo = expo - 1; > while abs(y) > eps > x0 = x0 - y / (dcoeffs * (x0 .^ dexpo)'); > y = coeffs * (x0 .^ expo)' - cste; > end > y = x0; > endfunction > > newton2([0.403 60.5], [-0.121 -0.73],0.1839,2806,1e-10) > > Calixte > > On 05/11/2012 13:13, Paul Carrico wrote: > > Dear all, > > This a stupid question, but how can I solve directly in, Scilab an > equation such as : > > 0.403*X^(-0.121) + 60.5*X^(-0.73) -- 0.1839 = 0 > > ? > > Is-it necessary to code a function ? from memory : dichotomy method, > secant method, Brent one etc. ... > > Regards > > Paul > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > > > > -- > Calixte Denizet > Software Development Engineer > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > http://www.scilab-enterprises.com > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- 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 remi.mercier at imelavi.fr Tue Nov 6 16:48:06 2012 From: remi.mercier at imelavi.fr (Tingsten) Date: Tue, 6 Nov 2012 07:48:06 -0800 (PST) Subject: [Scilab-users] For loop - maximum size Message-ID: <1352216886061-4025172.post@n3.nabble.com> Hello everybody, I assume this kind of talk about the effectiveness of the For loop in Scilab has been discussed many times but I was not able to find a recent topic about it.... I am usually post-processing big csv files and by reading them I noticed some important time change depending of the architecture of the loop. So i did some very quick and simple tests with the following results : 1)timer();A=[];for i=1:100000,A=[A;i];,end;timer() ans = 16.598506 2)timer();B=[];for j=1:10,A=[];for i=1:10000,A=[A;i];,end;B=[B;A];,end;timer() ans = 1.0452067 3)timer();B=[];for j=1:100,A=[];for i=1:1000,A=[A;i];,end;B=[B;A];,end;timer() ans = 0.4992032 4)timer();B=[];for j=1:1000,A=[];for i=1:100,A=[A;i];,end;B=[B;A];,end;timer() ans = 0.9204059 5)timer();C=[];for h=1:10,B=[];for j=1:100,A=[];for i=1:100,A=[A;i];,end;B=[B;A];,end,C=[C;B];,end;timer() ans = 0.4524029 It is probably explainable but interesting to know that 3) is 30 time better than 1). So I would think that it is totally forbidden to be efficient to do loop >10000. Any comment or advice about that? Thx you a lot, R?mi Mercier -- View this message in context: http://mailinglists.scilab.org/For-loop-maximum-size-tp4025172.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From calixte.denizet at scilab-enterprises.com Tue Nov 6 17:49:58 2012 From: calixte.denizet at scilab-enterprises.com (Calixte Denizet) Date: Tue, 06 Nov 2012 17:49:58 +0100 Subject: [Scilab-users] For loop - maximum size In-Reply-To: <1352216886061-4025172.post@n3.nabble.com> References: <1352216886061-4025172.post@n3.nabble.com> Message-ID: <50993FB6.8010602@scilab-enterprises.com> Hi Remi, but the better way to do this is timer();A=zeros(1,100000);for i=1:100000,A(i)=i;end;timer() it is probably linked with how Scilab handles its memory Calixte On 06/11/2012 16:48, Tingsten wrote: > Hello everybody, > > I assume this kind of talk about the effectiveness of the For loop in Scilab > has been discussed many times but I was not able to find a recent topic > about it.... > > I am usually post-processing big csv files and by reading them I noticed > some important time change depending of the architecture of the loop. > > So i did some very quick and simple tests with the following results : > > 1)timer();A=[];for i=1:100000,A=[A;i];,end;timer() > ans = > 16.598506 > > 2)timer();B=[];for j=1:10,A=[];for > i=1:10000,A=[A;i];,end;B=[B;A];,end;timer() > ans = > 1.0452067 > > 3)timer();B=[];for j=1:100,A=[];for > i=1:1000,A=[A;i];,end;B=[B;A];,end;timer() > ans = > 0.4992032 > > 4)timer();B=[];for j=1:1000,A=[];for > i=1:100,A=[A;i];,end;B=[B;A];,end;timer() > ans = > 0.9204059 > > 5)timer();C=[];for h=1:10,B=[];for j=1:100,A=[];for > i=1:100,A=[A;i];,end;B=[B;A];,end,C=[C;B];,end;timer() > ans = > 0.4524029 > > It is probably explainable but interesting to know that 3) is 30 time better > than 1). > So I would think that it is totally forbidden to be efficient to do loop >> 10000. > Any comment or advice about that? > > Thx you a lot, > R?mi Mercier > > > > -- > View this message in context: http://mailinglists.scilab.org/For-loop-maximum-size-tp4025172.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Calixte Denizet Software Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France http://www.scilab-enterprises.com From remi.mercier at imelavi.fr Tue Nov 6 18:43:54 2012 From: remi.mercier at imelavi.fr (Tingsten) Date: Tue, 6 Nov 2012 09:43:54 -0800 (PST) Subject: [Scilab-users] For loop - maximum size In-Reply-To: <50993FB6.8010602@scilab-enterprises.com> References: <1352216886061-4025172.post@n3.nabble.com> <50993FB6.8010602@scilab-enterprises.com> Message-ID: <1352223834963-4025174.post@n3.nabble.com> First, I have just realized that my first post was wrong (cause the final matrix is not the same). This is better : 1)timer();A=[];for i=1:100000,A=[A;i];,end;timer() ans = 16.489306 2)timer();B=[];for j=1:10,A=[];for i=1:10000,A=[A;i];,end;B=[B;A+(j-1)*10000];,end;timer() ans = 1.0452067 3)timer();B=[];for j=1:100,A=[];for i=1:1000,A=[A;i];,end;B=[B;A+(j-1)*1000];,end;timer() ans = 0.4368028 So same conclusion! In this case, splitting the for loop does not work well.... -->timer();A=zeros(1,100000);for i=1:100000,A(i)=i;end;timer() ans = 0.4368028 -->timer();B=[];for j=1:100,A=zeros(1,1000);for i=1:1000,A(i)=i;end;,B=[B A+(j-1)*1000];,end;timer() ans = 0.4212027 However this loop is an example to illustrate. In my case here are the kind of loop I use 1)A=mopen('myfile.txt'); X=[];Y=[];Z=[]; winH=waitbar('Coffee break'); for i=1:1000000, B=mgetl(-1,A); [n,x,y,z]=msscanf(1,B,'%*s %*d:%*d:%*f,%d,%d,%d'); X=[X;x];Y=[Y;y];Z=[Z;z]; waitbar(j/1000000,winH); ,end; =>30minutes (I guess cause it's so long that I stopped the loop) 2)A=mopen('myfile.txt'); X=[];Y=[];Z=[]; winH=waitbar('Coffee break'); for j=1:100, X2=[];Y2=[];Z2=[]; for i=1:10000, B=mgetl(-1,A); [n,x,y,z]=msscanf(1,B,'%*s %*d:%*d:%*f,%d,%d,%d'); X2=[X2;x];Y2=[Y2;y]; ,end; Z2=[Z2;z];X=[X;X2];Y=[Y;Y2];Z=[Z;Z2]; waitbar(j/100,winH); ,end; =>1 minutes -- View this message in context: http://mailinglists.scilab.org/For-loop-maximum-size-tp4025172p4025174.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From walsandro.medeiros at light.com.br Wed Nov 7 16:48:45 2012 From: walsandro.medeiros at light.com.br (walsandro.medeiros at light.com.br) Date: Wed, 7 Nov 2012 13:48:45 -0200 Subject: [Scilab-users] Xcos Solver Message-ID: Hi, I'm an electrical engineering student from Brazil and I'm developing an HVDC link in Xcos. Can you send me the code of the Xcos differential equations solver? Since Scilab is a open source software I think there's no big deal in share it. Thanks, ______________________________________________________________________________________ Walsandro M Bendelak -------------- next part -------------- An HTML attachment was scrubbed... URL: From sudhindra.nayak at gmail.com Thu Nov 8 06:41:48 2012 From: sudhindra.nayak at gmail.com (Sudhindra Nayak) Date: Thu, 8 Nov 2012 11:11:48 +0530 Subject: [Scilab-users] Support for RTDX in Scilab Message-ID: Hello, I?ve a few RTDX programs that run on Matlab. I?m thinking of migrating from Matlab to Scilab. I just wanted to know whether Scilab supports RTDX. -- Regards, Sudhindra Nayak -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Thu Nov 8 08:59:37 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 08 Nov 2012 08:59:37 +0100 Subject: [Scilab-users] Xcos Solver In-Reply-To: References: Message-ID: <509B6669.9020402@inria.fr> Xcos uses the open source library SUNDIALS for the ODE and DAE. You can get it at https://computation.llnl.gov/casc/sundials/main.html Serge Steer Le 07/11/2012 16:48, walsandro.medeiros at light.com.br a ?crit : > > Hi, I'm an electrical engineering student from Brazil and I'm > developing an HVDC link in Xcos. > > Can you send me the code of the Xcos differential equations solver? > > Since Scilab is a open source software I think there's no big deal in > share it. > > Thanks, > > *______________________________________________________________________________________* > > */Walsandro M Bendelak /* > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliseo at um.es Thu Nov 8 17:59:10 2012 From: eliseo at um.es (Eliseo Chacon Vera) Date: Thu, 8 Nov 2012 08:59:10 -0800 (PST) Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? Message-ID: <1352393950359-4025179.post@n3.nabble.com> Hello, could anyone give me one?? I can't do it with the drawnow/drawlater option. Thanks, Eliseo -- View this message in context: http://mailinglists.scilab.org/Use-of-show-pixmap-obsolete-Alternative-tp4025179.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From saketkc at gmail.com Thu Nov 8 18:11:51 2012 From: saketkc at gmail.com (Saket Choudhary) Date: Thu, 8 Nov 2012 22:41:51 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser Message-ID: Hello Everyone, I came up with a Django Interface that allows one to run Scilab Codes directly through a browser. http://scilab-test.garudaindia.in/cloud/ Please login with the following credentials : Username: guest Password : fcf41657f02f88137a1bcf068a32c0a3 (Yes its a md5!) One you login you would have the option to choose from a varierty of examples by Selecting a book, followed by a chapter and an example. You can either run an example from the database or choose to write your own code. The examples are part of the TextBook Companion Project ( http://scilab-test.garudaindia.in/scilab_in/Textbook_Companion_Project) which contains examples from 100+ books coded in scilab. The USP of 'Scilab On Cloud' is that you can generate graphs too. Incase your scilab code generates a graph, you will see it as a fancybox window . Alternatively you can also download it as a pdf by cliking on the 'Download PDF' link just besides the 'Evaluate' button Please feel free to email me(saketkc at gmail.com) incase you come across any bugs. I had taken up this as a project under the guidance of Prof. Kannan Moudgalya(http://www.che.iitb.ac.in/online/node/52),Chemical Engineering Department,IIT Bombay. I would like to thank him and C-DAC Bangalore,India for providing us with the GARUDA cloud. Regards, Saket Choudhary Fourth Year Undergraduate Chemical Engineering Department IIT Bombay India -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Thu Nov 8 19:25:57 2012 From: sdr at durietz.se (Stefan Du Rietz) Date: Thu, 08 Nov 2012 19:25:57 +0100 Subject: [Scilab-users] uicontrol "edit" Message-ID: <509BF935.40107@durietz.se> Hi, is this intended or a bug in uicontrol: when I press a button, an edit field is not updated with the last written text. I have to either press return in the edit field or move focus elsewhere. Scilab 5.4.0, Xubuntu 32-bit. Regards Stefan From sgougeon at free.fr Thu Nov 8 21:01:48 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 08 Nov 2012 21:01:48 +0100 Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? In-Reply-To: <1352393950359-4025179.post@n3.nabble.com> References: <1352393950359-4025179.post@n3.nabble.com> Message-ID: <509C0FAC.8050005@free.fr> Le 08/11/2012 17:59, Eliseo Chacon Vera a ?crit : > could anyone give me one?? I can't do it with the drawnow/drawlater option. Why not? It's difficult to help you more without knowing the code of your temptative... From sgougeon at free.fr Thu Nov 8 21:36:11 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 08 Nov 2012 21:36:11 +0100 Subject: [Scilab-users] uicontrol "edit" In-Reply-To: <509BF935.40107@durietz.se> References: <509BF935.40107@durietz.se> Message-ID: <509C17BB.2030907@free.fr> Hello, Le 08/11/2012 19:25, Stefan Du Rietz a ?crit : > is this intended or a bug in uicontrol: when I press a button, an edit > field is not updated with the last written text. I have to either > press return in the edit field or move focus elsewhere. Likely yes, it is intended. This behavior has been reported here: http://bugzilla.scilab.org/show_bug.cgi?id=6349#c1 Regards Samuel From eliseo at um.es Thu Nov 8 23:14:27 2012 From: eliseo at um.es (Eliseo Chacon Vera) Date: Thu, 8 Nov 2012 14:14:27 -0800 (PST) Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? In-Reply-To: <509C0FAC.8050005@free.fr> References: <1352393950359-4025179.post@n3.nabble.com> <509C0FAC.8050005@free.fr> Message-ID: <03A71E27-EACF-4291-8B6B-0865120F8F93@um.es> Dear Samuel, thanks for your quick answer. The following lines solve the heat equation and provides a smooth evolution of the solution in the plot. SCILAB 5.3.3 likes but SCILAB 5.4.0 does not like it. thanks, eliseo (hope this time gets to the list right) /// // heat equation // clear; // // Initial value // function z=u0(xx) if (abs(xx)<=1) then z=1; else z=0; end endfunction // // b heat coef. // b=1; f0=scf(0); f0.pixmap='on'; clf(f0); show_window(); // // space interval // xmin=-5; xmax=5; Nx=125; // Number of points h=(xmax-xmin)/Nx; x=xmin:h:xmax; // u=zeros(1,Nx+1); uold=zeros(1,Nx+1); u2=zeros(1,Nx+1); // dimensionamos inicialmente a cero uold2=zeros(1,Nx+1); ucero=zeros(1,Nx+1); // // time // t0=0; time=t0; for i=1:Nx+1 uold(i)=u0(x(i)); // initial value uold2(i)=u0(x(i)); ucero(i)=u0(x(i)); end plot(x,uold,'dr') ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title(" Initial data "); show_pixmap(); sleep(1000); k=0.9*h^2/(2*b);// stability // // coeficiente mu=k/h^2 // mu=k/h^2; // coef1=b*mu; coef2=1-2*b*mu; coef3=b*mu; // while (time<0.5) time=time+k; u(1)=0; u(Nx+1)=0; for i=2:Nx u(i)=coef1*uold(i+1)+coef2*uold(i)+coef3*uold(i-1); end clf(f0); plot(x,u,'or',x,ucero,'db'); ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title("Euler explicit: time= "+string(time).. +"; time step = "+string(k)+.. +"; spatial h="+string(h)+"; diffusion = "+string(b)); legend('b=1','initial'); show_pixmap(); uold=u; sleep(1); end -- View this message in context: http://mailinglists.scilab.org/Use-of-show-pixmap-obsolete-Alternative-tp4025179p4025186.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Nov 9 00:13:16 2012 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mttelet?=) Date: Fri, 09 Nov 2012 00:13:16 +0100 Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? In-Reply-To: <03A71E27-EACF-4291-8B6B-0865120F8F93@um.es> References: <1352393950359-4025179.post@n3.nabble.com> <509C0FAC.8050005@free.fr> <03A71E27-EACF-4291-8B6B-0865120F8F93@um.es> Message-ID: <509C3C8C.3000906@utc.fr> Hello, This problem has already been reported in bug 12028 http://bugzilla.scilab.org/show_bug.cgi?id=12028 The Scilab Team made a really good job in the 5.4.0, but the answer in the comments of this bug is not adequate (changing the data field of entities). Most Scilab users (the one who use it *daily* for their work or their research) are used to make simple animations by simply using the drawlater/drawnow pair. Scilab graphics was already fast in 5.3.3, and now even faster in 5.4 (the offscreen rendering is really cool). But if the performance increase has this kind of counterpart, I will keep on using 5.3.3 : my students really appreciate doing animations this way and I don't have enough time to teach them the insights of graphical entities. S. Le 08/11/12 23:14, Eliseo Chacon Vera a ?crit : > Dear Samuel, > thanks for your quick answer. The following lines solve the heat > equation and provides > a smooth evolution of the solution in the plot. SCILAB 5.3.3 likes > but SCILAB 5.4.0 does not like it. > thanks, > eliseo (hope this time gets to the list right) > /// > // heat equation > // > clear; > // > // Initial value > // > function z=u0(xx) > if (abs(xx)<=1) then > z=1; > else > z=0; > end > endfunction > // > // b heat coef. > // > b=1; > > f0=scf(0); > f0.pixmap='on'; > clf(f0); > show_window(); > // > // space interval > // > xmin=-5; > xmax=5; > Nx=125;// Number of points > h=(xmax-xmin)/Nx; > x=xmin:h:xmax; > // > u=zeros(1,Nx+1); > uold=zeros(1,Nx+1); > u2=zeros(1,Nx+1);// dimensionamos inicialmente a cero > uold2=zeros(1,Nx+1); > ucero=zeros(1,Nx+1); > // > // time > // > t0=0; > time=t0; > > for i=1:Nx+1 > uold(i)=u0(x(i));// initial value > uold2(i)=u0(x(i)); > ucero(i)=u0(x(i)); > end > plot(x,uold,'dr') > ejes=gca(); > ejes.data_bounds=[xmin, 0; xmax,1.2]; > title(" Initial data "); > show_pixmap(); > sleep(1000); > > k=0.9*h^2/(2*b);// stability > > // > // coeficiente mu=k/h^2 > // > > mu=k/h^2; > > // > coef1=b*mu; > coef2=1-2*b*mu; > coef3=b*mu; > > // > while (time<0.5) > time=time+k; > u(1)=0; > u(Nx+1)=0; > for i=2:Nx > u(i)=coef1*uold(i+1)+coef2*uold(i)+coef3*uold(i-1); > end > clf(f0); > plot(x,u,'or',x,ucero,'db'); > ejes=gca(); > ejes.data_bounds=[xmin, 0; xmax,1.2]; > title("Euler explicit: time="+string(time).. > +"; time step ="+string(k)+.. > +"; spatial h="+string(h)+"; diffusion ="+string(b)); > legend('b=1','initial'); > show_pixmap(); > uold=u; > sleep(1); > end > > ------------------------------------------------------------------------ > View this message in context: Re: Use of show_pixmap() obsolete. > Alternative?? > > Sent from the Scilab users - Mailing Lists Archives mailing list > archive > > at Nabble.com. > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Nov 9 01:25:00 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 09 Nov 2012 01:25:00 +0100 Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? In-Reply-To: <03A71E27-EACF-4291-8B6B-0865120F8F93@um.es> References: <1352393950359-4025179.post@n3.nabble.com> <509C0FAC.8050005@free.fr> <03A71E27-EACF-4291-8B6B-0865120F8F93@um.es> Message-ID: <509C4D5C.9000405@free.fr> Here it is, working for me with Scilab 5.4.0 / window 7 64 bits: ------------------- // Initial value function z=u0(xx) if (abs(xx)<=1) then z=1; else z=0; end endfunction // b heat coef. b=1; f0=scf(0); //f0.pixmap='on; // CANCELLED clf(f0); //show_window(); // CANCELLED // // space interval // xmin=-5; xmax=5; Nx=125; // Number of points h=(xmax-xmin)/Nx; x=xmin:h:xmax; // u=zeros(1,Nx+1); uold=zeros(1,Nx+1); u2=zeros(1,Nx+1); // dimensionamos inicialmente a cero uold2=zeros(1,Nx+1); ucero=zeros(1,Nx+1); // // time // t0=0; time=t0; for i=1:Nx+1 uold(i)=u0(x(i)); // initial value uold2(i)=u0(x(i)); ucero(i)=u0(x(i)); end plot(x,uold,'dr') ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title(" Initial data"); //show_pixmap(); // CANCELLED sleep(1000); k=0.9*h^2/(2*b);// stability // coeficiente mu=k/h^2 mu=k/h^2; // coef1=b*mu; coef2=1-2*b*mu; coef3=b*mu; // while (time<0.5) drawlater() // <<<<<< time=time+k; u(1)=0; u(Nx+1)=0; for i=2:Nx u(i)=coef1*uold(i+1)+coef2*uold(i)+coef3*uold(i-1); end clf(f0); plot(x,u,'or',x,ucero,'db'); ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title("Euler explicit: time="+string(time).. +"; time step ="+string(k)+.. +"; spatial h="+string(h)+"; diffusion ="+string(b)); legend('b=1','initial'); //show_pixmap(); // CANCELLED uold=u; drawnow() // <<<<<< sleep(30); // <<<<<< end -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Thu Nov 8 23:33:31 2012 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 08 Nov 2012 23:33:31 +0100 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: Message-ID: <387-509c3300-21-1a07fc00@70800561> Le Jeudi 8 Novembre 2012 18.11 CET, Saket Choudhary a ?crit: > Hello Everyone, Hi Saket, I wanted to give it a try but the url you gave us is 404 for me. Cheers, Antoine > > I came up with a Django Interface that allows one to run Scilab Codes > directly through a browser. > > http://scilab-test.garudaindia.in/cloud/ > > Please login with the following credentials : > Username: guest > Password : fcf41657f02f88137a1bcf068a32c0a3 (Yes its a md5!) > > One you login you would have the option to choose from a varierty of > examples by Selecting a book, followed by a chapter and an example. You can > either run an example from the database or choose to write your own code. > The examples are part of the TextBook Companion Project ( > http://scilab-test.garudaindia.in/scilab_in/Textbook_Companion_Project) > which contains examples from 100+ books coded in scilab. > > The USP of 'Scilab On Cloud' is that you can generate graphs too. Incase > your scilab code generates a graph, you will see it as a fancybox window . > Alternatively you can also download it as a pdf by cliking on the 'Download > PDF' link just besides the 'Evaluate' button > > Please feel free to email me(saketkc at gmail.com) incase you come across any > bugs. > I had taken up this as a project under the guidance of Prof. Kannan > Moudgalya(http://www.che.iitb.ac.in/online/node/52),Chemical Engineering > Department,IIT Bombay. > > I would like to thank him and C-DAC Bangalore,India for providing us with > the GARUDA cloud. > > Regards, > Saket Choudhary > Fourth Year Undergraduate > Chemical Engineering Department > IIT Bombay > India From eliseo at um.es Thu Nov 8 23:01:09 2012 From: eliseo at um.es (Eliseo Chacon Vera) Date: Thu, 8 Nov 2012 14:01:09 -0800 (PST) Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? In-Reply-To: <509C0FAC.8050005@free.fr> References: <1352393950359-4025179.post@n3.nabble.com> <509C0FAC.8050005@free.fr> Message-ID: Dear Samuel, thanks for your quick answer. The following lines solve the heat equation and provides a smooth evolution for the plot. SCILAB 5.4.0 does not like it. thanks, eliseo /// // heat equation // clear; // // Initial value // function z=u0(xx) if (abs(xx)<=1) then z=1; else z=0; end endfunction // // b heat coef. // b=1; f0=scf(0); f0.pixmap='on'; clf(f0); show_window(); // // space interval // xmin=-5; xmax=5; Nx=125; // Number of points h=(xmax-xmin)/Nx; x=xmin:h:xmax; // u=zeros(1,Nx+1); uold=zeros(1,Nx+1); u2=zeros(1,Nx+1); // dimensionamos inicialmente a cero uold2=zeros(1,Nx+1); ucero=zeros(1,Nx+1); // // time // t0=0; time=t0; for i=1:Nx+1 uold(i)=u0(x(i)); // initial value uold2(i)=u0(x(i)); ucero(i)=u0(x(i)); end plot(x,uold,'dr') ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title(" Initial data "); show_pixmap(); sleep(1000); k=0.9*h^2/(2*b);// stability // // coeficiente mu=k/h^2 // mu=k/h^2; // coef1=b*mu; coef2=1-2*b*mu; coef3=b*mu; // while (time<0.5) time=time+k; u(1)=0; u(Nx+1)=0; for i=2:Nx u(i)=coef1*uold(i+1)+coef2*uold(i)+coef3*uold(i-1); end clf(f0); plot(x,u,'or',x,ucero,'db'); ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title("Euler explicit: time= "+string(time).. +"; time step = "+string(k)+.. +"; spatial h="+string(h)+"; diffusion = "+string(b)); legend('b=1','initial'); show_pixmap(); uold=u; sleep(1); end Saludos, Eliseo Chacon Vera Departamento de Matem?ticas Facultad de Matematicas. Universidad de Murcia Postal Address: Campus de Espinardo, 30100-Espinardo-Murcia Phone: (34) 868 884175 fax: (34) 868 884182 email: eliseo at um.es Freefem Wiki: http://www.um.es/freefem/ff++/pmwiki.php Web site: http://webs.um.es/eliseo/ El 08/11/2012, a las 20:01, Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives] escribi?: > Le 08/11/2012 17:59, Eliseo Chacon Vera a ?crit : > > could anyone give me one?? I can't do it with the drawnow/drawlater option. > Why not? It's difficult to help you more without knowing the code of > your temptative... > _______________________________________________ > 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/Use-of-show-pixmap-obsolete-Alternative-tp4025179p4025182.html > To start a new topic under Scilab users - Mailing Lists Archives, email ml-node+s994242n2602246h85 at n3.nabble.com > To unsubscribe from Use of show_pixmap() obsolete. Alternative??, click here. > NAML -- View this message in context: http://mailinglists.scilab.org/Use-of-show-pixmap-obsolete-Alternative-tp4025179p4025184.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliseo at um.es Thu Nov 8 23:06:14 2012 From: eliseo at um.es (Eliseo Chacon Vera) Date: Thu, 8 Nov 2012 14:06:14 -0800 (PST) Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? In-Reply-To: <509C0FAC.8050005@free.fr> References: <1352393950359-4025179.post@n3.nabble.com> <509C0FAC.8050005@free.fr> Message-ID: <1507D200-AA06-4005-828F-E54605B12220@um.es> Dear Samuel, thanks for your quick answer. The following lines solve the heat equation and provides a smooth evolution of the solution in the plot. SCILAB 5.4.0 does not like it. thanks, eliseo /// // heat equation // clear; // // Initial value // function z=u0(xx) if (abs(xx)<=1) then z=1; else z=0; end endfunction // // b heat coef. // b=1; f0=scf(0); f0.pixmap='on'; clf(f0); show_window(); // // space interval // xmin=-5; xmax=5; Nx=125; // Number of points h=(xmax-xmin)/Nx; x=xmin:h:xmax; // u=zeros(1,Nx+1); uold=zeros(1,Nx+1); u2=zeros(1,Nx+1); // dimensionamos inicialmente a cero uold2=zeros(1,Nx+1); ucero=zeros(1,Nx+1); // // time // t0=0; time=t0; for i=1:Nx+1 uold(i)=u0(x(i)); // initial value uold2(i)=u0(x(i)); ucero(i)=u0(x(i)); end plot(x,uold,'dr') ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title(" Initial data "); show_pixmap(); sleep(1000); k=0.9*h^2/(2*b);// stability // // coeficiente mu=k/h^2 // mu=k/h^2; // coef1=b*mu; coef2=1-2*b*mu; coef3=b*mu; // while (time<0.5) time=time+k; u(1)=0; u(Nx+1)=0; for i=2:Nx u(i)=coef1*uold(i+1)+coef2*uold(i)+coef3*uold(i-1); end clf(f0); plot(x,u,'or',x,ucero,'db'); ejes=gca(); ejes.data_bounds=[xmin, 0; xmax,1.2]; title("Euler explicit: time= "+string(time).. +"; time step = "+string(k)+.. +"; spatial h="+string(h)+"; diffusion = "+string(b)); legend('b=1','initial'); show_pixmap(); uold=u; sleep(1); end -- View this message in context: http://mailinglists.scilab.org/Use-of-show-pixmap-obsolete-Alternative-tp4025179p4025185.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From saketkc at gmail.com Fri Nov 9 09:51:43 2012 From: saketkc at gmail.com (Saket Choudhary) Date: Fri, 9 Nov 2012 14:21:43 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: <387-509c3300-21-1a07fc00@70800561> References: <387-509c3300-21-1a07fc00@70800561> Message-ID: Hi Antoine, It looks like someone hacked our website. We are investigating it and should be up soon Thanks Saket -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Fri Nov 9 10:03:43 2012 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 09 Nov 2012 10:03:43 +0100 Subject: [Scilab-users] uicontrol "edit" In-Reply-To: <509C17BB.2030907@free.fr> References: <509BF935.40107@durietz.se> <509C17BB.2030907@free.fr> Message-ID: <509CC6EF.1010101@durietz.se> On 2012-11-08 21:36, Samuel Gougeon wrote: -------------------- > Le 08/11/2012 19:25, Stefan Du Rietz a ?crit : >> is this intended or a bug in uicontrol: when I press a button, an >> edit field is not updated with the last written text. I have to >> either press return in the edit field or move focus elsewhere. > Likely yes, it is intended. This behavior has been reported here: > http://bugzilla.scilab.org/show_bug.cgi?id=6349#c1 Imagine a simple but useful GUI with an edit field for user input and an OK-button. When the user has written some characters (which [s]he can see!), [s]he presses the OK-button and its callback function reads an empty string! If this is intentional, you have to tell me how to handle it! What am I supposed to do? Regards Stefan From eliseo at um.es Fri Nov 9 13:32:42 2012 From: eliseo at um.es (Eliseo Chacon Vera) Date: Fri, 9 Nov 2012 04:32:42 -0800 (PST) Subject: [Scilab-users] Use of show_pixmap() obsolete. Alternative?? In-Reply-To: <509C4D5C.9000405@free.fr> References: <1352393950359-4025179.post@n3.nabble.com> <509C0FAC.8050005@free.fr> <03A71E27-EACF-4291-8B6B-0865120F8F93@um.es> <509C4D5C.9000405@free.fr> Message-ID: Thanks, but your modiffication does NOT work for me with Mac OSX 10.6.8, 64 bits Eliseo El 09/11/2012, a las 00:25, Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives] escribi?: > Here it is, working for me with Scilab 5.4.0 / window 7 64 bits: > ------------------- > // Initial value > function z=u0(xx) > if (abs(xx)<=1) then > z=1; > else > z=0; > end > endfunction > > // b heat coef. > b=1; > > f0=scf(0); > //f0.pixmap='on; // CANCELLED > clf(f0); > //show_window(); // CANCELLED > > // > // space interval > // > xmin=-5; > xmax=5; > Nx=125; // Number of points > h=(xmax-xmin)/Nx; > x=xmin:h:xmax; > // > u=zeros(1,Nx+1); > uold=zeros(1,Nx+1); > u2=zeros(1,Nx+1); // dimensionamos inicialmente a cero > uold2=zeros(1,Nx+1); > ucero=zeros(1,Nx+1); > // > // time > // > t0=0; > time=t0; > > for i=1:Nx+1 > uold(i)=u0(x(i)); // initial value > uold2(i)=u0(x(i)); > ucero(i)=u0(x(i)); > end > plot(x,uold,'dr') > ejes=gca(); > > ejes.data_bounds=[xmin, 0; xmax,1.2]; > > title(" Initial data "); > //show_pixmap(); // CANCELLED > > sleep(1000); > > k=0.9*h^2/(2*b);// stability > > // coeficiente mu=k/h^2 > > mu=k/h^2; > > // > coef1=b*mu; > coef2=1-2*b*mu; > coef3=b*mu; > > // > while (time<0.5) > drawlater() // <<<<<< > time=time+k; > u(1)=0; > u(Nx+1)=0; > for i=2:Nx > u(i)=coef1*uold(i+1)+coef2*uold(i)+coef3* > > uold(i-1); > end > clf(f0); > plot(x,u,'or',x,ucero,'db'); > ejes=gca(); > ejes.data_bounds=[xmin, 0; xmax,1.2]; > title("Euler explicit: time= "+string(time).. > +"; time step = "+string(k)+.. > +"; spatial h="+string(h)+"; diffusion = "+string(b)); > legend('b=1','initial'); > //show_pixmap(); // CANCELLED > uold=u; > drawnow() // <<<<<< > sleep(30); // <<<<<< > end > > > _______________________________________________ > 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/Use-of-show-pixmap-obsolete-Alternative-tp4025179p4025188.html > To start a new topic under Scilab users - Mailing Lists Archives, email ml-node+s994242n2602246h85 at n3.nabble.com > To unsubscribe from Use of show_pixmap() obsolete. Alternative??, click here. > NAML -- View this message in context: http://mailinglists.scilab.org/Use-of-show-pixmap-obsolete-Alternative-tp4025179p4025192.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrianomeis03 at gmail.com Fri Nov 9 19:35:14 2012 From: adrianomeis03 at gmail.com (adriano meis) Date: Fri, 9 Nov 2012 10:35:14 -0800 (PST) Subject: [Scilab-users] problems with tools for accurate computation In-Reply-To: <1351810459372-4025136.post@n3.nabble.com> References: <1347371618567-4024810.post@n3.nabble.com> <1351810459372-4025136.post@n3.nabble.com> Message-ID: <1352486114515-4025193.post@n3.nabble.com> bkherbert wrote > link('D:\scilab\xnum\xnum.dll','xdispacher2','c'); > exec('D:\scilab\xnum\xnum.sci'); > > The two lines of code above can be used in Scilab 5.4 to load the xnum dll > and then the xnum functions in the file xnum.sci. Note that the code does > not do the check to see if the dll is already loaded (which is found in > the file xnum_loader). I save this file and then load and execute the > file whenever I want to use xnum. Hope this helps. Note that the file > path must be the correct path location for the xnum folder on your > computer (on my computer this just happens to be 'D:\scilab\xnum' ) I have followed your procedure. Now this library works with Scilab 5.3.3 on my computer. Now I can use xnum library too. Thank you very much, adriano -- View this message in context: http://mailinglists.scilab.org/problems-with-tools-for-accurate-computation-tp4024810p4025193.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From adrianomeis03 at gmail.com Fri Nov 9 19:37:20 2012 From: adrianomeis03 at gmail.com (adriano meis) Date: Fri, 9 Nov 2012 10:37:20 -0800 (PST) Subject: [Scilab-users] problems with tools for accurate computation In-Reply-To: <1351743013268-4025124.post@n3.nabble.com> References: <1347371618567-4024810.post@n3.nabble.com> <1351725845213-4025123.post@n3.nabble.com> <1351743013268-4025124.post@n3.nabble.com> Message-ID: <1352486240081-4025194.post@n3.nabble.com> bkherbert wrote > You may be using a faulty version of Mupat > this is a link to a working version of Mupat > http://www.mi.kagu.tus.ac.jp/qupat/mupat_win_ver02.zip > > both dd(var) and qd(var) work properly (I am using Scilab 5.4) > both xnum and qupat/mupat require the 32 bit version of scilab Two version of "mupat library" exist: the slow (general) one, and the fast (for Windows) one. Some days after I sent my first post to this forum, slow generic version of mupat was really working. However I think it has some bugs, that I have described in an mail snt to the autor of mupat library. If I execute loader.sce file of generic version of mupat then I obtain: /////////// exec('C:\Downloads\fft_scilab_eng\accuratezza\accuracy_incidence_of_trigono_costants_on_qft.sce', -1) -->exec('C:\Documents and Settings\utente\Documenti\Downloads\mupat_ver02\MuPAT\loader.sce', -1) Start MuPAT Load macros Load help /////////////// Differently I am not able to use the Windows fast versions of "mupat" library (mupat_win) yet, since I obtain the following result, after I execute the "loader.sce" file of windows fast versions of "mupat" (mupat_win): /////////// Start MuPAT_win Load macros toolbox_skeletonlib = lib(pathmacros); !--error 241 Il file "C:\DOCUME~1\utente\DOCUME~1\DOWNLO~1\MUPAT_~1\MUPAT_~1\macros\names" gi? esiste oppure ? negato l'accesso in lettura. // translated: the file names aleady exists, or // reading it is not possible. at line 20 of exec file called by : exec(get_absolute_file_path("loader.sce")+"etc\"+"MuPAT_win.start"); at line 10 of exec file called by : exec('C:\Documents and Settings\utente\Documenti\Downloads\mupat_win_ver02\MuPAT_win\loader.sce', -1) ////////////////////////////////////////////////////////// thanks, adriano meis -- View this message in context: http://mailinglists.scilab.org/problems-with-tools-for-accurate-computation-tp4024810p4025194.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Fri Nov 9 20:15:36 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 09 Nov 2012 20:15:36 +0100 Subject: [Scilab-users] uicontrol "edit" In-Reply-To: <509CC6EF.1010101@durietz.se> References: <509BF935.40107@durietz.se> <509C17BB.2030907@free.fr> <509CC6EF.1010101@durietz.se> Message-ID: <509D5658.2060208@free.fr> Le 09/11/2012 10:03, Stefan Du Rietz a ?crit : > On 2012-11-08 21:36, Samuel Gougeon wrote: > -------------------- >> Le 08/11/2012 19:25, Stefan Du Rietz a ?crit : >>> is this intended or a bug in uicontrol: when I press a button, an >>> edit field is not updated with the last written text. I have to >>> either press return in the edit field or move focus elsewhere. >> Likely yes, it is intended. This behavior has been reported here: >> http://bugzilla.scilab.org/show_bug.cgi?id=6349#c1 > > Imagine a simple but useful GUI with an edit field for user input and > an OK-button. When the user has written some characters (which [s]he > can see!), [s]he presses the OK-button and its callback function reads > an empty string! The example that you have posted here http://bugzilla.scilab.org/show_bug.cgi?id=6349#c6 works as you expect with Scilab 5.3.0 64 bits / windows 7: changing the edited value and pressing OK updates the text value without pressing return in the edit field nor bluring the focus except on "OK" and (mis)works as you report in this thread, with 5.4.0. So clearly there is a change of behavior from 5.3.0 to 5.4.0. Regards Samuel From paul.carrico at free.fr Sat Nov 10 11:28:50 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Sat, 10 Nov 2012 11:28:50 +0100 Subject: [Scilab-users] sort a table/matrix Message-ID: <000001cdbf2e$2ddad790$899086b0$@carrico@free.fr> Dear all, As it can be done under excel for example, I would like to sort the first column in increasing order, the each line the same time (see above example). Does the gsort function allow such rearranging ? or do I've to code it ? Thanks Paul ############################################################################ ####### D = [ 1 0 3 11 10 13; 4 9 6 -1 -1 0; 17 8 39 9 -451 3; 10 110 -12 1 -9 45 ; -13 514 15 78 -99 3] // each line is sorted from the 1rst column (in increasing order) D_expeted = [ -13 514 15 78 -99 3; 1 0 3 11 10 13; 4 9 6 -1 -1 0; 10 110 -12 1 -9 45; 17 8 39 9 -451 3; ] // some trials based on an old post . how to use k ? [g,k] = gsort(D,'c','i') g2 = gsort(D(:,1),'c','i') -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Sat Nov 10 15:06:31 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Sat, 10 Nov 2012 15:06:31 +0100 Subject: [Scilab-users] sort a table/matrix Message-ID: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> Dear all, As it can be done under excel for example, I would like to sort the first column in increasing order, the each line the same time (see above example). Does the gsort function allow such rearranging (I've made some trials, but .) ? or do I've to code it ? Thanks Paul ############################################################################ ####### D = [ 1 0 3 11 10 13; 4 9 6 -1 -1 0; 17 8 39 9 -451 3; 10 110 -12 1 -9 45 ; -13 514 15 78 -99 3] // each line is sorted from the 1rst column (in increasing order) D_expeted = [ -13 514 15 78 -99 3; 1 0 3 11 10 13; 4 9 6 -1 -1 0; 10 110 -12 1 -9 45; 17 8 39 9 -451 3; ] -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Sat Nov 10 15:21:04 2012 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 10 Nov 2012 15:21:04 +0100 Subject: [Scilab-users] sort a table/matrix In-Reply-To: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> References: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> Message-ID: <509E62D0.6010706@durietz.se> Try lex_sort(). Stefan On 2012-11-10 15:06, Paul Carrico wrote: -------------------- > Dear all, > > As it can be done under excel for example, I would like to sort the > first column in increasing order, the each line the same time (see > above example). > > Does the gsort function allow such rearranging (I?ve made some trials, > but ?) ? or do I?ve to code it ? > > Thanks > > Paul > > ################################################################################### > > D= [ > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 178 39 9 -451 3; > > 10110 -12 1 -9 45 ; > > -13514 15 78 -99 3] > > /// each line is sorted from the 1rst column (in increasing order)/ > > D_expeted= [ > > -13514 15 78 -99 3; > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 10110 -12 1 -9 45; > > 178 39 9 -451 3; > > ] > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sat Nov 10 15:40:25 2012 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 10 Nov 2012 15:40:25 +0100 Subject: [Scilab-users] sort a table/matrix In-Reply-To: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> References: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> Message-ID: <509E6759.9000202@durietz.se> Sorry, like this: D_expected=lex_sort(D,1); Stefan On 2012-11-10 15:06, Paul Carrico wrote: -------------------- > Dear all, > > As it can be done under excel for example, I would like to sort the > first column in increasing order, the each line the same time (see > above example). > > Does the gsort function allow such rearranging (I?ve made some trials, > but ?) ? or do I?ve to code it ? > > Thanks > > Paul > > ################################################################################### > > D= [ > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 178 39 9 -451 3; > > 10110 -12 1 -9 45 ; > > -13514 15 78 -99 3] > > /// each line is sorted from the 1rst column (in increasing order)/ > > D_expeted= [ > > -13514 15 78 -99 3; > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 10110 -12 1 -9 45; > > 178 39 9 -451 3; > > ] > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Sat Nov 10 16:39:40 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 10 Nov 2012 16:39:40 +0100 Subject: [Scilab-users] sort a table/matrix In-Reply-To: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> References: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> Message-ID: <509E753C.1070209@free.fr> Le 10/11/2012 15:06, Paul Carrico a ?crit : > > D= [ > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 178 39 9 -451 3; > > 10110 -12 1 -9 45 ; > > -13514 15 78 -99 3] > > /// each line is sorted from the 1rst column (in increasing order)/ > > D_expeted= [ > > -13514 15 78 -99 3; > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 10110 -12 1 -9 45; > > 178 39 9 -451 3; > > ] > gsort(D,"lr","i") will do it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Sat Nov 10 17:25:10 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Sat, 10 Nov 2012 17:25:10 +0100 Subject: [Scilab-users] sort a table/matrix In-Reply-To: <509E6759.9000202@durietz.se> References: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> <509E6759.9000202@durietz.se> Message-ID: <000601cdbf5f$f55a3320$e00e9960$@carrico@free.fr> That's fine ... thanks Stefan Paul -----Message d'origine----- De?: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Stefan Du Rietz Envoy??: samedi 10 novembre 2012 15:40 ??: International users mailing list for Scilab. Objet?: Re: [Scilab-users] sort a table/matrix Sorry, like this: D_expected=lex_sort(D,1); Stefan On 2012-11-10 15:06, Paul Carrico wrote: -------------------- > Dear all, > > As it can be done under excel for example, I would like to sort the > first column in increasing order, the each line the same time (see > above example). > > Does the gsort function allow such rearranging (I?ve made some trials, > but ) ? or do I?ve to code it ? > > Thanks > > Paul > > ###################################################################### > ############# > > D= [ > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 178 39 9 -451 3; > > 10110 -12 1 -9 45 ; > > -13514 15 78 -99 3] > > /// each line is sorted from the 1rst column (in increasing order)/ > > D_expeted= [ > > -13514 15 78 -99 3; > > 10 3 11 10 13; > > 49 6 -1 -1 0; > > 10110 -12 1 -9 45; > > 178 39 9 -451 3; > > ] > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sdr at durietz.se Sat Nov 10 17:32:53 2012 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 10 Nov 2012 17:32:53 +0100 Subject: [Scilab-users] sort a table/matrix In-Reply-To: <509E753C.1070209@free.fr> References: <000001cdbf4c$96544fe0$c2fcefa0$@carrico@free.fr> <509E753C.1070209@free.fr> Message-ID: <509E81B5.2060208@durietz.se> On 2012-11-10 16:39, Samuel Gougeon wrote: -------------------- > Le 10/11/2012 15:06, Paul Carrico a ?crit : >> >> D= [ >> >> 10 3 11 10 13; >> >> 49 6 -1 -1 0; >> >> 178 39 9 -451 3; >> >> 10110 -12 1 -9 45 ; >> >> -13514 15 78 -99 3] >> >> /// each line is sorted from the 1rst column (in increasing order)/ >> >> D_expeted= [ >> >> -13514 15 78 -99 3; >> >> 10 3 11 10 13; >> >> 49 6 -1 -1 0; >> >> 10110 -12 1 -9 45; >> >> 178 39 9 -451 3; >> >> ] >> > gsort(D,"lr","i") > > will do it. > But if you want to sort only according to the first column (or certain columns) and keep the original order independently of the other columns (which I often need), you have to do it in two steps: -->A=[3 4 1; 3 3 2; 2 2 3; 1 1 4] A = 3. 4. 1. 3. 3. 2. 2. 2. 3. 1. 1. 4. 1. Sort only the first column and get the sort order (with "lr" as the second argument, you can use a vector of several columns for the second index of A): -->[B,k]=gsort(A(:,1),"lr","i") k = 4. 3. 1. 2. 2. Rearrange the rows with k: -->A=A(k,:) ans = 1. 1. 4. 2. 2. 3. 3. 4. 1. 3. 3. 2. Note the original order of the last two rows, contrary to -->gsort(A,"lr","i") ans = 1. 1. 4. 2. 2. 3. 3. 3. 2. 3. 4. 1. Stefan From saketkc at gmail.com Sat Nov 10 19:55:25 2012 From: saketkc at gmail.com (Saket Choudhary) Date: Sun, 11 Nov 2012 00:25:25 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: References: <387-509c3300-21-1a07fc00@70800561> Message-ID: Hello Everyone! We are back again at : http://scilab-test.garudaindia.in/cloud/ Username: guest Password : guest123 Lets hope the hacker doesnt try ti pull it down again ! The books and examples are still missing as we are still under the process of migrating our whole site ! The hacker(read cracker) deleted everything we had ! I am sure his/her act of 'cracking' can be utilised in much ethical ways , rather than just deleting the content of a site like ours meant for community education. Regards, Saket Choudhary Fourth Year Undergraduate IIT Bombay On 9 November 2012 14:21, Saket Choudhary wrote: > Hi Antoine, > > It looks like someone hacked our website. We are investigating it and > should be up soon > > Thanks > > Saket > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Sat Nov 10 20:36:07 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sat, 10 Nov 2012 20:36:07 +0100 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: References: <387-509c3300-21-1a07fc00@70800561> Message-ID: <509EACA7.6060103@scilab-enterprises.com> Hello If you want to make it safe and public, you should: * disable the Scilab features related to files management (rmdir, deletefile, mdelete, etc). Note that this is likely to have side effects on other functions * disable the dynamic link functions (it is easy to write a C file which will be compiled by Scilab and delete file) * disable the link function (through this function, you can load the libc and call the delete C functions) * probably some other functions that I forget * launch Scilab within a chroot Scilab has not been made to be publicly used by anyone. We have in the roadmap a "safe mode" planned but this won't happen soon. Sylvestre On 10/11/2012 19:55, Saket Choudhary wrote: > Hello Everyone! > > We are back again at : http://scilab-test.garudaindia.in/cloud/ > > Username: guest > Password : guest123 > > Lets hope the hacker doesnt try ti pull it down again ! > > The books and examples are still missing as we are still under the > process of migrating our whole site ! The hacker(read cracker) deleted > everything we had ! I am sure his/her act of 'cracking' can be utilised > in much ethical ways , rather than just deleting the content of a site > like ours meant for community education. > > > Regards, > Saket Choudhary > Fourth Year Undergraduate > IIT Bombay > > On 9 November 2012 14:21, Saket Choudhary > wrote: > > Hi Antoine, > > It looks like someone hacked our website. We are investigating it > and should be up soon > > Thanks > > Saket > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From apsengupta at gmail.com Sat Nov 10 20:40:22 2012 From: apsengupta at gmail.com (Aditya Sengupta) Date: Sun, 11 Nov 2012 01:10:22 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: <509EACA7.6060103@scilab-enterprises.com> References: <387-509c3300-21-1a07fc00@70800561> <509EACA7.6060103@scilab-enterprises.com> Message-ID: I haven't tested this yet, but if you haven't already, you might also want to disable functions like unix_g and related functions. On Sun, Nov 11, 2012 at 1:06 AM, Sylvestre Ledru < sylvestre.ledru at scilab-enterprises.com> wrote: > Hello > > If you want to make it safe and public, you should: > * disable the Scilab features related to files management (rmdir, > deletefile, mdelete, etc). Note that this is likely to have side effects > on other functions > * disable the dynamic link functions (it is easy to write a C file which > will be compiled by Scilab and delete file) > * disable the link function (through this function, you can load the > libc and call the delete C functions) > * probably some other functions that I forget > * launch Scilab within a chroot > > Scilab has not been made to be publicly used by anyone. We have in the > roadmap a "safe mode" planned but this won't happen soon. > > Sylvestre > > On 10/11/2012 19:55, Saket Choudhary wrote: > > Hello Everyone! > > > > We are back again at : http://scilab-test.garudaindia.in/cloud/ > > > > Username: guest > > Password : guest123 > > > > Lets hope the hacker doesnt try ti pull it down again ! > > > > The books and examples are still missing as we are still under the > > process of migrating our whole site ! The hacker(read cracker) deleted > > everything we had ! I am sure his/her act of 'cracking' can be utilised > > in much ethical ways , rather than just deleting the content of a site > > like ours meant for community education. > > > > > > Regards, > > Saket Choudhary > > Fourth Year Undergraduate > > IIT Bombay > > > > On 9 November 2012 14:21, Saket Choudhary > > wrote: > > > > Hi Antoine, > > > > It looks like someone hacked our website. We are investigating it > > and should be up soon > > > > Thanks > > > > Saket > > > > > > > > > > _______________________________________________ > > 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 oreske at gmail.com Sun Nov 11 08:47:57 2012 From: oreske at gmail.com (R.Sathish Kumar) Date: Sun, 11 Nov 2012 13:17:57 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: <387-509c3300-21-1a07fc00@70800561> References: <387-509c3300-21-1a07fc00@70800561> Message-ID: Hi Saket, When I try the example scilab code given at: https://www.equalis.com/default.asp?page=MathintheCloud I get no output or result.Just the Blue button showing "executing".Plz check and rectify. Regards, R.Sathish Kumar On Fri, Nov 9, 2012 at 4:03 AM, Antoine Monmayrant wrote: > > Le Jeudi 8 Novembre 2012 18.11 CET, Saket Choudhary a ?crit: > >> Hello Everyone, > > Hi Saket, > > I wanted to give it a try but the url you gave us is 404 for me. > > Cheers, > > Antoine > > >> >> I came up with a Django Interface that allows one to run Scilab Codes >> directly through a browser. >> >> http://scilab-test.garudaindia.in/cloud/ >> >> Please login with the following credentials : >> Username: guest >> Password : fcf41657f02f88137a1bcf068a32c0a3 (Yes its a md5!) >> >> One you login you would have the option to choose from a varierty of >> examples by Selecting a book, followed by a chapter and an example. You can >> either run an example from the database or choose to write your own code. >> The examples are part of the TextBook Companion Project ( >> http://scilab-test.garudaindia.in/scilab_in/Textbook_Companion_Project) >> which contains examples from 100+ books coded in scilab. >> >> The USP of 'Scilab On Cloud' is that you can generate graphs too. Incase >> your scilab code generates a graph, you will see it as a fancybox window . >> Alternatively you can also download it as a pdf by cliking on the 'Download >> PDF' link just besides the 'Evaluate' button >> >> Please feel free to email me(saketkc at gmail.com) incase you come across any >> bugs. >> I had taken up this as a project under the guidance of Prof. Kannan >> Moudgalya(http://www.che.iitb.ac.in/online/node/52),Chemical Engineering >> Department,IIT Bombay. >> >> I would like to thank him and C-DAC Bangalore,India for providing us with >> the GARUDA cloud. >> >> Regards, >> Saket Choudhary >> Fourth Year Undergraduate >> Chemical Engineering Department >> IIT Bombay >> India > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From saketkc at gmail.com Sun Nov 11 09:03:58 2012 From: saketkc at gmail.com (Saket Choudhary) Date: Sun, 11 Nov 2012 13:33:58 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: References: <387-509c3300-21-1a07fc00@70800561> Message-ID: Hi Satish, Could you please copy paste the example here ? Thanks ! Saket On 11 November 2012 13:17, R.Sathish Kumar wrote: > Hi Saket, > > When I try the example scilab code given at: > https://www.equalis.com/default.asp?page=MathintheCloud > > I get no output or result.Just the Blue button showing "executing".Plz > check and rectify. > > > Regards, > > R.Sathish Kumar > > > > On Fri, Nov 9, 2012 at 4:03 AM, Antoine Monmayrant > wrote: > > > > Le Jeudi 8 Novembre 2012 18.11 CET, Saket Choudhary > a ?crit: > > > >> Hello Everyone, > > > > Hi Saket, > > > > I wanted to give it a try but the url you gave us is 404 for me. > > > > Cheers, > > > > Antoine > > > > > >> > >> I came up with a Django Interface that allows one to run Scilab Codes > >> directly through a browser. > >> > >> http://scilab-test.garudaindia.in/cloud/ > >> > >> Please login with the following credentials : > >> Username: guest > >> Password : fcf41657f02f88137a1bcf068a32c0a3 (Yes its a md5!) > >> > >> One you login you would have the option to choose from a varierty of > >> examples by Selecting a book, followed by a chapter and an example. You > can > >> either run an example from the database or choose to write your own > code. > >> The examples are part of the TextBook Companion Project ( > >> http://scilab-test.garudaindia.in/scilab_in/Textbook_Companion_Project) > >> which contains examples from 100+ books coded in scilab. > >> > >> The USP of 'Scilab On Cloud' is that you can generate graphs too. Incase > >> your scilab code generates a graph, you will see it as a fancybox > window . > >> Alternatively you can also download it as a pdf by cliking on the > 'Download > >> PDF' link just besides the 'Evaluate' button > >> > >> Please feel free to email me(saketkc at gmail.com) incase you come across > any > >> bugs. > >> I had taken up this as a project under the guidance of Prof. Kannan > >> Moudgalya(http://www.che.iitb.ac.in/online/node/52),Chemical > Engineering > >> Department,IIT Bombay. > >> > >> I would like to thank him and C-DAC Bangalore,India for providing us > with > >> the GARUDA cloud. > >> > >> Regards, > >> Saket Choudhary > >> Fourth Year Undergraduate > >> Chemical Engineering Department > >> IIT Bombay > >> India > > > > > > > > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Nov 11 12:00:08 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 11 Nov 2012 12:00:08 +0100 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: References: <387-509c3300-21-1a07fc00@70800561> Message-ID: <509F8538.20101@free.fr> Le 11/11/2012 08:47, R.Sathish Kumar a ?crit : > Hi Saket, > > When I try the example scilab code given at: > https://www.equalis.com/default.asp?page=MathintheCloud > > I get no output or result.Just the Blue button showing "executing".Plz > check and rectify. I have got the same behavior with simple single instructions such that m = rand(3,3) or plot2d() // with the proper checkbox checked From saketkc at gmail.com Sun Nov 11 12:26:59 2012 From: saketkc at gmail.com (Saket Choudhary) Date: Sun, 11 Nov 2012 16:56:59 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: <509F8538.20101@free.fr> References: <387-509c3300-21-1a07fc00@70800561> <509F8538.20101@free.fr> Message-ID: HI Samuel, This should worl: a=rand(3,3) disp(a) You have to use, 'disp' for displaying variables. plot2d should also work with no issues. On 11 November 2012 16:30, Samuel Gougeon wrote: > Le 11/11/2012 08:47, R.Sathish Kumar a ?crit : > > Hi Saket, >> >> When I try the example scilab code given at: >> https://www.equalis.com/**default.asp?page=**MathintheCloud >> >> I get no output or result.Just the Blue button showing "executing".Plz >> check and rectify. >> > I have got the same behavior with simple single instructions such that > m = rand(3,3) > or > plot2d() // with the proper checkbox checked > > ______________________________**_________________ > 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 Mon Nov 12 09:48:37 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 12 Nov 2012 09:48:37 +0100 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: References: <387-509c3300-21-1a07fc00@70800561> Message-ID: <50A0B7E5.5000904@inria.fr> Hello, I tried your site, with firefox 16.0.2 entering A=1 as input, with "Enable graphic" checked I got the message "The requested content cannot ne loaded, Please try again later", with graphic disable nothing appaers in the output part.... Serge Steer On 10/11/2012 19:55, Saket Choudhary wrote: > Hello Everyone! > > We are back again at : http://scilab-test.garudaindia.in/cloud/ > > Username: guest > Password : guest123 > > Lets hope the hacker doesnt try ti pull it down again ! > > The books and examples are still missing as we are still under the > process of migrating our whole site ! The hacker(read cracker) deleted > everything we had ! I am sure his/her act of 'cracking' can be > utilised in much ethical ways , rather than just deleting the content > of a site like ours meant for community education. > > > Regards, > Saket Choudhary > Fourth Year Undergraduate > IIT Bombay > > On 9 November 2012 14:21, Saket Choudhary > wrote: > > Hi Antoine, > > It looks like someone hacked our website. We are investigating it > and should be up soon > > Thanks > > Saket > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From saketkc at gmail.com Mon Nov 12 09:50:30 2012 From: saketkc at gmail.com (Saket Choudhary) Date: Mon, 12 Nov 2012 14:20:30 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: <50A0B7E5.5000904@inria.fr> References: <387-509c3300-21-1a07fc00@70800561> <50A0B7E5.5000904@inria.fr> Message-ID: Hi Serge, To see the value of any variable you will have to use disp(variable name); Graphic mode is only to be enabled if you are plotting something (say plot2d,plot2d,bode plot etc) Saket On 12 November 2012 14:18, Serge Steer wrote: > Hello, > > I tried your site, with firefox 16.0.2 entering A=1 as input, with "Enable > graphic" checked I got the message "The requested content cannot ne > loaded, Please try again later", with graphic disable nothing appaers in > the output part.... > > > Serge Steer > > > > On 10/11/2012 19:55, Saket Choudhary wrote: > > Hello Everyone! > > We are back again at : http://scilab-test.garudaindia.in/cloud/ > > Username: guest > Password : guest123 > > Lets hope the hacker doesnt try ti pull it down again ! > > The books and examples are still missing as we are still under the process > of migrating our whole site ! The hacker(read cracker) deleted everything > we had ! I am sure his/her act of 'cracking' can be utilised in much > ethical ways , rather than just deleting the content of a site like ours > meant for community education. > > > Regards, > Saket Choudhary > Fourth Year Undergraduate > IIT Bombay > > On 9 November 2012 14:21, Saket Choudhary wrote: > >> Hi Antoine, >> >> It looks like someone hacked our website. We are investigating it and >> should be up soon >> >> Thanks >> >> Saket >> > > > > _______________________________________________ > users mailing listusers at lists.scilab.orghttp://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 michael.baudin at contrib.scilab.org Mon Nov 12 10:11:56 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Mon, 12 Nov 2012 10:11:56 +0100 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: References: <387-509c3300-21-1a07fc00@70800561> Message-ID: <8a926bae99e5424f4466e4cf35f9fa03@contrib.scilab.org> Hi, This is a very interesting project. Thank you for sharing this ! I have a couple of questions and suggestions. * Can you clearly state which version of Scilab it uses ? Scilab 5.4.0 ? * Can you pre-install a selected collection of ATOMS toolboxes ? * What system do we use ? Linux, Windows, Mac ? * Did you make sure that the performances of the Scilab you installed are the best possible ? Best regards, Micha?l Le 2012-11-10 19:55, Saket Choudhary a ?crit?: > Hello Everyone! > > We are back again at : http://scilab-test.garudaindia.in/cloud/ [1] > > Username: guest > Password : guest123 > > Lets hope the hacker doesnt try ti pull it down again !? > > The books and examples are still missing as we are still under the > process of migrating our whole site ! The hacker(read cracker) > deleted > everything we had ! I am sure his/her act of 'cracking' can be > utilised in much ethical ways , rather than just deleting the content > of a site like ours meant for community education. > > Regards, > Saket Choudhary > Fourth Year Undergraduate > IIT Bombay > > On 9 November 2012 14:21, Saket Choudhary wrote: > >> Hi Antoine, >> >> It looks like someone hacked our website. We are investigating it >> and should be up soon >> >> Thanks >> >> Saket > > > > Links: > ------ > [1] http://scilab-test.garudaindia.in/cloud/ > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From stephane.becu at maya-technologies.com Mon Nov 12 11:24:58 2012 From: stephane.becu at maya-technologies.com (=?iso-8859-1?Q?St=E9phane_B=E9cu?=) Date: Mon, 12 Nov 2012 11:24:58 +0100 Subject: [Scilab-users] =?iso-8859-1?q?TR=A0=3A_WRITEC=5Ff_=26_WFILE=5Ff?= References: Message-ID: Hello, It seems that the WFILE_f block shall disppear in the the next SCILAB 6.0.0 version? What is the aim to replace the WFILE_f block by WRITEC_f and how can I read the generated binary file in scinotes afterwards? St?phane -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.becu at maya-technologies.com Mon Nov 12 11:25:12 2012 From: stephane.becu at maya-technologies.com (=?iso-8859-1?Q?St=E9phane_B=E9cu?=) Date: Mon, 12 Nov 2012 11:25:12 +0100 Subject: [Scilab-users] =?iso-8859-1?q?TR=A0=3A__read=5Fcsv_issue?= References: Message-ID: Hello, Using the official 5.4.0 scilab version, I have much difficulty to adapt the new csvRead function which replaces read_csv(). I've always used it easily to read alpha-numeric files but now it's not possible anymore. Here is an example: example of file to be treated: ////////////////////////////////////////////////////////////////////////////////////////////// The first lines of this alpha-numerical file are only comments. The last line of the file is also comment. The following lines contain data to be sorted. 1; 5; 2.369 1; 5; 2.369 1; 5; 2.369 1; 5; 2.369 1; 5; 2.369 1; 5; 2.369 1; 5; 2.369 1; 5; 2.369 1; 5; 2.369 This is the last line of the file. ///////////////////////////////////////////////////////////////////////////////////////////////// Typing, data=read_csv('myfile',";") data(1:3,:) = []; // removes the 3 first comment lines data($,:) = []; // removes thelast line of the file data = abs(evstr(data)); I used to finding the following result: ans = 1 5 2.369 1 5 2.369 1 5 2.369 1 5 2.369 1 5 2.369 1 5 2.369 1 5 2.369 1 5 2.369 1 5 2.369 But now it is not the case anymore? Which functions could replace this in scilab 5.4.0? Thanks in advance St?phane -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.becu at maya-technologies.com Mon Nov 12 15:39:10 2012 From: stephane.becu at maya-technologies.com (=?iso-8859-1?Q?St=E9phane_B=E9cu?=) Date: Mon, 12 Nov 2012 15:39:10 +0100 Subject: [Scilab-users] Xcos: Context issue References: <1351498185.2066.3.camel@paros> <1351582776.1932.2.camel@paros> Message-ID: Hello Cl?ment, Please find a simple testcase showing my Context issue: Changing one or more parameters is ok but this does not change a variable which is a function of these parameters. Here a=amin+*amax is not changed when amin, amax are modifed... There must be another way to manage his but I don't know how? Thanks for help St?phane ________________________________ De: users-bounces at lists.scilab.org de la part de Cl?ment David Date: mar. 30/10/2012 08:39 ?: International users mailing list for Scilab. Objet : Re: [Scilab-users] RE : TR : java heap space Hello, Some tests on our compilation chain use the context update and pass. Can you post a reduced test-case of your issue please ? PS: unit test added to manage context update http://codereview.scilab.org/#/c/9558/ Le lundi 29 octobre 2012 ? 16:48 +0100, St?phane B?cu a ?crit : > I did not have the problem with Scilab 5.4.0 but with this last > version my parameters modification are not taken into account when > using scicos_simulate() as it used to be with previous versions. > > Code example: > ///////////////////////// > > Context.mypar1; > Context.mypar2; > > Context.mypar3; > scicos_simulate(scs_m,list(),Context,'nw'); > > --> this simulation gives the same result than with original parameter values. > -- Cl?ment DAVID Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.xcos Type: text/xml Size: 43655 bytes Desc: test.xcos URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: simulation_test.sce Type: application/octet-stream Size: 486 bytes Desc: simulation_test.sce URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: param_test.sce Type: application/octet-stream Size: 74 bytes Desc: param_test.sce URL: From huubvanniekerk at yahoo.com Mon Nov 12 16:40:26 2012 From: huubvanniekerk at yahoo.com (hvn) Date: Mon, 12 Nov 2012 15:40:26 +0000 (UTC) Subject: [Scilab-users] Scilab 5.4 on CentOS 5.8: error plotting Message-ID: Hi, I just installed Scilab 5.4 on CentOS 5.8. It starts fine, but when I want to plot something, I get this: -->x = 1:10 x = 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. -->plot(3*x+4) Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: AWT-EventQueue-0: Unable to create temp OpenGL context(1) at jogamp.opengl.x11.glx.X11GLXContext.createImplRaw (X11GLXContext.java:325) at jogamp.opengl.x11.glx.X11GLXContext.createImpl (X11GLXContext.java:260) at jogamp.opengl.GLContextImpl.makeCurrentWithinLock (GLContextImpl.java:484) at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:402) at jogamp.opengl.GLDrawableHelper.invokeGLImpl (GLDrawableHelper.java:415) at jogamp.opengl.GLDrawableHelper.invokeGL (GLDrawableHelper.java:364) at javax.media.opengl.awt.GLJPanel $SoftwareBackend.doPaintComponentImpl(GLJPanel.java:1043) at javax.media.opengl.awt.GLJPanel $AbstractReadbackBackend.doPaintComponent(GLJPanel.java:942) at javax.media.opengl.awt.GLJPanel.paintComponent (GLJPanel.java:356) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JLayeredPane.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JViewport.paint(Unknown Source) which goes on and on until I end it with ctl-c. At first I had only openjdk installed, but installed latest Sun/Oracle jdk after the initial error messages. But it still goes wrong: the plot window comes up but nothing is plotted. What is wrong? Thank you. From saketkc at gmail.com Mon Nov 12 18:32:08 2012 From: saketkc at gmail.com (Saket Choudhary) Date: Mon, 12 Nov 2012 23:02:08 +0530 Subject: [Scilab-users] Run your Scilab Codes Through Browser In-Reply-To: <8a926bae99e5424f4466e4cf35f9fa03@contrib.scilab.org> References: <387-509c3300-21-1a07fc00@70800561> <8a926bae99e5424f4466e4cf35f9fa03@contrib.scilab.org> Message-ID: HI Michael, Please find my answers below : On 12 November 2012 14:41, wrote: > Hi, > > This is a very interesting project. > > Thank you for sharing this ! > > I have a couple of questions and suggestions. > * Can you clearly state which version of Scilab it uses ? Scilab 5.4.0 ? > Scilab 5.4.0 > * Can you pre-install a selected collection of ATOMS toolboxes ? > In principle, Yes. I am not much of an ATOMS user. Do you have specific toolboxes which are generally used ? > * What system do we use ? Linux, Windows, Mac ? > Linux Server Ubuntu 12.04. > * Did you make sure that the performances of the Scilab you installed are > the best possible ? > I have not tested this yet. But yes this is an impo7958.ACTREC4rtant stuff to take care of. Thanks for suggestions If there are more ideas that you would want us to explore, please do pour in. We are trying our best to make it as user friendly as possible. Thanks Saket > > Best regards, > > Micha?l > > Le 2012-11-10 19:55, Saket Choudhary a ?crit : > >> Hello Everyone! >> >> We are back again at : http://scilab-test.**garudaindia.in/cloud/[1] >> >> >> Username: guest >> Password : guest123 >> >> Lets hope the hacker doesnt try ti pull it down again ! >> >> The books and examples are still missing as we are still under the >> process of migrating our whole site ! The hacker(read cracker) deleted >> everything we had ! I am sure his/her act of 'cracking' can be >> utilised in much ethical ways , rather than just deleting the content >> of a site like ours meant for community education. >> >> Regards, >> Saket Choudhary >> Fourth Year Undergraduate >> IIT Bombay >> >> On 9 November 2012 14:21, Saket Choudhary wrote: >> >> Hi Antoine, >>> >>> It looks like someone hacked our website. We are investigating it and >>> should be up soon >>> >>> Thanks >>> >>> Saket >>> >> >> >> >> Links: >> ------ >> [1] http://scilab-test.**garudaindia.in/cloud/ >> >> >> ______________________________**_________________ >> 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 brandonfoo.kf at gmail.com Tue Nov 13 03:33:42 2012 From: brandonfoo.kf at gmail.com (Brandon Foo) Date: Tue, 13 Nov 2012 10:33:42 +0800 Subject: [Scilab-users] Details of Installed Atoms Message-ID: Dear Sir / Madam, Greetings from Singapore! I am a new user of SCILAB and would like to ask you the following question. 1) I have just installed the ATOM, CASCI 1.0.1-1. How do I get further details regarding the usage of the individual functions that comes with the package? I tried looking up the package in the modules folder in the installed SCILAB folder but could not locate the CASCI package. -- Best wishes, Brandon +65 90062578 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Nov 13 08:47:49 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Tue, 13 Nov 2012 08:47:49 +0100 Subject: [Scilab-users] vectorization Message-ID: <000301cdc173$2e80df90$8b829eb0$@carrico@free.fr> Dear all, I?m trying to optimize a part of an existing (but slow) code including a lot of loops ; naturally I?m thinking in using vectorization and for that issue I read the Micha?l Baudin?s document (programming in Scilab V0.9) I?ve the feeling the above costly code can be vectorized, but some aspects are not clear for me at the moment (basically how to transform the double loop theta/fi in a vector for example ?) NB: - Since the initial tensor is symmetrical, is expressed as a vector - To apply transformations, it?s necessary to ?rebuild? its matrix form (compared to a direct calculation , the current solution is faster) - This kind of code is currently called hundred thousand times clearly not acceptable - I understand we?ve to transform any variable/constant under vector Any advice ? where can I find any tutorial or doc that explains and brackets the use of (efficient) vectorization ? Regards Paul mode(0) // ############################################################### function E_prime=fct_transformation_M(E, theta, fi) // values of theta and fi are in radian theta = theta * %pi / 180; fi = fi * %pi / 180; // Calculation of matrix in the studied plane E_prime=zeros(3,3); M_transform = [ (cos(theta)* sin(fi)) (sin(theta) * sin(fi)) (cos(fi)); (-sin(theta)) (cos(theta)) 0. ; (-cos(theta) * cos(fi)) (-sin(theta) * cos(fi)) (sin(fi)); ]; // New tensor calculation E_prime = M_transform * E * M_transform'; endfunction function M_new=fct_vector2matrix(M) M_new = zeros(3,3); M_new(1,1)= M(1,1); M_new(2,2)= M(1,2); M_new(3,3)= M(1,3); M_new(1,2)= M(1,4); M_new(2,3)= M(1,5); M_new(1,3)= M(1,6); M_new(2,1)= M_new(1,2); M_new(3,1)= M_new(1,3); M_new(3,2)= M_new(2,3); endfunction function M_vect=fct_matrix2vector(M) M_vect = zeros(1,6); M_vect(1,1) = M(1,1); M_vect(1,2) = M(2,2); M_vect(1,3) = M(3,3); M_vect(1,4) = M(1,2); M_vect(1,5) = M(2,3); M_vect(1,6) = M(1,3); endfunction // ############################################################### Epsilon = 10^(-8) *[ 4.441D-08 0. 0. 0. 0. 0. ; -1022. -6278. 6914. 210.6 783100. -33910. ; -2316. -24190. 25930. 894.6 1545000. -67320. ; -3608. -52660. 55610. 2004. 2284000. -99750. ; -4895. -90810. 94970. 3508. 3002000. -131300. ; -6171. -137700. 143100. 5365. 3699000. -161900. ; -7429. -192400. 199000. 7533. 4373000. -191600. ; -8675. -254200. 262000. 9997. 5027000. -220400. ; -8675. -254200. 262000. 9997. 5027000. -220400. ] [p,c] = size(Epsilon); // number of time steps step_ = 2; // nb_loops = 0; tic() for i = 1 : p for theta = 0 : step_ : 180 for fi = 0 : step_ : 180 Epsilon_matrix = fct_vector2matrix(Epsilon(i,:)); Epsilon_prime_matrix = fct_transformation_M(Epsilon_matrix,theta,fi); Epsilon_prime(i,:) = fct_matrix2vector(Epsilon_prime_matrix); nb_loops = nb_loops + 1; end end end t_vect2matr2vect = toc() nb_loops -------------- next part -------------- An HTML attachment was scrubbed... URL: From jacques.beilin at ensg.eu Tue Nov 13 11:11:31 2012 From: jacques.beilin at ensg.eu (jacques.beilin) Date: Tue, 13 Nov 2012 11:11:31 +0100 Subject: [Scilab-users] problem with getdate() Message-ID: <50A21CD3.8050400@ensg.eu> Dear All, I am currently trying to learn Scilab. I Wrote a Gnu Octave GPS date/time management package and I am trying to port it to Scilab. Il notice a strange behaviour of a scilab function. I use the getdate() function in order to get date/time elements from current date or from an epoch refered to unix timestamp (1970-01-01 0h00UTC). Without any parameter getdate gives a date including the time zone. When called with a parameter (i.e. getdate(0)), the function gives 1970 January, 1st at 1:00 instead of 0:00. the "0" parameter stands for the number of seconds from 1970-01-01T00:00:00. -->getdate(0) ans = 1970. 1. 1. 1. 5. 1. 1. 0. 0. 0. I do not find the reason why the date needs to be corrected from time zone when getdate is called with a parameter. On a computed set to UTC+00, getdate(0) gives the right result. I compared with Gnu Octave. The equivalent function is gmtime. gmtile(0) gives the rigth result. Regards, Jacques Beilin From frederic.jourdin at shom.fr Tue Nov 13 11:59:20 2012 From: frederic.jourdin at shom.fr (Frederic Jourdin) Date: Tue, 13 Nov 2012 11:59:20 +0100 Subject: [Scilab-users] problem with getdate() In-Reply-To: <50A21CD3.8050400@ensg.eu> References: <50A21CD3.8050400@ensg.eu> Message-ID: <50A22808.8000107@shom.fr> Effectively this is strange: the 7th value of getdate(0) is 1 and should be 0 instead! (Checked on Scilab 5.4.0) Fred Le 13/11/2012 11:11, jacques.beilin a ?crit : > Dear All, > > I am currently trying to learn Scilab. I Wrote a Gnu Octave GPS > date/time management package and I am trying to port it to Scilab. Il > notice a strange behaviour of a scilab function. > > I use the getdate() function in order to get date/time elements from > current date or from an epoch refered to unix timestamp (1970-01-01 > 0h00UTC). > > Without any parameter getdate gives a date including the time zone. > > When called with a parameter (i.e. getdate(0)), the function gives > 1970 January, 1st at 1:00 instead of 0:00. the "0" parameter stands > for the number of seconds from 1970-01-01T00:00:00. > > -->getdate(0) > ans = > > 1970. 1. 1. 1. 5. 1. 1. 0. 0. 0. > > I do not find the reason why the date needs to be corrected from time > zone when getdate is called with a parameter. > > On a computed set to UTC+00, getdate(0) gives the right result. > > I compared with Gnu Octave. The equivalent function is gmtime. > gmtile(0) gives the rigth result. > > Regards, > > Jacques Beilin > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From simon.gareste at scilab-enterprises.com Tue Nov 13 13:43:52 2012 From: simon.gareste at scilab-enterprises.com (Simon GARESTE) Date: Tue, 13 Nov 2012 13:43:52 +0100 Subject: [Scilab-users] Details of Installed Atoms In-Reply-To: References: Message-ID: <50A24088.8030307@scilab-enterprises.com> Hi, Could you please precise which OS do you use ? With a binary installation, the module will usually be in SCIHOME/atoms/ on windows, in SCI/contrib on linux. Unfortunately, from what I saw this module doesn't come with help files. Simon On 11/13/2012 03:33 AM, Brandon Foo wrote: > Dear Sir / Madam, > Greetings from Singapore! > I am a new user of SCILAB and would like to ask you the following > question. > 1) I have just installed the ATOM, CASCI 1.0.1-1. How do I get further > details regarding the usage of the individual functions that comes > with the package? I tried looking up the package in the modules > folder in the installed SCILAB folder but could not locate the CASCI > package. > > -- > Best wishes, > > Brandon > +65 90062578 > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Simon Gareste Support & Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.70 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.becu at maya-technologies.com Tue Nov 13 15:44:31 2012 From: stephane.becu at maya-technologies.com (=?iso-8859-1?Q?St=E9phane_B=E9cu?=) Date: Tue, 13 Nov 2012 15:44:31 +0100 Subject: [Scilab-users] =?iso-8859-1?q?RE=A0=3A_Xcos=3A_Context_issue?= References: <1351498185.2066.3.camel@paros> <1351582776.1932.2.camel@paros> Message-ID: Did anybody ever have the same problem to change variable in Context ? Thanks for help, St?phane ________________________________ De: St?phane B?cu Date: lun. 12/11/2012 15:39 ?: users at lists.scilab.org Objet : Xcos: Context issue Hello Cl?ment, Please find a simple testcase showing my Context issue: Changing one or more parameters is ok but this does not change a variable which is a function of these parameters. Here a=amin+*amax is not changed when amin, amax are modifed... There must be another way to manage his but I don't know how? Thanks for help St?phane ________________________________ De: users-bounces at lists.scilab.org de la part de Cl?ment David Date: mar. 30/10/2012 08:39 ?: International users mailing list for Scilab. Objet : Re: [Scilab-users] RE : TR : java heap space Hello, Some tests on our compilation chain use the context update and pass. Can you post a reduced test-case of your issue please ? PS: unit test added to manage context update http://codereview.scilab.org/#/c/9558/ Le lundi 29 octobre 2012 ? 16:48 +0100, St?phane B?cu a ?crit : > I did not have the problem with Scilab 5.4.0 but with this last > version my parameters modification are not taken into account when > using scicos_simulate() as it used to be with previous versions. > > Code example: > ///////////////////////// > > Context.mypar1; > Context.mypar2; > > Context.mypar3; > scicos_simulate(scs_m,list(),Context,'nw'); > > --> this simulation gives the same result than with original parameter values. > -- Cl?ment DAVID Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com _______________________________________________ users mailing list 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 Nov 13 18:19:59 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 13 Nov 2012 18:19:59 +0100 Subject: [Scilab-users] problem with getdate() In-Reply-To: <50A21CD3.8050400@ensg.eu> References: <50A21CD3.8050400@ensg.eu> Message-ID: <50A2813F.5070402@free.fr> Le 13/11/2012 11:11, jacques.beilin a ?crit : > .../... > -->getdate(0) > ans = > > 1970. 1. 1. 1. 5. 1. 1. 0. 0. 0. > > I do not find the reason why the date needs to be corrected from time > zone when getdate is called with a parameter. > > On a computed set to UTC+00, getdate(0) gives the right result. > > I compared with Gnu Octave. The equivalent function is gmtime. > gmtile(0) gives the rigth result. Yes, this bug was reported in february 2011: http://bugzilla.scilab.org/show_bug.cgi?id=8898 From sgougeon at free.fr Tue Nov 13 18:25:30 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 13 Nov 2012 18:25:30 +0100 Subject: [Scilab-users] vectorization In-Reply-To: <000301cdc173$2e80df90$8b829eb0$@carrico@free.fr> References: <000301cdc173$2e80df90$8b829eb0$@carrico@free.fr> Message-ID: <50A2828A.8010108@free.fr> Le 13/11/2012 08:47, Paul Carrico a ?crit : > .../... > > Epsilon= 10^(-8) *[ > > 4.441D-080. 0. 0. 0. 0. ; > > -1022.-6278. 6914. 210.6 783100. -33910. ; > > -2316.-24190. 25930. 894.6 1545000. -67320. ; > > -3608.-52660. 55610. 2004. 2284000. -99750. ; > > -4895.-90810. 94970. 3508. 3002000. -131300. ; > > -6171.-137700. 143100. 5365. 3699000. -161900. ; > > -7429.-192400. 199000. 7533. 4373000. -191600. ; > > -8675.-254200. 262000. 9997. 5027000. -220400. ; > > -8675.-254200. 262000. 9997. 5027000. -220400. > > ] > > [p,c]= size(Epsilon); > > /// number of time steps/ > > step_= 2; //// > > nb_loops= 0; > > _tic_() > > fori = 1 : p > > for theta = 0 : step_ : 180 > > for fi = 0 : step_ : 180 > > Epsilon_matrix= _fct_vector2matrix_(Epsilon(i,:)); > > Epsilon_prime_matrix = _fct_transformation_M_(Epsilon_matrix,theta,fi); > > Epsilon_prime(i,:)= _fct_matrix2vector_(Epsilon_prime_matrix); > > nb_loops = nb_loops + 1; > > end > > end > > end > Since Epsilon_matrix does not depend neither on theta nor on fi, it can be set only once when opening the for { i} loop: fori = 1 : p Epsilon_matrix= _fct_vector2matrix_(Epsilon(i,:)); for theta = 0 : step_ : 180 for fi = 0 : step_ : 180 Epsilon_prime_matrix = _fct_transformation_M_(Epsilon_matrix,theta,fi); Epsilon_prime(i,:)= _fct_matrix2vector_(Epsilon_prime_matrix); nb_loops = nb_loops + 1; end end end Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.becu at maya-technologies.com Wed Nov 14 10:54:16 2012 From: stephane.becu at maya-technologies.com (=?iso-8859-1?Q?St=E9phane_B=E9cu?=) Date: Wed, 14 Nov 2012 10:54:16 +0100 Subject: [Scilab-users] =?iso-8859-1?q?TR=A0=3A_Xcos=3A_Context_issue?= References: <1351498185.2066.3.camel@paros> <1351582776.1932.2.camel@paros> Message-ID: Please find in attached in the simple tescase illustrating the problem. ________________________________ De: St?phane B?cu Date: mar. 13/11/2012 15:44 ?: users at lists.scilab.org Objet : RE : Xcos: Context issue Did anybody ever have the same problem to change variable in Context ? Thanks for help, St?phane ________________________________ De: St?phane B?cu Date: lun. 12/11/2012 15:39 ?: users at lists.scilab.org Objet : Xcos: Context issue Hello Cl?ment, Please find a simple testcase showing my Context issue: Changing one or more parameters is ok but this does not change a variable which is a function of these parameters. Here a=amin+2*amax is not changed when amin, amax are modifed... There must be another way to manage his but I don't know how? Thanks for help St?phane ________________________________ De: users-bounces at lists.scilab.org de la part de Cl?ment David Date: mar. 30/10/2012 08:39 ?: International users mailing list for Scilab. Objet : Re: [Scilab-users] RE : TR : java heap space Hello, Some tests on our compilation chain use the context update and pass. Can you post a reduced test-case of your issue please ? PS: unit test added to manage context update http://codereview.scilab.org/#/c/9558/ Le lundi 29 octobre 2012 ? 16:48 +0100, St?phane B?cu a ?crit : > I did not have the problem with Scilab 5.4.0 but with this last > version my parameters modification are not taken into account when > using scicos_simulate() as it used to be with previous versions. > > Code example: > ///////////////////////// > > Context.mypar1; > Context.mypar2; > > Context.mypar3; > scicos_simulate(scs_m,list(),Context,'nw'); > > --> this simulation gives the same result than with original parameter values. > -- Cl?ment DAVID Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.xcos Type: text/xml Size: 43655 bytes Desc: test.xcos URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: simulation_test.sce Type: application/octet-stream Size: 486 bytes Desc: simulation_test.sce URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: param_test.sce Type: application/octet-stream Size: 71 bytes Desc: param_test.sce URL: From aurelien.stolzenbach at gmail.com Wed Nov 14 12:16:17 2012 From: aurelien.stolzenbach at gmail.com (A. Stolzenbach) Date: Wed, 14 Nov 2012 03:16:17 -0800 (PST) Subject: [Scilab-users] MacOS 10.8 Scilab function calls In-Reply-To: <5079C4D5.6080803@scilab-enterprises.com> References: <3AE687A1-6652-4A01-9EE9-2BA94E3C1C6C@knology.net> <5079C4D5.6080803@scilab-enterprises.com> Message-ID: <1352891777036-4025234.post@n3.nabble.com> Hi,I have approximatively the same problem exept I'm running scilab on Mac OS X 10.7 (64 bits) I made this simple function // d?finition en ligne function [x, y]=myfct(a, b) x=a+b y=a-b endfunction and saved this in myfct.sci when I try -->exec(path+"myfct.sci") it shows only -->// d?finition en ligne so i try -->[x,y]=myfct(1,2) !--error 4 Variable non d?finie : myfct or -->myfct(1,2) !--error 4 Variable non d?finie : myfct The path is right. I'm working on some Crank-Nicolson scheme so my functions are more complicated, and I didnt tried on my Linux computer at home. Thanks -- View this message in context: http://mailinglists.scilab.org/Scilab-users-MacOS-10-8-Scilab-function-calls-tp4024985p4025234.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From paul.carrico at free.fr Thu Nov 15 09:21:54 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Thu, 15 Nov 2012 09:21:54 +0100 Subject: [Scilab-users] basic question Message-ID: <000901cdc30a$466c62d0$d3452870$@carrico@free.fr> Dear all, Sorry for this basic question but I failed in finding the answer after a look in the documentation . . how can I optimize the following basic code (using vectorization instead of loops) ? Thanks to the community Paul mode(0) A = [1 : 0.2 : 100]' B = [100 : 1 : 595]' [nl,nc] = size(A); C = zeros(nl,1); for i = 1 : nl C(i,1) = A(i,1)*B(i,1); end // D = prod( //A(nl,1)*B(nl,1) - C(nl,1) -------------- next part -------------- An HTML attachment was scrubbed... URL: From arvid at softube.com Thu Nov 15 09:25:21 2012 From: arvid at softube.com (=?iso-8859-1?Q?Arvid_Ros=E9n?=) Date: Thu, 15 Nov 2012 09:25:21 +0100 Subject: [Scilab-users] basic question In-Reply-To: <50a4a62d.87cb0e0a.07dd.fffffe41SMTPIN_ADDED@mx.google.com> References: <50a4a62d.87cb0e0a.07dd.fffffe41SMTPIN_ADDED@mx.google.com> Message-ID: Hi, Replace loop with: C = A.*B; Arvid 15 nov 2012 kl. 09:21 skrev Paul Carrico : > Dear all, > > Sorry for this basic question but I failed in finding the answer after a look in the documentation ? > ? how can I optimize the following basic code (using vectorization instead of loops) ? > > Thanks to the community > > Paul > mode(0) > > A = [1 : 0.2 : 100]' > B = [100 : 1 : 595]' > > [nl,nc] = size(A); > C = zeros(nl,1); > > for i = 1 : nl > C(i,1) = A(i,1)*B(i,1); > end > > // D = prod( > //A(nl,1)*B(nl,1) - C(nl,1) > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Arvid Ros?n Softube AB S:t Larsgatan 10c SE-582 24 Link?ping Sweden Mobile: (+46) 73 25 123 47 Office: (+46) 13 21 16 23 Fax: (+46) 13 10 00 23 Mail: arvid at softube.com URL: www.softube.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Thu Nov 15 09:28:24 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 15 Nov 2012 09:28:24 +0100 Subject: [Scilab-users] basic question In-Reply-To: <000901cdc30a$466c62d0$d3452870$@carrico@free.fr> References: <000901cdc30a$466c62d0$d3452870$@carrico@free.fr> Message-ID: <50A4A7A8.1090500@inria.fr> just replace fori = 1 : nl C(i,1) = A(i,1)*B(i,1); end by C(:,1) = A(:,1) .*B(:,1); Serge Steer On 15/11/2012 09:21, Paul Carrico wrote: > > Dear all, > > Sorry for this basic question but I failed in finding the answer after > a look in the documentation ... > > ... how can I optimize the following basic code (using vectorization > instead of loops) ? > > Thanks to the community > > Paul > > mode(0) > > A= [1 : 0.2 : 100]' > > B= [100 : 1 : 595]' > > [nl,nc]= size(A); > > C= zeros(nl,1); > > fori = 1 : nl > > C(i,1) = A(i,1)*B(i,1); > > end > > /// D = prod(/ > > ///A(nl,1)*B(nl,1) - C(nl,1)/ > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Thu Nov 15 09:36:13 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Thu, 15 Nov 2012 09:36:13 +0100 Subject: [Scilab-users] basic question In-Reply-To: <50A4A7A8.1090500@inria.fr> References: <000901cdc30a$466c62d0$d3452870$@carrico@free.fr> <50A4A7A8.1090500@inria.fr> Message-ID: <002301cdc30c$4658c8e0$d30a5aa0$@carrico@free.fr> Thanks all De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Serge Steer Envoy? : jeudi 15 novembre 2012 09:28 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] basic question just replace for i = 1 : nl C(i,1) = A(i,1)*B(i,1); end by C(:,1) = A(:,1) .* B(:,1); Serge Steer On 15/11/2012 09:21, Paul Carrico wrote: Dear all, Sorry for this basic question but I failed in finding the answer after a look in the documentation how can I optimize the following basic code (using vectorization instead of loops) ? Thanks to the community Paul mode(0) A = [1 : 0.2 : 100]' B = [100 : 1 : 595]' [nl,nc] = size(A); C = zeros(nl,1); for i = 1 : nl C(i,1) = A(i,1)*B(i,1); end // D = prod( //A(nl,1)*B(nl,1) - C(nl,1) _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From klaus-rohe at t-online.de Thu Nov 15 15:45:36 2012 From: klaus-rohe at t-online.de (Klaus Rohe) Date: Thu, 15 Nov 2012 15:45:36 +0100 Subject: [Scilab-users] scilab 5.4.0 plotting does not work on HP MINI 110-4125 with Windows 7 Sarter edition Message-ID: <000001cdc33f$dfe53970$9fafac50$@t-online.de> Hi all, I have installed scilab 5.4.0 on a HP MINI 110-4125 with Windows 7 Sarter edition and 1 GB of RAM. Scilab plotting does not work. I have attached a screen shot, showing what happens I the plot2d demo is executed. I have tried other examples with plot2d getting the same results. What is going wrong here? Any hints how to fix it? Kind regards Klaus Dipl.-Phys. Klaus Rohe Adolf-Kolping-Strasse 10a 85625 Glonn E-Mail: klaus-rohe at t-online.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: scilab_plotting_error.jpg Type: image/jpeg Size: 194376 bytes Desc: not available URL: From sylvestre.ledru at scilab-enterprises.com Thu Nov 15 17:34:56 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Thu, 15 Nov 2012 17:34:56 +0100 Subject: [Scilab-users] scilab 5.4.0 plotting does not work on HP MINI 110-4125 with Windows 7 Sarter edition In-Reply-To: <000001cdc33f$dfe53970$9fafac50$@t-online.de> References: <000001cdc33f$dfe53970$9fafac50$@t-online.de> Message-ID: <50A519B0.80503@scilab-enterprises.com> On 15/11/2012 15:45, Klaus Rohe wrote: > Hi all, > > > > I have installed scilab 5.4.0 on a HP MINI 110-4125 with Windows 7 > Sarter edition and 1 GB of RAM. > > Scilab plotting does not work. I have attached a screen shot, showing > what happens I the plot2d demo is executed. > > I have tried other examples with plot2d getting the same results. > > > > What is going wrong here? Any hints how to fix it? We have some reports for Scilab graphics failing on some systems. For now, we have not been able to reproduce it on our systems. Could you let us know what is your graphic card and the result of [a,b] = getdebuginfo() Thanks, Sylvestre From eliseo at um.es Thu Nov 15 18:04:18 2012 From: eliseo at um.es (Eliseo Chacon Vera) Date: Thu, 15 Nov 2012 09:04:18 -0800 (PST) Subject: [Scilab-users] scilab 5.4.0 plotting does not work on HP MINI 110-4125 with Windows 7 Sarter edition In-Reply-To: <50A519B0.80503@scilab-enterprises.com> References: <000001cdc33f$dfe53970$9fafac50$@t-online.de> <50A519B0.80503@scilab-enterprises.com> Message-ID: <1352999058476-4025242.post@n3.nabble.com> Hi, pity, also is NOT working the drawnow() / drawlater() feature to replace the show_pixmap() on Mac OSX 10.6.8, 64 bits. Hope you find a fix, because 5.4.0 is much nicer than 5.3.3 Cheers, Eliseo -- View this message in context: http://mailinglists.scilab.org/Scilab-users-scilab-5-4-0-plotting-does-not-work-on-HP-MINI-110-4125-with-Windows-7-Sarter-edition-tp4025240p4025242.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From klaus-rohe at t-online.de Thu Nov 15 18:45:12 2012 From: klaus-rohe at t-online.de (Klaus Rohe) Date: Thu, 15 Nov 2012 18:45:12 +0100 Subject: [Scilab-users] scilab 5.4.0 plotting does not work on HP MINI 110-4125 with Windows 7 Sarter edition In-Reply-To: <50A519B0.80503@scilab-enterprises.com> References: <000001cdc33f$dfe53970$9fafac50$@t-online.de> <50A519B0.80503@scilab-enterprises.com> Message-ID: <000f01cdc358$f670d320$e3527960$@t-online.de> Hi Sylvestre, here is information about the graphics card: Name Intel(R) Graphics Media Accelerator 3600 Series PNP-Ger?tekennung PCI\VEN_8086&DEV_0BE1&SUBSYS_338D103C&REV_09\3&11583659&0&10 Adaptertyp Intel(R) GMA 3600 Series (Atom N2600), Intel Corporation-kompatibel Adapterbeschreibung Intel(R) Graphics Media Accelerator 3600 Series Adapter-RAM Nicht verf?gbar Installierte Treiber igdumd32.dll Treiberversion 8.14.8.1065 INF-Datei oem12.inf (Abschnitt iCNT0) Farbebenen Nicht verf?gbar Farbtabelleneintr?ge 4294967296 Aufl?sung 1024 x 600 x 60 Hz Bits/Pixel 32 Speicheradresse 0x44000000-0x440FFFFF E/A-Port 0x000040D0-0x000040D7 IRQ-Kanal IRQ 4294967294 E/A-Port 0x000003B0-0x000003BB E/A-Port 0x000003C0-0x000003DF Speicheradresse 0xA0000-0xBFFFF Treiber c:\windows\system32\drivers\igdkmd32.sys (8.14.8.1065, 409,00 KB (418.816 Bytes), 30.12.2011 10:56) ============================================================================ ================ Here is the output of [a,b] = getdebuginfo(): -->[a,b] = getdebuginfo() b = !Version: scilab-5.4.0 ! ! ! !Compilation date: Sep 29 2012 ! ! ! !Compilation time: 00:40:07 ! ! ! !Compiler Architecture: x86 ! ! ! !Compiled with Microsoft compiler (160040219) ! ! ! !BLAS library optimized version: MKL ! ! ! !XML version: 2.7.7 ! ! ! !Tcl/Tk: Enable ! ! ! !TCL version: 8.5.9 ! ! ! !TK version: 8.5.9 ! ! ! !Path separator: ; ! ! ! !Directory separator: \ ! ! ! !PCRE Version: 8.21 ! a = !Memory in use: 92 % ! ! ! !Total Physical Memory (Kbytes): 1036596 ! ! ! !Free Physical Memory (Kbytes): 80992 ! ! ! !Total Paging File (Kbytes): 2085172 ! ! ! !Free Paging File (Kbytes): 839604 ! ! ! !Total Virtual Memory (Kbytes): 2097024 ! ! ! !Free Virtual Memory (Kbytes): 1487640 ! ! ! !Free Extended Memory (Kbytes): 0 ! ! ! !Operating System: Windows Seven ! ! ! !Intel(R) Atom(TM) CPU N2600 @ 1.60GHz ! ! ! !Number of processors: 4 ! ! ! !Number of Video cards: 1 ! ! ! !Video card #0: Intel(R) Graphics Media Accelerator 3600 Series ! ! ! !Primary Video card driver version: 8.14.8.1065 ! ! ! !Screen size: 1024 x 600 32 bits ! ! ! !Number of Monitors: 1 ! ! ! !Path: C:/Program Files/scilab-5.4.0/bin;C:\Program Files\Common Files\! ! Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\W! ! indows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;! ! C:\Program Files\Windows Live\Shared;C:\Program Files\Microsoft S! ! QL Server\110\Tools\Binn\ ! ! ! !ComSpec: C:\Windows\system32\cmd.exe ! ! ! !TMP : C:\Users\klrohe\AppData\Local\Temp ! ! ! !TEMP: C:\Users\klrohe\AppData\Local\Temp ! ! ! !TMPDIR: C:\Users\klrohe\AppData\Local\Temp\SCI_TMP_6024_ ! ! ! !WSCI: C:\Program Files\scilab-5.4.0 ! ! ! !SCIHOME: C:\Users\klrohe\AppData\Roaming\Scilab\scilab-5.4.0 Thanks and kind regards Klaus -----Urspr?ngliche Nachricht----- Von: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] Im Auftrag von Sylvestre Ledru Gesendet: Donnerstag, 15. November 2012 17:35 An: users at lists.scilab.org Betreff: Re: [Scilab-users] scilab 5.4.0 plotting does not work on HP MINI 110-4125 with Windows 7 Sarter edition On 15/11/2012 15:45, Klaus Rohe wrote: > Hi all, > > > > I have installed scilab 5.4.0 on a HP MINI 110-4125 with Windows 7 > Sarter edition and 1 GB of RAM. > > Scilab plotting does not work. I have attached a screen shot, showing > what happens I the plot2d demo is executed. > > I have tried other examples with plot2d getting the same results. > > > > What is going wrong here? Any hints how to fix it? We have some reports for Scilab graphics failing on some systems. For now, we have not been able to reproduce it on our systems. Could you let us know what is your graphic card and the result of [a,b] = getdebuginfo() Thanks, Sylvestre _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From werner.wurmbauer at aon.at Thu Nov 15 23:08:34 2012 From: werner.wurmbauer at aon.at (Werner Wurmbauer) Date: Thu, 15 Nov 2012 23:08:34 +0100 Subject: [Scilab-users] lookup_f, question from 28.Oct 2012 Message-ID: Concerning my question from 28.Oct 2012: The problem is solved easily. You just have to klick on "ok" in the edit menu of the lookup_f graphical editor as soon as you have drawn the data points. From lce at creativ-ceutical.com Fri Nov 16 10:37:51 2012 From: lce at creativ-ceutical.com (Laurent Cetinsoy) Date: Fri, 16 Nov 2012 10:37:51 +0100 Subject: [Scilab-users] Passing argument to function by reference Message-ID: <000c01cdc3de$0f70a910$2e51fb30$@com> Dear all, For a simulation, I need to update a matrix in a loop. The thing is, I only need to update a few rows. And since this code is to be used in different part, I would like to include it in a function. Beside I would like to avoid using ?global? variable. Here is it what I want to do : myMat = zeros(nrow, ncol) For I =1 :i_max fUpdateMat( reference myMat) etc end function fUpdateMat(Mat) Mat(2:3) = Mat(4) = Mat(10) = Etc end function I do not want to include this into a scrip (.sce) file and execute it with ?exec? because reading a written file in a loop slows down the computation greatly. I would be pleased if you have any suggestion. Regards, Laurent __________________________________ Laurent Cetinsoy Research Analyst Health Economics and Outcomes Research LOGO Q + CLAIM HD petite 215, rue du Faubourg St-Honor? 75008 Paris - France Phone: +33 1 76 70 47 90 Fax: +33 1 53 75 49 24 www.creativ-ceutical.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 2292 bytes Desc: not available URL: From paul.carrico at free.fr Sat Nov 17 23:30:14 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Sat, 17 Nov 2012 23:30:14 +0100 Subject: [Scilab-users] parallelization Message-ID: <000601cdc513$1df35830$59da0890$@carrico@free.fr> Dear all, Here is a basic function I would like to perform on a multicore architecture (the function is just to illustrate the issue) : - the inputs have been split into 18 sub-parts - 18*20 = 360? elementary Sherlock Thus : - How to use ?parallel_run? macro ? (not understood) - How to store the intermediate results into a final matrix ? has the chronology of writing can be imposed ? - 8 procs however 18 = 2*8 +2 troubles ? Thanks for any feedback / advice Paul // ##################################################################### mode(0); nb = 18; i = [1 : 1 : 20]'; j = [1 : 1 : 20]'; [nl,nc] = size(i) function vect_fct=fct_angles(i, j) vect_fct = [i j cos(i)+sin(j) -sin(j)]; endfunction //vect1 = zeros(nb*nl,4); vect1 = []; for k = 1 : nb vect1 = [vect1 ; fct_angles(nl*(k-1)+i([1: nl],1),nl*(k -1)+j([1: nl],1))]; end -------------- next part -------------- An HTML attachment was scrubbed... URL: From iai at axelspace.com Mon Nov 19 01:43:33 2012 From: iai at axelspace.com (Iai Masafumi ax) Date: Mon, 19 Nov 2012 09:43:33 +0900 Subject: [Scilab-users] profiling Message-ID: <50A980B5.9090606@axelspace.com> Hello, How do I prepare a function for profiling using ? The help page of says that "To use profile the Scilab function must have been prepared for profiling (see exec)." http://help.scilab.org/docs/5.4.0/en_US/profile.html But, in the help page of , nothing is mentioned about profiling. http://help.scilab.org/docs/5.4.0/en_US/exec.html (I noticed has an option for profiling. But I want to know how to do it with .) Thank you, Iai From paul.carrico at free.fr Mon Nov 19 08:24:51 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 19 Nov 2012 08:24:51 +0100 Subject: [Scilab-users] parallilization : error on opensuse Message-ID: <000301cdc626$f79ad9f0$e6d08dd0$@carrico@free.fr> Dear all When I launched one of the examples, I had the above error : is there something to install first ? I?ve not seen anything in the help page (nor into Atoms main page) ?. Paul A previous error has been detected while loading libsciparallel.so: ?T?[Min,Med,Max]=parallel_run(A,B,C,"min_med_max");// equivalent to the previous loop. !--error 999 Impossible de charger la biblioth?que libsciparallel.so : /home/paul/scilab-5.4.0/share/scilab/modules/parallel/.libs/libsciparallel.so: Ne peut ouvrir le fichier d'objet partag?: Aucun fichier ou dossier de ce type at line 37 of exec file called by : -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Mon Nov 19 10:51:24 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 19 Nov 2012 10:51:24 +0100 Subject: [Scilab-users] profiling In-Reply-To: <50A980B5.9090606@axelspace.com> References: <50A980B5.9090606@axelspace.com> Message-ID: <50AA011C.4010909@inria.fr> Now you can use the add_profiling function. Serge Steer Le 19/11/2012 01:43, Iai Masafumi ax a ?crit : > Hello, > ?crit : > How do I prepare a function for profiling using ? > > The help page of says that "To use profile the Scilab function > must have been prepared for profiling (see exec)." > http://help.scilab.org/docs/5.4.0/en_US/profile.html > > But, in the help page of , nothing is mentioned about profiling. > http://help.scilab.org/docs/5.4.0/en_US/exec.html > > (I noticed has an option for profiling. But I want to know how to > do it with .) > > Thank you, > Iai > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From iai at axelspace.com Mon Nov 19 11:01:58 2012 From: iai at axelspace.com (Iai Masafumi ax) Date: Mon, 19 Nov 2012 19:01:58 +0900 Subject: [Scilab-users] profiling In-Reply-To: <50AA011C.4010909@inria.fr> References: <50A980B5.9090606@axelspace.com> <50AA011C.4010909@inria.fr> Message-ID: <50AA0396.5060801@axelspace.com> Thank you, Serger. I occasionally come across unsatisfactory contents of the help. Is there any way to suggest improvements? Something like bugzilla, but for help contents? Iai (2012/11/19 18:51), Serge Steer wrote: > Now you can use the add_profiling function. > Serge Steer > > Le 19/11/2012 01:43, Iai Masafumi ax a ?crit : >> Hello, >> ?crit : >> How do I prepare a function for profiling using ? >> >> The help page of says that "To use profile the Scilab function >> must have been prepared for profiling (see exec)." >> http://help.scilab.org/docs/5.4.0/en_US/profile.html >> >> But, in the help page of , nothing is mentioned about profiling. >> http://help.scilab.org/docs/5.4.0/en_US/exec.html >> >> (I noticed has an option for profiling. But I want to know how to >> do it with .) >> >> Thank you, >> Iai >> >> _______________________________________________ >> 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 sylvestre.ledru at scilab-enterprises.com Mon Nov 19 11:08:43 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Mon, 19 Nov 2012 11:08:43 +0100 Subject: [Scilab-users] profiling In-Reply-To: <50AA0396.5060801@axelspace.com> References: <50A980B5.9090606@axelspace.com> <50AA011C.4010909@inria.fr> <50AA0396.5060801@axelspace.com> Message-ID: <50AA052B.9010002@scilab-enterprises.com> On 19/11/2012 11:01, Iai Masafumi ax wrote: > Thank you, Serger. > > I occasionally come across unsatisfactory contents of the help. Is there > any way to suggest improvements? Something like bugzilla, but for help > contents? Sure. Right here: http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages Don't hesitate to suggest improvements and/or examples. Sylvestre From paul.carrico at free.fr Mon Nov 19 15:08:14 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 19 Nov 2012 15:08:14 +0100 Subject: [Scilab-users] Vectorization : initiation of an e-mailing titurial Message-ID: <000301cdc65f$51e46dd0$f5ad4970$@carrico@free.fr> Dear all, Very recently, the need of coding fast became evident (and its necessity). Thus I?ve had a look in the documentations on the vectorization issue. Unfortunately few documents exist and explain how to develop vectorized codes. I had some helps and supports from the community, and the current document is a way to thanks those people this document (which is a personal reminder) has to be intended as a feedback, with more or less good/bad codes (depending of the point of view of each one). So please update this document with your own experiences, your improvements, and share it to the community hope this na?ve suggestion will echoed Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tutorial_vectorization_V0.0.sce Type: application/octet-stream Size: 9710 bytes Desc: not available URL: From withold.gregoritza at gmx.de Mon Nov 19 16:53:28 2012 From: withold.gregoritza at gmx.de (witkatz) Date: Mon, 19 Nov 2012 07:53:28 -0800 (PST) Subject: [Scilab-users] matlab d2c equivalent Message-ID: <50AA53D1.60501@gmx.de> Hi all, is there in scilab any possibility to convert from discrete to continuous transfer function? There is the cls2dls which convert from coninuous to discrete. But what about the approximation from discrete to continuous, just like d2c in matlab and octave? Any chance? thanks and regards witkatz -- View this message in context: http://mailinglists.scilab.org/matlab-d2c-equivalent-tp4025266.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From waqar.ahmadsiddiqui at gmail.com Mon Nov 19 18:05:31 2012 From: waqar.ahmadsiddiqui at gmail.com (Waqar Ahmad) Date: Mon, 19 Nov 2012 09:05:31 -0800 (PST) Subject: [Scilab-users] Need Code for Connecting Database. Message-ID: <1353344731590-4025267.post@n3.nabble.com> Can anyone help me.. I need code for connecting Database Ms Access through SCI Lab. -- View this message in context: http://mailinglists.scilab.org/Need-Code-for-Connecting-Database-tp4025267.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From iai at axelspace.com Mon Nov 19 23:09:25 2012 From: iai at axelspace.com (Iai Masafumi ax) Date: Tue, 20 Nov 2012 07:09:25 +0900 Subject: [Scilab-users] profiling In-Reply-To: <50AA052B.9010002@scilab-enterprises.com> References: <50A980B5.9090606@axelspace.com> <50AA011C.4010909@inria.fr> <50AA0396.5060801@axelspace.com> <50AA052B.9010002@scilab-enterprises.com> Message-ID: <50AAAE15.3060006@axelspace.com> "Documentation pages" is the one! I did not notice it. Thank you Iai (2012/11/19 19:08), Sylvestre Ledru wrote: > On 19/11/2012 11:01, Iai Masafumi ax wrote: >> Thank you, Serger. >> >> I occasionally come across unsatisfactory contents of the help. Is there >> any way to suggest improvements? Something like bugzilla, but for help >> contents? > Sure. Right here: > http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages > > Don't hesitate to suggest improvements and/or examples. > > Sylvestre > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From mathieu.dubois at limsi.fr Tue Nov 20 01:35:21 2012 From: mathieu.dubois at limsi.fr (Mathieu Dubois) Date: Tue, 20 Nov 2012 01:35:21 +0100 Subject: [Scilab-users] Passing argument to function by reference In-Reply-To: <000c01cdc3de$0f70a910$2e51fb30$@com> References: <000c01cdc3de$0f70a910$2e51fb30$@com> Message-ID: <6f42fcaada9d796a5b65cdb7daa023e0@limsi.fr> Hello, I don't think that scilab has call by reference. Maybe I misunderstood your problem but the function could return the updated matrix and you replace the old value with the new one it in the loop. If you know which columns you will update you can use block assignment to avoid passing large matrices. HTH, Mathieu Le 16/11/2012 10:37, Laurent Cetinsoy a ?crit : > Dear all, > > For a simulation, I need to update a matrix in a loop. The thing is, > I > only need to update a few rows. And since this code is to be used in > different part, I would like to include it in a function. Beside I > would > like to avoid using ?global? variable. > > Here is it what I want to do : > > myMat = zeros(nrow, ncol) > > For I =1 :i_max > > fUpdateMat( reference myMat) > > etc? > > end > > function fUpdateMat(Mat) > > Mat(2:3) = ? > > Mat(4) = ? > > Mat(10) = ? > > Etc? > > end function > > I do not want to include this into a scrip (.sce) file and execute it > with ?exec? because reading a written file in a loop slows down the > computation greatly. > > I would be pleased if you have any suggestion. > > Regards, > > Laurent > > __________________________________ > > *Laurent Cetinsoy*** > > /Research Analyst/ > > /Health Economics and Outcomes Research/ > > LOGO Q + CLAIM HD petite > > 215, rue du Faubourg St-Honor? > > 75008 Paris - France > > Phone: +33 1 76 70 47 90 > > Fax: +33 1 53 75 49 24 > > www.creativ-ceutical.com __ > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From mathieu.dubois at limsi.fr Tue Nov 20 01:46:14 2012 From: mathieu.dubois at limsi.fr (Mathieu Dubois) Date: Tue, 20 Nov 2012 01:46:14 +0100 Subject: [Scilab-users] Vectorization : initiation of an e-mailing titurial In-Reply-To: <000301cdc65f$51e46dd0$f5ad4970$@carrico@free.fr> References: <000301cdc65f$51e46dd0$f5ad4970$@carrico@free.fr> Message-ID: <5896fc1d3541f8432828ad0f7efa4b59@limsi.fr> Hello, Thanks Paul for your idea it's always interesting to have recipes. I have briefly look at the code and it seems well structured (I didn't run it). Maybe this document would be more useful on scilab wiki: http://wiki.scilab.org/. That would help collaboration and version control. Mathieu Le 19/11/2012 15:08, Paul Carrico a ?crit : > Dear all, > > Very recently, the need of coding fast became evident (and its > necessity). Thus I?ve had a look in the documentations on the > vectorization issue. Unfortunately few documents exist and explain > how > to develop vectorized codes. > > I had some helps and supports from the community, and the current > document is a way to thanks those people ? > > ? this document (which is a personal reminder) has to be intended as > a > feedback, with more or less good/bad codes (depending of the point of > view of each one). > > So please update this document with your own experiences, your > improvements, and share it to the community ? > > ? hope this na?ve suggestion will echoed > > Regards > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From emmanuel.bakare at fuoye.edu.ng Tue Nov 20 10:44:33 2012 From: emmanuel.bakare at fuoye.edu.ng (Emmanuel Bakare) Date: Tue, 20 Nov 2012 10:44:33 +0100 Subject: [Scilab-users] question Message-ID: Dear Lovely ones, I have been working on Optimal control using Runge kutta for a systems of five differential equations and the plot has not been visualized.It did not run. What can i do? Bakare Emmanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas.reichlin.lists at gmail.com Tue Nov 20 10:54:04 2012 From: lukas.reichlin.lists at gmail.com (Lukas Reichlin) Date: Tue, 20 Nov 2012 10:54:04 +0100 Subject: [Scilab-users] Custom Blocks in Xcos, linked, not copied into models Message-ID: <27F005F4-CC82-4493-A68A-D5BC3B104F5C@gmail.com> Dear Scilab Community I would like to create custom blocks (out of standard Xcos blocks) in Xcos, save them into a file and add them to the Xcos palette browser. If I use these custom blocks, no copies must be made, only links to the original block in the palette. If I change the block in the palette browser, all models using this block should be updated automatically to the new version of the custom block. How can I do this? Thanks in advance for any help and best regards, Lukas From clement.david at scilab-enterprises.com Tue Nov 20 11:19:26 2012 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Tue, 20 Nov 2012 11:19:26 +0100 Subject: [Scilab-users] Custom Blocks in Xcos, linked, not copied into models In-Reply-To: <27F005F4-CC82-4493-A68A-D5BC3B104F5C@gmail.com> References: <27F005F4-CC82-4493-A68A-D5BC3B104F5C@gmail.com> Message-ID: <1353406766.2041.17.camel@paros> Hello, You can define your own block using the xcosPal* functions. A complete toolbox example is provided with Scilab (SCI/contrib/xcos_toolbox_skeleton). As it is your own blocks, you can use references to meta blocks but *take care* such behavior is not the standard Xcos one and may probably confuse users. An upgrade path from version to version should also be well defined. Le mardi 20 novembre 2012 ? 10:54 +0100, Lukas Reichlin a ?crit : > Dear Scilab Community > > I would like to create custom blocks (out of standard Xcos blocks) in Xcos, save them into a file and add them to the Xcos palette browser. If I use these custom blocks, no copies must be made, only links to the original block in the palette. If I change the block in the palette browser, all models using this block should be updated automatically to the new version of the custom block. > > How can I do this? > > Thanks in advance for any help and > best regards, > Lukas > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Cl?ment DAVID Development Engineer / Account Manager ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Mobile: +33.6.26.26.51.90 Phone: +33.2.90.22.78.96 http://www.scilab-enterprises.com From muhammadjabaka at gmail.com Tue Nov 20 10:43:09 2012 From: muhammadjabaka at gmail.com (Muhammad Lawali) Date: Tue, 20 Nov 2012 10:43:09 +0100 Subject: [Scilab-users] Network Topology Message-ID: I am a newbie in scilab 5.4.0. How can I generate network topology for study of Mobile Ad hoc Network? Thanks Lawali Jabaka -------------- next part -------------- An HTML attachment was scrubbed... URL: From chukonvilla at yahoo.com Tue Nov 20 11:29:12 2012 From: chukonvilla at yahoo.com (chukonvilla at yahoo.com) Date: Tue, 20 Nov 2012 10:29:12 +0000 Subject: [Scilab-users] New to scilab Message-ID: <510121.82818.bm@smtp112-mob.biz.mail.ird.yahoo.com> Am a new scilab user, how best do i learn fast. From withold.gregoritza at gmx.de Tue Nov 20 12:42:09 2012 From: withold.gregoritza at gmx.de (witkatz) Date: Tue, 20 Nov 2012 03:42:09 -0800 (PST) Subject: [Scilab-users] New to scilab In-Reply-To: <510121.82818.bm@smtp112-mob.biz.mail.ird.yahoo.com> References: <510121.82818.bm@smtp112-mob.biz.mail.ird.yahoo.com> Message-ID: <1353411729644-4025277.post@n3.nabble.com> The best way ist learning by doing. Just install and try out... You can find an introduction to scilab and a lot of tutorials and documentations on Scilab Wiki: http://wiki.scilab.org/Tutorials -- View this message in context: http://mailinglists.scilab.org/Scilab-users-New-to-scilab-tp4025276p4025277.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From papriwalprateek at gmail.com Tue Nov 20 13:21:15 2012 From: papriwalprateek at gmail.com (prateek papriwal) Date: Tue, 20 Nov 2012 17:51:15 +0530 Subject: [Scilab-users] New to scilab In-Reply-To: <1353411729644-4025277.post@n3.nabble.com> References: <510121.82818.bm@smtp112-mob.biz.mail.ird.yahoo.com> <1353411729644-4025277.post@n3.nabble.com> Message-ID: U can learn more by trying out things. And also u can find offline help/documentation through scilab software by typing help command in console. On Tue, Nov 20, 2012 at 5:12 PM, witkatz wrote: > The best way ist learning by doing. Just install and try out... > You can find an introduction to scilab and a lot of tutorials and > documentations on Scilab Wiki: http://wiki.scilab.org/Tutorials > > > > > -- > View this message in context: > http://mailinglists.scilab.org/Scilab-users-New-to-scilab-tp4025276p4025277.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 > -- Thanks and Regards Prateek Papriwal B.Tech, Electrical IIT Delhi -------------- next part -------------- An HTML attachment was scrubbed... URL: From papriwalprateek at gmail.com Tue Nov 20 13:26:47 2012 From: papriwalprateek at gmail.com (prateek papriwal) Date: Tue, 20 Nov 2012 17:56:47 +0530 Subject: [Scilab-users] Network Topology In-Reply-To: References: Message-ID: Install Network Topology Generator http://atoms.scilab.org/toolboxes/NTG Try from console ---> atomsInstall('NTG','3.0') On Tue, Nov 20, 2012 at 3:13 PM, Muhammad Lawali wrote: > I am a newbie in scilab 5.4.0. How can I generate network topology for > study of Mobile Ad hoc Network? > > Thanks > > Lawali Jabaka > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- Thanks and Regards Prateek Papriwal B.Tech, Electrical IIT Delhi -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Nov 20 14:34:14 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Tue, 20 Nov 2012 14:34:14 +0100 Subject: [Scilab-users] Vectorization : how to proceed Message-ID: <000001cdc723$bc0d3f60$3427be20$@carrico@free.fr> Dear All In the above example, how can I proceed to perform the product (see function fct_angles2) ? Indeed, theta are 2 vectors, so no problem for the fct_angles . but in case of product, it's naturally not work !!! what is the correct syntax in order to use vectorization ? Thanks Paul ###################################################### mode(0) function vect_fct=fct_angles(i, j) vect_fct = [cos(i)+sin(j) -sin(j) i j]; endfunction function vect_fct2=fct_angles2(i, j) vect_fct = [cos(i)*sin(j) -sin(j) i j]; endfunction B1 = zeros(130321,4); theta_vect = (0:360)'.*.ones(361,1); fi_vect = (ones(361,1)'.*.[0:360])'; B1 = fct_angles(theta_vect([1:130321],1),fi_vect([1:130321],1)); B2 = fct_angles2(theta_vect([1:130321],1),fi_vect([1:130321],1)); -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Nov 20 17:28:19 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Tue, 20 Nov 2012 17:28:19 +0100 Subject: [Scilab-users] Vectorization : how to proceed In-Reply-To: <000001cdc723$bc0d3f60$3427be20$@carrico@free.fr> References: <000001cdc723$bc0d3f60$3427be20$@carrico@free.fr> Message-ID: <000601cdc73c$0d9f20b0$28dd6210$@carrico@free.fr> Finally I think I?ve found how to proceed .. at the same time I think I understood the use of the dot ?.? (see after the cos) Paul ################################################### function vect_fct=fct_angles(i, j) vect_fct3 = [ (cos(i). * sin(j) ) (-sin(j)) i j]; endfunction B = zeros(130321,4); theta_vect = (0:360)'.*.ones(361,1); fi_vect = (ones(361,1)'.*.[0:360])'; B = fct_angles3(theta_vect([1:130321],1),fi_vect([1:130321],1)); De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Paul Carrico Envoy? : mardi 20 novembre 2012 14:34 ? : 'International users mailing list for Scilab.' Objet : [Scilab-users] Vectorization : how to proceed Dear All In the above example, how can I proceed to perform the product (see function fct_angles2) ? Indeed, theta are 2 vectors, so no problem for the fct_angles but in case of product, it?s naturally not work !!! what is the correct syntax in order to use vectorization ? Thanks Paul ###################################################### mode(0) function vect_fct=fct_angles(i, j) vect_fct = [cos(i)+sin(j) -sin(j) i j]; endfunction function vect_fct2=fct_angles2(i, j) vect_fct = [cos(i)*sin(j) -sin(j) i j]; endfunction B1 = zeros(130321,4); theta_vect = (0:360)'.*.ones(361,1); fi_vect = (ones(361,1)'.*.[0:360])'; B1 = fct_angles(theta_vect([1:130321],1),fi_vect([1:130321],1)); B2 = fct_angles2(theta_vect([1:130321],1),fi_vect([1:130321],1)); -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Tue Nov 20 18:29:05 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 20 Nov 2012 18:29:05 +0100 Subject: [Scilab-users] question In-Reply-To: References: Message-ID: <50ABBDE1.3040405@inria.fr> On 20/11/2012 10:44, Emmanuel Bakare wrote: > for a systems of five differential equations and the plot has > not been visualized.It did not run. > What can i do? > Bakare Emmanuel Sorry, but it is diffucult to give a precise answer with so few elements. Can you post a code that exhibits the problem you have? Serge Steer From Serge.Steer at inria.fr Tue Nov 20 18:36:42 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 20 Nov 2012 18:36:42 +0100 Subject: [Scilab-users] Vectorization : how to proceed In-Reply-To: <000601cdc73c$0d9f20b0$28dd6210$@carrico@free.fr> References: <000001cdc723$bc0d3f60$3427be20$@carrico@free.fr> <000601cdc73c$0d9f20b0$28dd6210$@carrico@free.fr> Message-ID: <50ABBFAA.7040502@inria.fr> On 20/11/2012 17:28, Paul Carrico wrote: > > Finally I think I've found how to proceed .. at the same time I think > I understood the use of the dot "." (see after the cos) > You are right, but take care that your code will work if and only if at least one of i or j are scalars. If you want your code being able to work when i and j are vectors you can use the kronecker product .*. function*vect_fct*=_fct_angles_(*i*, *j*) i=i(:);j=j(:); //transform i and j into column vectors *vect_fct3* = [ (cos(*i*)*.***.*sin(*j*) ), (-ones(i)*.***.*sin(*j*)), *i***.***.ones(j)**,***ones(i)*.***.** *j*]; endfunction Serge Steer > > Paul > > ################################################### > > function*vect_fct*=_fct_angles_(*i*, *j*) > > *vect_fct3* = [ (cos(*i*)*.** sin(*j*) ) (-sin(*j*)) *i* *j*]; > > endfunction > > B= zeros(130321,4); > > theta_vect= (0:360)'.*.ones(361,1); > > fi_vect= (ones(361,1)'.*.[0:360])'; > > B= fct_angles3(theta_vect([1:130321],1),fi_vect([1:130321],1)); > > *De :*users-bounces at lists.scilab.org > > [mailto:users-bounces at lists.scilab.org] *De la part de* Paul Carrico > *Envoy? :* mardi 20 novembre 2012 14:34 > *? :* 'International users mailing list for Scilab.' > *Objet :*[Scilab-users] Vectorization : how to proceed > > Dear All > > In the above example, how can I proceed to perform the product (see > function fct_angles2) ? > > Indeed, theta are 2 vectors, so no problem for the fct_angles ... but > in case of product, it's naturally not work !!! what is the correct > syntax in order to use vectorization ? > > Thanks > > Paul > > ###################################################### > > mode(0) > > function *vect_fct*=_fct_angles_(*i*, *j*) > > *vect_fct* = [cos(*i*)+sin(*j*) -sin(*j*) *i* *j*]; > > endfunction > > function *vect_fct2*=_fct_angles2_(*i*, *j*) > > vect_fct = [cos(*i*)*sin(*j*) -sin(*j*) *i* *j*]; > > endfunction > > B1 = zeros(130321,4); > > theta_vect = (0:360)'.*.ones(361,1); > > fi_vect = (ones(361,1)'.*.[0:360])'; > > B1 = _fct_angles_(theta_vect([1:130321],1),fi_vect([1:130321],1)); > > B2 = _fct_angles2_(theta_vect([1:130321],1),fi_vect([1:130321],1)); > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Nov 20 19:05:16 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Tue, 20 Nov 2012 19:05:16 +0100 Subject: [Scilab-users] Vectorization : how to proceed In-Reply-To: <50ABBFAA.7040502@inria.fr> References: <000001cdc723$bc0d3f60$3427be20$@carrico@free.fr> <000601cdc73c$0d9f20b0$28dd6210$@carrico@free.fr> <50ABBFAA.7040502@inria.fr> Message-ID: <001501cdc749$995c3770$cc14a650$@carrico@free.fr> Deer Serge, Effectively it?s cleaner (and faster) to use directly vectors as arguments see above B3 = list in arguments B4 = vector in argument Thanks for the recipe I need to modify my code LJ Paul /// classical function function vect_fct2=fct_angles2(i, j) vect_fct2 = [ (cos(i) * sin(j) ) (-sin(j)) i j]; endfunction // vectorized function function vect_fct3=fct_angles3(i, j) vect_fct3 = [ (cos(i). * sin(j) ) (-sin(j)) i j]; endfunction function vect_fc4t=fct_angles4(i, j) i=i(:);j=j(:); //transform i and j into column vectors vect_fct4 = [ (cos(i). *.sin(j) ), (-ones(i). *.sin(j)), i. *.ones(j), ones(i). *. j]; endfunction // traditional with loops B2 = zeros(130321,4); n = 1 tic() for i = 0 : 360 for j = 0 : 360 B2(n,:) = fct_angles2(i,j); n = n +1; end end time_with_loops = toc() // vectorized 1 B3 = zeros(130321,4); theta_vect = (0:360)'.*.ones(361,1); fi_vect = (ones(361,1)'.*.[0:360])'; tic() B3 = fct_angles3(theta_vect([1:130321],1),fi_vect([1:130321],1)); time_vectorization = toc() max(abs(B2 - B3)) // vectorized 2 tic() B4 = zeros(130321,4); B4 = fct_angles3(theta_vect,fi_vect); time2_vectorization = toc() max(abs(B4 - B3)) De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Serge Steer Envoy? : mardi 20 novembre 2012 18:37 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] Vectorization : how to proceed On 20/11/2012 17:28, Paul Carrico wrote: Finally I think I?ve found how to proceed .. at the same time I think I understood the use of the dot ?.? (see after the cos) You are right, but take care that your code will work if and only if at least one of i or j are scalars. If you want your code being able to work when i and j are vectors you can use the kronecker product .*. function vect_fct=fct_angles(i, j) i=i(:);j=j(:); //transform i and j into column vectors vect_fct3 = [ (cos(i). *.sin(j) ), (-ones(i). *.sin(j)), i. *.ones(j), ones(i). *. j]; endfunction Serge Steer Paul ################################################### function vect_fct=fct_angles(i, j) vect_fct3 = [ (cos(i). * sin(j) ) (-sin(j)) i j]; endfunction B = zeros(130321,4); theta_vect = (0:360)'.*.ones(361,1); fi_vect = (ones(361,1)'.*.[0:360])'; B = fct_angles3(theta_vect([1:130321],1),fi_vect([1:130321],1)); De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Paul Carrico Envoy? : mardi 20 novembre 2012 14:34 ? : 'International users mailing list for Scilab.' Objet : [Scilab-users] Vectorization : how to proceed Dear All In the above example, how can I proceed to perform the product (see function fct_angles2) ? Indeed, theta are 2 vectors, so no problem for the fct_angles but in case of product, it?s naturally not work !!! what is the correct syntax in order to use vectorization ? Thanks Paul ###################################################### mode(0) function vect_fct=fct_angles(i, j) vect_fct = [cos(i)+sin(j) -sin(j) i j]; endfunction function vect_fct2=fct_angles2(i, j) vect_fct = [cos(i)*sin(j) -sin(j) i j]; endfunction B1 = zeros(130321,4); theta_vect = (0:360)'.*.ones(361,1); fi_vect = (ones(361,1)'.*.[0:360])'; B1 = fct_angles(theta_vect([1:130321],1),fi_vect([1:130321],1)); B2 = fct_angles2(theta_vect([1:130321],1),fi_vect([1:130321],1)); _______________________________________________ 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 Nov 20 20:02:49 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 20 Nov 2012 20:02:49 +0100 Subject: [Scilab-users] Vectorization : initiation of an e-mailing titurial In-Reply-To: <5896fc1d3541f8432828ad0f7efa4b59@limsi.fr> References: <000301cdc65f$51e46dd0$f5ad4970$@carrico@free.fr> <5896fc1d3541f8432828ad0f7efa4b59@limsi.fr> Message-ID: <50ABD3D9.2030001@free.fr> Le 20/11/2012 01:46, Mathieu Dubois a ?crit : > Hello, > > Thanks Paul for your idea it's always interesting to have recipes. I > have briefly look at the code and it seems well structured (I didn't > run it). > > Maybe this document would be more useful on scilab wiki: > http://wiki.scilab.org/. That would help collaboration and version > control. fileexchange would also be a proper place for Paul to post the script, for instance in the Documentation or Education categories. fileexchange actually allows versionning. Samuel From Alexis.Gautier at InergyAutomotive.com Tue Nov 20 21:20:32 2012 From: Alexis.Gautier at InergyAutomotive.com (Gautier, Alexis) Date: Tue, 20 Nov 2012 20:20:32 +0000 Subject: [Scilab-users] fscanfMat limitations/failure function Message-ID: <16CF997F91542246A41F67E49270D5DD5BFFBEA6@IN-PRD-MBX01.inapps.inergyautomotive.com> Hello, I need to post treat data from a data logger (temperatures, strains, etc). Raw data are in a txt file with numbers and Tabulation column separator. File size can goes up to 100 Mb (> 400.000 lines) I use "fscanfMat" function to read the raw data file before post treatment and most of time Scilab display this: D=fscanfMat(F1); !--error 999 fscanfMat: Memory allocation error. at line 8 of exec file called by : But sometimes (after several Scilab close/opening), complete program is OK and post treatment is performed. I use also stacksize('max') ==> What are the Scilab limitations about txt file reading? ==> Could it be possible to increase this capacity Thanks in advance for your feedback. Best regards, Alexis Gautier Architecture System & Components Mechatronics Development PhD Engineer Inergy Automotive Systems -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Nov 20 22:00:06 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Tue, 20 Nov 2012 22:00:06 +0100 Subject: [Scilab-users] fscanfMat limitations/failure function In-Reply-To: <16CF997F91542246A41F67E49270D5DD5BFFBEA6@IN-PRD-MBX01.inapps.inergyautomotive.com> References: <16CF997F91542246A41F67E49270D5DD5BFFBEA6@IN-PRD-MBX01.inapps.inergyautomotive.com> Message-ID: <001b01cdc762$05f4bca0$11de35e0$@carrico@free.fr> You can use csvRead (Atoms package) in order to read huge ascii files it?s a more powerfull and a faster alternative to fscanMat Paul De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Gautier, Alexis Envoy? : mardi 20 novembre 2012 21:21 ? : users at lists.scilab.org Objet : [Scilab-users] fscanfMat limitations/failure function Hello, I need to post treat data from a data logger (temperatures, strains, etc). Raw data are in a txt file with numbers and Tabulation column separator. File size can goes up to 100 Mb (> 400.000 lines) I use ?fscanfMat? function to read the raw data file before post treatment and most of time Scilab display this: D=fscanfMat(F1); !--error 999 fscanfMat: Memory allocation error. at line 8 of exec file called by : But sometimes (after several Scilab close/opening), complete program is OK and post treatment is performed. I use also stacksize('max?) ? What are the Scilab limitations about txt file reading? ? Could it be possible to increase this capacity Thanks in advance for your feedback. Best regards, Alexis Gautier Architecture System & Components Mechatronics Development PhD Engineer Inergy Automotive Systems -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Wed Nov 21 00:53:43 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Wed, 21 Nov 2012 00:53:43 +0100 Subject: [Scilab-users] fscanfMat limitations/failure function In-Reply-To: <001b01cdc762$05f4bca0$11de35e0$@carrico@free.fr> References: <16CF997F91542246A41F67E49270D5DD5BFFBEA6@IN-PRD-MBX01.inapps.inergyautomotive.com> <001b01cdc762$05f4bca0$11de35e0$@carrico@free.fr> Message-ID: <50AC1807.4060202@scilab-enterprises.com> On 20/11/2012 22:00, Paul Carrico wrote: > You can use csvRead (Atoms package) in order to read huge ascii files ? > it?s a more powerfull and a faster alternative to fscanMat ? Just to make thing clear, csvRead is included by default in 5.4.0. In previous version, it is csv_read through the ATOMS module [1] ;) Sylvestre [1] http://atoms.scilab.org/toolboxes/csv_readwrite From withold.gregoritza at gmx.de Tue Nov 20 21:41:45 2012 From: withold.gregoritza at gmx.de (witkatz) Date: Tue, 20 Nov 2012 12:41:45 -0800 (PST) Subject: [Scilab-users] =?utf-8?b?VFLCoDogIHJlYWRfY3N2IGlzc3Vl?= In-Reply-To: References: Message-ID: <1353444105928-4025288.post@n3.nabble.com> you could just try the following: -->fscanfMat('myfile') ans = 1. 5. 2.369 1. 5. 2.369 1. 5. 2.369 1. 5. 2.369 1. 5. 2.369 1. 5. 2.369 1. 5. 2.369 1. 5. 2.369 1. 5. 2.369 regards witkatz -- View this message in context: http://mailinglists.scilab.org/Scilab-users-TR-read-csv-issue-tp4025218p4025288.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From paul.carrico at free.fr Wed Nov 21 08:20:20 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Wed, 21 Nov 2012 08:20:20 +0100 Subject: [Scilab-users] fscanfMat limitations/failure function In-Reply-To: <50AC1807.4060202@scilab-enterprises.com> References: <16CF997F91542246A41F67E49270D5DD5BFFBEA6@IN-PRD-MBX01.inapps.inergyautomotive.com> <001b01cdc762$05f4bca0$11de35e0$@carrico@free.fr> <50AC1807.4060202@scilab-enterprises.com> Message-ID: <000001cdc7b8$aac3c900$004b5b00$@carrico@free.fr> Hummm .... from memory I needed to install csv_readwrite Atoms package in order to use csvRead enven for the last release ... but maybe I'm mistaken Paul -----Message d'origine----- De?: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Sylvestre Ledru Envoy??: mercredi 21 novembre 2012 00:54 ??: users at lists.scilab.org Objet?: Re: [Scilab-users] fscanfMat limitations/failure function On 20/11/2012 22:00, Paul Carrico wrote: > You can use csvRead (Atoms package) in order to read huge ascii files > it?s a more powerfull and a faster alternative to fscanMat Just to make thing clear, csvRead is included by default in 5.4.0. In previous version, it is csv_read through the ATOMS module [1] ;) Sylvestre [1] http://atoms.scilab.org/toolboxes/csv_readwrite _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From araditiya at gmail.com Wed Nov 21 07:35:41 2012 From: araditiya at gmail.com (Arif) Date: Wed, 21 Nov 2012 13:35:41 +0700 Subject: [Scilab-users] Neural network model at SCILAB Message-ID: Dear all, Could you give me like tutorial for make neural network model at SCILAB ? I'm sorry, usually I use Matlab, but I want change to FOSS for my research. Thanks Arif Aditiya Postgraduate Students of School of Computer Science, Jakarta -- ********************** Best Wishes Arif -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Wed Nov 21 08:50:43 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Wed, 21 Nov 2012 08:50:43 +0100 Subject: [Scilab-users] EXCEPTION_ACCESS_VIOLATION error Message-ID: <000701cdc7bc$e9bb07a0$bd3116e0$@carrico@free.fr> All, I had the following error : -->i=[1:130321]'; -->size(i) ans = 130321. 1. -->j=[1:130321]'; -->size(i.*.ones(j)) Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION) with "kron" function. Save your data and restart Scilab. ans = 130321. 1. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Wed Nov 21 09:52:19 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Wed, 21 Nov 2012 09:52:19 +0100 Subject: [Scilab-users] EXCEPTION_ACCESS_VIOLATION error In-Reply-To: <000701cdc7bc$e9bb07a0$bd3116e0$@carrico@free.fr> References: <000701cdc7bc$e9bb07a0$bd3116e0$@carrico@free.fr> Message-ID: <50AC9643.9040806@scilab-enterprises.com> Hello Paul, On 21/11/2012 08:50, Paul Carrico wrote: > All, > > > > I had the following error : > Warning !!! > > Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION) > > with "kron" function. > > Save your data and restart Scilab. This is ugly. I can reproduce the problem under GNU/Linux with the current 5.4. I reported a bug: http://bugzilla.scilab.org/show_bug.cgi?id=12089 Thanks, Sylvestre From Serge.Steer at inria.fr Wed Nov 21 11:04:12 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 21 Nov 2012 11:04:12 +0100 Subject: [Scilab-users] EXCEPTION_ACCESS_VIOLATION error In-Reply-To: <000701cdc7bc$e9bb07a0$bd3116e0$@carrico@free.fr> References: <000701cdc7bc$e9bb07a0$bd3116e0$@carrico@free.fr> Message-ID: <50ACA71C.3000106@inria.fr> take care that i.*.ones(j) generates a vector of size 130321^2 which is near 2^34. With the current Scilab, the array dimensions (ans pointers) are stored in 32 bits integers. The crash is probably due to a missing test on dimensions in the kronecker product gateway. Butindependently of that you wont be able to generate such a huge vector. May be you have to think about batch processing. Serge On 21/11/2012 08:50, Paul Carrico wrote: > > All, > > I had the following error : > > -->i=[1:130321]'; > > -->size(i) > > ans = > > 130321. 1. > > -->j=[1:130321]'; > > -->size(i.*.ones(j)) > > Warning !!! > > Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION) > > with "kron" function. > > Save your data and restart Scilab. > > ans = > > 130321. 1. > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From pepp88e at virgilio.it Wed Nov 21 17:49:43 2012 From: pepp88e at virgilio.it (pepp88e at virgilio.it) Date: Wed, 21 Nov 2012 17:49:43 +0100 (CET) Subject: [Scilab-users] Scilab on Win8 Message-ID: <13b23e00892.pepp88e@virgilio.it> Hi, im a italian student who want know if scilab running on window 8 because on official site doesn't wrote it! thank you for your possible answer! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Matthias.Frei at ferag.com Thu Nov 22 09:14:58 2012 From: Matthias.Frei at ferag.com (Frei Matthias) Date: Thu, 22 Nov 2012 09:14:58 +0100 Subject: [Scilab-users] Bug 6737 Message-ID: <64F9FFF64DC7DD4884B0AB82AA8E83B7838A6F@srhw8120.ferag.com> Hi, I've seen the bug report http://bugzilla.scilab.org/show_bug.cgi?id=6737. The report is 2 years old, can we still hope it will be fixed? Thanks, Matthias ferag... Ferag AG Matthias Frei Forschung & Entwicklung Z?richstrasse 74 CH-8340 Hinwil Telefon +41 44 938 65 86 matthias.frei at ferag.com www.ferag.com This message is intended only for []. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Thu Nov 22 15:48:32 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Thu, 22 Nov 2012 15:48:32 +0100 Subject: [Scilab-users] vectoriztion and sets of data Message-ID: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> Dear All, On the above example, it should be possible to select a sets of rows, should not ? if so how please ? Thanks Paul ################################################### mode(0) // initial matrix A = rand(8,6); B = zeros(8,6); C = [A ; A; B; A; B; B; A]; [nr,nc] = size(C); // each set of 8 rows is analysed Search = zeros((nr/8),1); //i = ones((nr/8),1).* 1; i = [1:(nr/8)]'; // Search = max(abs(C((8*(i - 1) + 1):(8 * i),:))); Search = max(abs(C([i. * 8 - 7 : i. * 8],:))); B = (find(Search == 0))'; D = zeros((nr/8),1); D(B,2) = 1; -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt at centre-cired.fr Thu Nov 22 15:54:15 2012 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Thu, 22 Nov 2012 15:54:15 +0100 Subject: [Scilab-users] vectoriztion and sets of data In-Reply-To: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> References: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> Message-ID: <50AE3C97.8010302@centre-cired.fr> On 22/11/2012 15:48, Paul Carrico wrote: > > Dear All, > > On the above example, it should be possible to select a sets of rows, > should not ? if so how please ? > > Thanks > > Paul > Hi Didn't understand your question, have a look at this: A=[1:10]'*2 rows = [1;6;2] B=zeros(A) B(rows) = A(rows) hope this helps > ################################################### > > mode(0) > > /// initial matrix/ > A = rand(8,6); > B = zeros(8,6); > C = [A ; A; B; A; B; B; A]; > [nr,nc] = size(C); > > /// each set of 8 rows is analysed/ > Search = zeros((nr/8),1); > ///i = ones((nr/8),1).* 1;/ > i = [1:(nr/8)]'; > /// Search = max(abs(C((8*(i - 1) + 1):(8 * i),:)));/ > Search = max(abs(C([i. * 8 - 7 :i. * 8],:))); > B = (find(Search == 0))'; > > D = zeros((nr/8),1); > D(B,2) = 1; > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Thu Nov 22 16:06:58 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Thu, 22 Nov 2012 16:06:58 +0100 Subject: [Scilab-users] vectoriztion and sets of data In-Reply-To: <50AE3C97.8010302@centre-cired.fr> References: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> <50AE3C97.8010302@centre-cired.fr> Message-ID: <001701cdc8c3$056deb00$1049c100$@carrico@free.fr> The original code looked like I?m trying to optimized it (ok for the ?if?, but how to combine a set of data and vectorization (??? Many trials but I failed) // initial matrix A = rand(8,6); B = zeros(8,6); C = [A ; A; B; A; B; B; A]; [nr,nc] = size(C); // original code looks like D = zeros((nr/8),1); for i = 1 : (nr/8) search = max(abs(C((8*(i-1)+1):(8*i),:))); if (search > 0) then D(i,1) = 1; else D(i,1) = 0; end end De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Adrien Vogt-Schilb Envoy? : jeudi 22 novembre 2012 15:54 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] vectoriztion and sets of data On 22/11/2012 15:48, Paul Carrico wrote: Dear All, On the above example, it should be possible to select a sets of rows, should not ? if so how please ? Thanks Paul Hi Didn't understand your question, have a look at this: A=[1:10]'*2 rows = [1;6;2] B=zeros(A) B(rows) = A(rows) hope this helps ################################################### mode(0) // initial matrix A = rand(8,6); B = zeros(8,6); C = [A ; A; B; A; B; B; A]; [nr,nc] = size(C); // each set of 8 rows is analysed Search = zeros((nr/8),1); //i = ones((nr/8),1).* 1; i = [1:(nr/8)]'; // Search = max(abs(C((8*(i - 1) + 1):(8 * i),:))); Search = max(abs(C([i. * 8 - 7 : i. * 8],:))) ; B = (find(Search == 0))'; D = zeros((nr/8),1); D(B,2) = 1; _______________________________________________ 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 Nov 22 16:12:03 2012 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Thu, 22 Nov 2012 16:12:03 +0100 Subject: [Scilab-users] vectoriztion and sets of data In-Reply-To: <001701cdc8c3$056deb00$1049c100$@carrico@free.fr> References: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> <50AE3C97.8010302@centre-cired.fr> <001701cdc8c3$056deb00$1049c100$@carrico@free.fr> Message-ID: <50AE40C3.9000402@centre-cired.fr> Hi again I am still not sure, but look at the output of A=rand(8,6) B=zeros(8,6) D = A > B D = bool2s (A > B) This might give you insight on how to solve your problem tell me if not On 22/11/2012 16:06, Paul Carrico wrote: > > The original code looked like ... I'm trying to optimized it (ok for > the "if", but how to combine a set of data and vectorization (??? Many > trials but I failed) > > /// initial matrix/ > > A=rand(8,6); > > B=zeros(8,6); > > C=[A;A;B;A;B;B;A]; > > [nr,nc]=size(C); > > /// original code looks like/ > > D=zeros((nr/8),1); > > fori=1:(nr/8) > > search=max(abs(C((8*(i-1)+1):(8*i),:))); > > if(search>0)then > > D(i,1)=1; > > else > > D(i,1)=0; > > end > > end > > *De :*users-bounces at lists.scilab.org > [mailto:users-bounces at lists.scilab.org] *De la part de* Adrien Vogt-Schilb > *Envoy? :* jeudi 22 novembre 2012 15:54 > *? :* International users mailing list for Scilab. > *Objet :* Re: [Scilab-users] vectoriztion and sets of data > > On 22/11/2012 15:48, Paul Carrico wrote: > > Dear All, > > On the above example, it should be possible to select a sets of > rows, should not ? if so how please ? > > Thanks > > Paul > > > Hi > > Didn't understand your question, have a look at this: > > A=[1:10]'*2 > > rows = [1;6;2] > > B=zeros(A) > > B(rows) = A(rows) > > > hope this helps > > > ################################################### > > mode(0) > > /// initial matrix/ > A = rand(8,6); > B = zeros(8,6); > C = [A ; A; B; A; B; B; A]; > [nr,nc] = size(C); > > /// each set of 8 rows is analysed/ > Search = zeros((nr/8),1); > ///i = ones((nr/8),1).* 1;/ > i = [1:(nr/8)]'; > /// Search = max(abs(C((8*(i - 1) + 1):(8 * i),:)));/ > Search = max(abs(C([i. * 8 - 7 :i. * 8],:))) > ; > B = (find(Search == 0))'; > > D = zeros((nr/8),1); > D(B,2) = 1; > > > > > _______________________________________________ > 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 dkajah at gmail.com Fri Nov 23 02:58:19 2012 From: dkajah at gmail.com (Daniel Penalva) Date: Thu, 22 Nov 2012 23:58:19 -0200 Subject: [Scilab-users] Neural network model at SCILAB In-Reply-To: References: Message-ID: There is a external module named ANN, you can find it at ATOMS: http://atoms.scilab.org/ On Wed, Nov 21, 2012 at 4:35 AM, Arif wrote: > Dear all, > > Could you give me like tutorial for make neural network model at SCILAB ? > I'm sorry, usually I use Matlab, but I want change to FOSS for my research. > > Thanks > Arif Aditiya > Postgraduate Students of School of Computer Science, Jakarta > > -- > ********************** > Best Wishes > Arif > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- *Democracia Digital Direta Carta: *http://li7e.org/ddd2 *Des Carta coletiva aos ministerios * http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam * * *AfroAmbiental eh sociedade em Axe e Diversidade* http://afroambiental.org Daniel Penalva State related activity, currently: Phd - Physics in Institute for Theoretical Physics - http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php Transparency portal(workflows): http://www.nightsc.com.br/aa/interface_v0.1.php *look for SUoU9 user, or do ctrl+f and SUoU9* FLOSS and related ideas enthusiastic -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Thu Nov 22 22:59:21 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Thu, 22 Nov 2012 22:59:21 +0100 Subject: [Scilab-users] vectoriztion and sets of data In-Reply-To: <50AE40C3.9000402@centre-cired.fr> References: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> <50AE3C97.8010302@centre-cired.fr> <001701cdc8c3$056deb00$1049c100$@carrico@free.fr> <50AE40C3.9000402@centre-cired.fr> Message-ID: <000001cdc8fc$a1417db0$e3c47910$@carrico@free.fr> Thanks for your suggestion ; it?s is interesting for another specific development unfortunately I don?t think I cannot adapt that code for my project ! Indeed I need to work on sets of data (n rows of data at the same time to select, to rearrange, to transform, to mean, etc. ) on matrix on size on X*n rows (X may be 100 000 ) ; currently I use loops as described above the issue is to optimize the following line through vectorized ?i? index: Search = max(abs(C([i. * 8 - 7 : i. * 8],:))) Si let ?s rack one?s brains Thanks Paul De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Adrien Vogt-Schilb Envoy? : jeudi 22 novembre 2012 16:12 ? : International users mailing list for Scilab. Objet : Re: [Scilab-users] vectoriztion and sets of data Hi again I am still not sure, but look at the output of A = rand(8,6) B = zeros(8,6) D = A > B D = bool2s (A > B) This might give you insight on how to solve your problem tell me if not On 22/11/2012 16:06, Paul Carrico wrote: The original code looked like I?m trying to optimized it (ok for the ?if?, but how to combine a set of data and vectorization (??? Many trials but I failed) // initial matrix A = rand(8,6); B = zeros(8,6); C = [A ; A; B; A; B; B; A]; [nr,nc] = size(C); // original code looks like D = zeros((nr/8),1); for i = 1 : (nr/8) search = max(abs(C((8*(i-1)+1):(8*i),:))); if (search > 0) then D(i,1) = 1; else D(i,1) = 0; end end ################################################### mode(0) // initial matrix A = rand(8,6); B = zeros(8,6); C = [A ; A; B; A; B; B; A]; [nr,nc] = size(C); // each set of 8 rows is analysed Search = zeros((nr/8),1); //i = ones((nr/8),1).* 1; i = [1:(nr/8)]'; // Search = max(abs(C((8*(i - 1) + 1):(8 * i),:))); Search = max(abs(C([i. * 8 - 7 : i. * 8],:))) ; B = (find(Search == 0))'; D = zeros((nr/8),1); D(B,2) = 1; -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludo.wag at laposte.net Fri Nov 23 09:14:18 2012 From: ludo.wag at laposte.net (Orbeman) Date: Fri, 23 Nov 2012 00:14:18 -0800 (PST) Subject: [Scilab-users] How to plot 3d implicit surface Message-ID: <1353658458018-4025307.post@n3.nabble.com> Hello, I would like to plot a 3d implicit surface defines with an equation like f(x, y, z)=0. There's no parametric transformation and is not possible to express for example z=g(x, y). Does anyone have an idea ? Thank a lot. -- View this message in context: http://mailinglists.scilab.org/How-to-plot-3d-implicit-surface-tp4025307.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From stephane.mottelet at utc.fr Fri Nov 23 09:21:03 2012 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Fri, 23 Nov 2012 09:21:03 +0100 Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <1353658458018-4025307.post@n3.nabble.com> References: <1353658458018-4025307.post@n3.nabble.com> Message-ID: <50AF31EF.3020902@utc.fr> Le 23/11/12 09:14, Orbeman a ?crit : > Hello, > > I would like to plot a 3d implicit surface defines with an equation like > f(x, y, z)=0. There's no parametric transformation and is not possible to > express for example z=g(x, y). > > Does anyone have an idea ? > > Thank a lot. > > > > -- > View this message in context: http://mailinglists.scilab.org/How-to-plot-3d-implicit-surface-tp4025307.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 What is your equation ? S. From vogt at centre-cired.fr Fri Nov 23 09:54:00 2012 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Fri, 23 Nov 2012 09:54:00 +0100 Subject: [Scilab-users] vectoriztion and sets of data In-Reply-To: <000001cdc8fc$a1417db0$e3c47910$@carrico@free.fr> References: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> <50AE3C97.8010302@centre-cired.fr> <001701cdc8c3$056deb00$1049c100$@carrico@free.fr> <50AE40C3.9000402@centre-cired.fr> <000001cdc8fc$a1417db0$e3c47910$@carrico@free.fr> Message-ID: <50AF39A8.3070302@centre-cired.fr> On 22/11/2012 22:59, Paul Carrico wrote: > > Thanks for your suggestion ; it's is interesting for another specific > development... unfortunately I don't think I cannot adapt that code > for my project ! > > Indeed I need to work on sets of data (n rows of data at the same time > to select, to rearrange, to transform, to mean, etc. ...) on matrix on > size on X*n rows (X may be 100 000 ... ) ; currently I use loops as > described above ... > > ... the issue is to optimize the following line through vectorized "i" index:Search = max(abs(C([i. * 8 - 7 :i. * 8],:))) Hi Right. Well a trivial improvment is still : D=zeros((nr/8),1); fori=1:(nr/8) D=max(abs(C((8*(i-1)+1):(8*i),:)))>0; //oh, that's what you meant with "ok with the if" end But you want to get rid of the loop I gess. Do you actually build the C matrix yourself as in the example? I believe your example is equivalent to: A=rand(8,6); B=zeros(8,6); C=[A;A;B;A;B;B;A]; D=[max(abs(A))>0; max(abs(A))>0; max(abs(B))>0; max(abs(A))>0; max(abs(B))>0; max(abs(B))>0; max(abs(A))>0] or better to isA = max(abs(A))>0; isB =max(abs(B))>0; C=[isA; isA; isB; isA; isB; isB; isA] in other words: the idea is to write D while you build C, not once C is built entirely. Does that make sense for your actual code? > Si let 's rack one's brains ... > > Thanks > > Paul > > *De :*users-bounces at lists.scilab.org > [mailto:users-bounces at lists.scilab.org] *De la part de* Adrien Vogt-Schilb > *Envoy? :* jeudi 22 novembre 2012 16:12 > *? :* International users mailing list for Scilab. > *Objet :*Re: [Scilab-users] vectoriztion and sets of data > > Hi again > > I am still not sure, but look at the output of > > A=rand(8,6) > > B=zeros(8,6) > > D = A > B > > D = bool2s (A > B) > > This might give you insight on how to solve your problem > tell me if not > > On 22/11/2012 16:06, Paul Carrico wrote: > > The original code looked like ... I'm trying to optimized it (ok > for the "if", but how to combine a set of data and vectorization > (??? Many trials but I failed) > > /// initial matrix/ > > A=rand(8,6); > > B=zeros(8,6); > > C=[A;A;B;A;B;B;A]; > > [nr,nc]=size(C); > > /// original code looks like/ > > D=zeros((nr/8),1); > > fori=1:(nr/8) > > search=max(abs(C((8*(i-1)+1):(8*i),:))); > > if(search>0)then > > D(i,1)=1; > > else > > D(i,1)=0; > > end > > end > > ################################################### > > mode(0) > > > > /// initial matrix/ > > A = rand(8,6); > > B = zeros(8,6); > > C = [A ; A; B; A; B; B; A]; > > [nr,nc] = size(C); > > > > /// each set of 8 rows is analysed/ > > Search = zeros((nr/8),1); > > ///i = ones((nr/8),1).* 1;/ > > i = [1:(nr/8)]'; > > /// Search = max(abs(C((8*(i - 1) + 1):(8 * i),:)));/ > > Search = max(abs(C([i. * 8 - 7 :i. * 8],:))) > > ; > > B = (find(Search == 0))'; > > > > D = zeros((nr/8),1); > > D(B,2) = 1; > > > > _______________________________________________ > 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 Fri Nov 23 13:29:00 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Fri, 23 Nov 2012 13:29:00 +0100 Subject: [Scilab-users] vectoriztion and sets of data In-Reply-To: <50AF39A8.3070302@centre-cired.fr> References: <000001cdc8c0$7249d610$56dd8230$@carrico@free.fr> <50AE3C97.8010302@centre-cired.fr> <001701cdc8c3$056deb00$1049c100$@carrico@free.fr> <50AE40C3.9000402@centre-cired.fr> <000001cdc8fc$a1417db0$e3c47910$@carrico@free.fr> <50AF39A8.3070302@centre-cired.fr> Message-ID: <50AF6C0C.7060103@inria.fr> I am not sure to have really understood the problem But may be you can vectorize this way max(abs(matrix(C,8,:)),'r') Serge Steer Le 23/11/2012 09:54, Adrien Vogt-Schilb a ?crit : > On 22/11/2012 22:59, Paul Carrico wrote: >> >> Thanks for your suggestion ; it's is interesting for another specific >> development... unfortunately I don't think I cannot adapt that code >> for my project ! >> >> Indeed I need to work on sets of data (n rows of data at the same >> time to select, to rearrange, to transform, to mean, etc. ...) on >> matrix on size on X*n rows (X may be 100 000 ... ) ; currently I use >> loops as described above ... >> >> ... the issue is to optimize the following line through vectorized "i" index:Search = max(abs(C([i. * 8 - 7 :i. * 8],:))) > > Hi > > Right. > Well a trivial improvment is still : > > D=zeros((nr/8),1); > > fori=1:(nr/8) > > D=max(abs(C((8*(i-1)+1):(8*i),:)))>0; //oh, that's what you meant > with "ok with the if" > > end > > But you want to get rid of the loop I gess. > > > Do you actually build the C matrix yourself as in the example? > > I believe your example is equivalent to: > > A=rand(8,6); > > B=zeros(8,6); > > C=[A;A;B;A;B;B;A]; > > D=[max(abs(A))>0; max(abs(A))>0; max(abs(B))>0; max(abs(A))>0; > max(abs(B))>0; max(abs(B))>0; max(abs(A))>0] > > or better to > > isA = max(abs(A))>0; > isB =max(abs(B))>0; > > > C=[isA; isA; isB; isA; isB; isB; isA] > > in other words: the idea is to write D while you build C, not once C > is built entirely. Does that make sense for your actual code? > > >> Si let 's rack one's brains ... >> >> Thanks >> >> Paul >> >> *De :*users-bounces at lists.scilab.org >> [mailto:users-bounces at lists.scilab.org] *De la part de* Adrien >> Vogt-Schilb >> *Envoy? :* jeudi 22 novembre 2012 16:12 >> *? :* International users mailing list for Scilab. >> *Objet :*Re: [Scilab-users] vectoriztion and sets of data >> >> Hi again >> >> I am still not sure, but look at the output of >> >> A=rand(8,6) >> >> B=zeros(8,6) >> >> D = A > B >> >> D = bool2s (A > B) >> >> This might give you insight on how to solve your problem >> tell me if not >> >> On 22/11/2012 16:06, Paul Carrico wrote: >> >> The original code looked like ... I'm trying to optimized it (ok >> for the "if", but how to combine a set of data and vectorization >> (??? Many trials but I failed) >> >> /// initial matrix/ >> >> A=rand(8,6); >> >> B=zeros(8,6); >> >> C=[A;A;B;A;B;B;A]; >> >> [nr,nc]=size(C); >> >> /// original code looks like/ >> >> D=zeros((nr/8),1); >> >> fori=1:(nr/8) >> >> search=max(abs(C((8*(i-1)+1):(8*i),:))); >> >> if(search>0)then >> >> D(i,1)=1; >> >> else >> >> D(i,1)=0; >> >> end >> >> end >> >> ################################################### >> >> mode(0) >> >> >> >> /// initial matrix/ >> >> A = rand(8,6); >> >> B = zeros(8,6); >> >> C = [A ; A; B >> ; A; B; B; A]; >> >> [nr,nc] = size(C); >> >> >> >> /// each set of 8 rows is analysed/ >> >> Search = zeros((nr/8),1); >> >> ///i = ones((nr/8),1).* 1;/ >> >> i = [1:(nr/8)]'; >> >> /// Search = max(abs(C((8*(i - 1) + 1):(8 * i),:)));/ >> >> Search = max(abs(C([i! >> . * 8 - 7 :i. * 8],:))) >> >> ; >> >> B = (find(Search == 0))'; >> >> >> >> D = zeros((nr/8),1); >> >> D(B,2) = 1; >> >> >> >> _______________________________________________ >> 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 ludo.wag at laposte.net Fri Nov 23 16:33:45 2012 From: ludo.wag at laposte.net (Orbeman) Date: Fri, 23 Nov 2012 07:33:45 -0800 (PST) Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <50AF31EF.3020902@utc.fr> References: <1353658458018-4025307.post@n3.nabble.com> <50AF31EF.3020902@utc.fr> Message-ID: <1353684825054-4025311.post@n3.nabble.com> In fact, I have several equations like this : x^2+y^2+x+y+x*y+z^2-1=0 I can express z=sqrt(1-...) but in a general case... -- View this message in context: http://mailinglists.scilab.org/How-to-plot-3d-implicit-surface-tp4025307p4025311.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From paul.carrico at free.fr Fri Nov 23 17:09:53 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Fri, 23 Nov 2012 17:09:53 +0100 Subject: [Scilab-users] TR: parallelization Message-ID: <008801cdc994$fa3013d0$ee903b70$@carrico@free.fr> No suggestion on how to proceed ? Paul De : Paul Carrico [mailto:paul.carrico at free.fr] Envoy? : samedi 17 novembre 2012 23:30 ? : 'International users mailing list for Scilab.' Objet : parallelization Dear all, Here is a basic function I would like to perform on a multicore architecture (the function is just to illustrate the issue) : - the inputs have been split into 18 sub-parts - 18*20 = 360? elementary Sherlock Thus : - How to use ?parallel_run? macro ? (not understood) - How to store the intermediate results into a final matrix ? has the chronology of writing can be imposed ? - 8 procs however 18 = 2*8 +2 troubles ? Thanks for any feedback / advice Paul // ##################################################################### mode(0); nb = 18; i = [1 : 1 : 20]'; j = [1 : 1 : 20]'; [nl,nc] = size(i) function vect_fct=fct_angles(i, j) vect_fct = [i j cos(i)+sin(j) -sin(j)]; endfunction //vect1 = zeros(nb*nl,4); vect1 = []; for k = 1 : nb vect1 = [vect1 ; fct_angles(nl*(k-1)+i([1: nl],1),nl*(k -1)+j([1: nl],1))]; end -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Sat Nov 24 11:26:32 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Sat, 24 Nov 2012 11:26:32 +0100 Subject: [Scilab-users] csvWrite trouble Message-ID: <000001cdca2e$2cec1c30$86c45490$@carrico@free.fr> Hi, It's a pity but when I use csvWrite function, each line is separated by a blank line .. Paul ##################################################### mode(0) PATH = get_absolute_file_path("test_csvWrite.sce"); FILE_NAME = "test_csvwrite.csv"; A = rand(10,3); // test csvWrite(A,PATH+FILE_NAME,","); Result : 0.50153415976092219,0.28064980218186975,0.40948254754766822 0.43685875833034515,0.12800584640353918,0.87841258011758327 0.26931248093023896,0.77831285959109664,0.11383596854284406 0.6325744865462184,0.2119030449539423,0.19983377400785685 0.40519540151581168,0.11213546665385365,0.56186607433483005 0.91847078315913677,0.68568959552794695,0.58961773291230202 0.043733433354645967,0.15312166837975383,0.68539796629920602 0.48185089323669672,0.69708506017923355,0.89062247332185507 0.26395560009405017,0.84155184263363481,0.50422128057107329 0.41481037065386772,0.40620247554033995,0.34936154074966908 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt at centre-cired.fr Sat Nov 24 12:44:04 2012 From: vogt at centre-cired.fr (A. Vogt-Schilb) Date: Sat, 24 Nov 2012 12:44:04 +0100 Subject: [Scilab-users] csvWrite trouble Message-ID: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> Hi Make sure you use the last versions. I had noticed a bug like this in my windows machine. It was worked around telling csv to use Linux ends of line. Something like csv_default("eol", "unix ") best thing to do to debug is open your csv with a good text editor and show all characters to see what end of line chars are being used Sent from my phone Paul Carrico wrote: >Hi, > > > >It's a pity but when I use csvWrite function, each line is separated by a >blank line .. > > > >Paul > > > >##################################################### > >mode(0) > > > >PATH = get_absolute_file_path("test_csvWrite.sce"); > >FILE_NAME = "test_csvwrite.csv"; > >A = rand(10,3); > > > >// test > >csvWrite(A,PATH+FILE_NAME,","); > > > > > >Result : > >0.50153415976092219,0.28064980218186975,0.40948254754766822 > >0.43685875833034515,0.12800584640353918,0.87841258011758327 > >0.26931248093023896,0.77831285959109664,0.11383596854284406 > >0.6325744865462184,0.2119030449539423,0.19983377400785685 > >0.40519540151581168,0.11213546665385365,0.56186607433483005 > >0.91847078315913677,0.68568959552794695,0.58961773291230202 > >0.043733433354645967,0.15312166837975383,0.68539796629920602 > >0.48185089323669672,0.69708506017923355,0.89062247332185507 > >0.26395560009405017,0.84155184263363481,0.50422128057107329 > >0.41481037065386772,0.40620247554033995,0.34936154074966908 > > >_______________________________________________ >users mailing list >users at lists.scilab.org >http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Sat Nov 24 16:23:20 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sat, 24 Nov 2012 16:23:20 +0100 Subject: [Scilab-users] csvWrite trouble In-Reply-To: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> References: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> Message-ID: <50B0E668.1080204@scilab-enterprises.com> Hello, This bug has been fixed since then and will be part of the 5.4.1 release. See: http://bugzilla.scilab.org/11991 Sylvestre On 24/11/2012 12:44, A. Vogt-Schilb wrote: > Hi > > Make sure you use the last versions. > > I had noticed a bug like this in my windows machine. It was worked > around telling csv to use Linux ends of line. Something like > csv_default("eol", "unix ") > > best thing to do to debug is open your csv with a good text editor and > show all characters to see what end of line chars are being used > > Sent from my phone > > Paul Carrico wrote: > > Hi, > > > > It?s a pity but when I use csvWrite function, each line is separated by > a blank line ?. > > > > Paul > > > > ##################################################### > > mode(0) > > > > PATH= get_absolute_file_path("test_csvWrite.sce"); > > FILE_NAME= "test_csvwrite.csv"; > > A= rand(10,3); > > > > /// test/ > > csvWrite(A,PATH+FILE_NAME,","); > > > > > > *_Result_*: > > 0.50153415976092219,0.28064980218186975,0.40948254754766822 > > 0.43685875833034515,0.12800584640353918,0.87841258011758327 > > 0.26931248093023896,0.77831285959109664,0.11383596854284406 > > 0.6325744865462184,0.2119030449539423,0.19983377400785685 > > 0.40519540151581168,0.11213546665385365,0.56186607433483005 > > 0.91847078315913677,0.68568959552794695,0.58961773291230202 > > 0.043733433354645967,0.15312166837975383,0.68539796629920602 > > 0.48185089323669672,0.69708506017923355,0.89062247332185507 > > 0.26395560009405017,0.84155184263363481,0.50422128057107329 > > 0.41481037065386772,0.40620247554033995,0.34936154074966908 > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sat Nov 24 16:46:16 2012 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 24 Nov 2012 16:46:16 +0100 Subject: [Scilab-users] csvWrite trouble In-Reply-To: <50B0E668.1080204@scilab-enterprises.com> References: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> <50B0E668.1080204@scilab-enterprises.com> Message-ID: <50B0EBC8.9000706@durietz.se> Hello Sylvestre, A similar question: Why are string vectors written with every other line empty? -->s = [ -->"This is a two row" -->"string vector" -->] s = !This is a two row ! ! ! !string vector ! Regards Stefan On 2012-11-24 16:23, Sylvestre Ledru wrote: -------------------- > Hello, > > This bug has been fixed since then and will be part of the 5.4.1 release. > See: > http://bugzilla.scilab.org/11991 > > Sylvestre > > On 24/11/2012 12:44, A. Vogt-Schilb wrote: >> Hi >> >> Make sure you use the last versions. >> >> I had noticed a bug like this in my windows machine. It was worked >> around telling csv to use Linux ends of line. Something like >> csv_default("eol", "unix ") >> >> best thing to do to debug is open your csv with a good text editor and >> show all characters to see what end of line chars are being used >> >> Sent from my phone >> >> Paul Carrico wrote: >> >> Hi, >> >> >> >> It?s a pity but when I use csvWrite function, each line is separated by >> a blank line ?. >> >> >> >> Paul >> >> >> >> ##################################################### >> >> mode(0) >> >> >> >> PATH= get_absolute_file_path("test_csvWrite.sce"); >> >> FILE_NAME= "test_csvwrite.csv"; >> >> A= rand(10,3); >> >> >> >> /// test/ >> >> csvWrite(A,PATH+FILE_NAME,","); >> >> >> >> >> >> *_Result_*: >> >> 0.50153415976092219,0.28064980218186975,0.40948254754766822 >> >> 0.43685875833034515,0.12800584640353918,0.87841258011758327 >> >> 0.26931248093023896,0.77831285959109664,0.11383596854284406 >> >> 0.6325744865462184,0.2119030449539423,0.19983377400785685 >> >> 0.40519540151581168,0.11213546665385365,0.56186607433483005 >> >> 0.91847078315913677,0.68568959552794695,0.58961773291230202 >> >> 0.043733433354645967,0.15312166837975383,0.68539796629920602 >> >> 0.48185089323669672,0.69708506017923355,0.89062247332185507 >> >> 0.26395560009405017,0.84155184263363481,0.50422128057107329 >> >> 0.41481037065386772,0.40620247554033995,0.34936154074966908 >> >> >> >> _______________________________________________ >> 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 sylvestre.ledru at scilab-enterprises.com Sat Nov 24 17:29:15 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Sat, 24 Nov 2012 17:29:15 +0100 Subject: [Scilab-users] csvWrite trouble In-Reply-To: <50B0EBC8.9000706@durietz.se> References: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> <50B0E668.1080204@scilab-enterprises.com> <50B0EBC8.9000706@durietz.se> Message-ID: <50B0F5DB.7090808@scilab-enterprises.com> Hello, It is a just a display. The vector has still a size of 2x1: -->size(s) ans = 2. 1. Sylvestre On 24/11/2012 16:46, Stefan Du Rietz wrote: > Hello Sylvestre, > > A similar question: > Why are string vectors written with every other line empty? > > -->s = [ > -->"This is a two row" > -->"string vector" > -->] > s = > > !This is a two row ! > ! ! > !string vector ! > > Regards > Stefan > > On 2012-11-24 16:23, Sylvestre Ledru wrote: > -------------------- >> Hello, >> >> This bug has been fixed since then and will be part of the 5.4.1 release. >> See: >> http://bugzilla.scilab.org/11991 >> >> Sylvestre >> >> On 24/11/2012 12:44, A. Vogt-Schilb wrote: >>> Hi >>> >>> Make sure you use the last versions. >>> >>> I had noticed a bug like this in my windows machine. It was worked >>> around telling csv to use Linux ends of line. Something like >>> csv_default("eol", "unix ") >>> >>> best thing to do to debug is open your csv with a good text editor and >>> show all characters to see what end of line chars are being used >>> >>> Sent from my phone >>> >>> Paul Carrico wrote: >>> >>> Hi, >>> >>> >>> >>> It?s a pity but when I use csvWrite function, each line is separated by >>> a blank line ?. >>> >>> >>> >>> Paul >>> >>> >>> >>> ##################################################### >>> >>> mode(0) >>> >>> >>> >>> PATH= get_absolute_file_path("test_csvWrite.sce"); >>> >>> FILE_NAME= "test_csvwrite.csv"; >>> >>> A= rand(10,3); >>> >>> >>> >>> /// test/ >>> >>> csvWrite(A,PATH+FILE_NAME,","); >>> >>> >>> >>> >>> >>> *_Result_*: >>> >>> 0.50153415976092219,0.28064980218186975,0.40948254754766822 >>> >>> 0.43685875833034515,0.12800584640353918,0.87841258011758327 >>> >>> 0.26931248093023896,0.77831285959109664,0.11383596854284406 >>> >>> 0.6325744865462184,0.2119030449539423,0.19983377400785685 >>> >>> 0.40519540151581168,0.11213546665385365,0.56186607433483005 >>> >>> 0.91847078315913677,0.68568959552794695,0.58961773291230202 >>> >>> 0.043733433354645967,0.15312166837975383,0.68539796629920602 >>> >>> 0.48185089323669672,0.69708506017923355,0.89062247332185507 >>> >>> 0.26395560009405017,0.84155184263363481,0.50422128057107329 >>> >>> 0.41481037065386772,0.40620247554033995,0.34936154074966908 >>> >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > From sdr at durietz.se Sat Nov 24 17:53:51 2012 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 24 Nov 2012 17:53:51 +0100 Subject: [Scilab-users] csvWrite trouble In-Reply-To: <50B0F5DB.7090808@scilab-enterprises.com> References: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> <50B0E668.1080204@scilab-enterprises.com> <50B0EBC8.9000706@durietz.se> <50B0F5DB.7090808@scilab-enterprises.com> Message-ID: <50B0FB9F.8030606@durietz.se> Hello, I know that, but why is it displayed like that? It is confusing and makes it unnecessary bulky. It would also be fine to be able to choose to avoid all the empty lines in displaying things (like in Matlab) ;-) Stefan On 2012-11-24 17:29, Sylvestre Ledru wrote: -------------------- > Hello, > > It is a just a display. The vector has still a size of 2x1: > > -->size(s) > ans = > > 2. 1. > > Sylvestre > > On 24/11/2012 16:46, Stefan Du Rietz wrote: >> Hello Sylvestre, >> >> A similar question: >> Why are string vectors written with every other line empty? >> >> -->s = [ >> -->"This is a two row" >> -->"string vector" >> -->] >> s = >> >> !This is a two row ! >> ! ! >> !string vector ! >> >> Regards >> Stefan >> >> On 2012-11-24 16:23, Sylvestre Ledru wrote: >> -------------------- >>> Hello, >>> >>> This bug has been fixed since then and will be part of the 5.4.1 release. >>> See: >>> http://bugzilla.scilab.org/11991 >>> >>> Sylvestre >>> >>> On 24/11/2012 12:44, A. Vogt-Schilb wrote: >>>> Hi >>>> >>>> Make sure you use the last versions. >>>> >>>> I had noticed a bug like this in my windows machine. It was worked >>>> around telling csv to use Linux ends of line. Something like >>>> csv_default("eol", "unix ") >>>> >>>> best thing to do to debug is open your csv with a good text editor and >>>> show all characters to see what end of line chars are being used >>>> >>>> Sent from my phone >>>> >>>> Paul Carrico wrote: >>>> >>>> Hi, >>>> >>>> >>>> >>>> It?s a pity but when I use csvWrite function, each line is separated by >>>> a blank line ?. >>>> >>>> >>>> >>>> Paul >>>> >>>> >>>> >>>> ##################################################### >>>> >>>> mode(0) >>>> >>>> >>>> >>>> PATH= get_absolute_file_path("test_csvWrite.sce"); >>>> >>>> FILE_NAME= "test_csvwrite.csv"; >>>> >>>> A= rand(10,3); >>>> >>>> >>>> >>>> /// test/ >>>> >>>> csvWrite(A,PATH+FILE_NAME,","); >>>> >>>> >>>> >>>> >>>> >>>> *_Result_*: >>>> >>>> 0.50153415976092219,0.28064980218186975,0.40948254754766822 >>>> >>>> 0.43685875833034515,0.12800584640353918,0.87841258011758327 >>>> >>>> 0.26931248093023896,0.77831285959109664,0.11383596854284406 >>>> >>>> 0.6325744865462184,0.2119030449539423,0.19983377400785685 >>>> >>>> 0.40519540151581168,0.11213546665385365,0.56186607433483005 >>>> >>>> 0.91847078315913677,0.68568959552794695,0.58961773291230202 >>>> >>>> 0.043733433354645967,0.15312166837975383,0.68539796629920602 >>>> >>>> 0.48185089323669672,0.69708506017923355,0.89062247332185507 >>>> >>>> 0.26395560009405017,0.84155184263363481,0.50422128057107329 >>>> >>>> 0.41481037065386772,0.40620247554033995,0.34936154074966908 >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 martin at null-a.de Sun Nov 25 00:40:17 2012 From: martin at null-a.de (Martin Helm) Date: Sat, 24 Nov 2012 15:40:17 -0800 (PST) Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <1353684825054-4025311.post@n3.nabble.com> References: <1353658458018-4025307.post@n3.nabble.com> <50AF31EF.3020902@utc.fr> <1353684825054-4025311.post@n3.nabble.com> Message-ID: <1353800417609-4025321.post@n3.nabble.com> Orbeman wrote > In fact, I have several equations like this : > > x^2+y^2+x+y+x*y+z^2-1=0 > > I can express z=sqrt(1-...) but in a general case... In the general case I usually use isosurfaces to plot implicit functions. Since I am completely new to scilab I do not know if it is just a lack of my ability to find a corresponding method in scilab of if there is none to plot isosurfaces. If there is none and there is interest in having one I could adapt the Octave function I wrote a few years ago and which is since then part of their software to work in scilab and also the implicit function for plotting the zero level surfaces of 3d functions. -- View this message in context: http://mailinglists.scilab.org/How-to-plot-3d-implicit-surface-tp4025307p4025321.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From martin at null-a.de Sun Nov 25 01:32:49 2012 From: martin at null-a.de (Martin Helm) Date: Sun, 25 Nov 2012 01:32:49 +0100 Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <1353800417609-4025321.post@n3.nabble.com> References: <1353658458018-4025307.post@n3.nabble.com> <50AF31EF.3020902@utc.fr> <1353684825054-4025311.post@n3.nabble.com> <1353800417609-4025321.post@n3.nabble.com> Message-ID: <50B16731.9080804@null-a.de> Am 25.11.2012 00:40, schrieb Martin Helm: > Orbeman wrote >> In fact, I have several equations like this : >> >> x^2+y^2+x+y+x*y+z^2-1=0 >> >> I can express z=sqrt(1-...) but in a general case... I found this one http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1236 have not tested it yet but looks promising. From martin at null-a.de Sun Nov 25 03:01:49 2012 From: martin at null-a.de (Martin Helm) Date: Sun, 25 Nov 2012 03:01:49 +0100 Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <50B16731.9080804@null-a.de> References: <1353658458018-4025307.post@n3.nabble.com> <50AF31EF.3020902@utc.fr> <1353684825054-4025311.post@n3.nabble.com> <1353800417609-4025321.post@n3.nabble.com> <50B16731.9080804@null-a.de> Message-ID: <50B17C0D.3050509@null-a.de> Am 25.11.2012 01:32, schrieb Martin Helm: > I found this one > http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1236 > have not tested it yet but looks promising. I tested it now: Take the function contour3d.sci from the link above. It seems to be an old function which uses a few deprecated function calls. You need to change line 36 and replace xbas() with gcf() in addition you need to replace in line 82 sort with gsort. Now you can run the following simple test function val = isotest(x, y,z) val = x.^2+y.^2+x+y+x.*y+z.^2-1; endfunction clf(); x = linspace(-2, 2, 31); y = x; z = x; [X Y Z] = meshgrid(x,y,z); val = isotest(X, Y, Z); contour3d(X, Y, Z, val, 0) f = gcf(); f.color_map = [1 0 0]; // make the black surface red which will draw your implicit function in red. This will work for all kind of implicit functions as long as your discretisation is fine enough. Hope that helps. From sgougeon at free.fr Sun Nov 25 15:53:06 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 25 Nov 2012 15:53:06 +0100 Subject: [Scilab-users] How to plot 3d implicit surface In-Reply-To: <50B16731.9080804@null-a.de> References: <1353658458018-4025307.post@n3.nabble.com> <50AF31EF.3020902@utc.fr> <1353684825054-4025311.post@n3.nabble.com> <1353800417609-4025321.post@n3.nabble.com> <50B16731.9080804@null-a.de> Message-ID: <50B230D2.5040209@free.fr> Le 25/11/2012 01:32, Martin Helm a ?crit : > Am 25.11.2012 00:40, schrieb Martin Helm: >> Orbeman wrote >>> In fact, I have several equations like this : >>> >>> x^2+y^2+x+y+x*y+z^2-1=0 >>> >>> I can express z=sqrt(1-...) but in a general case... > I found this one > http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1236 > have not tested it yet but looks promising. Yes, a more recent version has been released on fileexchange instead of the old contributions repository: http://fileexchange.scilab.org/toolboxes/contour3d From haasejos at web.de Sun Nov 25 18:16:35 2012 From: haasejos at web.de (haasejos) Date: Sun, 25 Nov 2012 09:16:35 -0800 (PST) Subject: [Scilab-users] for-loop -> vectorisation Message-ID: <1353863795288-4025325.post@n3.nabble.com> hallo, I want to calculate the algebraic sum of all entries in each columns of a matrix, like it is done in this example: clear; clc; xdel; m = [1 2 3;... 4 5 6;... 7 8 9]; a = zeros(1:length(m(1,:)); for i = 1 : length(m(1,:)); a(i) = sum(m(:,i)); end; disp(a); Can this be done by vectorisation the for-loop? thank you! Josef -- View this message in context: http://mailinglists.scilab.org/for-loop-vectorisation-tp4025325.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From martin at null-a.de Sun Nov 25 18:28:43 2012 From: martin at null-a.de (Martin Helm) Date: Sun, 25 Nov 2012 18:28:43 +0100 Subject: [Scilab-users] for-loop -> vectorisation In-Reply-To: <1353863795288-4025325.post@n3.nabble.com> References: <1353863795288-4025325.post@n3.nabble.com> Message-ID: <50B2554B.8040204@null-a.de> What about sum(m, 1) ? From haasejos at web.de Sun Nov 25 19:13:18 2012 From: haasejos at web.de (haasejos) Date: Sun, 25 Nov 2012 10:13:18 -0800 (PST) Subject: [Scilab-users] for-loop -> vectorisation In-Reply-To: <50B2554B.8040204@null-a.de> References: <1353863795288-4025325.post@n3.nabble.com> <50B2554B.8040204@null-a.de> Message-ID: <1353867198825-4025327.post@n3.nabble.com> thank you very much Martin! Now I understand, what y=sum(x,orientation) in scilab - help means. Martin Helm wrote > What about sum(m, 1) ? > _______________________________________________ > users mailing list > users at .scilab > http://lists.scilab.org/mailman/listinfo/users -- View this message in context: http://mailinglists.scilab.org/for-loop-vectorisation-tp4025325p4025327.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From michael.baudin at contrib.scilab.org Sun Nov 25 22:28:37 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Sun, 25 Nov 2012 22:28:37 +0100 Subject: [Scilab-users] Emulate Object Oriented Programming Message-ID: <9120d3c2e7c98d0009db563874f1217e@contrib.scilab.org> Hi, I have a problem with the possibility of emulating OOP in Scilab with tlists, that prevents me to have safe "set" methods. In the script in attachment, I created a human "class" with two fields: name (a scalar string) and weight (a scalar real). The problem is : how have a "set" method which is both simple and safe ? Here is how this class works : bob=human_new() This is simple, but is unsafe: bob.name="Bob" bob.weight=70 bob.name=-12 // Oups ! These statements are safe: bob=human_set(bob,"name","Will") bob=human_set(bob,"weight",80) It is safe in the sense that the following statements produce an error: bob=human_set(bob,"weight",-12) The function "human_set" is safe but somewhat unconvenient to use. The question is : How to make so that bob.name="Will" makes the code bob=human_set(bob,"name","Will") be executed ? Can overloading do this ? Is the only possible way is at the C level with the sci_percent* functions that Denizet wrote : http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/xml/sci_gateway/cpp/sci_percent_XMLAttr_size.cpp;h=9d3b361bcbe6416e62f422dd448aa72d65f1fe4c;hb=HEAD for the XML module ? Best regards, Micha?l -------------- next part -------------- A non-text attachment was scrubbed... Name: smalloop.sce Type: text/x-c++ Size: 3006 bytes Desc: not available URL: From dkajah at gmail.com Sun Nov 25 23:04:56 2012 From: dkajah at gmail.com (Daniel Penalva) Date: Sun, 25 Nov 2012 20:04:56 -0200 Subject: [Scilab-users] Emulate Object Oriented Programming In-Reply-To: <9120d3c2e7c98d0009db563874f1217e@contrib.scilab.org> References: <9120d3c2e7c98d0009db563874f1217e@contrib.scilab.org> Message-ID: Hi, By safe you mean that the field is protected or private ? i dont know if it is possible in scilab nowadays ... [ ]s On Sun, Nov 25, 2012 at 7:28 PM, wrote: > Hi, > > I have a problem with the possibility of emulating OOP in Scilab with > tlists, that prevents me to have safe "set" methods. > In the script in attachment, I created a human "class" with > two fields: name (a scalar string) and weight (a scalar real). > > The problem is : how have a "set" method which is both simple and safe ? > > Here is how this class works : > > bob=human_new() > > This is simple, but is unsafe: > > bob.name="Bob" > bob.weight=70 > bob.name=-12 // Oups ! > > These statements are safe: > > bob=human_set(bob,"name","**Will") > bob=human_set(bob,"weight",80) > > It is safe in the sense that the following statements produce an error: > > bob=human_set(bob,"weight",-**12) > > The function "human_set" is safe but somewhat unconvenient to use. > > The question is : > > How to make so that bob.name="Will" makes the code > bob=human_set(bob,"name","**Will") be executed ? Can overloading do this ? > > Is the only possible way is at the C level with the sci_percent* functions > that Denizet wrote : > > http://gitweb.scilab.org/?p=**scilab.git;a=blob;f=scilab/** > modules/xml/sci_gateway/cpp/**sci_percent_XMLAttr_size.cpp;**h=** > 9d3b361bcbe6416e62f422dd448aa7**2d65f1fe4c;hb=HEAD > > for the XML module ? > > Best regards, > > Micha?l > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- *Democracia Digital Direta Carta: *http://li7e.org/ddd2 *Des Carta coletiva aos ministerios * http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam * * *AfroAmbiental eh sociedade em Axe e Diversidade* http://afroambiental.org Daniel Penalva State related activity, currently: Phd - Physics in Institute for Theoretical Physics - http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php Transparency portal(workflows): http://www.nightsc.com.br/aa/interface_v0.1.php *look for SUoU9 user, or do ctrl+f and SUoU9* FLOSS and related ideas enthusiastic -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab-enterprises.com Mon Nov 26 09:35:56 2012 From: sylvestre.ledru at scilab-enterprises.com (Sylvestre Ledru) Date: Mon, 26 Nov 2012 09:35:56 +0100 Subject: [Scilab-users] Display of string in Scilab [was: Re: csvWrite trouble] In-Reply-To: <50B0FB9F.8030606@durietz.se> References: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> <50B0E668.1080204@scilab-enterprises.com> <50B0EBC8.9000706@durietz.se> <50B0F5DB.7090808@scilab-enterprises.com> <50B0FB9F.8030606@durietz.se> Message-ID: <50B329EC.9030208@scilab-enterprises.com> Hello, I think it is a legacy behavior of Scilab. It is the same with the "!" around the strings. It complexifies the copy/paste. We could update these behaviors in a future release but this would probably break some unitary tests and some other code. Sylvestre On 24/11/2012 17:53, Stefan Du Rietz wrote: > Hello, > > I know that, but why is it displayed like that? It is confusing and > makes it unnecessary bulky. > > It would also be fine to be able to choose to avoid all the empty lines > in displaying things (like in Matlab) ;-) > > Stefan > > On 2012-11-24 17:29, Sylvestre Ledru wrote: > -------------------- >> Hello, >> >> It is a just a display. The vector has still a size of 2x1: >> >> -->size(s) >> ans = >> >> 2. 1. >> >> Sylvestre >> >> On 24/11/2012 16:46, Stefan Du Rietz wrote: >>> Hello Sylvestre, >>> >>> A similar question: >>> Why are string vectors written with every other line empty? >>> >>> -->s = [ >>> -->"This is a two row" >>> -->"string vector" >>> -->] >>> s = >>> >>> !This is a two row ! >>> ! ! >>> !string vector ! >>> >>> Regards >>> Stefan >>> >>> On 2012-11-24 16:23, Sylvestre Ledru wrote: >>> -------------------- >>>> Hello, >>>> >>>> This bug has been fixed since then and will be part of the 5.4.1 >>>> release. >>>> See: >>>> http://bugzilla.scilab.org/11991 >>>> >>>> Sylvestre >>>> >>>> On 24/11/2012 12:44, A. Vogt-Schilb wrote: >>>>> Hi >>>>> >>>>> Make sure you use the last versions. >>>>> >>>>> I had noticed a bug like this in my windows machine. It was worked >>>>> around telling csv to use Linux ends of line. Something like >>>>> csv_default("eol", "unix ") >>>>> >>>>> best thing to do to debug is open your csv with a good text editor and >>>>> show all characters to see what end of line chars are being used >>>>> >>>>> Sent from my phone >>>>> >>>>> Paul Carrico wrote: >>>>> >>>>> Hi, >>>>> >>>>> >>>>> >>>>> It?s a pity but when I use csvWrite function, each line is >>>>> separated by >>>>> a blank line ?. >>>>> >>>>> >>>>> >>>>> Paul >>>>> >>>>> >>>>> >>>>> ##################################################### >>>>> >>>>> mode(0) >>>>> >>>>> >>>>> >>>>> PATH= get_absolute_file_path("test_csvWrite.sce"); >>>>> >>>>> FILE_NAME= "test_csvwrite.csv"; >>>>> >>>>> A= rand(10,3); >>>>> >>>>> >>>>> >>>>> /// test/ >>>>> >>>>> csvWrite(A,PATH+FILE_NAME,","); >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *_Result_*: >>>>> >>>>> 0.50153415976092219,0.28064980218186975,0.40948254754766822 >>>>> >>>>> 0.43685875833034515,0.12800584640353918,0.87841258011758327 >>>>> >>>>> 0.26931248093023896,0.77831285959109664,0.11383596854284406 >>>>> >>>>> 0.6325744865462184,0.2119030449539423,0.19983377400785685 >>>>> >>>>> 0.40519540151581168,0.11213546665385365,0.56186607433483005 >>>>> >>>>> 0.91847078315913677,0.68568959552794695,0.58961773291230202 >>>>> >>>>> 0.043733433354645967,0.15312166837975383,0.68539796629920602 >>>>> >>>>> 0.48185089323669672,0.69708506017923355,0.89062247332185507 >>>>> >>>>> 0.26395560009405017,0.84155184263363481,0.50422128057107329 >>>>> >>>>> 0.41481037065386772,0.40620247554033995,0.34936154074966908 >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Nov 26 10:42:56 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 26 Nov 2012 10:42:56 +0100 Subject: [Scilab-users] Display of string in Scilab [was: Re: csvWrite trouble] In-Reply-To: <50B0EBC8.9000706@durietz.se> References: <8s3uu1uid4p9inrcyli0pmmc.1353757444000@email.android.com> <50B0E668.1080204@scilab-enterprises.com> <50B0EBC8.9000706@durietz.se> Message-ID: <50B339A0.6000309@free.fr> Le 24/11/2012 16:46, Stefan Du Rietz a ?crit : > Hello Sylvestre, > > A similar question: > Why are string vectors written with every other line empty? > > -->s = [ > -->"This is a two row" > -->"string vector" > -->] > s = > > !This is a two row ! > ! ! > !string vector ! Removing useless extra lines is a long pending request posted here with comments: http://bugzilla.scilab.org/show_bug.cgi?id=6286 Samuel From paul.carrico at free.fr Mon Nov 26 11:48:30 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 26 Nov 2012 11:48:30 +0100 Subject: [Scilab-users] vectorization : blocked Message-ID: <000c01cdcbc3$938c5040$baa4f0c0$@carrico@free.fr> Dear All In a vectorization process, I noticed it is strongly recommended to use "^" instead of "**" for vectorized calculation .. Paul ################################### mode(0) A = rand(10,50); B = rand(10,50); C = A -B; D = C.^2; -> ok E = C. **2; -> error . as I did for "traditional" calculations .. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grivet at cnrs-orleans.fr Mon Nov 26 12:18:39 2012 From: grivet at cnrs-orleans.fr (grivet) Date: Mon, 26 Nov 2012 12:18:39 +0100 Subject: [Scilab-users] graphics display In-Reply-To: <000c01cdcbc3$938c5040$baa4f0c0$@carrico@free.fr> References: <000c01cdcbc3$938c5040$baa4f0c0$@carrico@free.fr> Message-ID: <50B3500F.3000201@cnrs-orleans.fr> Hello, I have recently intalled Scilab 5.4.0 on my home computer; it seems that graphics display don't work on this particular machine. Simple plot commands like x = 0:0.1:10; plot2d(x,xin(x); produce a set of ticks and graduations, but no curve. Same behavior for graphics demos: none of them works. The problem remains after four cycles of uninstall/install. The computer is a Dell dimension 5150C, with ATI Readeon X600 SE graphics card and Dell E193FP monitor. The ATI driver version is 8.263.0.0 of june 2006 (latest on the ATI site). Is there anyway I can get Scilab-5.4 to work on this machine ? Thank you in advance for your time and help JP Grivet From jacques.beilin at ensg.eu Mon Nov 26 13:50:37 2012 From: jacques.beilin at ensg.eu (jacques.beilin) Date: Mon, 26 Nov 2012 13:50:37 +0100 Subject: [Scilab-users] module installation Message-ID: <50B3659D.7@ensg.eu> Dear Scilab users, I'm new to Scilab. At the moment I use gnu Octave but I need to be able to use both for teaching purposes. I wrote Octave packages. I'm trying to transform them into Scilab modules. I would like to write Scilab modules buts I do not want to put them on ATOMS (at least for the moment). With Octave it is easy because once the package structure is followed, the package can be zipped (tar.gz) and installed using the command "pkg install my_package.tar.gz". If Octave has been started with sudo, the package is installed in "/usr/local/share/octave/packages/" otherwise it is installed only for the current user (in ~/octave/). Is there a equivalent procedure on Scilab ? I cannot find the documentation about that. Best regards, Jacques -------------- next part -------------- A non-text attachment was scrubbed... Name: jacques_beilin.vcf Type: text/x-vcard Size: 545 bytes Desc: not available URL: From paul.carrico at free.fr Mon Nov 26 13:54:09 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 26 Nov 2012 13:54:09 +0100 Subject: [Scilab-users] basic (stupid ?) question Message-ID: <000c01cdcbd5$21009010$6301b030$@carrico@free.fr> All I'm skeptical regarding following issue : is it necessary to declare twice a variable when using a function, I mean inside and outside the function ? A = zeros(n,n) A = myfunction(..) A = zeros(n,n) Blabla End (that's always I'm doing .) Is there any consequence when using huge matrixes ? paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.gareste at scilab-enterprises.com Mon Nov 26 14:02:20 2012 From: simon.gareste at scilab-enterprises.com (Simon GARESTE) Date: Mon, 26 Nov 2012 14:02:20 +0100 Subject: [Scilab-users] module installation In-Reply-To: <50B3659D.7@ensg.eu> References: <50B3659D.7@ensg.eu> Message-ID: <50B3685C.4080909@scilab-enterprises.com> Hi, With ATOMS, it's not much more complicated. You should develop your module following the structure of the toolbox_skeleton , with an according description file. Once it's done, set your scilab to offLine (atomsSetConfig("offLine", "True")), install your package using atomsInstall (atomsInstall("/path/to/your/zip-or-targz-file")), and load it (atomsLoad("yourmodule")). Once the package is installed, you can set your Scilab back to online (atomsSetConfig("offLine","False")). Note that if you install a module while offLine, you must be offLine to uninstall it, and vice versa. I will update the wiki pages to indicate this procedure. To create your Scilab module, you can follow the indications here and there . Best regards, Simon On 11/26/2012 01:50 PM, jacques.beilin wrote: > Dear Scilab users, > > I'm new to Scilab. At the moment I use gnu Octave but I need to be > able to use both for teaching purposes. > > I wrote Octave packages. I'm trying to transform them into Scilab > modules. I would like to write Scilab modules buts I do not want to > put them on ATOMS (at least for the moment). With Octave it is easy > because once the package structure is followed, the package can be > zipped (tar.gz) and installed using the command "pkg install > my_package.tar.gz". If Octave has been started with sudo, the package > is installed in "/usr/local/share/octave/packages/" otherwise it is > installed only for the current user (in ~/octave/). > > Is there a equivalent procedure on Scilab ? I cannot find the > documentation about that. > > Best regards, > > Jacques > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Simon Gareste Support & Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.70 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.gareste at scilab-enterprises.com Mon Nov 26 14:08:39 2012 From: simon.gareste at scilab-enterprises.com (Simon GARESTE) Date: Mon, 26 Nov 2012 14:08:39 +0100 Subject: [Scilab-users] module installation In-Reply-To: <50B3685C.4080909@scilab-enterprises.com> References: <50B3659D.7@ensg.eu> <50B3685C.4080909@scilab-enterprises.com> Message-ID: <50B369D7.30206@scilab-enterprises.com> Hi again, After a check, it might even not be necessary to be offLine to install it, atomsInstall("/path/to/your/package") works too. The toolbox skeleton is also available in your SCI+/contrib folder Simon On 11/26/2012 02:02 PM, Simon GARESTE wrote: > Hi, > > With ATOMS, it's not much more complicated. > > You should develop your module following the structure of the > toolbox_skeleton > , with an > according description file. Once it's done, set your scilab to offLine > (atomsSetConfig("offLine", "True")), install your package using > atomsInstall (atomsInstall("/path/to/your/zip-or-targz-file")), and > load it (atomsLoad("yourmodule")). > > Once the package is installed, you can set your Scilab back to online > (atomsSetConfig("offLine","False")). Note that if you install a module > while offLine, you must be offLine to uninstall it, and vice versa. > > I will update the wiki pages to indicate this procedure. To create > your Scilab module, you can follow the indications here > and there > . > > Best regards, > > Simon > > On 11/26/2012 01:50 PM, jacques.beilin wrote: >> Dear Scilab users, >> >> I'm new to Scilab. At the moment I use gnu Octave but I need to be >> able to use both for teaching purposes. >> >> I wrote Octave packages. I'm trying to transform them into Scilab >> modules. I would like to write Scilab modules buts I do not want to >> put them on ATOMS (at least for the moment). With Octave it is easy >> because once the package structure is followed, the package can be >> zipped (tar.gz) and installed using the command "pkg install >> my_package.tar.gz". If Octave has been started with sudo, the package >> is installed in "/usr/local/share/octave/packages/" otherwise it is >> installed only for the current user (in ~/octave/). >> >> Is there a equivalent procedure on Scilab ? I cannot find the >> documentation about that. >> >> Best regards, >> >> Jacques >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > Simon Gareste > Support & Development Engineer > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > Phone: +33.1.80.77.04.70 > http://www.scilab-enterprises.com > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Simon Gareste Support & Development Engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.70 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jacques.beilin at ensg.eu Mon Nov 26 14:36:20 2012 From: jacques.beilin at ensg.eu (jacques.beilin) Date: Mon, 26 Nov 2012 14:36:20 +0100 Subject: [Scilab-users] module installation In-Reply-To: <50B3685C.4080909@scilab-enterprises.com> References: <50B3659D.7@ensg.eu> <50B3685C.4080909@scilab-enterprises.com> Message-ID: <50B37054.1060509@ensg.eu> Thank you for your help. I had already followed the toolbox_skeleton so my package is installed. Best regards, Jacques Le 26/11/2012 14:02, Simon GARESTE a ?crit : > Hi, > > With ATOMS, it's not much more complicated. > > You should develop your module following the structure of the > toolbox_skeleton > , with an > according description file. Once it's done, set your scilab to offLine > (atomsSetConfig("offLine", "True")), install your package using > atomsInstall (atomsInstall("/path/to/your/zip-or-targz-file")), and > load it (atomsLoad("yourmodule")). > > Once the package is installed, you can set your Scilab back to online > (atomsSetConfig("offLine","False")). Note that if you install a module > while offLine, you must be offLine to uninstall it, and vice versa. > > I will update the wiki pages to indicate this procedure. To create > your Scilab module, you can follow the indications here > and there > . > > Best regards, > > Simon > > On 11/26/2012 01:50 PM, jacques.beilin wrote: >> Dear Scilab users, >> >> I'm new to Scilab. At the moment I use gnu Octave but I need to be >> able to use both for teaching purposes. >> >> I wrote Octave packages. I'm trying to transform them into Scilab >> modules. I would like to write Scilab modules buts I do not want to >> put them on ATOMS (at least for the moment). With Octave it is easy >> because once the package structure is followed, the package can be >> zipped (tar.gz) and installed using the command "pkg install >> my_package.tar.gz". If Octave has been started with sudo, the package >> is installed in "/usr/local/share/octave/packages/" otherwise it is >> installed only for the current user (in ~/octave/). >> >> Is there a equivalent procedure on Scilab ? I cannot find the >> documentation about that. >> >> Best regards, >> >> Jacques >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > Simon Gareste > Support & Development Engineer > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > Phone: +33.1.80.77.04.70 > http://www.scilab-enterprises.com > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: jacques_beilin.vcf Type: text/x-vcard Size: 545 bytes Desc: not available URL: From dkajah at gmail.com Mon Nov 26 18:42:32 2012 From: dkajah at gmail.com (Daniel Penalva) Date: Mon, 26 Nov 2012 15:42:32 -0200 Subject: [Scilab-users] On the needs of a Scilab Vectorization Oriented Help Message-ID: Dear all, Its my first intuition, when i roll down my eyes through ScilabList threads, that it's very necessary to enroll the actual Scilab reference/documentation with a vectorization tutorial. I am very sorry if iam being redundant here. best wishes. -- *Democracia Digital Direta Carta: *http://li7e.org/ddd2 *Des Carta coletiva aos ministerios * http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam * * *AfroAmbiental eh sociedade em Axe e Diversidade* http://afroambiental.org Daniel Penalva State related activity, currently: Phd - Physics in Institute for Theoretical Physics - http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php Transparency portal(workflows): http://www.nightsc.com.br/aa/interface_v0.1.php *look for SUoU9 user, or do ctrl+f and SUoU9* FLOSS and related ideas enthusiastic -------------- next part -------------- An HTML attachment was scrubbed... URL: From serge.steer at inria.fr Mon Nov 26 19:09:19 2012 From: serge.steer at inria.fr (Serge Steer) Date: Mon, 26 Nov 2012 19:09:19 +0100 (CET) Subject: [Scilab-users] Emulate Object Oriented Programming In-Reply-To: Message-ID: <802281485.8447245.1353953359549.JavaMail.root@inria.fr> For safe mode you can use tlist with no field names. See the example in the attached file Serge Steer ----- Mail original ----- > De: "Daniel Penalva" > ?: "International users mailing list for Scilab." > > Envoy?: Dimanche 25 Novembre 2012 23:04:56 > Objet: Re: [Scilab-users] Emulate Object Oriented Programming > Hi, > By safe you mean that the field is protected or private ? i dont know > if it is possible in scilab nowadays ... > [ ]s > On Sun, Nov 25, 2012 at 7:28 PM, < michael.baudin at contrib.scilab.org > > wrote: > > Hi, > > > I have a problem with the possibility of emulating OOP in Scilab > > with > > > tlists, that prevents me to have safe "set" methods. > > > In the script in attachment, I created a human "class" with > > > two fields: name (a scalar string) and weight (a scalar real). > > > The problem is : how have a "set" method which is both simple and > > safe ? > > > Here is how this class works : > > > bob=human_new() > > > This is simple, but is unsafe: > > > bob.name ="Bob" > > > bob.weight=70 > > > bob.name =-12 // Oups ! > > > These statements are safe: > > > bob=human_set(bob,"name"," Will") > > > bob=human_set(bob,"weight",80) > > > It is safe in the sense that the following statements produce an > > error: > > > bob=human_set(bob,"weight",- 12) > > > The function "human_set" is safe but somewhat unconvenient to use. > > > The question is : > > > How to make so that bob.name ="Will" makes the code > > bob=human_set(bob,"name"," Will") be executed ? Can overloading do > > this ? > > > Is the only possible way is at the C level with the sci_percent* > > functions that Denizet wrote : > > > http://gitweb.scilab.org/?p= scilab.git;a=blob;f=scilab/ > > modules/xml/sci_gateway/cpp/ sci_percent_XMLAttr_size.cpp; h= > > 9d3b361bcbe6416e62f422dd448aa7 2d65f1fe4c;hb=HEAD > > > for the XML module ? > > > Best regards, > > > Micha?l > > > _______________________________________________ > > > users mailing list > > > users at lists.scilab.org > > > http://lists.scilab.org/mailman/listinfo/users > > -- > Democracia Digital Direta > Carta: > http://li7e.org/ddd2 > Des Carta coletiva aos ministerios > http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam > AfroAmbiental eh sociedade em Axe e Diversidade > http://afroambiental.org > Daniel Penalva > State related activity, currently: > Phd - Physics in Institute for Theoretical Physics - > http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php > Transparency portal(workflows): > http://www.nightsc.com.br/aa/interface_v0.1.php *look for SUoU9 > user, or do ctrl+f and SUoU9* > FLOSS and related ideas enthusiastic > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: human.sci Type: text/x-matlab Size: 937 bytes Desc: not available URL: From paul.carrico at free.fr Mon Nov 26 19:53:56 2012 From: paul.carrico at free.fr (Paul Carrico) Date: Mon, 26 Nov 2012 19:53:56 +0100 Subject: [Scilab-users] On the needs of a Scilab Vectorization Oriented Help In-Reply-To: References: Message-ID: <001201cdcc07$640578d0$2c106a70$@carrico@free.fr> Dear Daniel, Here is a personal ? reminder ? I?m making for a current development by replacing almost all the loops by a ?vectorized? variables, the time CPU has been divided by nearly 10 for a complex modeling. Hope this help Some advices : - You?ve to understand how Scilab proceed when using vectorization (see some examples) - The kronecker product ?.*.? is one of your best friend .. - The dot one as well ?.? Paul De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Daniel Penalva Envoy? : lundi 26 novembre 2012 18:43 ? : International users mailing list for Scilab. Objet : [Scilab-users] On the needs of a Scilab Vectorization Oriented Help Dear all, Its my first intuition, when i roll down my eyes through ScilabList threads, that it's very necessary to enroll the actual Scilab reference/documentation with a vectorization tutorial. I am very sorry if iam being redundant here. best wishes. -- Democracia Digital Direta Carta: http://li7e.org/ddd2 Des Carta coletiva aos ministerios http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclage m-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam AfroAmbiental eh sociedade em Axe e Diversidade http://afroambiental.org Daniel Penalva State related activity, currently: Phd - Physics in Institute for Theoretical Physics - http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php Transparency portal(workflows): http://www.nightsc.com.br/aa/interface_v0.1.php *look for SUoU9 user, or do ctrl+f and SUoU9* FLOSS and related ideas enthusiastic -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tutorial_vectorization_V0.1.sce Type: application/octet-stream Size: 15312 bytes Desc: not available URL: From byronmillet at hotmail.com Mon Nov 26 22:12:13 2012 From: byronmillet at hotmail.com (Byron Millet) Date: Mon, 26 Nov 2012 14:12:13 -0700 Subject: [Scilab-users] Using Scilab to plot via C++ code Message-ID: Hello, I have a program written in C++ that reads in multiple data files and processes data.At the end of the processing I am trying to produce a plot of an approximately 300 x 350 lattice of sites. I ran several tests and was able to generate a plot. I then moved the plotting routine to a later part of the program (after many calculations are performed).Initially I was able to generate a plot, but my calculations were off. Once I fixed the calculations the plotting is no longer working. The C++ code first creates a named matrix of double that contains all the data to be plotted.Then it runs a sciilab script that actually generates the plot. When the script executes it is generating the graphics window with the axes but instead of giving me a plot of the data I am getting:FecFacetDrawerJoGL::drawFec: No more memory I have tried increasing the stacksize by including the command "stacksize("max") at the start of my script but the error is still occurring. Here is the script that my C++ code calls: stacksize("max");X = [1:349];Y = [1:287];disp("executing Scilab script")f=scf(0);f.color_map = jetcolormap(50);Sgrayplot(Y,X,d);disp("Done"); Any help would be greatly appreciated. Byron -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodrigoathomas at gmail.com Mon Nov 26 20:33:13 2012 From: rodrigoathomas at gmail.com (Rodrigo Thomas) Date: Mon, 26 Nov 2012 17:33:13 -0200 Subject: [Scilab-users] solve complex ode Message-ID: Hello, I'm having a problem to solve complex ordinary differential equations like (a simplified one): dx/dt = i*x. I tried to use: -->function xdot=f(x,t) -->xdot=%i*x -->endfunction -->x0=[1;0]; -->t0=0; -->t=linspace(0,10,100); -->y=ode(x0,t0,t,f); -->plot(t,y) but Scilab give the plot of a constant line in x=1 and a exponential term (real expoent). How can I solve it? hug, Thomas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.baudin at contrib.scilab.org Tue Nov 27 10:08:07 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Tue, 27 Nov 2012 10:08:07 +0100 Subject: [Scilab-users] Emulate Object Oriented Programming In-Reply-To: <802281485.8447245.1353953359549.JavaMail.root@inria.fr> References: <802281485.8447245.1353953359549.JavaMail.root@inria.fr> Message-ID: Hi, Thank you Serge for this interesting script. Defining a tlist with unnamed fields is indeed an idea which is quite unusual ! You will find in attachment a modified version, merging your proposal and my previous attempt. On the user's side, the "object" can now produce messages such as: -->bob.weight=-5 !--error 10000 Expect nonnegative weight. at line 18 of function %s_i_THUMAN called by : bob.weight=-5 which is excellent. On the developper's side, the "set" function (which is called insertion in the overloading vocabulary), is now much less clear, because fields are now identified with their index (i.e. 1, 2, 3,...) instead of their name (i.e. "name", "weight", ...). For example, this is the code to set the "weight" field: function h=%s_i_THUMAN(field,value,h) [...] select field case "weight" [...] if (value<0) then error("Expect nonnegative weight.") end h(4)=value [...] So this is not an ideal solution: it has some advantages for the users, but is much more difficult for the developper. It is a huge source of bugs, for example if we mix up the indices: e.g. 2 instead of 4 will set the "name" instead of the "weight". In the C language, we would #define constants to these indices, so that we can avoid this problem. But this is Scilab, not C. Isn't there a simpler way ? In other words, couldn't we get the named fields both from the user's and the developper's sides ? Best regards, Micha?l Le 2012-11-26 19:09, Serge Steer a ?crit?: > For safe mode you can use tlist with no field names. See the example > in the attached file > > Serge Steer > > ------------------------- > >> DE: "Daniel Penalva" >> ?: "International users mailing list for Scilab." >> >> ENVOY?: Dimanche 25 Novembre 2012 23:04:56 >> OBJET: Re: [Scilab-users] Emulate Object Oriented Programming >> >> Hi, >> >> By safe you mean that the field is protected or private ? i dont >> know if it is possible in scilab nowadays ... >> >> [ ]s >> >> On Sun, Nov 25, 2012 at 7:28 PM, >> wrote: >> >>> Hi, >>> >>> I have a problem with the possibility of emulating OOP in Scilab >>> with >>> tlists, that prevents me to have safe "set" methods. >>> In the script in attachment, I created a human "class" with >>> two fields: name (a scalar string) and weight (a scalar real). >>> >>> The problem is : how have a "set" method which is both simple and >>> safe ? >>> >>> Here is how this class works : >>> >>> bob=human_new() >>> >>> This is simple, but is unsafe: >>> >>> bob.name [1]="Bob" >>> bob.weight=70 >>> bob.name [1]=-12 // Oups ! >>> >>> These statements are safe: >>> >>> bob=human_set(bob,"name","Will") >>> bob=human_set(bob,"weight",80) >>> >>> It is safe in the sense that the following statements produce an >>> error: >>> >>> bob=human_set(bob,"weight",-12) >>> >>> The function "human_set" is safe but somewhat unconvenient to use. >>> >>> The question is : >>> >>> How to make so that bob.name [1]="Will" makes the code >>> bob=human_set(bob,"name","Will") be executed ? Can overloading do >>> this ? >>> >>> Is the only possible way is at the C level with the sci_percent* >>> functions that Denizet wrote : >>> >>> >>> http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/xml/sci_gateway/cpp/sci_percent_XMLAttr_size.cpp;h=9d3b361bcbe6416e62f422dd448aa72d65f1fe4c;hb=HEAD >>> [2] >>> >>> for the XML module ? >>> >>> Best regards, >>> >>> Micha?l >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users [3] >> >> -- >> Democracia Digital Direta >> Carta: >> >> http://li7e.org/ddd2 [4] >> >> Des Carta coletiva aos ministerios >> >> http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam >> [5] >> >> AFROAMBIENTAL EH SOCIEDADE EM AXE E DIVERSIDADE >> >> http://afroambiental.org [6] >> >> Daniel Penalva >> >> State related activity, currently: >> Phd - Physics in Institute for Theoretical Physics - >> http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php [7] >> >> Transparency portal(workflows): >> http://www.nightsc.com.br/aa/interface_v0.1.php [8] *look for SUoU9 >> user, or do ctrl+f and SUoU9* >> >> FLOSS and related ideas enthusiastic >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > Links: > ------ > [1] http://bob.name > [2] > > http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/xml/sci_gateway/cpp/sci_percent_XMLAttr_size.cpp;h=9d3b361bcbe6416e62f422dd448aa72d65f1fe4c;hb=HEAD > [3] http://lists.scilab.org/mailman/listinfo/users > [4] http://li7e.org/ddd2 > [5] > > http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam > [6] http://afroambiental.org > [7] http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php > [8] http://www.nightsc.com.br/aa/interface_v0.1.php > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: human-v3.sci Type: text/x-c++ Size: 2948 bytes Desc: not available URL: From michael.baudin at contrib.scilab.org Tue Nov 27 10:20:02 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Tue, 27 Nov 2012 10:20:02 +0100 Subject: [Scilab-users] On the needs of a Scilab Vectorization Oriented Help In-Reply-To: References: Message-ID: <6ed94be67346625bc8b3f4beaa73783e@contrib.scilab.org> Hi, I feel that vectorization cannot be completely covered in a typical 2-pages document that we could find in Scilab's help. This is because the "vectorization" problem is contained in a more general "performance" topic, which is beyond vectorization. For example, it is much more efficient to use the backslash operator combined with an optimized linear algebra library such as the Intel MKL (or ATLAS), than to use a user-defined vectorized Gaussian elimination algorithm. There is also the problem of measuring the performance, profiling a function, etc... On the other hand, the section 5 of "Programming in Scilab" focuses on performance and presents the most common vectorization principles: http://forge.scilab.org/index.php/p/docprogscilab/downloads/ It is an open-source document, so feel free to comment it, or to contribute. Best regards, Micha?l Le 2012-11-26 18:42, Daniel Penalva a ?crit?: > Dear all, > > Its my first intuition, when i roll down my eyes through ScilabList > threads, that it's very necessary to enroll the actual Scilab > reference/documentation with a vectorization tutorial. I am very > sorry > if iam being redundant here. > > best wishes. > > -- > Democracia Digital Direta > Carta: > > http://li7e.org/ddd2 [1] > > Des Carta coletiva aos ministerios > > http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam > [2] > > AFROAMBIENTAL EH SOCIEDADE EM AXE E DIVERSIDADE > > http://afroambiental.org [3] > > Daniel Penalva > > State related activity, currently: > Phd - Physics in Institute for Theoretical Physics - > http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php [4] > > Transparency portal(workflows): > http://www.nightsc.com.br/aa/interface_v0.1.php [5]? *look for SUoU9 > user, or do ctrl+f and SUoU9* > > FLOSS and related ideas enthusiastic > > > > Links: > ------ > [1] http://li7e.org/ddd2 > [2] > > http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam > [3] http://afroambiental.org > [4] http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php > [5] http://www.nightsc.com.br/aa/interface_v0.1.php > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Mike at Page-One.Waitrose.com Tue Nov 27 11:10:30 2012 From: Mike at Page-One.Waitrose.com (Mike Page) Date: Tue, 27 Nov 2012 10:10:30 -0000 Subject: [Scilab-users] Emulate Object Oriented Programming In-Reply-To: Message-ID: You could of course "define constants" in Scilab. This is what I usually do: [NONE, CONTINUOUS, DISCRETE, FFT] = (1, 2, 3, 4); OK - not perfect, but it makes code more readable. HTH, Mike. -----Original Message----- From: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org]On Behalf Of michael.baudin at contrib.scilab.org Sent: 27 November 2012 09:08 To: users at lists.scilab.org Subject: Re: [Scilab-users] Emulate Object Oriented Programming Hi, Thank you Serge for this interesting script. Defining a tlist with unnamed fields is indeed an idea which is quite unusual ! You will find in attachment a modified version, merging your proposal and my previous attempt. On the user's side, the "object" can now produce messages such as: -->bob.weight=-5 !--error 10000 Expect nonnegative weight. at line 18 of function %s_i_THUMAN called by : bob.weight=-5 which is excellent. On the developper's side, the "set" function (which is called insertion in the overloading vocabulary), is now much less clear, because fields are now identified with their index (i.e. 1, 2, 3,...) instead of their name (i.e. "name", "weight", ...). For example, this is the code to set the "weight" field: function h=%s_i_THUMAN(field,value,h) [...] select field case "weight" [...] if (value<0) then error("Expect nonnegative weight.") end h(4)=value [...] So this is not an ideal solution: it has some advantages for the users, but is much more difficult for the developper. It is a huge source of bugs, for example if we mix up the indices: e.g. 2 instead of 4 will set the "name" instead of the "weight". In the C language, we would #define constants to these indices, so that we can avoid this problem. But this is Scilab, not C. Isn't there a simpler way ? In other words, couldn't we get the named fields both from the user's and the developper's sides ? Best regards, Micha?l Le 2012-11-26 19:09, Serge Steer a ?crit : > For safe mode you can use tlist with no field names. See the example > in the attached file > > Serge Steer > > ------------------------- > >> DE: "Daniel Penalva" >> ?: "International users mailing list for Scilab." >> >> ENVOY?: Dimanche 25 Novembre 2012 23:04:56 >> OBJET: Re: [Scilab-users] Emulate Object Oriented Programming >> >> Hi, >> >> By safe you mean that the field is protected or private ? i dont >> know if it is possible in scilab nowadays ... >> >> [ ]s >> >> On Sun, Nov 25, 2012 at 7:28 PM, >> wrote: >> >>> Hi, >>> >>> I have a problem with the possibility of emulating OOP in Scilab >>> with >>> tlists, that prevents me to have safe "set" methods. >>> In the script in attachment, I created a human "class" with >>> two fields: name (a scalar string) and weight (a scalar real). >>> >>> The problem is : how have a "set" method which is both simple and >>> safe ? >>> >>> Here is how this class works : >>> >>> bob=human_new() >>> >>> This is simple, but is unsafe: >>> >>> bob.name [1]="Bob" >>> bob.weight=70 >>> bob.name [1]=-12 // Oups ! >>> >>> These statements are safe: >>> >>> bob=human_set(bob,"name","Will") >>> bob=human_set(bob,"weight",80) >>> >>> It is safe in the sense that the following statements produce an >>> error: >>> >>> bob=human_set(bob,"weight",-12) >>> >>> The function "human_set" is safe but somewhat unconvenient to use. >>> >>> The question is : >>> >>> How to make so that bob.name [1]="Will" makes the code >>> bob=human_set(bob,"name","Will") be executed ? Can overloading do >>> this ? >>> >>> Is the only possible way is at the C level with the sci_percent* >>> functions that Denizet wrote : >>> >>> >>> http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/xml/sci_gateway/cpp/sci_percent_XMLAttr_size.cpp;h=9d3b361bcbe6416e62f422dd448aa72d65f1fe4c;hb=HEAD >>> [2] >>> >>> for the XML module ? >>> >>> Best regards, >>> >>> Micha?l >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users [3] >> >> -- >> Democracia Digital Direta >> Carta: >> >> http://li7e.org/ddd2 [4] >> >> Des Carta coletiva aos ministerios >> >> http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam >> [5] >> >> AFROAMBIENTAL EH SOCIEDADE EM AXE E DIVERSIDADE >> >> http://afroambiental.org [6] >> >> Daniel Penalva >> >> State related activity, currently: >> Phd - Physics in Institute for Theoretical Physics - >> http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php [7] >> >> Transparency portal(workflows): >> http://www.nightsc.com.br/aa/interface_v0.1.php [8] *look for SUoU9 >> user, or do ctrl+f and SUoU9* >> >> FLOSS and related ideas enthusiastic >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > Links: > ------ > [1] http://bob.name > [2] > > http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/xml/sci_gateway/cpp/sci_percent_XMLAttr_size.cpp;h=9d3b361bcbe6416e62f422dd448aa72d65f1fe4c;hb=HEAD > [3] http://lists.scilab.org/mailman/listinfo/users > [4] http://li7e.org/ddd2 > [5] > > http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam > [6] http://afroambiental.org > [7] http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php > [8] http://www.nightsc.com.br/aa/interface_v0.1.php > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From madilyn at student.chalmers.se Tue Nov 27 13:25:44 2012 From: madilyn at student.chalmers.se (Madilyn Ottosson) Date: Tue, 27 Nov 2012 04:25:44 -0800 (PST) Subject: [Scilab-users] USB dongle & Xcos Message-ID: <1354019144511-4025354.post@n3.nabble.com> A friend and I are doing a project. We are using Xcos to modeling and regulate a machine. Now we want to connect Xcos with the real machine. We have a USB dongle from Kvaser and are going to use PCAN for the communication. How do we connect Xcos with the dongle/machine? -- View this message in context: http://mailinglists.scilab.org/USB-dongle-Xcos-tp4025354.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From vogt at centre-cired.fr Tue Nov 27 14:03:20 2012 From: vogt at centre-cired.fr (Adrien Vogt-Schilb) Date: Tue, 27 Nov 2012 14:03:20 +0100 Subject: [Scilab-users] solve complex ode In-Reply-To: References: Message-ID: <50B4BA18.6090700@centre-cired.fr> On 26/11/2012 20:33, Rodrigo Thomas wrote: > Hello, > > I'm having a problem to solve complex ordinary differential equations > like (a simplified one): > > dx/dt = i*x. > > I tried to use: > > -->function xdot=f(x,t) > -->xdot=%i*x > -->endfunction > -->x0=[1;0]; > -->t0=0; > -->t=linspace(0,10,100); > -->y=ode(x0,t0,t,f); > -->plot(t,y) > > but Scilab give the plot of a constant line in x=1 and a exponential > term (real expoent). How can I solve it? > > hug, > Thomas. > > Hi Thomas, Indeed, the result of this ODE is very different than the result of the naive one: xx(:,1) = x0; dt=0.1; tt = 0:dt:10; for i=1:size(t,"*") xx(:,i+1) = xx(:,i)+dt*f(xx(:,i)); end Now, the ODE help page seems to imply that ODE should be used with rela matrixes and functions So, the solution seems to be to write real functions, something like function xdot =f(x) im = x(1) re = x(2) dim = re dre = -im xdot = [dre; dim] endfunction hop this helps -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Wed Nov 28 09:23:08 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 28 Nov 2012 09:23:08 +0100 Subject: [Scilab-users] Emulate Object Oriented Programming In-Reply-To: References: <802281485.8447245.1353953359549.JavaMail.root@inria.fr> Message-ID: <50B5C9EC.3040004@inria.fr> Le 27/11/2012 10:08, michael.baudin at contrib.scilab.org a ?crit : > Hi, > > Thank you Serge for this interesting script. > Defining a tlist with unnamed fields is indeed an idea which > is quite unusual ! > > You will find in attachment a modified version, merging your proposal > and my > previous attempt. > > On the user's side, the "object" can now produce messages such as: > > -->bob.weight=-5 > !--error 10000 > Expect nonnegative weight. > at line 18 of function %s_i_THUMAN called by : > bob.weight=-5 > > which is excellent. > > On the developper's side, the "set" function (which is > called insertion in the overloading vocabulary), is now > much less clear, because fields are now identified with > their index (i.e. 1, 2, 3,...) instead of their name > (i.e. "name", "weight", ...). > You can also use tlist with names, to index the entry, just use "hidden" field names instead of the user one for example tlist(["human","%name","%surname",...) so the developper uses the %name field and the user the name one. Serge From adelson.oliveira at gmail.com Wed Nov 28 17:11:23 2012 From: adelson.oliveira at gmail.com (Adelson Oliveira) Date: Wed, 28 Nov 2012 14:11:23 -0200 Subject: [Scilab-users] Vectorial export to PDF Message-ID: Hi, Scilab (5.4.0) allows for exporting figures to vectorial and bitmat formats as, for example, PDF and PNG. Sometimes I hide portions of a picture using a white rectangle. This brings no problem for bitmap formats. Vectorial formats are different. The following code draws a white rectangle over an empty box in Scilab 5.4.0. I converted it to PNG and PDF (attachments) formats. A comparison between them shows that in the PDF file the white rectangle is over the surrounding box while the PNG doesn't show it. What can be done to have PDF and PNG files looking equally ? Scilab code: xfpolys([0;[0:18]';18],[0;ones(19,1);0],-8) plot2d(0,0,1,"012"," ",[0,0,21,2]) PS: For a visible rectangle, change the xfpolys command to, xfpolys([0;[0:18]';18],[0;ones(19,1);0],-1) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure.png Type: image/png Size: 2302 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: figure.pdf Type: application/pdf Size: 1175 bytes Desc: not available URL: From julien.langouet at gmail.com Wed Nov 28 20:16:17 2012 From: julien.langouet at gmail.com (julien.langouet) Date: Wed, 28 Nov 2012 11:16:17 -0800 (PST) Subject: [Scilab-users] Scilab date and hour functions Message-ID: <1354130177632-4025363.post@n3.nabble.com> Hello, I'm a beginner in Scilab. However I'm trying to use it for a special application. I participate to the Shell Eco Marathon with my college team. And I want to analyse data from an electrical logger. I'm now in trouble with Scilab because I want to create a matrix containing the time corresponding with the recording time. The logger records 10 times a second (10Hz) some electrical data. There is a "time matrix" in the data file but it's in millisecond. So after 1 hour recording data, I have in the time matrix something like 3600000. I need it to be able to analyse a graph depending on time My question is : How can I display or create a matrix with the time in a different format? I would like to have the time displayed in this kind of format hh:mm:ss,ms for exemple : 01:15:36,4 ... Is this possible? Thank you very much. Julien Langouet -- View this message in context: http://mailinglists.scilab.org/Scilab-date-and-hour-functions-tp4025363.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From amonmayr at laas.fr Wed Nov 28 21:44:39 2012 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Wed, 28 Nov 2012 21:44:39 +0100 Subject: [Scilab-users] =?utf-8?q?Matrix_of_function_pointers=3F?= Message-ID: <2d3b-50b67780-31-41190480@130597042> Hi all, Is it possible to define a matrix of function? Something like: f=[c,s]; where c and s are function pointers and [.,.] is overloaded in such a way that: f(x)=[c(x),s(x)]; I tried to play with %fptr_c_fptr but without success. Any idea? Cheers, Antoine From sgougeon at free.fr Wed Nov 28 22:54:26 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 28 Nov 2012 22:54:26 +0100 Subject: [Scilab-users] Matrix of function pointers? In-Reply-To: <2d3b-50b67780-31-41190480@130597042> References: <2d3b-50b67780-31-41190480@130597042> Message-ID: <50B68812.9030304@free.fr> Hello Antoine, Le 28/11/2012 21:44, Antoine Monmayrant a ?crit : > .../... > > I tried to play with %fptr_c_fptr but without success. It could depend on the container you choose. The following works well: function r=%fptr_c_fptr(f,g) r = tlist(["fptrL"], f, g) endfunction // ---------------------------------- function r =%fptrL_c_fptr(L,f) r = tlist(["fptrL"], L(2:$), f) endfunction -->L = [ disp disp disp] L = L(1) fptrL L(2) L(3) L(4) or function r=%fptr_c_fptr(f,g) r = list(f, g) endfunction // ---------------------------------- function r=%l_c_fptr(L,f) r = list(L(:), f) endfunction -->L = [ disp disp disp] L = L(1) L(2) L(3) or function r=%fptr_c_fptr(f,g) c = cell(1,2) c(1).entries = f c(2).entries = g r = tlist("fptrL",c) endfunction // ---------------------------------- function r=%fptrL_c_fptr(L,f) c = L(2) d = c.dims d(2) = int32(d(2)*1. +1) setfield(2, d, c) L2 = getfield(3,c) // entries L2($+1) = f setfield(3,L2,c) r = tlist("fptrL", L2) endfunction -->L = [ disp rand diag ]; -->L(2)(1)("Hello boy") Hello boy -->L(2)(2)(list(2,3)) ans = 0.8497452 0.8782165 0.5608486 0.6857310 0.0683740 0.6623569 -->L(2)(3)(1:4) ans = 1. 0. 0. 0. 0. 2. 0. 0. 0. 0. 3. 0. 0. 0. 0. 4. you may also prefer using a structure array instead of a cell as container. It should also work. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Nov 28 23:09:17 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 28 Nov 2012 23:09:17 +0100 Subject: [Scilab-users] Scilab date and hour functions In-Reply-To: <1354130177632-4025363.post@n3.nabble.com> References: <1354130177632-4025363.post@n3.nabble.com> Message-ID: <50B68B8D.5070209@free.fr> Le 28/11/2012 20:16, julien.langouet a ?crit : > .../.. > My question is : How can I display or create a matrix with the time in a > different format? I would like to have the time displayed in this kind of > format hh:mm:ss,ms for exemple : 01:15:36,4 ... > Is this possible? Something like the following: t = 3600271; // ms [A,M,J,h,mn,s]=datevec(t/1000/24/3600); out = msprintf("%02d:%02d:%04.1f",h, mn ,s) Hope This Helps Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From serge.steer at inria.fr Wed Nov 28 23:31:34 2012 From: serge.steer at inria.fr (Serge Steer) Date: Wed, 28 Nov 2012 23:31:34 +0100 (CET) Subject: [Scilab-users] Scilab date and hour functions In-Reply-To: <1354130177632-4025363.post@n3.nabble.com> Message-ID: <1493600569.9820648.1354141894975.JavaMail.root@inria.fr> ----- Mail original ----- > De: "julien.langouet" > ?: users at lists.scilab.org > Envoy?: Mercredi 28 Novembre 2012 20:16:17 > Objet: [Scilab-users] Scilab date and hour functions > > My question is : How can I display or create a matrix with the time > in a different format? I would like to have the time displayed in this > kind of format hh:mm:ss,ms for exemple : 01:15:36,4 ... > Is this possible? > It depends on what you what to do: if your purpose is only display you can use the solution proposed by samuel into a dedicated display function for example, suppose you have a 3 column matrix X where the last one is time you can write the function as follow: function mydist(X) [A, M, J, h, mn, s] = datevec(X(:,3)/1000/24/3600); out = msprintf("%02d:%02d:%04.1f\n",h, mn ,s) mprintf("%.3g %.3g %s\",X(:,1),X(:,2),out) endfunction If you want to create an array with a string column formatted as you want, you may use a tlist [A, M, J, h, mn, s] = datevec(X(:,3)/1000/24/3600); out = msprintf("%02d:%02d:%04.1f\n",h, mn ,s) T=tlist(["foo","data","time"],X(:,1:2),out) I hope it will help. Serge Steer > > -- > View this message in context: > http://mailinglists.scilab.org/Scilab-date-and-hour-functions-tp4025363.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 michael.baudin at contrib.scilab.org Thu Nov 29 09:26:15 2012 From: michael.baudin at contrib.scilab.org (michael.baudin at contrib.scilab.org) Date: Thu, 29 Nov 2012 09:26:15 +0100 Subject: [Scilab-users] Emulate Object Oriented Programming In-Reply-To: References: Message-ID: <5107f14270ae1cbd1c8e8bb17d4be584@contrib.scilab.org> Hi, Thanks for the input. I did not know this syntax, but it really works ! -->[NONE, CONTINUOUS, DISCRETE, FFT] = (1, 2, 3, 4) FFT = 4. DISCRETE = 3. CONTINUOUS = 2. NONE = 1. This sounds weird, since the "(1, 2, 3, 4)" variable has no meaning by itself: -->(1, 2, 3, 4) !--error 41 Incompatible output argument. Anyway, with respect to the current topic, this method would require to define these 4 variables (ie NONE, CONTINUOUS, DISCRETE, FFT) in all the functions which access to the fields. This could be done "manually", by pasting this statement (which is far from being perfect), or by defining a global variable (which is far from being perfect). These problems do not occur in the usual case where we have a single function which uses these indices. I'd rather try Serge's method (the one based on the %name field names). I'll share the updated code when I can. Best regards, Micha?l Le 2012-11-27 11:10, Mike Page a ?crit?: > You could of course "define constants" in Scilab. This is what I > usually do: > > [NONE, CONTINUOUS, DISCRETE, FFT] = (1, 2, 3, 4); > > OK - not perfect, but it makes code more readable. > > HTH, > Mike. > > > -----Original Message----- > From: users-bounces at lists.scilab.org > [mailto:users-bounces at lists.scilab.org]On Behalf Of > michael.baudin at contrib.scilab.org > Sent: 27 November 2012 09:08 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Emulate Object Oriented Programming > > > Hi, > > Thank you Serge for this interesting script. > Defining a tlist with unnamed fields is indeed an idea which > is quite unusual ! > > You will find in attachment a modified version, merging your proposal > and my > previous attempt. > > On the user's side, the "object" can now produce messages such as: > > -->bob.weight=-5 > !--error 10000 > Expect nonnegative weight. > at line 18 of function %s_i_THUMAN called by : > bob.weight=-5 > > which is excellent. > > On the developper's side, the "set" function (which is > called insertion in the overloading vocabulary), is now > much less clear, because fields are now identified with > their index (i.e. 1, 2, 3,...) instead of their name > (i.e. "name", "weight", ...). > > For example, this is the code to set the "weight" field: > > function h=%s_i_THUMAN(field,value,h) > [...] > select field > case "weight" > [...] > if (value<0) then > error("Expect nonnegative weight.") > end > h(4)=value > [...] > > So this is not an ideal solution: it has some advantages for the > users, but is much more difficult for the developper. > It is a huge source of bugs, for example if we mix up the > indices: e.g. 2 instead of 4 will set the "name" instead of the > "weight". > In the C language, we would #define constants to these indices, > so that we can avoid this problem. > But this is Scilab, not C. > > Isn't there a simpler way ? > In other words, couldn't we get the named fields both from the > user's and the developper's sides ? > > Best regards, > > Micha?l > > Le 2012-11-26 19:09, Serge Steer a ?crit : >> For safe mode you can use tlist with no field names. See the example >> in the attached file >> >> Serge Steer >> >> ------------------------- >> >>> DE: "Daniel Penalva" >>> ?: "International users mailing list for Scilab." >>> >>> ENVOY?: Dimanche 25 Novembre 2012 23:04:56 >>> OBJET: Re: [Scilab-users] Emulate Object Oriented Programming >>> >>> Hi, >>> >>> By safe you mean that the field is protected or private ? i dont >>> know if it is possible in scilab nowadays ... >>> >>> [ ]s >>> >>> On Sun, Nov 25, 2012 at 7:28 PM, >>> >>> wrote: >>> >>>> Hi, >>>> >>>> I have a problem with the possibility of emulating OOP in Scilab >>>> with >>>> tlists, that prevents me to have safe "set" methods. >>>> In the script in attachment, I created a human "class" with >>>> two fields: name (a scalar string) and weight (a scalar real). >>>> >>>> The problem is : how have a "set" method which is both simple and >>>> safe ? >>>> >>>> Here is how this class works : >>>> >>>> bob=human_new() >>>> >>>> This is simple, but is unsafe: >>>> >>>> bob.name [1]="Bob" >>>> bob.weight=70 >>>> bob.name [1]=-12 // Oups ! >>>> >>>> These statements are safe: >>>> >>>> bob=human_set(bob,"name","Will") >>>> bob=human_set(bob,"weight",80) >>>> >>>> It is safe in the sense that the following statements produce an >>>> error: >>>> >>>> bob=human_set(bob,"weight",-12) >>>> >>>> The function "human_set" is safe but somewhat unconvenient to use. >>>> >>>> The question is : >>>> >>>> How to make so that bob.name [1]="Will" makes the code >>>> bob=human_set(bob,"name","Will") be executed ? Can overloading do >>>> this ? >>>> >>>> Is the only possible way is at the C level with the sci_percent* >>>> functions that Denizet wrote : >>>> >>>> >>>> >>>> http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/xml/sci_gateway/cpp/sci_percent_XMLAttr_size.cpp;h=9d3b361bcbe6416e62f422dd448aa72d65f1fe4c;hb=HEAD >>>> [2] >>>> >>>> for the XML module ? >>>> >>>> Best regards, >>>> >>>> Micha?l >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users [3] >>> >>> -- >>> Democracia Digital Direta >>> Carta: >>> >>> http://li7e.org/ddd2 [4] >>> >>> Des Carta coletiva aos ministerios >>> >>> >>> http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam >>> [5] >>> >>> AFROAMBIENTAL EH SOCIEDADE EM AXE E DIVERSIDADE >>> >>> http://afroambiental.org [6] >>> >>> Daniel Penalva >>> >>> State related activity, currently: >>> Phd - Physics in Institute for Theoretical Physics - >>> http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php [7] >>> >>> Transparency portal(workflows): >>> http://www.nightsc.com.br/aa/interface_v0.1.php [8] *look for SUoU9 >>> user, or do ctrl+f and SUoU9* >>> >>> FLOSS and related ideas enthusiastic >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> >> >> Links: >> ------ >> [1] http://bob.name >> [2] >> >> >> http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/xml/sci_gateway/cpp/sci_percent_XMLAttr_size.cpp;h=9d3b361bcbe6416e62f422dd448aa72d65f1fe4c;hb=HEAD >> [3] http://lists.scilab.org/mailman/listinfo/users >> [4] http://li7e.org/ddd2 >> [5] >> >> >> http://rede.metareciclagem.org/blog/16-10-12/Des-Carta-da-Rede-Metareciclagem-para-o-Ministerio-da-Cultura-e-Outros-Ministerios-Tam >> [6] http://afroambiental.org >> [7] http://www.ift.unesp.br/posgrad/ramais-alunos-pos.php >> [8] http://www.nightsc.com.br/aa/interface_v0.1.php >> >> _______________________________________________ >> 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 antoine.monmayrant at laas.fr Thu Nov 29 09:37:26 2012 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 29 Nov 2012 09:37:26 +0100 Subject: [Scilab-users] Matrix of function pointers? In-Reply-To: <50B68812.9030304@free.fr> References: <2d3b-50b67780-31-41190480@130597042> <50B68812.9030304@free.fr> Message-ID: <50B71EC6.7090408@laas.fr> Hi Samuel, Thanks for your fast and pertinent answer. However, it does not work really well for what I try to do. Indeed, I would like to use f=[c,s] as a normal function that is being able to call something like f(x)=[c(x),s(x)]; I assume that all the functions f,c and s share the same input arguments. With your solution, it could work if I could call "L(:)(x)": L=[cos sin]; L(1)(%pi) ans = - 1. L(2)(%pi) ans = 1.225D-16 //What I would like: L(:)(%pi) //not implemented in scilab ans_I_am_dreaming_about = - 1. 1.225D-16 The ultimate goal here is to build something that I could manipulate like a matrix with a "*" operator that mimic what happens with a normal matrix: L=[a b ; c d]; M=[e f; g h]; N=L*M==[a*e+b*g, a*f+b*h ; c*e+d*g, c*f+d*h]; and N(x)==[a(x)*e(x)+b(x)*g(x), a(x)*f(x)+b(x)*h(x) ; c(x)*e(x)+d(x)*g(x), c(x)*f(x)+d(x)*h(x)]; I am not sure this can be done in scilab... Cheers, Antoine On 28/11/2012 22:54, Samuel Gougeon wrote: > Hello Antoine, > Le 28/11/2012 21:44, Antoine Monmayrant a ?crit : >> .../... >> >> I tried to play with %fptr_c_fptr but without success. > It could depend on the container you choose. The following works well: > function r=%fptr_c_fptr(f,g) > r = tlist(["fptrL"], f, g) > endfunction > // ---------------------------------- > function r =%fptrL_c_fptr(L,f) > r = tlist(["fptrL"], L(2:$), f) > endfunction > > -->L = [ disp disp disp] > L = > L(1) > fptrL > L(2) > L(3) > L(4) > > or > function r=%fptr_c_fptr(f,g) > r = list(f, g) > endfunction > // ---------------------------------- > function r=%l_c_fptr(L,f) > r = list(L(:), f) > endfunction > > -->L = [ disp disp disp] > L = > L(1) > L(2) > L(3) > > or > > function r=%fptr_c_fptr(f,g) > c = cell(1,2) > c(1).entries = f > c(2).entries = g > r = tlist("fptrL",c) > endfunction > // ---------------------------------- > function r=%fptrL_c_fptr(L,f) > c = L(2) > d = c.dims > d(2) = int32(d(2)*1. +1) > setfield(2, d, c) > L2 = getfield(3,c) // entries > L2($+1) = f > setfield(3,L2,c) > r = tlist("fptrL", L2) > endfunction > -->L = [ disp rand diag ]; > > -->L(2)(1)("Hello boy") > Hello boy > > -->L(2)(2)(list(2,3)) > ans = > 0.8497452 0.8782165 0.5608486 > 0.6857310 0.0683740 0.6623569 > > -->L(2)(3)(1:4) > ans = > 1. 0. 0. 0. > 0. 2. 0. 0. > 0. 0. 3. 0. > 0. 0. 0. 4. > > > you may also prefer using a structure array instead of a cell > as container. It should also work. > > 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 dedic at ac.me Thu Nov 29 11:11:38 2012 From: dedic at ac.me (Aleksandar Dedic) Date: Thu, 29 Nov 2012 11:11:38 +0100 Subject: [Scilab-users] installation problem Message-ID: <829bfbd905743f3d61a9b1c2dd5a21b7.squirrel@www.mail.ac.me> Installation is not possible Scilab-5.4.0 Setup message: CPU SSE2 instruction are required for Scilab to run correctly. From antoine.monmayrant at laas.fr Thu Nov 29 12:48:34 2012 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 29 Nov 2012 12:48:34 +0100 Subject: [Scilab-users] installation problem In-Reply-To: <829bfbd905743f3d61a9b1c2dd5a21b7.squirrel@www.mail.ac.me> References: <829bfbd905743f3d61a9b1c2dd5a21b7.squirrel@www.mail.ac.me> Message-ID: <50B74B92.8000502@laas.fr> On 29/11/2012 11:11, Aleksandar Dedic wrote: > Installation is not possible > > Scilab-5.4.0 Setup message: > > CPU SSE2 instruction are required for Scilab to run correctly. What computer are you using? What kind of CPU do you have? Antoine > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Alain.Lamy at cnes.fr Thu Nov 29 12:59:31 2012 From: Alain.Lamy at cnes.fr (Lamy Alain) Date: Thu, 29 Nov 2012 11:59:31 +0000 Subject: [Scilab-users] Changing elements of "global" structure/vector in function Message-ID: <8F232902ADB4E14EB16789FB7006FC840F9463@TW-MBX-P01.cnesnet.ad.cnes.fr> Changing elements of a "global" (i.e. visible) variable in a function may be dangerous. A new structure or vector is created that only contains the elements that have been changed. I would expect the whole structure/vector to be copied locally before changing part of them. A workaround is to create a local copy in the function by an instruction like: A=A (see fun3) which looks a bit strange at first sight as it seems to do nothing. Has anyone an opinion on whether this is considered as correct behaviour or not ? Or is it a bug ? --------------------------------------------- A = [1, 2, 3]; B = struct("a", 2, "b", 3); function fun1() A(2) = 5; disp(A); endfunction function fun2() B.a = 10; disp(B); endfunction function fun3() A=A; A(3) = 6; disp(A); endfunction -->fun1() 0. 5. -->fun2() a: 10 -->fun3() 1. 2. 6. From Alain.Lamy at cnes.fr Thu Nov 29 12:46:22 2012 From: Alain.Lamy at cnes.fr (Lamy Alain) Date: Thu, 29 Nov 2012 11:46:22 +0000 Subject: [Scilab-users] Changing elements of "global" structure/vector in function Message-ID: <8F232902ADB4E14EB16789FB7006FC840F9425@TW-MBX-P01.cnesnet.ad.cnes.fr> Changing elements of a "global" (i.e. visible) variable in a function may be dangerous. A new structure or vector is created that only contains the elements that have been changed. I would expect the whole structure/vector to be copied locally before changing part of them. A workaround is to create a local copy in the function by an instruction like: A=A (see fun3) which looks a bit strange at first sight as it seems to do nothing. Has anyone an opinion on whether this is considered as correct behaviour or not ? Or is it a bug ? --------------------------------------------- A = [1, 2, 3]; B = struct("a", 2, "b", 3); function fun1() A(2) = 5; disp(A); endfunction function fun2() B.a = 10; disp(B); endfunction function fun3() A=A; A(3) = 6; disp(A); endfunction -->fun1() 0. 5. -->fun2() a: 10 -->fun3() 1. 2. 6. From jacques.beilin at ensg.eu Thu Nov 29 14:25:54 2012 From: jacques.beilin at ensg.eu (jacques.beilin) Date: Thu, 29 Nov 2012 14:25:54 +0100 Subject: [Scilab-users] module installation In-Reply-To: References: <50B3659D.7@ensg.eu> Message-ID: <50B76262.7060706@ensg.eu> Hi, Yes, but with ATOMS the package is installed in the scilab-5.4.0/share/scilab/contrib and with everything automaticaly configured (help...). Is it possible with your procedure ? Best regards, Jacques Le 29/11/2012 09:36, michael.baudin at contrib.scilab.org a ?crit : > Hi, > > To create a Scilab package, all you have to do is zip the > compiled toolbox. > To install: > * unzip, > * execute the loader, > * that's it ! > > Atoms is essentially to distribute a package to other, unknown, users. > > Regards, > > Micha?l > > Le 2012-11-26 13:50, jacques.beilin a ?crit : >> Dear Scilab users, >> >> I'm new to Scilab. At the moment I use gnu Octave but I need to be >> able to use both for teaching purposes. >> >> I wrote Octave packages. I'm trying to transform them into Scilab >> modules. I would like to write Scilab modules buts I do not want to >> put them on ATOMS (at least for the moment). With Octave it is easy >> because once the package structure is followed, the package can be >> zipped (tar.gz) and installed using the command "pkg install >> my_package.tar.gz". If Octave has been started with sudo, the package >> is installed in "/usr/local/share/octave/packages/" otherwise it is >> installed only for the current user (in ~/octave/). >> >> Is there a equivalent procedure on Scilab ? I cannot find the >> documentation about that. >> >> Best regards, >> >> Jacques >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- A non-text attachment was scrubbed... Name: jacques_beilin.vcf Type: text/x-vcard Size: 557 bytes Desc: not available URL: From withold.gregoritza at gmx.de Thu Nov 29 14:27:09 2012 From: withold.gregoritza at gmx.de (witkatz) Date: Thu, 29 Nov 2012 05:27:09 -0800 (PST) Subject: [Scilab-users] Changing elements of "global" structure/vector in function In-Reply-To: <8F232902ADB4E14EB16789FB7006FC840F9463@TW-MBX-P01.cnesnet.ad.cnes.fr> References: <8F232902ADB4E14EB16789FB7006FC840F9463@TW-MBX-P01.cnesnet.ad.cnes.fr> Message-ID: <1354195629100-4025378.post@n3.nabble.com> Inside the Scilab functions the variables declared in the base workspace can only be read. For write access the variable has to be defined with the global keyword. global A; A = [1, 2, 3]; function fun1() global A; disp(A); A(5) = 5; disp(A); endfunction -->fun1 1. 2. 3. 1. 2. 3. 0. 5. regards witkatz -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Changing-elements-of-global-structure-vector-in-function-tp4025375p4025378.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From lagershausen at prod.uni-hannover.de Thu Nov 29 17:55:10 2012 From: lagershausen at prod.uni-hannover.de (Svenja Lagershausen) Date: Thu, 29 Nov 2012 17:55:10 +0100 Subject: [Scilab-users] Plot a function that contains matrix operations Message-ID: <3B1BC2B45D704A4A908879D3C3BADF0D77DB8E@uranos.finance.local> Dear users, I would like to plot a function f(x) that contains matrix operations. Correctly, it looks like this (obtained by Mathematica): Do you know how to do this? My code is: //L?schen der Variablen clear //Bereinigen der Konsole clc // S. Lagershausen // 29.11.2012 // System : M = 3, n = 3, Expo - vtlte Bz., mu1 = 0.7, mu2 = 0.5, mu3 = 0.9 // E[TBPS] = 2.59664365 // CV[TBPS] = 0.908682321 // Daten der Verteilung der Zeit zw. Bearbeitungsbeginnzeitpunkten an Station 1 : initv = {1 0 0 0 0} Smat = [-0.7 0.061984965 0 0.111572936 0.200831285; 0 -1.4 0.5 0 0; 0 0 -0.9 0 0; 0 0.5 0 -1.4 0; 0 0 0 0.5 -0.5] onevec = {1 1 1 1 1} S0vec = {0.325610814; 0.9; 0.9; 0.9; 0} // Dichtefunktion : scf(1); //create figure 1 clf(1); //clear figure 1 x=[1 : 0.2 : 20] //x=2 ////x= linspace(0,20,101); //temp1=Smat*x //f_x= sum(sum(Smat*x,"c"),"r")// //test=Smat*(x); f_x=initv*expm(Smat*x)*S0vec //f_x=x // plot(x,f_x) ////xlabel('x'), ylabel('f(x)') //title('Dichtefunktion von TBPS') //Generating function of the PH renewal process //P_Stern=exp((Smat + z*S0vec*initv)*x) x is the variable. If I simply plug in a single value, it works (the result is a value) However, if I I declare a range, it does not work anymore ("Inconsitent multiplication") I suppose that Scilab understands the range of x as a vector such that the matrix operations cannot work that way. Thank you very much for your help! Best regards Svenja Lagershausen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 1337 bytes Desc: image001.png URL: From sgougeon at free.fr Thu Nov 29 22:20:16 2012 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 29 Nov 2012 22:20:16 +0100 Subject: [Scilab-users] Changing elements of "global" structure/vector in function In-Reply-To: <8F232902ADB4E14EB16789FB7006FC840F9425@TW-MBX-P01.cnesnet.ad.cnes.fr> References: <8F232902ADB4E14EB16789FB7006FC840F9425@TW-MBX-P01.cnesnet.ad.cnes.fr> Message-ID: <50B7D190.2030603@free.fr> Le 29/11/2012 12:46, Lamy Alain a ?crit : > Changing elements of a "global" (i.e. visible) variable in a function may be dangerous. > A new structure or vector is created that only contains the elements that have been changed. > > I would expect the whole structure/vector to be copied locally before changing part of them. > > A workaround is to create a local copy in the function by an instruction like: > A=A > (see fun3) > which looks a bit strange at first sight as it seems to do nothing. > > Has anyone an opinion on whether this is considered as correct behaviour or not ? > Or is it a bug ? AFAIU, i do not think that it is a bug. When a LHS symbol is not yet defined, then Scilab creates it as a recipient. It is the usual behavior. While if a RHS symbol is not yet defined, the expected source is missing, and rather than yielding an error, Scilab tries to look for it outside. Then, the "global" link is set. So, this could look tricky, but yes: A=A does it ;-) Samuel From mathieu.dubois at limsi.fr Thu Nov 29 23:17:20 2012 From: mathieu.dubois at limsi.fr (Mathieu Dubois) Date: Thu, 29 Nov 2012 23:17:20 +0100 Subject: [Scilab-users] Plot a function that contains matrix operations In-Reply-To: <3B1BC2B45D704A4A908879D3C3BADF0D77DB8E@uranos.finance.local> References: <3B1BC2B45D704A4A908879D3C3BADF0D77DB8E@uranos.finance.local> Message-ID: <809128bfa20ae93de1fe85592e6d4400@limsi.fr> Hello, I don't know what you want to model exactly but there are several problems in your code. In scilab, if x is a vector, Smat*x means matrix multiplication. As Smat is a 5x5 matrix it certainly won't work with a 96 components vector. If x is a scalar it is the scalar multiplication (better written x*Smat). The expression initv*expm(x*Smat)*S0vec (for a scalar x) works. Is that what you want to compute? If you want to plot a function you should have a look at the fplot function. You will find attached a simple script that produce a graph very similar to the one you send. HTH, Mathieu Le 29/11/2012 17:55, Svenja Lagershausen a ?crit : > Dear users, > > I would like to plot a function f(x) that contains matrix operations. > Correctly, it looks like this (obtained by Mathematica): > > > > Do you know how to do this? > > My code is: > > ///L?schen der Variablen/ > > clear > > ///Bereinigen der Konsole/ > > clc > > /// S. Lagershausen/ > > /// 2//9.11.2012/ > > /// System : M = 3, n = 3, Expo - vtlte Bz., mu1 = 0.7, mu2 = 0.5, > mu3 > = 0.9/ > > /// E[TBPS] = 2.59664365/ > > /// CV[TBPS] = 0.908682321/ > > /// Daten der Verteilung der Zeit zw. Bearbeitungsbeginnzeitpunkten > an > Station 1 :/ > > initv= {1 0 0 0 0} > > Smat= [-0.7 0.061984965 0 0.111572936 0.200831285; > > 0-1.4 0.5 0 0; > > 00 -0.9 0 0; > > 00.5 0 -1.4 0; > > 00 0 0.5 -0.5] > > onevec= {1 1 1 1 1} > > S0vec= {0.325610814; 0.9; 0.9; 0.9; 0} > > /// Dichtefunktion :/ > > _scf_(1);///create figure 1/ > > _clf_(1);///clear figure 1/ > > x=[1: 0.2 : 20] > > //x=2 > > /////x= linspace(0,20,101);/ > > ///temp1=Smat*x/ > > ///f_x= sum(sum(Smat*x,"c"),"r")/// > > ///test=Smat*(x);/ > > f_x=initv*expm(Smat*x)*S0vec > > ///f_x=x/ > > //// > > _plot_(x,f_x) > > /////xlabel('x'), ylabel('f(x)')/ > > ///title('Dichtefunktion von TBPS')/ > > ///Generating function of the PH renewal process/ > > ///P_Stern=exp((Smat + z*S0vec*initv)*x)/ > > x is the variable. If I simply plug in a single value, it works (the > result is a value) > > However, if I I declare a range, it does not work anymore > (?Inconsitent > multiplication?) > I suppose that Scilab understands the range of x as a vector such > that > the matrix operations cannot work that way. > > Thank you very much for your help! > > Best regards > Svenja Lagershausen > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- A non-text attachment was scrubbed... Name: test_svenja.sce Type: application/x-scilab Size: 531 bytes Desc: not available URL: From Alain.Lamy at cnes.fr Fri Nov 30 09:10:32 2012 From: Alain.Lamy at cnes.fr (Lamy Alain) Date: Fri, 30 Nov 2012 08:10:32 +0000 Subject: [Scilab-users] Changing elements of "global" structure/vector in function In-Reply-To: <50B7D190.2030603@free.fr> References: <8F232902ADB4E14EB16789FB7006FC840F9425@TW-MBX-P01.cnesnet.ad.cnes.fr> <50B7D190.2030603@free.fr> Message-ID: <8F232902ADB4E14EB16789FB7006FC840F9753@TW-MBX-P01.cnesnet.ad.cnes.fr> I understand the logic. My concern was that it is easy to make a mistake (we write A(5)=1, thinking that the other elements are unchanged and in fact everything else is set to 0). Arguments to function behave differently (but they are considered as local variables). I guess one way could be to add a kind of declaration keywork like: "import VAR" whose effect would be to copy the "VAR" variable locally. We could even imagine that all variables in a function should either be local are declared in some way (some kind of "strict" scilab mode as it exists in perl). Maybe a suggestion for future scilab versions ? -----Message d'origine----- De?: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon Envoy??: jeudi 29 novembre 2012 22:20 ??: International users mailing list for Scilab. Objet?: Re: [Scilab-users] Changing elements of "global" structure/vector in function Le 29/11/2012 12:46, Lamy Alain a ?crit : > Changing elements of a "global" (i.e. visible) variable in a function may be dangerous. > A new structure or vector is created that only contains the elements that have been changed. > > I would expect the whole structure/vector to be copied locally before changing part of them. > > A workaround is to create a local copy in the function by an instruction like: > A=A > (see fun3) > which looks a bit strange at first sight as it seems to do nothing. > > Has anyone an opinion on whether this is considered as correct behaviour or not ? > Or is it a bug ? AFAIU, i do not think that it is a bug. When a LHS symbol is not yet defined, then Scilab creates it as a recipient. It is the usual behavior. While if a RHS symbol is not yet defined, the expected source is missing, and rather than yielding an error, Scilab tries to look for it outside. Then, the "global" link is set. So, this could look tricky, but yes: A=A does it ;-) Samuel _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From Serge.Steer at inria.fr Fri Nov 30 10:45:35 2012 From: Serge.Steer at inria.fr (Serge Steer) Date: Fri, 30 Nov 2012 10:45:35 +0100 Subject: [Scilab-users] Plot a function that contains matrix operations In-Reply-To: <3B1BC2B45D704A4A908879D3C3BADF0D77DB8E@uranos.finance.local> References: <3B1BC2B45D704A4A908879D3C3BADF0D77DB8E@uranos.finance.local> Message-ID: <50B8803F.4070308@inria.fr> Here is a code that correspond to your wish: initv = [1 0 0 0 0]; Smat = [-0.7 0.061984965 0 0.111572936 0.200831285; 0 -1.4 0.5 0 0; 0 0 -0.9 0 0; 0 0.5 0 -1.4 0; 0 0 0 0.5 -0.5]; onevec = [1 1 1 1 1]; S0vec = [0.325610814; 0.9; 0.9; 0.9; 0]; // Dichtefunktion : function y=f(x) y=initv*expm(Smat*x)*S0vec endfunction scf(1); //create figure 1 clf(1); //clear figure 1 x= linspace(0,20,101); plot(x,feval(x,f)) xlabel('x'); ylabel('f(x)') title('Dichtefunktion von TBPS') You can also write it as follow // Dichtefunktion : function y=f(x,init,A,vec) y=init*expm(A*x)*vec endfunction .... plot(x,feval(x,list(f,initv,Smat,S0vec)) Le 29/11/2012 17:55, Svenja Lagershausen a ?crit : > > Dear users, > > I would like to plot a function f(x) that contains matrix operations. > Correctly, it looks like this (obtained by Mathematica): > > > > Do you know how to do this? > > My code is: > > ///L?schen der Variablen/ > > clear > > ///Bereinigen der Konsole/ > > clc > > /// S. Lagershausen/ > > /// 2//9.11.2012/ > > /// System : M = 3, n = 3, Expo - vtlte Bz., mu1 = 0.7, mu2 = 0.5, > mu3 = 0.9/ > > /// E[TBPS] = 2.59664365/ > > /// CV[TBPS] = 0.908682321/ > > /// Daten der Verteilung der Zeit zw. Bearbeitungsbeginnzeitpunkten an > Station 1 :/ > > initv= {1 0 0 0 0} > > Smat= [-0.7 0.061984965 0 0.111572936 0.200831285; > > 0-1.4 0.5 0 0; > > 00 -0.9 0 0; > > 00.5 0 -1.4 0; > > 00 0 0.5 -0.5] > > onevec= {1 1 1 1 1} > > S0vec= {0.325610814; 0.9; 0.9; 0.9; 0} > > /// Dichtefunktion :/ > > _scf_(1);///create figure 1/ > > _clf_(1);///clear figure 1/ > > x=[1: 0.2 : 20] > > //x=2 > > /////x= linspace(0,20,101);/ > > ///temp1=Smat*x/ > > ///f_x= sum(sum(Smat*x,"c"),"r")/// > > ///test=Smat*(x);/ > > f_x=initv*expm(Smat*x)*S0vec > > ///f_x=x/ > > //// > > _plot_(x,f_x) > > /////xlabel('x'), ylabel('f(x)')/ > > ///title('Dichtefunktion von TBPS')/ > > ///Generating function of the PH renewal process/ > > ///P_Stern=exp((Smat + z*S0vec*initv)*x)/ > > x is the variable. If I simply plug in a single value, it works (the > result is a value) > > However, if I I declare a range, it does not work anymore > ("Inconsitent multiplication") > I suppose that Scilab understands the range of x as a vector such that > the matrix operations cannot work that way. > > Thank you very much for your help! > > Best regards > Svenja Lagershausen > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1337 bytes Desc: not available URL: From lagershausen at prod.uni-hannover.de Fri Nov 30 11:27:33 2012 From: lagershausen at prod.uni-hannover.de (Svenja Lagershausen) Date: Fri, 30 Nov 2012 11:27:33 +0100 Subject: [Scilab-users] Plot a function that contains matrix operations References: <3B1BC2B45D704A4A908879D3C3BADF0D77DB8E@uranos.finance.local> <2BF3A6B98B24469FB2C5DEF0FE617F8C@finance.local> Message-ID: <3B1BC2B45D704A4A908879D3C3BADF0D77DBAD@uranos.finance.local> Dear Mathieu, thank you very much. That solved it. (Yes, x is a scalar). Thank you Serge, as well! - Svenja -----Urspr?ngliche Nachricht----- Von: users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] Im Auftrag von Mathieu Dubois Gesendet: Donnerstag, 29. November 2012 23:31 An: International users mailing list for Scilab. Betreff: Re: [Scilab-users] Plot a function that contains matrix operations Hello, I don't know what you want to model exactly but there are several problems in your code. In scilab, if x is a vector, Smat*x means matrix multiplication. As Smat is a 5x5 matrix it certainly won't work with a 96 components vector. If x is a scalar it is the scalar multiplication (better written x*Smat). The expression initv*expm(x*Smat)*S0vec (for a scalar x) works. Is that what you want to compute? If you want to plot a function you should have a look at the fplot function. You will find attached a simple script that produce a graph very similar to the one you send. HTH, Mathieu Le 29/11/2012 17:55, Svenja Lagershausen a ?crit : > Dear users, > > I would like to plot a function f(x) that contains matrix operations. > Correctly, it looks like this (obtained by Mathematica): > > > > Do you know how to do this? > > My code is: > > ///L?schen der Variablen/ > > clear > > ///Bereinigen der Konsole/ > > clc > > /// S. Lagershausen/ > > /// 2//9.11.2012/ > > /// System : M = 3, n = 3, Expo - vtlte Bz., mu1 = 0.7, mu2 = 0.5, > mu3 > = 0.9/ > > /// E[TBPS] = 2.59664365/ > > /// CV[TBPS] = 0.908682321/ > > /// Daten der Verteilung der Zeit zw. Bearbeitungsbeginnzeitpunkten an > Station 1 :/ > > initv= {1 0 0 0 0} > > Smat= [-0.7 0.061984965 0 0.111572936 0.200831285; > > 0-1.4 0.5 0 0; > > 00 -0.9 0 0; > > 00.5 0 -1.4 0; > > 00 0 0.5 -0.5] > > onevec= {1 1 1 1 1} > > S0vec= {0.325610814; 0.9; 0.9; 0.9; 0} > > /// Dichtefunktion :/ > > _scf_(1);///create figure 1/ > > _clf_(1);///clear figure 1/ > > x=[1: 0.2 : 20] > > //x=2 > > /////x= linspace(0,20,101);/ > > ///temp1=Smat*x/ > > ///f_x= sum(sum(Smat*x,"c"),"r")/// > > ///test=Smat*(x);/ > > f_x=initv*expm(Smat*x)*S0vec > > ///f_x=x/ > > //// > > _plot_(x,f_x) > > /////xlabel('x'), ylabel('f(x)')/ > > ///title('Dichtefunktion von TBPS')/ > > ///Generating function of the PH renewal process/ > > ///P_Stern=exp((Smat + z*S0vec*initv)*x)/ > > x is the variable. If I simply plug in a single value, it works (the > result is a value) > > However, if I I declare a range, it does not work anymore > (?Inconsitent > multiplication?) > I suppose that Scilab understands the range of x as a vector such that > the matrix operations cannot work that way. > > Thank you very much for your help! > > Best regards > Svenja Lagershausen > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From Alain.Lamy at cnes.fr Fri Nov 30 12:19:23 2012 From: Alain.Lamy at cnes.fr (Lamy Alain) Date: Fri, 30 Nov 2012 11:19:23 +0000 Subject: [Scilab-users] Changing elements of "global" structure/vector in function References: <8F232902ADB4E14EB16789FB7006FC840F9425@TW-MBX-P01.cnesnet.ad.cnes.fr> <50B7D190.2030603@free.fr> Message-ID: <8F232902ADB4E14EB16789FB7006FC840F9853@TW-MBX-P01.cnesnet.ad.cnes.fr> Correction of typo in my previous answer: ... that all variables in a function should either be local OR declared in some way ... (the initial text may have been difficult to understand) From eng.walidshouman at gmail.com Fri Nov 30 14:26:37 2012 From: eng.walidshouman at gmail.com (walid shouman) Date: Fri, 30 Nov 2012 15:26:37 +0200 Subject: [Scilab-users] getting values from an event handler Message-ID: how can i return the a value from an event handling function ie: seteventhandler('myEventHandler(win,x,y,ibut)') function val=myEventHandler(win,x,y,ibut) return x*2 endfunction where should i find "val" to use it later in the code ? -- Sincerely, Walid E. Shouman -------------- next part -------------- An HTML attachment was scrubbed... URL: