From mattyalbrecht at gmail.com Tue Jun 3 07:16:47 2008 From: mattyalbrecht at gmail.com (Matthew Albrecht) Date: Tue, 3 Jun 2008 13:16:47 +0800 Subject: Memory leak; mdelete? Message-ID: When doing a lot of read, write and delete to disks, I've noticed that "mdelete" leaks memory, e.g., for i=1:1000 a=1:10; save('r:\TEMP\test',a) mdelete('r:\TEMP\t*') end Looking at the memory usage on my computer, using mdelete this many times uses approximately 62 M of RAM without giving it back (commit charge starts at 643 M and ends at 705 M). Is there a command which will release the memory used? At the moment it only releases the memory when I exit Scilab. Thanks Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.leroux at stage.cnes.fr Tue Jun 3 15:12:52 2008 From: cyril.leroux at stage.cnes.fr (LeRoux Cyril) Date: Tue, 3 Jun 2008 15:12:52 +0200 Subject: 'imtransform' function in Scilab ? Message-ID: <092785B790DCD043BA45401EDA43D9B50304C323@cst-xch-003.cnesnet.ad.cnes.fr> Bonjour, Etant de plus en plus confront? aux restrictions de licence Matlab, j'utilise depuis un certain temps diverses fonctionnalit?s offertes par Scilab pour r?aliser du traitement de donn?es. Cependant, Matlab me permettait de r?aliser certaines op?rations dont je n'ai pas trouv? l'?quivalence sous Scilab en ce qui concerne le traitement d'images, notamment gr?ce aux fonctions 'cpselect', 'cp2tform' et 'imtransform'. 'cpselect' permet de d?signer des points de contr?les sur deux images distinctes. 'cp2tform' permet de g?n?rer ? partir de ces points de contr?le une structure TFORM mettant en ?quations les d?formations entre les deux images. 'imtransform' permet de d?former une image en utilisant la structure TFORM. Existe-t-il sous Scilab des fonctions ?quivalentes dont je n'aurais pas eu connaissance, ou des bo?tes ? outils proposant ce type de fonctionnalit?s ? Ou est-il possible d'importer sous Scilab des structures de type TFORM sous forme de matrice de transformation (de dimension 512x512 pour transformer une image de taille 512x512, par exemple) ? Je vous remercie de toute l'attention que vous porterez ? mon probl?me. Cordialement, Cyril Le Roux Centre National d'Etudes Spatiales DCT/AQ/LE --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Hi! Recently, I have been more and more confronted with Matlab license issues, so I decided to start using Scilab, and now I need your help to code my programs. Indeed, I haven't found any Scilab function accomplishing image transformations such as 'cpselect', 'cp2tform' and 'imtransform' Matlab functions. 'cpselect' enables to select control points in two related images. 'cp2tform' infers a spatial transformation from pairs of control points.It returns a TFORM structure containing the spatial transformation. 'imtransform' transforms an image according to a 2-D spatial transformation defined by a TFORM structure. Does any equivalent Scilab functions exist? Or is there any toolbox containing such functionalities? Is it possible to import TFORM structures in Scilab, or to convert them into matrices (with dimensions corresponding with the image-to-transform dimensions)? Thank you for your help. Yours faithfully, Cyril Le Roux Centre National d'Etudes Spatiales DCT/AQ/LE From stefane.paris at gmail.com Tue Jun 3 16:10:46 2008 From: stefane.paris at gmail.com (=?ISO-8859-1?Q?St=E9phane_Paris?=) Date: Tue, 3 Jun 2008 16:10:46 +0200 Subject: [scilab-Users] ilib_for_link In-Reply-To: <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> References: <2a5deba40805290855r68e35cd0gac9d6423b96eab96@mail.gmail.com> <1212096497.3693.1.camel@zlarin.inria.fr> <2a5deba40805300103h4d0cdb3fq179c26a272f6f72c@mail.gmail.com> <1212134814.11252.169.camel@korcula.inria.fr> <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> Message-ID: <2a5deba40806030710t2e72395ah91ae56aeebe4cc77@mail.gmail.com> Is there someone who tried it ? stf 2008/5/30 St?phane Paris : > Le 30 mai 2008 10:06, Sylvestre Ledru a ?crit : > > Le vendredi 30 mai 2008 ? 10:03 +0200, St?phane Paris a ?crit : >> > Hi, >> > I use Scilab version 4.1.2on a linux plateform (Ubuntu 8.04 - Hardy >> > Heron - ) >> >> The version provided in Ubuntu or by the Scilab Consortium ? >> >> Sylvestre >> >> >> The one provided by Ubuntu Synaptic. > > stf > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.leroux at stage.cnes.fr Tue Jun 3 16:39:24 2008 From: cyril.leroux at stage.cnes.fr (LeRoux Cyril) Date: Tue, 3 Jun 2008 16:39:24 +0200 Subject: Video functionalities in SIVP toolbox Message-ID: <092785B790DCD043BA45401EDA43D9B50304C324@cst-xch-003.cnesnet.ad.cnes.fr> > Bonjour, > Ayant besoin de cr?er une vid?o sous Scilab, j'ai r?cemment install? la boite ? outils SIVP. Cependant, chaque fois que j'utilise une fonction li?e ? la manipulation de vid?o ('avifile', 'aviopen', ou 'aviclose'), j'obtiens un message d'erreur tel que "!--error 999 avifile: Can not create video file D:\Documents and Settings\user\Bureau\truc.avi". J'utilise Scilab 4.1.2 sous Windows 2000. J'ai pr?alablement install? OpenCV 1.0, expat 2.0.1 et sablotron 1.0.3 (en copiant sabcmd.exe et sablot.dll dans C:\Program Files\Expat 2.0.1\Bin) avant d'installer SIVP 3.1. J'ai m?me ajout? manuellement le chemin C:\Program Files\OpenCV\Bin ? la liste 'PATH' dans les variables d'environnement Windows, comme il est conseill? de faire sur certains sites, et ce sans r?sultats. Ai-je install? correctement SIVP ? Si oui, que faire pour utiliser les fonctions li?es ? la manipulation de vid?os ? > Je vous remercie de toute l'attention que vous porterez ? mon probl?me. > > Cordialement, > > Cyril Le Roux > Centre National d'Etudes Spatiales > DCT/AQ/LE > > > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Hi! > I need to create a video file with Scilab and I installed SIVP toolbox in that purpose. Unfortunately, each time I use a SIVP video-related function, such as 'avifile', 'aviopen' or 'aviclose', I get an error message like "!--error 999 avifile: Can not create video file D:\Documents and Settings\user\Bureau\truc.avi". I've got Scilab 4.1.2 under Windows 2000, OpenCV 1.0, expat 2.0.1, sablotron 1.0.3 (I copied sablot.dll and sabcmd.exe in C:\Program Files\Expat 2.0.1\Bin) and SIVP 3.1. I even add manually the path C:\Program Files\OpenCV\Bin to the 'PATH' list in the Windows environment variables, like it is recommended to do in some internet websites I visited. Did I correctly install SIVP toolbox? How to use SIVP video-related functions? > Thank you for your help. > > Yours faithfully, > > Cyril Le Roux > Centre National d'Etudes Spatiales > DCT/AQ/LE From xr at geo.hmg.inpg.fr Tue Jun 3 21:22:06 2008 From: xr at geo.hmg.inpg.fr (xavier roguiez) Date: Tue, 03 Jun 2008 21:22:06 +0200 Subject: Exception_access_violation Message-ID: <484599DE.5000605@geo.hmg.inpg.fr> Hi, I've generated some binary function in a folder with the following code : mode(-1) pathB=get_absolute_file_path('builder.sce') if isdef('BA_imateriaux') predef(0); clear BA_imateriaux; end //g?n?ration des librairies genlib('BA_materiaux',pathB+'macros\materiaux',%t); clear pathB; It works perfect with that code, function [alphaeR]=alphae(fck) if (fck <=Cmax) then alphaeR=Es/Ecm(fck) else disp("fck > C90/100 (EC2-3.1.2(2)P"); end endfunction but i've modified it with that, in order to test better help /manedit('manedit')/ function [alphaeR]=alphae(fck) if (fck <=Cmax) then alphaeR=Es/Ecm(fck) else disp("fck > C90/100 (EC2-3.1.2(2)P"); end endfunction /manedit alphae/ But now, the binary building stops on the following error message : *Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION). Scilab may become unstable. *I've uninstalled Scilab 4.1.2 and delete temporary folder, delete binary and then reinstalled but nothing change ? What can I do in order to have the first state (of stability) ? Thanks in advance for any help Xavier Roguiez -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at inria.fr Wed Jun 4 01:23:58 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Wed, 04 Jun 2008 01:23:58 +0200 Subject: [scilab-Users] Video functionalities in SIVP toolbox In-Reply-To: <092785B790DCD043BA45401EDA43D9B50304C324@cst-xch-003.cnesnet.ad.cnes.fr> References: <092785B790DCD043BA45401EDA43D9B50304C324@cst-xch-003.cnesnet.ad.cnes.fr> Message-ID: <1212535438.31054.36.camel@zlarin.inria.fr> Hello, > I need to create a video file with Scilab and I installed SIVP toolbox in that purpose. Unfortunately, each time I use a SIVP video-related function, such as 'avifile', 'aviopen' or 'aviclose', I get an error message like "!--error 999 avifile: Can not create video file D:\Documents and Settings\user\Bureau\truc.avi". > > I've got Scilab 4.1.2 under Windows 2000, OpenCV 1.0, expat 2.0.1, sablotron 1.0.3 (I copied sablot.dll and sabcmd.exe in C:\Program Files\Expat 2.0.1\Bin) and SIVP 3.1. I even add manually the path C:\Program Files\OpenCV\Bin to the 'PATH' list in the Windows environment variables, like it is recommended to do in some internet websites I visited. > > Did I correctly install SIVP toolbox? > How to use SIVP video-related functions? Check if the basic examples are working or not ... I didn't used it under Windows but for Linux, the developper of SIVP made a great work for the Linux version. And it is working out of the box. Sylvestre From osvaldo at dcc.ufmg.br Wed Jun 4 05:32:09 2008 From: osvaldo at dcc.ufmg.br (Osvaldo Sergio Farhat de Carvalho) Date: Wed, 4 Jun 2008 00:32:09 -0300 Subject: Scilab 4.1.2 does not work Message-ID: Hello, One day about one month ago some basic functions of Scilab suddenly stoped to work: opening, saving and executing files. I am using Scilab 4.1.2 with Windows Vista Home Premium. I've tried both to downgrade to Scilab 4.1.1 and to upgrade to the Beta version, without success. I am in a desperate situation, in the middle of the third consecutive semester using Scilab for an introductory course on computer programming for 150 students. Can someone help me? Best regards, Osvaldo -------------- next part -------------- An HTML attachment was scrubbed... URL: From allan.cornet at inria.fr Wed Jun 4 08:42:17 2008 From: allan.cornet at inria.fr (Allan CORNET) Date: Wed, 4 Jun 2008 08:42:17 +0200 Subject: [scilab-Users] Re: Re: Scilab 4.1.2 does not work In-Reply-To: References: Message-ID: <000f01c8c60e$21abfb20$6503f160$@cornet@inria.fr> Hi, What did you modify on your windows vista , one month ago ? Can you try to describe with more details your problem ? (try to attach some screenshots to your answer) Thank you Allan De : Osvaldo Sergio Farhat de Carvalho [mailto:osvaldo at dcc.ufmg.br] Envoy? : mercredi 4 juin 2008 05:32 ? : users at lists.scilab.org Objet : [scilab-Users] Re: Re: Scilab 4.1.2 does not work Hello, One day about one month ago some basic functions of Scilab suddenly stoped to work: opening, saving and executing files. I am using Scilab 4.1.2 with Windows Vista Home Premium. I've tried both to downgrade to Scilab 4.1.1 and to upgrade to the Beta version, without success. I am in a desperate situation, in the middle of the third consecutive semester using Scilab for an introductory course on computer programming for 150 students. Can someone help me? Best regards, Osvaldo -------------- next part -------------- An HTML attachment was scrubbed... URL: From allan.cornet at inria.fr Wed Jun 4 08:56:53 2008 From: allan.cornet at inria.fr (Allan CORNET) Date: Wed, 4 Jun 2008 08:56:53 +0200 Subject: [scilab-Users] Exception_access_violation In-Reply-To: <484599DE.5000605@geo.hmg.inpg.fr> References: <484599DE.5000605@geo.hmg.inpg.fr> Message-ID: <001701c8c610$2c1047e0$8430d7a0$@cornet@inria.fr> Hi, Have you try to remove your folder where you have your toolbox ? Genlib is used to create a library with some .sci files Example with your function alphae You create a alphae.sci and you put in your function : function [alphaeR]=alphae(fck) if (fck <=Cmax) then alphaeR=Es/Ecm(fck) else disp("fck > C90/100 (EC2-3.1.2(2)P"); end endfunction You should not put some instructions outside the functions in a .sci file. Best regards Allan CORNET De : xavier roguiez [mailto:xr at geo.hmg.inpg.fr] Envoy? : mardi 3 juin 2008 21:22 ? : users at lists.scilab.org Objet : [scilab-Users] Exception_access_violation Hi, I've generated some binary function in a folder with the following code : mode(-1) pathB=get_absolute_file_path('builder.sce') if isdef('BA_imateriaux') predef(0); clear BA_imateriaux; end //g?n?ration des librairies genlib('BA_materiaux',pathB+'macros\materiaux',%t); clear pathB; It works perfect with that code, function [alphaeR]=alphae(fck) if (fck <=Cmax) then alphaeR=Es/Ecm(fck) else disp("fck > C90/100 (EC2-3.1.2(2)P"); end endfunction but i've modified it with that, in order to test better help manedit('manedit') function [alphaeR]=alphae(fck) if (fck <=Cmax) then alphaeR=Es/Ecm(fck) else disp("fck > C90/100 (EC2-3.1.2(2)P"); end endfunction manedit alphae But now, the binary building stops on the following error message : Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION). Scilab may become unstable. I've uninstalled Scilab 4.1.2 and delete temporary folder, delete binary and then reinstalled but nothing change ? What can I do in order to have the first state (of stability) ? Thanks in advance for any help Xavier Roguiez -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simone.Mannori at inria.fr Wed Jun 4 08:27:10 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Wed, 04 Jun 2008 08:27:10 +0200 Subject: [scilab-Users] Re: Re: Scilab 4.1.2 does not work In-Reply-To: References: Message-ID: <1212560830.24693.5.camel@pinarellu.inria.fr> Bonjour, - un-install ALL the Scilab from your PC; - install a clean Scilab 4.1.2 using the default options Do you have installed the Vista service pack 1 ? Are you using a good antivirus ? (e.g. AVG ?) Simone Mannori - Scilab Consortium Scilab/Scicos Embedded Applications //**--------------------------------------------------------------------- On Wed, 2008-06-04 at 00:32 -0300, Osvaldo Sergio Farhat de Carvalho wrote: > Hello, > > One day about one month ago some basic functions of Scilab suddenly > stoped to work: opening, saving and executing files. I am using Scilab > 4.1.2 with Windows Vista Home Premium. I've tried both to downgrade to > Scilab 4.1.1 and to upgrade to the Beta version, without success. I am > in a desperate situation, in the middle of the third consecutive > semester using Scilab for an introductory course on computer > programming for 150 students. Can someone help me? > > Best regards, > > Osvaldo > From sylvestre.ledru at inria.fr Wed Jun 4 11:33:45 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Wed, 04 Jun 2008 11:33:45 +0200 Subject: [scilab-Users] ilib_for_link In-Reply-To: <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> References: <2a5deba40805290855r68e35cd0gac9d6423b96eab96@mail.gmail.com> <1212096497.3693.1.camel@zlarin.inria.fr> <2a5deba40805300103h4d0cdb3fq179c26a272f6f72c@mail.gmail.com> <1212134814.11252.169.camel@korcula.inria.fr> <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> Message-ID: <1212572025.13683.17.camel@korcula.inria.fr> Le vendredi 30 mai 2008 ? 19:59 +0200, St?phane Paris a ?crit : > Le 30 mai 2008 10:06, Sylvestre Ledru a > ?crit : > Le vendredi 30 mai 2008 ? 10:03 +0200, St?phane Paris a > ?crit : > > Hi, > > I use Scilab version 4.1.2on a linux plateform (Ubuntu 8.04 > - Hardy > > Heron - ) > > > The version provided in Ubuntu or by the Scilab Consortium ? > > Sylvestre > > > The one provided by Ubuntu Synaptic. I tried with the package provided in Debian (which is the same) and I don't get the issue. Are you sure you have a compiler (gcc) on your computer ? If yes, which version ? (gcc -v) Thx S From stefane.paris at gmail.com Wed Jun 4 14:01:50 2008 From: stefane.paris at gmail.com (=?ISO-8859-1?Q?St=E9phane_Paris?=) Date: Wed, 4 Jun 2008 14:01:50 +0200 Subject: [scilab-Users] ilib_for_link In-Reply-To: <1212572025.13683.17.camel@korcula.inria.fr> References: <2a5deba40805290855r68e35cd0gac9d6423b96eab96@mail.gmail.com> <1212096497.3693.1.camel@zlarin.inria.fr> <2a5deba40805300103h4d0cdb3fq179c26a272f6f72c@mail.gmail.com> <1212134814.11252.169.camel@korcula.inria.fr> <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> <1212572025.13683.17.camel@korcula.inria.fr> Message-ID: <2a5deba40806040501g192a5132uc483f55afd18fdbc@mail.gmail.com> Here is the gcc -v : ========= Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) ========= Perhaps I'm missing something else since it works under Debian... ? Thanks stf 2008/6/4 Sylvestre Ledru : > Le vendredi 30 mai 2008 ? 19:59 +0200, St?phane Paris a ?crit : > > Le 30 mai 2008 10:06, Sylvestre Ledru a > > ?crit : > > Le vendredi 30 mai 2008 ? 10:03 +0200, St?phane Paris a > > ?crit : > > > Hi, > > > I use Scilab version 4.1.2on a linux plateform (Ubuntu 8.04 > > - Hardy > > > Heron - ) > > > > > > The version provided in Ubuntu or by the Scilab Consortium ? > > > > Sylvestre > > > > > > The one provided by Ubuntu Synaptic. > I tried with the package provided in Debian (which is the same) and I > don't get the issue. > Are you sure you have a compiler (gcc) on your computer ? If yes, which > version ? (gcc -v) > > Thx > S > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at inria.fr Wed Jun 4 14:14:52 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Wed, 04 Jun 2008 14:14:52 +0200 Subject: [scilab-Users] ilib_for_link In-Reply-To: <2a5deba40806040501g192a5132uc483f55afd18fdbc@mail.gmail.com> References: <2a5deba40805290855r68e35cd0gac9d6423b96eab96@mail.gmail.com> <1212096497.3693.1.camel@zlarin.inria.fr> <2a5deba40805300103h4d0cdb3fq179c26a272f6f72c@mail.gmail.com> <1212134814.11252.169.camel@korcula.inria.fr> <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> <1212572025.13683.17.camel@korcula.inria.fr> <2a5deba40806040501g192a5132uc483f55afd18fdbc@mail.gmail.com> Message-ID: <1212581692.13683.43.camel@korcula.inria.fr> Tested with the latest Ubuntu with Scilab 4.1.2-4: -->f1=['int ext1c(n, a, b, c)' [...] compilation of fun1 building shared library (be patient) ans = libext1c.so [...] -->link(ext1c_path+'libext1c.so',['ext1c'],'c'); shared archive loaded Link done ?[...] -->if norm(c-(a+b)) > %eps then pause,end -->disp(c) 5. 7. 9. I really cannot reproduce your bug. Sylvestre Le mercredi 04 juin 2008 ? 14:01 +0200, St?phane Paris a ?crit : > Here is the gcc -v : > ========= > Using built-in specs. > Target: i486-linux-gnu > Configured with: ../src/configure -v --enable-languages=c,c > ++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared > --with-system-zlib --libexecdir=/usr/lib --without-included-gettext > --enable-threads=posix --enable-nls > --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 > --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc > --enable-mpfr --enable-targets=all --enable-checking=release > --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu > Thread model: posix > gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) > ========= > Perhaps I'm missing something else since it works under Debian... ? > Thanks > stf > > 2008/6/4 Sylvestre Ledru : > Le vendredi 30 mai 2008 ? 19:59 +0200, St?phane Paris a > ?crit : > > > Le 30 mai 2008 10:06, Sylvestre Ledru > a > > ?crit : > > Le vendredi 30 mai 2008 ? 10:03 +0200, St?phane > Paris a > > ?crit : > > > Hi, > > > I use Scilab version 4.1.2on a linux plateform > (Ubuntu 8.04 > > - Hardy > > > Heron - ) > > > > > > The version provided in Ubuntu or by the Scilab > Consortium ? > > > > Sylvestre > > > > > > The one provided by Ubuntu Synaptic. > > I tried with the package provided in Debian (which is the > same) and I > don't get the issue. > Are you sure you have a compiler (gcc) on your computer ? If > yes, which > version ? (gcc -v) > > Thx > S > > > From xr at geo.hmg.inpg.fr Wed Jun 4 14:29:00 2008 From: xr at geo.hmg.inpg.fr (xavier roguiez) Date: Wed, 04 Jun 2008 14:29:00 +0200 Subject: [scilab-Users] Exception_access_violation In-Reply-To: <001701c8c610$2c1047e0$8430d7a0$@cornet@inria.fr> References: <484599DE.5000605@geo.hmg.inpg.fr> <001701c8c610$2c1047e0$8430d7a0$@cornet@inria.fr> Message-ID: <48468A8C.4000305@geo.hmg.inpg.fr> Allan CORNET a ?crit : > > Hi, > > > > Have you try to remove your folder where you have your toolbox ? > > > > Genlib is used to create a library with some .sci files > > > > Example with your function alphae > > > > You create a alphae.sci and you put in your function : > > > > function [alphaeR]=alphae(fck) > if (fck <=Cmax) then > alphaeR=Es/Ecm(fck) > else > disp("fck > C90/100 (EC2-3.1.2(2)P"); > end > endfunction > > > > > > You should not put some instructions outside the functions in a .sci > file. > > > > Best regards > > > > Allan CORNET > > > > > Hi Thank you for your answer. I've move my folder and subfolder in an another place on my disk, but I'v got the same problem. I thinh there's a link with the distribution, because, the binary are created in the folder which contains alphae. But as soon as it reache the alphae function, the process stop, the warning appear an scilab stop. If I want to remove all the scilab distribution in order to reinstall cleanly after, how to do it ? 1. uninstall scilab 4.1.2 2. remove folder \document and settings\... 3. and ? i'm sure there's something left elsewhere but ? in the registry data ? Thanks for any kind of help or information xavier From stefane.paris at gmail.com Wed Jun 4 14:34:28 2008 From: stefane.paris at gmail.com (=?ISO-8859-1?Q?St=E9phane_Paris?=) Date: Wed, 4 Jun 2008 14:34:28 +0200 Subject: [scilab-Users] ilib_for_link In-Reply-To: <1212581692.13683.43.camel@korcula.inria.fr> References: <2a5deba40805290855r68e35cd0gac9d6423b96eab96@mail.gmail.com> <1212096497.3693.1.camel@zlarin.inria.fr> <2a5deba40805300103h4d0cdb3fq179c26a272f6f72c@mail.gmail.com> <1212134814.11252.169.camel@korcula.inria.fr> <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> <1212572025.13683.17.camel@korcula.inria.fr> <2a5deba40806040501g192a5132uc483f55afd18fdbc@mail.gmail.com> <1212581692.13683.43.camel@korcula.inria.fr> Message-ID: <2a5deba40806040534t5c17db85gdb41c1307917422a@mail.gmail.com> Well, meanwhile I've done it again... And, now, that's ok?? I've made no change into scilab or ubuntu... perhaps rebooting the laptop was necessary after some installation ??? The only warning I've got now is : libtk8.4.so: cannot open shared object file: No such file or directory thanks again for your help stf 2008/6/4 Sylvestre Ledru : > Tested with the latest Ubuntu with Scilab 4.1.2-4: > > -->f1=['int ext1c(n, a, b, c)' > [...] > compilation of fun1 > building shared library (be patient) > ans = > > libext1c.so > > [...] > > -->link(ext1c_path+'libext1c.so',['ext1c'],'c'); > shared archive loaded > Link done > > ?[...] > > -->if norm(c-(a+b)) > %eps then pause,end > > -->disp(c) > > 5. 7. 9. > > I really cannot reproduce your bug. > > Sylvestre > > Le mercredi 04 juin 2008 ? 14:01 +0200, St?phane Paris a ?crit : > > Here is the gcc -v : > > ========= > > Using built-in specs. > > Target: i486-linux-gnu > > Configured with: ../src/configure -v --enable-languages=c,c > > ++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared > > --with-system-zlib --libexecdir=/usr/lib --without-included-gettext > > --enable-threads=posix --enable-nls > > --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 > > --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc > > --enable-mpfr --enable-targets=all --enable-checking=release > > --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu > > Thread model: posix > > gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) > > ========= > > Perhaps I'm missing something else since it works under Debian... ? > > Thanks > > stf > > > > 2008/6/4 Sylvestre Ledru : > > Le vendredi 30 mai 2008 ? 19:59 +0200, St?phane Paris a > > ?crit : > > > > > Le 30 mai 2008 10:06, Sylvestre Ledru > > a > > > ?crit : > > > Le vendredi 30 mai 2008 ? 10:03 +0200, St?phane > > Paris a > > > ?crit : > > > > Hi, > > > > I use Scilab version 4.1.2on a linux plateform > > (Ubuntu 8.04 > > > - Hardy > > > > Heron - ) > > > > > > > > > The version provided in Ubuntu or by the Scilab > > Consortium ? > > > > > > Sylvestre > > > > > > > > > The one provided by Ubuntu Synaptic. > > > > I tried with the package provided in Debian (which is the > > same) and I > > don't get the issue. > > Are you sure you have a compiler (gcc) on your computer ? If > > yes, which > > version ? (gcc -v) > > > > Thx > > S > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at inria.fr Wed Jun 4 14:37:50 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Wed, 04 Jun 2008 14:37:50 +0200 Subject: [scilab-Users] ilib_for_link In-Reply-To: <2a5deba40806040534t5c17db85gdb41c1307917422a@mail.gmail.com> References: <2a5deba40805290855r68e35cd0gac9d6423b96eab96@mail.gmail.com> <1212096497.3693.1.camel@zlarin.inria.fr> <2a5deba40805300103h4d0cdb3fq179c26a272f6f72c@mail.gmail.com> <1212134814.11252.169.camel@korcula.inria.fr> <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> <1212572025.13683.17.camel@korcula.inria.fr> <2a5deba40806040501g192a5132uc483f55afd18fdbc@mail.gmail.com> <1212581692.13683.43.camel@korcula.inria.fr> <2a5deba40806040534t5c17db85gdb41c1307917422a@mail.gmail.com> Message-ID: <1212583070.13683.52.camel@korcula.inria.fr> > The only warning I've got now is : > libtk8.4.so: cannot open shared object file: No such file or directory Where do you have this issue ? aptitude install tk8.4 ?tk8.4-dev should fix it anyway. Sylvestre From osvaldo at dcc.ufmg.br Wed Jun 4 18:49:52 2008 From: osvaldo at dcc.ufmg.br (Osvaldo Sergio Farhat de Carvalho) Date: Wed, 4 Jun 2008 13:49:52 -0300 Subject: [scilab-Users] Re: Re: Scilab 4.1.2 does not work In-Reply-To: <1212560830.24693.5.camel@pinarellu.inria.fr> References: <1212560830.24693.5.camel@pinarellu.inria.fr> Message-ID: Bonjour Simone, Simone Mannori wrote on 04/06/2008 03:27:10: > - un-install ALL the Scilab from your PC; > - install a clean Scilab 4.1.2 using the default options I did this many times, including, as I said, installing a clean 4.1.1 and also a clean Beta. > > Do you have installed the Vista service pack 1 ? Probably, since my Vista has automatic updates. Since all my troubles started at the same time, I also guess it should be caused by some incompatibility between Scilab and some Vista service pack. They are all related to file handling. > > Are you using a good antivirus ? (e.g. AVG ?) Yes, I'm using McAfee. > > > Simone Mannori - Scilab Consortium > Scilab/Scicos Embedded Applications Merci bien. Osvaldo > > > //**--------------------------------------------------------------------- > > > On Wed, 2008-06-04 at 00:32 -0300, Osvaldo Sergio Farhat de Carvalho > wrote: > > Hello, > > > > One day about one month ago some basic functions of Scilab suddenly > > stoped to work: opening, saving and executing files. I am using Scilab > > 4.1.2 with Windows Vista Home Premium. I've tried both to downgrade to > > Scilab 4.1.1 and to upgrade to the Beta version, without success. I am > > in a desperate situation, in the middle of the third consecutive > > semester using Scilab for an introductory course on computer > > programming for 150 students. Can someone help me? > > > > Best regards, > > > > Osvaldo > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From osvaldo at dcc.ufmg.br Wed Jun 4 19:41:42 2008 From: osvaldo at dcc.ufmg.br (Osvaldo Sergio Farhat de Carvalho) Date: Wed, 4 Jun 2008 14:41:42 -0300 Subject: [scilab-Users] Re: Re: Scilab 4.1.2 does not work Message-ID: As an example, see the following screenshots:? Screen1: Scilab after a directory change Screen 2: Scipad, launched after the directory change, with a (no matter which) program: Screeen 3: Scipad after saving the file: Screen 4: Trying to open another file: After this, Scipad ignores the opening comand, and remains with the same screen: while Scipad blocks! After a second trial, Scipad did open the TabelaDeSenos.sce file, but Scilab remained blocked. This is just one of many aspects of this problem. Similar behaviours occur when I try to exec some files. Sometimes I can't even open a single file! I hope this may help you. Merci beaucoup, Osvaldo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 38571083.gif Type: image/gif Size: 21060 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 38733321.gif Type: image/gif Size: 18453 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 38445628.gif Type: image/gif Size: 17010 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 38494214.gif Type: image/gif Size: 39398 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 38238793.gif Type: image/gif Size: 17448 bytes Desc: not available URL: From fvogelnew1 at free.fr Thu Jun 5 00:15:45 2008 From: fvogelnew1 at free.fr (fvogelnew1 at free.fr) Date: Thu, 05 Jun 2008 00:15:45 +0200 Subject: [scilab-Users] Re: Re: Scilab 4.1.2 does not work In-Reply-To: References: Message-ID: <1212617745.4847141168692@imp.free.fr> Selon Osvaldo Sergio Farhat de Carvalho : > After this, Scipad ignores the opening comand, and remains with the same > screen: > while Scipad blocks! Ah, *that* bug. Well known (and fixed for two months). http://bugzilla.scilab.org/show_bug.cgi?id=2672 > This is just one of many aspects of this problem. Similar behaviours occur > when I try to exec some files. Sometimes I can't even open a single file! This is perhaps different. Or not. Try the workaround that I explain in bug 2672, and come back if this still happens. Francois From dengbl at gmail.com Fri Jun 6 01:46:07 2008 From: dengbl at gmail.com (Eric) Date: Fri, 6 Jun 2008 07:46:07 +0800 Subject: How to disable Atlas when building scilab from source? Message-ID: <10433cb50806051646y5b6113fs84bf306bd1778c2f@mail.gmail.com> Hi all, I am building scilab 4.1.2 from source code on MS Windows. I found that the build requires the an installation of Atlas, which is a library of some natively tuned BLAS and LAPACK routines. May I disable Atlas and use the standard BLAS and LAPACK implementation instead when building scilab? Thanks in advance! Best regards, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From allan.cornet at inria.fr Fri Jun 6 08:39:20 2008 From: allan.cornet at inria.fr (Allan CORNET) Date: Fri, 6 Jun 2008 08:39:20 +0200 Subject: [scilab-Users] How to disable Atlas when building scilab from source? In-Reply-To: <10433cb50806051646y5b6113fs84bf306bd1778c2f@mail.gmail.com> References: <10433cb50806051646y5b6113fs84bf306bd1778c2f@mail.gmail.com> Message-ID: <000f01c8c7a0$0d23bd80$276b3880$@cornet@inria.fr> Hi, First, if you want to build scilab 4.1.2 , you need to build with Visual studio 2003. Then you choose : Release in configuration and build Release with Atlas if you want to build with atlas ? Best Regards Allan CORNET De : Eric [mailto:dengbl at gmail.com] Envoy? : vendredi 6 juin 2008 01:46 ? : users at lists.scilab.org Objet : [scilab-Users] How to disable Atlas when building scilab from source? Hi all, I am building scilab 4.1.2 from source code on MS Windows. I found that the build requires the an installation of Atlas, which is a library of some natively tuned BLAS and LAPACK routines. May I disable Atlas and use the standard BLAS and LAPACK implementation instead when building scilab? Thanks in advance! Best regards, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefane.paris at gmail.com Fri Jun 6 11:44:03 2008 From: stefane.paris at gmail.com (=?ISO-8859-1?Q?St=E9phane_Paris?=) Date: Fri, 6 Jun 2008 11:44:03 +0200 Subject: [scilab-Users] ilib_for_link In-Reply-To: <1212583070.13683.52.camel@korcula.inria.fr> References: <2a5deba40805290855r68e35cd0gac9d6423b96eab96@mail.gmail.com> <1212096497.3693.1.camel@zlarin.inria.fr> <2a5deba40805300103h4d0cdb3fq179c26a272f6f72c@mail.gmail.com> <1212134814.11252.169.camel@korcula.inria.fr> <2a5deba40805301059j549f8e27ybe0891f058b2f64e@mail.gmail.com> <1212572025.13683.17.camel@korcula.inria.fr> <2a5deba40806040501g192a5132uc483f55afd18fdbc@mail.gmail.com> <1212581692.13683.43.camel@korcula.inria.fr> <2a5deba40806040534t5c17db85gdb41c1307917422a@mail.gmail.com> <1212583070.13683.52.camel@korcula.inria.fr> Message-ID: <2a5deba40806060244t6c3916ccwbc43af4958c1eae8@mail.gmail.com> It's OK no warning Thanks again stf 2008/6/4 Sylvestre Ledru : > > > The only warning I've got now is : > > libtk8.4.so: cannot open shared object file: No such file or directory > Where do you have this issue ? > aptitude install tk8.4 ?tk8.4-dev > should fix it anyway. > > Sylvestre > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.leroux at stage.cnes.fr Fri Jun 6 11:46:42 2008 From: cyril.leroux at stage.cnes.fr (LeRoux Cyril) Date: Fri, 6 Jun 2008 11:46:42 +0200 Subject: [scilab-Users] Video functionalities in SIVP toolbox In-Reply-To: <1212535438.31054.36.camel@zlarin.inria.fr> Message-ID: <092785B790DCD043BA45401EDA43D9B50304C325@cst-xch-003.cnesnet.ad.cnes.fr> Hello, Thanks for your answer. I've found why I couldn't open a videofile with 'aviopen'. Actually, I hadn't got the matching codecs. So, the functions 'aviopen', 'avireadframe', and the basic examples provided with SIVP are now working... Excepted that the frame by frame video displaying provokes an instability of Scilab : Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION). Scilab may become unstable. But it's not my main problem since I don't need to display videos in Scilab. What bother me is that I can't create any video file with 'avifile' SIVP function. Indeed, I still obtain the same error : "!--error 999 avifile: Can not create video file D:\Documents and Settings\user\Bureau\video.avi" and I don't know why. Thanks again for your help, Cyril Le Roux -----Message d'origine----- De : Sylvestre Ledru [mailto:sylvestre.ledru at inria.fr ] Envoy? : mercredi 4 juin 2008 01:24 ? : users at lists.scilab.org Objet : Re: [scilab-Users] Video functionalities in SIVP toolbox Hello, > I need to create a video file with Scilab and I installed SIVP toolbox > in that purpose. Unfortunately, each time I use a SIVP video-related > function, such as 'avifile', 'aviopen' or 'aviclose', I get an error > message like "!--error 999 avifile: Can not create video file > D:\Documents and Settings\user\Bureau\truc.avi". > > I've got Scilab 4.1.2 under Windows 2000, OpenCV 1.0, expat 2.0.1, > sablotron 1.0.3 (I copied sablot.dll and sabcmd.exe in C:\Program > Files\Expat 2.0.1\Bin) and SIVP 3.1. I even add manually the path > C:\Program Files\OpenCV\Bin to the 'PATH' list in the Windows > environment variables, like it is recommended to do in some internet > websites I visited. > > Did I correctly install SIVP toolbox? > How to use SIVP video-related functions? Check if the basic examples are working or not ... I didn't used it under Windows but for Linux, the developper of SIVP made a great work for the Linux version. And it is working out of the box. Sylvestre -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.auerbach at uvm.edu Fri Jun 6 23:05:13 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Fri, 06 Jun 2008 17:05:13 -0400 Subject: heatmap / Matplot Message-ID: <4849A689.1080200@uvm.edu> Hi, I am looking for some assistance. I am trying to make what I know as a heatmap. Basically I have data for many points on a grid and want to construct a 2d plot where each point is given a color on a gradient (From blue to red say) based on the data value at that point. I have the data in the form of a matrix with 3 columns x-coord, y-coord, data value Currently I am making this type of plot by transforming my grid coordinates into matrix coordinates of a new matrix and scaling my data values into the range [0, NUM_COLORS] and using the Matplot function to plot this data. This method does work, but has a few shortcomings: I lose the original scale of my grid since the axis labels are based on the matrix coordinates. There is no key explaining the gradient and even if there were I would lose the original scale of my data values. Does anyone know how to get around these limitations or know of a better way to accomplish what I am trying to do? I'd appreciate any help. Cheers, Josh From fvogelnew1 at free.fr Fri Jun 6 23:37:47 2008 From: fvogelnew1 at free.fr (=?ISO-8859-1?Q?Fran=E7ois_Vogel?=) Date: Fri, 06 Jun 2008 23:37:47 +0200 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <4849A689.1080200@uvm.edu> References: <4849A689.1080200@uvm.edu> Message-ID: <4849AE2B.1030102@free.fr> IIUC, just adding a colorbar would do the trick, or...? See help colorbar Francois From joshua.auerbach at uvm.edu Sat Jun 7 18:38:44 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Sat, 07 Jun 2008 12:38:44 -0400 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <4849AE2B.1030102@free.fr> References: <4849A689.1080200@uvm.edu> <4849AE2B.1030102@free.fr> Message-ID: <484AB994.10101@uvm.edu> That gives me the key on the side, which helps things a little, but is there a way to adjust the coordinates of the plot so it uses my grid coordinates as opposed to the matrix indices? Josh Fran?ois Vogel wrote: > IIUC, just adding a colorbar would do the trick, or...? > > See help colorbar > > Francois From fvogelnew1 at free.fr Sat Jun 7 23:05:08 2008 From: fvogelnew1 at free.fr (=?ISO-8859-1?Q?Fran=E7ois_Vogel?=) Date: Sat, 07 Jun 2008 23:05:08 +0200 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484AB994.10101@uvm.edu> References: <4849A689.1080200@uvm.edu> <4849AE2B.1030102@free.fr> <484AB994.10101@uvm.edu> Message-ID: <484AF804.2010207@free.fr> help plotframe ? F. Joshua Auerbach said on 07/06/2008 18:38: > That gives me the key on the side, which helps things a little, but is > there a way to adjust the coordinates of the plot so it uses my grid > coordinates as opposed to the matrix indices? > > Josh > > Fran?ois Vogel wrote: >> IIUC, just adding a colorbar would do the trick, or...? >> >> See help colorbar >> >> Francois > > > From duboism at limsi.fr Sat Jun 7 11:54:38 2008 From: duboism at limsi.fr (duboism at limsi.fr) Date: Sat, 7 Jun 2008 11:54:38 +0200 (CEST) Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <4849A689.1080200@uvm.edu> References: <4849A689.1080200@uvm.edu> Message-ID: <51041.82.123.129.157.1212832478.squirrel@keo.limsi.fr> Hi Joshua, I think that the function grayplot (and its friends fgrayplot, Sgrayplot) would be useful for you but you will have to reformat your data. grayplot takes 3 arguments: x (vector of x coordinates, size nx), y (vector of y coordinates, size ny) and a nx*ny matrix data (the value at data(i,j) is the value of point (x(i), y(j)) ). See the script test_grayplot.sce. It should not be hard to re-format your data this way. Note the use of the zminmax option to plot different data with the same color scale (see test_grayplot2.sce). Note also that on the x86_64 architecture the function colorbar seems broken (in fact you cannot use it since it raises an error). Mathieu > Hi, > > I am looking for some assistance. I am trying to make what I know as a > heatmap. Basically I have data for many points on a grid and want to > construct a 2d plot where each point is given a color on a gradient > (From blue to red say) based on the data value at that point. I have > the data in the form of a matrix with 3 columns x-coord, y-coord, data > value > > Currently I am making this type of plot by transforming my grid > coordinates into matrix coordinates of a new matrix and scaling my data > values into the range [0, NUM_COLORS] and using the Matplot function to > plot this data. This method does work, but has a few shortcomings: I > lose the original scale of my grid since the axis labels are based on > the matrix coordinates. There is no key explaining the gradient and > even if there were I would lose the original scale of my data values. > > Does anyone know how to get around these limitations or know of a better > way to accomplish what I am trying to do? I'd appreciate any help. > > Cheers, > Josh > -------------- next part -------------- A non-text attachment was scrubbed... Name: test_grayplot.sce Type: application/octet-stream Size: 389 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test_grayplot2.sce Type: application/octet-stream Size: 627 bytes Desc: not available URL: From joshua.auerbach at uvm.edu Mon Jun 9 17:34:36 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Mon, 09 Jun 2008 11:34:36 -0400 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <51041.82.123.129.157.1212832478.squirrel@keo.limsi.fr> References: <4849A689.1080200@uvm.edu> <51041.82.123.129.157.1212832478.squirrel@keo.limsi.fr> Message-ID: <484D4D8C.4040307@uvm.edu> Thanks for the info on grayplot. A little confusing that something that plots colors would be called "gray"plot don't you think? In any case, this almost gets me to where I want, except grayplot determines the color for each rectangle from the average value at each corner and I do not want this. I want each rectangle to only take its color from one value (what is at the center of the rectangle). ie if my z matrix is binary I want to only see two colors but with grayplot i will get a color for 0 (all four corners 0), 0.25 (one corner 1), 0.5 (two corners 1), 0.75 (three corners 1) and 1 (all four corners 1). Any advice on how to do that? Thanks, Josh duboism at limsi.fr wrote: > Hi Joshua, > > I think that the function grayplot (and its friends fgrayplot, Sgrayplot) > would be useful for you but you will have to reformat your data. > > grayplot takes 3 arguments: x (vector of x coordinates, size nx), y > (vector of y coordinates, size ny) and a nx*ny matrix data (the value at > data(i,j) is the value of point (x(i), y(j)) ). See the script > test_grayplot.sce. > > It should not be hard to re-format your data this way. > > Note the use of the zminmax option to plot different data with the same > color scale (see test_grayplot2.sce). > Note also that on the x86_64 architecture the function colorbar seems > broken (in fact you cannot use it since it raises an error). > > Mathieu > > >> Hi, >> >> I am looking for some assistance. I am trying to make what I know as a >> heatmap. Basically I have data for many points on a grid and want to >> construct a 2d plot where each point is given a color on a gradient >> (From blue to red say) based on the data value at that point. I have >> the data in the form of a matrix with 3 columns x-coord, y-coord, data >> value >> >> Currently I am making this type of plot by transforming my grid >> coordinates into matrix coordinates of a new matrix and scaling my data >> values into the range [0, NUM_COLORS] and using the Matplot function to >> plot this data. This method does work, but has a few shortcomings: I >> lose the original scale of my grid since the axis labels are based on >> the matrix coordinates. There is no key explaining the gradient and >> even if there were I would lose the original scale of my data values. >> >> Does anyone know how to get around these limitations or know of a better >> way to accomplish what I am trying to do? I'd appreciate any help. >> >> Cheers, >> Josh >> >> From nmambre at gmail.com Mon Jun 9 17:48:17 2008 From: nmambre at gmail.com (Nelson Mambre) Date: Mon, 09 Jun 2008 11:18:17 -0430 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484D4D8C.4040307@uvm.edu> References: <4849A689.1080200@uvm.edu> <51041.82.123.129.157.1212832478.squirrel@keo.limsi.fr> <484D4D8C.4040307@uvm.edu> Message-ID: <484D50C1.6080601@gmail.com> Hi Joshua, Don't have Scilab installed right now, but maybe contour or contour2d could help you, if they are more or less the same as contourf in Matlab. Nelson. Joshua Auerbach wrote: > Thanks for the info on grayplot. A little confusing that something > that plots colors would be called "gray"plot don't you think? > > In any case, this almost gets me to where I want, except grayplot > determines the color for each rectangle from the average value at each > corner and I do not want this. I want each rectangle to only take its > color from one value (what is at the center of the rectangle). ie if > my z matrix is binary I want to only see two colors but with grayplot > i will get a color for 0 (all four corners 0), 0.25 (one corner 1), > 0.5 (two corners 1), 0.75 (three corners 1) and 1 (all four corners 1). > > Any advice on how to do that? > > Thanks, > Josh > > duboism at limsi.fr wrote: >> Hi Joshua, >> >> I think that the function grayplot (and its friends fgrayplot, >> Sgrayplot) >> would be useful for you but you will have to reformat your data. >> >> grayplot takes 3 arguments: x (vector of x coordinates, size nx), y >> (vector of y coordinates, size ny) and a nx*ny matrix data (the value at >> data(i,j) is the value of point (x(i), y(j)) ). See the script >> test_grayplot.sce. >> >> It should not be hard to re-format your data this way. >> >> Note the use of the zminmax option to plot different data with the same >> color scale (see test_grayplot2.sce). >> Note also that on the x86_64 architecture the function colorbar seems >> broken (in fact you cannot use it since it raises an error). >> >> Mathieu >> >> >>> Hi, >>> >>> I am looking for some assistance. I am trying to make what I know as a >>> heatmap. Basically I have data for many points on a grid and want to >>> construct a 2d plot where each point is given a color on a gradient >>> (From blue to red say) based on the data value at that point. I have >>> the data in the form of a matrix with 3 columns x-coord, y-coord, data >>> value >>> >>> Currently I am making this type of plot by transforming my grid >>> coordinates into matrix coordinates of a new matrix and scaling my data >>> values into the range [0, NUM_COLORS] and using the Matplot function to >>> plot this data. This method does work, but has a few shortcomings: I >>> lose the original scale of my grid since the axis labels are based on >>> the matrix coordinates. There is no key explaining the gradient and >>> even if there were I would lose the original scale of my data values. >>> >>> Does anyone know how to get around these limitations or know of a >>> better >>> way to accomplish what I am trying to do? I'd appreciate any help. >>> >>> Cheers, >>> Josh >>> >>> > > From joshua.auerbach at uvm.edu Mon Jun 9 18:05:19 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Mon, 09 Jun 2008 12:05:19 -0400 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484D50C1.6080601@gmail.com> References: <4849A689.1080200@uvm.edu> <51041.82.123.129.157.1212832478.squirrel@keo.limsi.fr> <484D4D8C.4040307@uvm.edu> <484D50C1.6080601@gmail.com> Message-ID: <484D54BF.5090209@uvm.edu> Don't think that is what I am looking for Nelson Mambre wrote: > Hi Joshua, > > Don't have Scilab installed right now, but maybe contour or contour2d > could help you, if they are more or less the same as contourf in Matlab. > > Nelson. > > Joshua Auerbach wrote: >> Thanks for the info on grayplot. A little confusing that something >> that plots colors would be called "gray"plot don't you think? >> >> In any case, this almost gets me to where I want, except grayplot >> determines the color for each rectangle from the average value at >> each corner and I do not want this. I want each rectangle to only >> take its color from one value (what is at the center of the >> rectangle). ie if my z matrix is binary I want to only see two >> colors but with grayplot i will get a color for 0 (all four corners >> 0), 0.25 (one corner 1), 0.5 (two corners 1), 0.75 (three corners 1) >> and 1 (all four corners 1). >> >> Any advice on how to do that? >> >> Thanks, >> Josh >> >> duboism at limsi.fr wrote: >>> Hi Joshua, >>> >>> I think that the function grayplot (and its friends fgrayplot, >>> Sgrayplot) >>> would be useful for you but you will have to reformat your data. >>> >>> grayplot takes 3 arguments: x (vector of x coordinates, size nx), y >>> (vector of y coordinates, size ny) and a nx*ny matrix data (the >>> value at >>> data(i,j) is the value of point (x(i), y(j)) ). See the script >>> test_grayplot.sce. >>> >>> It should not be hard to re-format your data this way. >>> >>> Note the use of the zminmax option to plot different data with the same >>> color scale (see test_grayplot2.sce). >>> Note also that on the x86_64 architecture the function colorbar seems >>> broken (in fact you cannot use it since it raises an error). >>> >>> Mathieu >>> >>> >>>> Hi, >>>> >>>> I am looking for some assistance. I am trying to make what I know >>>> as a >>>> heatmap. Basically I have data for many points on a grid and want to >>>> construct a 2d plot where each point is given a color on a gradient >>>> (From blue to red say) based on the data value at that point. I have >>>> the data in the form of a matrix with 3 columns x-coord, y-coord, data >>>> value >>>> >>>> Currently I am making this type of plot by transforming my grid >>>> coordinates into matrix coordinates of a new matrix and scaling my >>>> data >>>> values into the range [0, NUM_COLORS] and using the Matplot >>>> function to >>>> plot this data. This method does work, but has a few shortcomings: I >>>> lose the original scale of my grid since the axis labels are based on >>>> the matrix coordinates. There is no key explaining the gradient and >>>> even if there were I would lose the original scale of my data values. >>>> >>>> Does anyone know how to get around these limitations or know of a >>>> better >>>> way to accomplish what I am trying to do? I'd appreciate any help. >>>> >>>> Cheers, >>>> Josh >>>> >>>> >> >> From mathieu.dubois at limsi.fr Mon Jun 9 20:28:40 2008 From: mathieu.dubois at limsi.fr (Mathieu Dubois) Date: Mon, 09 Jun 2008 20:28:40 +0200 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484D4D8C.4040307@uvm.edu> References: <4849A689.1080200@uvm.edu> <51041.82.123.129.157.1212832478.squirrel@keo.limsi.fr> <484D4D8C.4040307@uvm.edu> Message-ID: <484D7658.9030204@limsi.fr> Hello Joshua, Hello scilabers, Joshua Auerbach a ?crit : > Thanks for the info on grayplot. A little confusing that something > that plots colors would be called "gray"plot don't you think? This came to my mind when I was writing you ;) > > In any case, this almost gets me to where I want, except grayplot > determines the color for each rectangle from the average value at each > corner and I do not want this. I want each rectangle to only take its > color from one value (what is at the center of the rectangle). ie if > my z matrix is binary I want to only see two colors but with grayplot > i will get a color for 0 (all four corners 0), 0.25 (one corner 1), > 0.5 (two corners 1), 0.75 (three corners 1) and 1 (all four corners 1). > > Any advice on how to do that? Maybe. You can choose the number of colors in the colormap. If you use graycolormap(2) you will have one color for '0' and one for '1' (if you have N discrete values, graycolormap(N) works). See the script. I am not completely satisfied with this so if somebody have a better idea let me know. The more general way would be to paint the rectangle [(x(i), y(j)), (x(i+1), y(j+1))] with the right color. I don't know enough for that. Scilab graphics are rather complex. > > Thanks, > Josh Thanks for the question, Mathieu > > duboism at limsi.fr wrote: >> Hi Joshua, >> >> I think that the function grayplot (and its friends fgrayplot, >> Sgrayplot) >> would be useful for you but you will have to reformat your data. >> >> grayplot takes 3 arguments: x (vector of x coordinates, size nx), y >> (vector of y coordinates, size ny) and a nx*ny matrix data (the value at >> data(i,j) is the value of point (x(i), y(j)) ). See the script >> test_grayplot.sce. >> >> It should not be hard to re-format your data this way. >> >> Note the use of the zminmax option to plot different data with the same >> color scale (see test_grayplot2.sce). >> Note also that on the x86_64 architecture the function colorbar seems >> broken (in fact you cannot use it since it raises an error). >> >> Mathieu >> >> >>> Hi, >>> >>> I am looking for some assistance. I am trying to make what I know as a >>> heatmap. Basically I have data for many points on a grid and want to >>> construct a 2d plot where each point is given a color on a gradient >>> (From blue to red say) based on the data value at that point. I have >>> the data in the form of a matrix with 3 columns x-coord, y-coord, data >>> value >>> >>> Currently I am making this type of plot by transforming my grid >>> coordinates into matrix coordinates of a new matrix and scaling my data >>> values into the range [0, NUM_COLORS] and using the Matplot function to >>> plot this data. This method does work, but has a few shortcomings: I >>> lose the original scale of my grid since the axis labels are based on >>> the matrix coordinates. There is no key explaining the gradient and >>> even if there were I would lose the original scale of my data values. >>> >>> Does anyone know how to get around these limitations or know of a >>> better >>> way to accomplish what I am trying to do? I'd appreciate any help. >>> >>> Cheers, >>> Josh >>> >>> > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test_grayplot_binary.sce URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test_grayplot_n.sce URL: From joshua.auerbach at uvm.edu Mon Jun 9 20:39:34 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Mon, 09 Jun 2008 14:39:34 -0400 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484D7658.9030204@limsi.fr> References: <4849A689.1080200@uvm.edu> <51041.82.123.129.157.1212832478.squirrel@keo.limsi.fr> <484D4D8C.4040307@uvm.edu> <484D7658.9030204@limsi.fr> Message-ID: <484D78E6.4040205@uvm.edu> Mathieu Dubois wrote: > Hello Joshua, Hello scilabers, > > Joshua Auerbach a ?crit : >> Thanks for the info on grayplot. A little confusing that something >> that plots colors would be called "gray"plot don't you think? > This came to my mind when I was writing you ;) >> >> In any case, this almost gets me to where I want, except grayplot >> determines the color for each rectangle from the average value at >> each corner and I do not want this. I want each rectangle to only >> take its color from one value (what is at the center of the >> rectangle). ie if my z matrix is binary I want to only see two >> colors but with grayplot i will get a color for 0 (all four corners >> 0), 0.25 (one corner 1), 0.5 (two corners 1), 0.75 (three corners 1) >> and 1 (all four corners 1). >> >> Any advice on how to do that? > Maybe. > > You can choose the number of colors in the colormap. If you use > graycolormap(2) you will have one color for '0' and one for '1' (if > you have N discrete values, graycolormap(N) works). See the script. I > am not completely satisfied with this so if somebody have a better > idea let me know. > I had tried that, but the problem with that is that rectangles with 2 or more corners with value 1 will get the color value for 1, whereas I want only those that actually have value 1 to be colored that way. > The more general way would be to paint the rectangle [(x(i), y(j)), > (x(i+1), y(j+1))] with the right color. I don't know enough for that. > Scilab graphics are rather complex. Not sure how I would do that. Thanks for the help in any case. -Josh >> >> Thanks, >> Josh > Thanks for the question, > Mathieu >> >> duboism at limsi.fr wrote: >>> Hi Joshua, >>> >>> I think that the function grayplot (and its friends fgrayplot, >>> Sgrayplot) >>> would be useful for you but you will have to reformat your data. >>> >>> grayplot takes 3 arguments: x (vector of x coordinates, size nx), y >>> (vector of y coordinates, size ny) and a nx*ny matrix data (the >>> value at >>> data(i,j) is the value of point (x(i), y(j)) ). See the script >>> test_grayplot.sce. >>> >>> It should not be hard to re-format your data this way. >>> >>> Note the use of the zminmax option to plot different data with the same >>> color scale (see test_grayplot2.sce). >>> Note also that on the x86_64 architecture the function colorbar seems >>> broken (in fact you cannot use it since it raises an error). >>> >>> Mathieu >>> >>> >>>> Hi, >>>> >>>> I am looking for some assistance. I am trying to make what I know >>>> as a >>>> heatmap. Basically I have data for many points on a grid and want to >>>> construct a 2d plot where each point is given a color on a gradient >>>> (From blue to red say) based on the data value at that point. I have >>>> the data in the form of a matrix with 3 columns x-coord, y-coord, data >>>> value >>>> >>>> Currently I am making this type of plot by transforming my grid >>>> coordinates into matrix coordinates of a new matrix and scaling my >>>> data >>>> values into the range [0, NUM_COLORS] and using the Matplot >>>> function to >>>> plot this data. This method does work, but has a few shortcomings: I >>>> lose the original scale of my grid since the axis labels are based on >>>> the matrix coordinates. There is no key explaining the gradient and >>>> even if there were I would lose the original scale of my data values. >>>> >>>> Does anyone know how to get around these limitations or know of a >>>> better >>>> way to accomplish what I am trying to do? I'd appreciate any help. >>>> >>>> Cheers, >>>> Josh >>>> >>>> >> > From joshua.auerbach at uvm.edu Mon Jun 9 21:13:31 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Mon, 09 Jun 2008 15:13:31 -0400 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484AF804.2010207@free.fr> References: <4849A689.1080200@uvm.edu> <4849AE2B.1030102@free.fr> <484AB994.10101@uvm.edu> <484AF804.2010207@free.fr> Message-ID: <484D80DB.2030602@uvm.edu> What I have found with plotframe as with using the rect argument of Matplot is that it gives me axises with the bounds I give it, but still is using the matrix indices for the coordinates. For example my real bounds are xmin = -5 xmax = 5, ymin = 0 and ymax = 5 which I have data collected at intervals of 0.1 in both directions, so my matrix has 101 columns and 51 rows, but if I call plotframe([-5 0 5 5]); All I will see is the lower left part of my data. What I really want is all the data to show, but instead of the axises showing x go from 1 to 101 and y go from 1 to 51 I want it to show as x going from -5 to 5 and y going from 0 to 5 I was able to get what I described above using grayplot, but (see my other responses) that has problems of its own. Perhaps I will just not display the axises at all and edit them into the image later, but was really hoping to be able to do this all in scilab. Cheers, Josh Fran?ois Vogel wrote: > help plotframe ? > > F. > > Joshua Auerbach said on 07/06/2008 18:38: >> That gives me the key on the side, which helps things a little, but >> is there a way to adjust the coordinates of the plot so it uses my >> grid coordinates as opposed to the matrix indices? >> >> Josh >> >> Fran?ois Vogel wrote: >>> IIUC, just adding a colorbar would do the trick, or...? >>> >>> See help colorbar >>> >>> Francois >> >> >> From fvogelnew1 at free.fr Mon Jun 9 23:24:38 2008 From: fvogelnew1 at free.fr (=?ISO-8859-1?Q?Fran=E7ois_Vogel?=) Date: Mon, 09 Jun 2008 23:24:38 +0200 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484D80DB.2030602@uvm.edu> References: <4849A689.1080200@uvm.edu> <4849AE2B.1030102@free.fr> <484AB994.10101@uvm.edu> <484AF804.2010207@free.fr> <484D80DB.2030602@uvm.edu> Message-ID: <484D9F96.7050900@free.fr> OK, OK... //---------- xmin=-5; xmax=5; ymin=0; ymax=5; xystep=0.1; nx=abs((xmax-xmin)/xystep)+1; ny=abs((ymax-ymin)/xystep)+1; data_array = rand(nx,ny); // between 0 and 1 dm=min(data_array); dM=max(data_array);// below it is supposed that dm<>dM n_colors=64; f=scf(max(winsid())+1); f.color_map=jetcolormap(n_colors); colorbar(dm,dM) ax=gca(); ax.axes_visible=["on","on"]; ax.tight_limits="on"; ax.data_bounds=[xmin,ymin;xmax,ymax]; data_colors=(data_array-dm)/(dM-dm)*(n_colors-1) + 1; Matplot1(data_colors,[xmin,ymin,xmax,ymax]) //---------- And now please don't tell me that each rectangle should be *centered* on the x and y coordinates. You are correct, of course, but this feature I could never get right. Your turn to contribute on this (and I would really be interested). Final note: the above works in Scilab 4.1.2. If you try it with Scilab 5 you hit bug 2814 (not fixed, no sign it will be in the foreseeable future). Francois Joshua Auerbach said on 09/06/2008 21:13: > What I have found with plotframe as with using the rect argument of > Matplot is that it gives me axises with the bounds I give it, but still > is using the matrix indices for the coordinates. For example my real > bounds are xmin = -5 xmax = 5, ymin = 0 and ymax = 5 which I have data > collected at intervals of 0.1 in both directions, so my matrix has 101 > columns and 51 rows, but if I call plotframe([-5 0 5 5]); > All I will see is the lower left part of my data. What I really want is > all the data to show, but instead of the axises showing x go from 1 to > 101 and y go from 1 to 51 I want it to show as x going from -5 to 5 and > y going from 0 to 5 > > I was able to get what I described above using grayplot, but (see my > other responses) that has problems of its own. Perhaps I will just not > display the axises at all and edit them into the image later, but was > really hoping to be able to do this all in scilab. > > Cheers, > Josh > > > Fran?ois Vogel wrote: >> help plotframe ? >> >> F. >> >> Joshua Auerbach said on 07/06/2008 18:38: >>> That gives me the key on the side, which helps things a little, but >>> is there a way to adjust the coordinates of the plot so it uses my >>> grid coordinates as opposed to the matrix indices? >>> >>> Josh >>> >>> Fran?ois Vogel wrote: >>>> IIUC, just adding a colorbar would do the trick, or...? >>>> >>>> See help colorbar >>>> >>>> Francois From arieldelpino at hotmail.com Mon Jun 9 21:47:08 2008 From: arieldelpino at hotmail.com (Ariel del Pino) Date: Mon, 9 Jun 2008 16:47:08 -0300 Subject: *****SPAM***** Question student from argentina Message-ID: Hello, first, excusme for my english. I am a new user of scilab and i have to make a proyect with ?Principal components analysis? but i cant find about this in scilab. Do you can help me and telle where can i find something about Principal_components_analysis. Thank. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fvogelnew1 at free.fr Tue Jun 10 00:13:12 2008 From: fvogelnew1 at free.fr (=?ISO-8859-1?Q?Fran=E7ois_Vogel?=) Date: Tue, 10 Jun 2008 00:13:12 +0200 Subject: [scilab-Users] Principal components analysis In-Reply-To: References: Message-ID: <484DAAF8.5020603@free.fr> Try: apropos principal or directly help pca Francois Ariel del Pino said on 09/06/2008 21:47: > Hello, first, excusme for my english. > > I am a new user of scilab and i have to make a proyect with ?Principal > components analysis? but i cant find about this in scilab. > > Do you can help me and telle where can i find something about > Principal_components_analysis. > > > Thank. From enrico.segre at weizmann.ac.il Tue Jun 10 09:42:41 2008 From: enrico.segre at weizmann.ac.il (Enrico Segre) Date: Tue, 10 Jun 2008 10:42:41 +0300 Subject: heatmap / Matplot Message-ID: <1213083761.3916.3.camel@segre-pc2.weizmann.ac.il> don't like too much to self-advertise so often, but are you aware that function pixmapl() of toolbox ENRICO does exactly this? Rectangles of the exact color, colorbar. Another (even easier) possibility should be to use plot3d1() with view from the direct top, if I don't err. Enrico From ricci2 at unisi.it Tue Jun 10 12:55:15 2008 From: ricci2 at unisi.it (Maso Ricci) Date: Tue, 10 Jun 2008 12:55:15 +0200 Subject: map from a data file Message-ID: <484E5D93.6070707@unisi.it> Hi all, I have a question: I have some data having the following structure 1 1 1 2 1 3 2 1 2 2 2 3 3 1 . . . . well I would like to plot them like a map using the first two columns as X and Y respectively and the third one as Z value. Of course it would be great if the Z value could determines the colour of the point in the map thanks for the hints -- Maso Ricci Ph.D Dept. of Chemical and Biosystem Science University of Siena Via A. Moro, 2 ? 53100 Siena ITALY Tel: +39 0577 234367 Fax: +39 0577 234177 email: ricci2 at unisi.it From kongwoei at gmail.com Tue Jun 10 13:53:28 2008 From: kongwoei at gmail.com (Susanto Kong) Date: Tue, 10 Jun 2008 12:53:28 +0100 Subject: SciLab features Message-ID: <7398a3ca0806100453g6acea6dctcb20b081b2c91629@mail.gmail.com> Hi, I am wondering if scilab supports symbolic simulation and proving environment? ex: (a + b + c) == (b + c + a) (if a then b else c) == (if (~a) then b else c) Thanks, Kong Susanto -------------- next part -------------- An HTML attachment was scrubbed... URL: From Francis.Drossaert at pgs.com Tue Jun 10 14:12:07 2008 From: Francis.Drossaert at pgs.com (Francis Drossaert) Date: Tue, 10 Jun 2008 13:12:07 +0100 Subject: Reading mixed headers Message-ID: <6D1269A4C2D21240807B91421B187255068DF49C@lonms21.onshore.pgs.com> Hello, I am brandnew to Scilab, although I have extensive experience in Matlab it is a bit of struggle in the beginning now. My problem is dat ik have to read in a mixed ascii file which consists of a line with a header followed by a two column data, blank line, header, data, etc, etc. I read the header line into a string using mgetl and the data is read into a matrix using mfscanf. The problem is that I need the information in the header which is now in a string. The string is something like: 'fldr=1 trcf=139 dt=1000' but much longer. Note that there is no space between the values and the keywords and that the keywords are seperated by blank space. I would like to put certain values - for example the value asscociated with the keyword fldr field (1) - in an integer vector. Any ideas how to proceed and whether if there is a smart way to do it? Cheers and thank you, Francis This email and any files contained therein is confidential and may contain privileged information. If you are not the named addressee(s) or you have otherwise received this in error, you should not distribute or copy this e-mail or use any of its content for any purpose. Please notify the sender immediately by e-mail if you have received this e-mail in error and delete it from your system -------------- next part -------------- An HTML attachment was scrubbed... URL: From David_Comer at Emcore.com Tue Jun 10 16:50:30 2008 From: David_Comer at Emcore.com (David Comer) Date: Tue, 10 Jun 2008 08:50:30 -0600 Subject: [scilab-Users] SciLab features In-Reply-To: <7398a3ca0806100453g6acea6dctcb20b081b2c91629@mail.gmail.com> Message-ID: Kong, This is a bit off-topic with respect to your question, but for my information, what features would you look for in Scilab that are not in a package such as Maxima? I seem to recall in a post some time back there are hooks to Mathematica from Scilab, but I could be wrong. Just Curious, Dave Comer Sr. Design Engineer EMCORE "If developers do not follow any methodology, there is no software engineering but only hacking" -- Gunther Lenz, Thomas Moeller This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. "Susanto Kong" 06/10/2008 05:53 AM Please respond to users at lists.scilab.org To users at lists.scilab.org cc Subject [scilab-Users] SciLab features Hi, I am wondering if scilab supports symbolic simulation and proving environment? ex: (a + b + c) == (b + c + a) (if a then b else c) == (if (~a) then b else c) Thanks, Kong Susanto -------------- next part -------------- An HTML attachment was scrubbed... URL: From kongwoei at gmail.com Tue Jun 10 17:55:39 2008 From: kongwoei at gmail.com (Susanto Kong) Date: Tue, 10 Jun 2008 16:55:39 +0100 Subject: [scilab-Users] SciLab features In-Reply-To: References: <7398a3ca0806100453g6acea6dctcb20b081b2c91629@mail.gmail.com> Message-ID: <7398a3ca0806100855n4af8a85aq1253a4380b1db823@mail.gmail.com> Dave, I am not yet a SciLab user. What is Maxima package? I am trying to learn whether SciLab can be used to check the equivalence of two formulas, mostly contains basic arithmetic operations with additional control condition (if command). I knew that mathematica has a light weight theorem prover and can do the job. I wonder if SciLab also has such functionality. Kong Susanto -------------- next part -------------- An HTML attachment was scrubbed... URL: From David_Comer at Emcore.com Tue Jun 10 18:31:40 2008 From: David_Comer at Emcore.com (David Comer) Date: Tue, 10 Jun 2008 10:31:40 -0600 Subject: [scilab-Users] SciLab features In-Reply-To: <7398a3ca0806100855n4af8a85aq1253a4380b1db823@mail.gmail.com> Message-ID: Hi Kong, At the risk of posting off-topic (we can take this off-line if others feel this discussion is not appropriate), you can find information on Maxima at maxima.sourceforge.net. In a nutshell I suppose it would be safe to say Maxima is to Scilab what Mathematica is to Matlab (Scilab and Maxima are open source, and, as you know, Mathematica and Matlab are not). In fact, from the Maxima home page, "Maxima is a descendant of Macsyma, the legendary computer algebra system developed in the late 1960s at the Massachusetts Institute of Technology." The grey matter between my ears may have failed me here, however, I believe Maxima served as the foundation or inspiration for Mathematic; you can read the Maxima home page for exact details. I find the two packages (Scilab and Maxima) to be of high quality, high value, and complementary. Dave Comer (AD5TU) Sr. Design Engineer EMCORE Desk: (505) 559-2612 Cell: (505) 553-2784 email: David_Comer at emcore.com "If developers do not follow any methodology, there is no software engineering but only hacking" -- Gunther Lenz, Thomas Moeller This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. "Susanto Kong" 06/10/2008 09:55 AM Please respond to users at lists.scilab.org To users at lists.scilab.org cc Subject Re: [scilab-Users] SciLab features Dave, I am not yet a SciLab user. What is Maxima package? I am trying to learn whether SciLab can be used to check the equivalence of two formulas, mostly contains basic arithmetic operations with additional control condition (if command). I knew that mathematica has a light weight theorem prover and can do the job. I wonder if SciLab also has such functionality. Kong Susanto -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2669 bytes Desc: not available URL: From hsr at ee.iitm.ac.in Wed Jun 11 10:14:38 2008 From: hsr at ee.iitm.ac.in (harishankar ramachandran) Date: Wed, 11 Jun 2008 13:44:38 +0530 Subject: [scilab-Users] map from a data file In-Reply-To: <484E5D93.6070707@unisi.it> References: <484E5D93.6070707@unisi.it> Message-ID: <200806111344.38462.hsr@ee.iitm.ac.in> Use the "matrix" command: // to convert gnuplot's splot data file format into a matrix A=read("matrix-data.txt",-1,3); // or use fscanfMat m=max(A(:,1)); // number of rows n=max(A(:,2)); // number of cols M=matrix(A(:,3),m,n); // Takes a matrix and reshapes it into // another matrix with the same number of elements, columnwise. // So if your data is entered row-wise, I guess you have to transpose // the result plot3d(1:m,1:n,M); where the data file I used was: 1 1 0 1 2 1 1 3 2 2 1 1 2 2 2 2 3 3 3 1 2 3 2 3 3 3 4 Regards hari ramachandran On Tuesday 10 June 2008 16:25, Maso Ricci wrote: > Hi all, > > I have a question: I have some data having the following structure > > 1 1 > 1 2 > 1 3 > 2 1 > 2 2 > 2 3 > 3 1 > . > . > . > . > > well I would like to plot them like a map using the first two columns as > X and Y respectively and the third one as Z value. > Of course it would be great if the Z value could determines the colour > of the point in the map > > thanks for the hints -- Dr. Hari Ramachandran, Professor, 332B ESB, EE Dept, IIT-Madras Interests: Nonlinear Optics, Nonlinear Waves, Plasma Physics, Particle Simulations, Computational Algorithms, Linux. Off: 91-44-2257-4421 Fax: 91-44-2257-0120 Res: 91-44-2663-1863 Home Email: omkarbharathi at gmail.com From joshua.auerbach at uvm.edu Wed Jun 11 15:26:15 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Wed, 11 Jun 2008 09:26:15 -0400 Subject: [scilab-Users] heatmap / Matplot In-Reply-To: <484D9F96.7050900@free.fr> References: <4849A689.1080200@uvm.edu> <4849AE2B.1030102@free.fr> <484AB994.10101@uvm.edu> <484AF804.2010207@free.fr> <484D80DB.2030602@uvm.edu> <484D9F96.7050900@free.fr> Message-ID: <484FD277.80103@uvm.edu> Excellent!! This is pretty much exactly what I was looking for. Thank you so much Fran?ois! Josh Fran?ois Vogel wrote: > OK, OK... > > > //---------- > > xmin=-5; > xmax=5; > ymin=0; > ymax=5; > xystep=0.1; > nx=abs((xmax-xmin)/xystep)+1; > ny=abs((ymax-ymin)/xystep)+1; > data_array = rand(nx,ny); // between 0 and 1 > > dm=min(data_array); > dM=max(data_array);// below it is supposed that dm<>dM > > n_colors=64; > > f=scf(max(winsid())+1); > f.color_map=jetcolormap(n_colors); > colorbar(dm,dM) > > ax=gca(); > ax.axes_visible=["on","on"]; > ax.tight_limits="on"; > ax.data_bounds=[xmin,ymin;xmax,ymax]; > > data_colors=(data_array-dm)/(dM-dm)*(n_colors-1) + 1; > > Matplot1(data_colors,[xmin,ymin,xmax,ymax]) > > //---------- > > And now please don't tell me that each rectangle should be *centered* > on the x and y coordinates. You are correct, of course, but this > feature I could never get right. Your turn to contribute on this (and > I would really be interested). > > Final note: the above works in Scilab 4.1.2. > If you try it with Scilab 5 you hit bug 2814 (not fixed, no sign it > will be in the foreseeable future). > > Francois > > > Joshua Auerbach said on 09/06/2008 21:13: >> What I have found with plotframe as with using the rect argument of >> Matplot is that it gives me axises with the bounds I give it, but >> still is using the matrix indices for the coordinates. For example >> my real bounds are xmin = -5 xmax = 5, ymin = 0 and ymax = 5 which I >> have data collected at intervals of 0.1 in both directions, so my >> matrix has 101 columns and 51 rows, but if I call plotframe([-5 0 5 >> 5]); >> All I will see is the lower left part of my data. What I really want >> is all the data to show, but instead of the axises showing x go from >> 1 to 101 and y go from 1 to 51 I want it to show as x going from -5 >> to 5 and y going from 0 to 5 >> >> I was able to get what I described above using grayplot, but (see my >> other responses) that has problems of its own. Perhaps I will just >> not display the axises at all and edit them into the image later, but >> was really hoping to be able to do this all in scilab. >> >> Cheers, >> Josh >> >> >> Fran?ois Vogel wrote: >>> help plotframe ? >>> >>> F. >>> >>> Joshua Auerbach said on 07/06/2008 18:38: >>>> That gives me the key on the side, which helps things a little, but >>>> is there a way to adjust the coordinates of the plot so it uses my >>>> grid coordinates as opposed to the matrix indices? >>>> >>>> Josh >>>> >>>> Fran?ois Vogel wrote: >>>>> IIUC, just adding a colorbar would do the trick, or...? >>>>> >>>>> See help colorbar >>>>> >>>>> Francois From pierre-alain.millet at insa-lyon.fr Wed Jun 11 16:17:41 2008 From: pierre-alain.millet at insa-lyon.fr (pam) Date: Wed, 11 Jun 2008 16:17:41 +0200 Subject: [scilab-Users] Can I draw a graph without giving "node_x" and "node_y" values? (show_graph) In-Reply-To: <483DEEFF.3050003@free.fr> References: <483DEEFF.3050003@free.fr> Message-ID: <484FDE85.7020207@insa-lyon.fr> seems to be normal. u have to calculate x and y i've used this... //---------------GRAPHEENROND(graphe) function gr=grapheenrond(g) // les positions x et y sont calcul?es pour un affichage en cercle des sommets du graphe g nbpoints=g.node_number; for i=1:nbpoints pos_x(i)=100*sin(2*i*%pi/nbpoints); pos_y(i)=100*cos(2*i*%pi/nbpoints); end g.node_y=100+round(pos_y'); g.node_x=100+round(pos_x'); gr=g; endfunction after force directed algorithms could be interseting to have better positionning.. i did not find som standard function to do that so i developped a limited one... pam R?mi G. a ?crit : > Hello! > > If I define a graph : > g = make_graph('toto',0,3,[1,2,3],[2,3,1]) > And I want to draw it : > show_graph(g) > > I get many errors begining with (I don't know how to copy/past from > scilab interpretor output) : > !-- error 60 > argument with incompatible dimensions > ... > > This error seems to come from the lack of "node_x" and "node_y" > value... Nevertheless, I saw in the graph-list help page that these > values are computed by default! > Could you help on this matter? > > R?mi. > From remjg at free.fr Wed Jun 11 17:53:50 2008 From: remjg at free.fr (=?ISO-8859-1?Q?=22R=E9mi_G=2E=22?=) Date: Wed, 11 Jun 2008 17:53:50 +0200 Subject: [scilab-Users] Can I draw a graph without giving "node_x" and "node_y" values? (show_graph) In-Reply-To: <484FDE85.7020207@insa-lyon.fr> References: <483DEEFF.3050003@free.fr> <484FDE85.7020207@insa-lyon.fr> Message-ID: <484FF50E.9010102@free.fr> Thank you very much for your answer! Even if I have already finished my project, I'm pleased to get an answer to my question. I spent time on scilab with graph and this drawing issue was frustrating! It's a good idea to draw nodes on a circle in order to be sure the representation would not be too confused! Besides, I didn't know that their were force-based algorithms... Perhaps a subject for a future project ;) R?mi. From A.Popielec at poczta.fm Wed Jun 11 22:45:00 2008 From: A.Popielec at poczta.fm (Adrian Popielec) Date: Wed, 11 Jun 2008 22:45:00 +0200 Subject: Question about scilab 4.1.2 Message-ID: <4850394C.2000105@poczta.fm> Hello I am a new user of SciLAB .Fisrt think its great but. Always those but's My small question is really simple in Matlab Iwas doing a simple diagrams for function such as: -->T1=0.5; -->k1=0.25; -->N1=[k1]; -->M1=[T1,1,0]; -->N2=[k1]; -->M2=[T1,1,k1]; -->t1=0:0.01:1; _*-->h1=step(N1,M1,T1); this is how it looks on matlab. Its going to count for me that fuctions in time t next think is too plot those h1. But in scilab step is a variable. *_How to describe function step from matlab in Scilab. Thanks a lot for help Your Sincerly Adrian P. ---------------------------------------------------------------------- Podbij Dziki Zachod!Gra strategiczna online Sprawdz >>> http://link.interia.pl/f1dff From fvogelnew1 at free.fr Thu Jun 12 13:18:52 2008 From: fvogelnew1 at free.fr (=?ISO-8859-1?Q?Fran=E7ois_Vogel?=) Date: Thu, 12 Jun 2008 13:18:52 +0200 Subject: [Fwd: conversion of m file to sci file] Message-ID: <4851061C.1010009@free.fr> Not sure why you send this to me directly. Forwarding to the users list, more appropriate. Francois -------- Message original -------- Sujet: conversion of m file to sci file Date: Wed, 11 Jun 2008 12:03:48 -0700 De: Pradipta Mandal Pour :: fvogelnew1 at free.fr Dear Francois, Can you please tell me how to convert an entire directory containing (.m files in Matlab) to their Scilab equivalent? I can convert a single "m-file" to "sci-file" without any trouble. But when I try to convert an entire directory, I get some error message. The message is as follows: "String property value must be a single character string." I am using mfile2sci for this. Can you please help me out with the syntax? Best regards Pradipta. From vincent.couvert at inria.fr Thu Jun 12 14:02:36 2008 From: vincent.couvert at inria.fr (Vincent COUVERT) Date: Thu, 12 Jun 2008 14:02:36 +0200 Subject: [scilab-Users] [Fwd: conversion of m file to sci file] In-Reply-To: <4851061C.1010009@free.fr> References: <4851061C.1010009@free.fr> Message-ID: <4851105C.30706@inria.fr> Hi, I think the function you need is translatepaths. Vincent Fran?ois Vogel a ?crit : > Not sure why you send this to me directly. > > Forwarding to the users list, more appropriate. > > Francois > > > -------- Message original -------- > Sujet: conversion of m file to sci file > Date: Wed, 11 Jun 2008 12:03:48 -0700 > De: Pradipta Mandal > Pour :: fvogelnew1 at free.fr > > > > Dear Francois, > Can you please tell me how to convert an entire > directory containing (.m files in Matlab) to their Scilab equivalent? > I can convert a single "m-file" to "sci-file" without any trouble. But > when I try to convert an entire directory, I get some error message. > The message is as follows: "String property value must be a single > character string." > I am using mfile2sci for this. > > Can you please help me out with the syntax? > > Best regards > Pradipta. > > -- ============================================== Vincent COUVERT Centre de Recherche INRIA Paris-Rocquencourt Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex ============================================== Equipe Projet SCILAB B?timent 1B - Bureau 013 Email : vincent.couvert at inria.fr T?l : +33 (0)1 39 63 54 46 Fax : +33 (0)1 39 63 55 94 ============================================== From bigi.alessandro at gmail.com Fri Jun 13 10:10:13 2008 From: bigi.alessandro at gmail.com (Alessandro Bigi) Date: Fri, 13 Jun 2008 10:10:13 +0200 Subject: problem with colorbar on linux Message-ID: <48522B65.8030609@gmail.com> Hello all, I am experiencing the same error as posted previously on this ML, but to which nobody apparently answered. (http://article.gmane.org/gmane.comp.mathematics.scilab.user/187). I am using linux debian 64bit, and actually I am experiencing this error only on this OS, but the same script works fine on winxp 32bit. Actually this same script was working until few weeks ago on a Debian 32bit, before I reinstalled the OS at 64bit. !--error 999 set: Number of the second argument must be taken between 1 to 3 at line 4 of function generic_i_h called by : line 2 of function %c_i_h called by : I am experiencing this error also with the colorbar example script... what should I do? Thanks in advance! Alessandro From fvogelnew1 at free.fr Fri Jun 13 12:56:15 2008 From: fvogelnew1 at free.fr (=?ISO-8859-1?Q?Fran=E7ois_Vogel?=) Date: Fri, 13 Jun 2008 12:56:15 +0200 Subject: [scilab-Users] problem with colorbar on linux In-Reply-To: <48522B65.8030609@gmail.com> References: <48522B65.8030609@gmail.com> Message-ID: <4852524F.20303@free.fr> Bug 2868 and 2394, still not addressed I think. Francois Alessandro Bigi said on 13/06/2008 10:10: > Hello all, > > I am experiencing the same error as posted previously on this ML, but > to which nobody apparently answered. > (http://article.gmane.org/gmane.comp.mathematics.scilab.user/187). I am > using linux debian 64bit, and actually I am experiencing this error only > on this OS, but the same script works fine on winxp 32bit. Actually this > same script was working until few weeks ago on a Debian 32bit, before I > reinstalled the OS at 64bit. > > !--error 999 > set: Number of the second argument must be taken between 1 to 3 > at line 4 of function generic_i_h called by : > line 2 of function %c_i_h called by : > > > > I am experiencing this error also with the colorbar example script... > what should I do? > Thanks in advance! > > Alessandro > > > > > From bigi.alessandro at gmail.com Fri Jun 13 15:54:17 2008 From: bigi.alessandro at gmail.com (Alessandro Bigi) Date: Fri, 13 Jun 2008 15:54:17 +0200 Subject: [scilab-Users] problem with colorbar on linux In-Reply-To: <4852524F.20303@free.fr> References: <48522B65.8030609@gmail.com> <4852524F.20303@free.fr> Message-ID: <48527C09.2080001@gmail.com> merci! I will keep on eye on Scilab beta (and use windows meanwhile). Alessandro Fran?ois Vogel ha scritto: > Bug 2868 and 2394, still not addressed I think. > > Francois > > > Alessandro Bigi said on 13/06/2008 10:10: >> Hello all, >> >> I am experiencing the same error as posted previously on this ML, >> but to which nobody apparently answered. >> (http://article.gmane.org/gmane.comp.mathematics.scilab.user/187). I >> am using linux debian 64bit, and actually I am experiencing this >> error only on this OS, but the same script works fine on winxp 32bit. >> Actually this same script was working until few weeks ago on a Debian >> 32bit, before I reinstalled the OS at 64bit. >> >> !--error 999 >> set: Number of the second argument must be taken between 1 to 3 >> at line 4 of function generic_i_h called by : >> line 2 of function %c_i_h called by : >> >> >> >> I am experiencing this error also with the colorbar example script... >> what should I do? >> Thanks in advance! >> >> Alessandro >> >> >> >> >> > From Alain.Giorla at eleves.ec-nantes.fr Wed Jun 18 16:01:19 2008 From: Alain.Giorla at eleves.ec-nantes.fr (Giorla Alain) Date: Wed, 18 Jun 2008 16:01:19 +0200 Subject: No warning for redefining and truncated functions Message-ID: <20080618160119.l7nui4hkatn488c4@webmail.ec-nantes.fr> Hello I have search in the bug database and in SciLab help, but I didn't find an answer to my problem : I want to remove the warning messages which are displayed when redefining functions or truncating function names. Exemples: Warning Identifier : function_with_very_long_name has been truncated to: function_with_very_long_ Warning :redefining function: function_with_very_long_ Is it possible to prevent the display of these messages ? Alain Giorla From hocus1 at wp.pl Wed Jun 18 18:33:56 2008 From: hocus1 at wp.pl (Wojciech Knoff) Date: Wed, 18 Jun 2008 18:33:56 +0200 Subject: Scilab question : fprintfMat Message-ID: <485938f4bc2ef@wp.pl> Hello I would like to add comment at the beggining of the file. Do you know hot to do this ?. I use fprintfMat command. Best Regards Wojtek ---------------------------------------------------- Kiedy Doda bywa grzeczna? Kliknij http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fdoda.html&sid=390 From ejoftiduttu at gmail.com Wed Jun 18 19:02:40 2008 From: ejoftiduttu at gmail.com (Dinesh Raghunath) Date: Wed, 18 Jun 2008 22:32:40 +0530 Subject: Problem with installing scilab-3.1.1-2.2.el4.rf.i386.rpm Message-ID: <1bd59be40806181002v4f8437b7gf2c058439dfbe9d8@mail.gmail.com> Hi, I tried installing the scilab-3.1.1-2.2.el4.rf.i386.rpm but it showed one dependecy, *Missing Dependency: libvte.so.4 is needed by package scilab.* I had already installed vte-0.14.0-2.el5, but still its showing the same error msg above. help me.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From ejoftiduttu at gmail.com Wed Jun 18 19:19:30 2008 From: ejoftiduttu at gmail.com (Dinesh Raghunath) Date: Wed, 18 Jun 2008 22:49:30 +0530 Subject: Problem with installing scilab-3.1.1-2.2.el4.rf.i386.rpm Message-ID: <1bd59be40806181019q56f39590t61ab96b53442f765@mail.gmail.com> Hi, I tried installing the scilab-3.1.1-2.2.el4.rf.i386.rpm but it showed one dependecy, *Missing Dependency: libvte.so.4 is needed by package scilab.* I had already installed vte-0.14.0-2.el5, but still its showing the same error msg above. help me.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From enrico.segre at weizmann.ac.il Thu Jun 19 14:46:24 2008 From: enrico.segre at weizmann.ac.il (Enrico Segre) Date: Thu, 19 Jun 2008 15:46:24 +0300 Subject: Problem with installing scilab-3.1.1-2.2.el4.rf.i386.rpm Message-ID: <1213879584.23268.9.camel@segre-pc2.weizmann.ac.il> Apparently libvte.so.4 is provided by older vte packages, like http://fr2.rpmfind.net//linux/RPM/ASP/i386/updates/10.1/i386/vte-0.11.11-12.el4.i386.html (assuming that you're on i386, which perhaps is not the case) vte-0.14.0-2.el5 provides libvte.so.9 Anyway, if you have the freedom of using el5 packages (you're not limited to el4), why don't you try with a more recent version of scilab? e.g. http://fr2.rpmfind.net//linux/RPM/dag/redhat/el4/i386/scilab-4.0-1.el4.rf.i386.html or even better, why don't you build from sources? For scilab 4.1.2 you don't need too many prerequisites, see http://wiki.scilab.org/Compilation_of_Scilab Enrico From joerg.kuehne at gmx.net Fri Jun 20 21:28:49 2008 From: joerg.kuehne at gmx.net (=?iso-8859-1?Q?=22J=F6rg_K=FChne=22?=) Date: Fri, 20 Jun 2008 21:28:49 +0200 Subject: moving averager Message-ID: <20080620192849.40420@gmx.net> Dear user list, have someone experience with moving averager. I should calculate the mean value of a certain amount of bins in a vector. It starts from the lowest bin and ends on the highest bin. Thanks for your help best regards joerg -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf at gmx From sylvestre.ledru at inria.fr Mon Jun 23 14:10:21 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Mon, 23 Jun 2008 14:10:21 +0200 Subject: [scilab-Users] Problem with installing scilab-3.1.1-2.2.el4.rf.i386.rpm In-Reply-To: <1bd59be40806181019q56f39590t61ab96b53442f765@mail.gmail.com> References: <1bd59be40806181019q56f39590t61ab96b53442f765@mail.gmail.com> Message-ID: <1214223021.10117.27.camel@korcula.inria.fr> > Hi, > > I tried installing the scilab-3.1.1-2.2.el4.rf.i386.rpm but it showed > one dependecy, Can I ask why you want to use Scilab 3.1.1 ? It is a pretty old version of Scilab. If you are using Suse or Opensuse, some RPM of the latest stable version of Scilab are available: http://en.opensuse.org/Scilab Sylvestre From A.Bluem at fhtw-berlin.de Mon Jun 23 16:41:12 2008 From: A.Bluem at fhtw-berlin.de (Alexander Bluem) Date: Mon, 23 Jun 2008 16:41:12 +0200 Subject: [scilab-Users] moving averager In-Reply-To: <20080620192849.40420@gmx.net> References: <20080620192849.40420@gmx.net> Message-ID: <485FB608.8020504@fhtw-berlin.de> J?rg K?hne wrote: > Dear user list, > > have someone experience with moving averager. I should calculate the mean value of a certain amount of bins in a vector. It starts from the lowest bin and ends on the highest bin. > > Thanks for your help > > best regards > > joerg Hello J?rg, you could simply run through your vector in a loop. Though I am quite sure that this "solution" is pretty inefficient, it still works well. here it is: //random values r=floor(rand(1,1000)*1000); //get size [nr, nc]=size(r); //windowsize wsize=50; //average vectors avg=zeros(1:(nc-wsize)); avg2=zeros(1:(nc-wsize)); //iterate through random vector for i = 1:wsize:(nc-wsize); //gliding window avg(i:i+wsize)=mean(r(i:i+wsize)); end //iterate through random vector for i = 1:(nc-wsize); avg2(i)=mean(r(i:i+wsize)); end clf; plot(1:nc, r, 'y', 1:nc-wsize+1, avg, 'b', 1:nc-wsize, avg2, 'g') From sylvestre.ledru at inria.fr Mon Jun 23 22:49:22 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Mon, 23 Jun 2008 22:49:22 +0200 Subject: [scilab-Users] SciLab features In-Reply-To: References: Message-ID: <1214254162.4069.33.camel@zlarin.inria.fr> Le mardi 10 juin 2008 ? 08:50 -0600, David Comer a ?crit : > > Kong, > > This is a bit off-topic with respect to your question, but for my > information, what features would you look for in Scilab that are not > in a package such as Maxima? I seem to recall in a post some time back > there are hooks to Mathematica from Scilab, but I could be wrong. You are right: http://www.cert.fr/dcsd/idco/perso/Magni/toolboxes.html#symbolic However, this work is not ready for production and we are looking for people interested to work on this: http://wiki.scilab.org/Contributor_-_symbolic Sylvestre From sylvestre.ledru at inria.fr Mon Jun 23 22:56:07 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Mon, 23 Jun 2008 22:56:07 +0200 Subject: [scilab-Users] problem with colorbar on linux In-Reply-To: <48522B65.8030609@gmail.com> References: <48522B65.8030609@gmail.com> Message-ID: <1214254567.4069.44.camel@zlarin.inria.fr> > I am experiencing the same error as posted previously on this ML, > but to which nobody apparently answered. > (http://article.gmane.org/gmane.comp.mathematics.scilab.user/187). I am > using linux debian 64bit, and actually I am experiencing this error only > on this OS, but the same script works fine on winxp 32bit. Actually this > same script was working until few weeks ago on a Debian 32bit, before I > reinstalled the OS at 64bit. Yep, we do have a borring bug with the 64 bits. We have this in mind. Sylvestre From sanilg81 at gmail.com Wed Jun 25 14:58:17 2008 From: sanilg81 at gmail.com (anil sharma) Date: Wed, 25 Jun 2008 18:28:17 +0530 Subject: help for executing the mat2sci converted file In-Reply-To: References: Message-ID: Hi, i have converted 2 matlab file for execution of zernike polynomials into scilab but i am facing problem in executing the code in scilab. can somebody help me. I have attached both the matlab and scilab codes with this mail Regards Anil Sharma -------------- next part -------------- A non-text attachment was scrubbed... Name: zernikepolynomials.m Type: text/x-objcsrc Size: 2860 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zernike.m Type: text/x-objcsrc Size: 2636 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zernikepolynomials.sci Type: application/octet-stream Size: 4726 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zernike.sci Type: application/octet-stream Size: 4101 bytes Desc: not available URL: From sanilg81 at gmail.com Wed Jun 25 14:58:40 2008 From: sanilg81 at gmail.com (anil sharma) Date: Wed, 25 Jun 2008 18:28:40 +0530 Subject: help for executing the mat2sci converted file In-Reply-To: References: Message-ID: Hi, i have converted 2 matlab file for execution of zernike polynomials into scilab but i am facing problem in executing the code in scilab. can somebody help me. I have attached both the matlab and scilab codes with this mail Regards Anil Sharma -------------- next part -------------- A non-text attachment was scrubbed... Name: zernikepolynomials.m Type: text/x-objcsrc Size: 2860 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zernike.m Type: text/x-objcsrc Size: 2636 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zernikepolynomials.sci Type: application/octet-stream Size: 4726 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zernike.sci Type: application/octet-stream Size: 4101 bytes Desc: not available URL: From sylvestre.ledru at inria.fr Wed Jun 25 15:02:24 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Wed, 25 Jun 2008 15:02:24 +0200 Subject: [scilab-Users] help for executing the mat2sci converted file In-Reply-To: References: Message-ID: <1214398944.6049.186.camel@korcula.inria.fr> Le mercredi 25 juin 2008 ? 18:28 +0530, anil sharma a ?crit : > i am facing problem in executing the code in scilab. Can you detail the "problem" you encounter ? It would be helpful ;) S From sanilg81 at gmail.com Wed Jun 25 15:07:24 2008 From: sanilg81 at gmail.com (anil sharma) Date: Wed, 25 Jun 2008 18:37:24 +0530 Subject: [scilab-Users] help for executing the mat2sci converted file In-Reply-To: <1214398944.6049.186.camel@korcula.inria.fr> References: <1214398944.6049.186.camel@korcula.inria.fr> Message-ID: Hi, Actually I need the zernike polynomials and the zernike function to execute my code in scilab. I have converted these files in scilab using mat2sci. Now i need to remove all the errors in the files i.e the code for factorial and in zernike.sci and the matlab function colormap needs to be replaced with that of scilab equivalent. Regards Anil Sharma On 6/25/08, Sylvestre Ledru wrote: > Le mercredi 25 juin 2008 ? 18:28 +0530, anil sharma a ?crit : >> i am facing problem in executing the code in scilab. > Can you detail the "problem" you encounter ? > It would be helpful ;) > > S > > > From vincent.couvert at inria.fr Wed Jun 25 18:12:03 2008 From: vincent.couvert at inria.fr (Vincent COUVERT) Date: Wed, 25 Jun 2008 18:12:03 +0200 Subject: [scilab-Users] help for executing the mat2sci converted file In-Reply-To: <1214398944.6049.186.camel@korcula.inria.fr> References: <1214398944.6049.186.camel@korcula.inria.fr> Message-ID: <48626E53.1020602@inria.fr> Hi, I just had a look to your Scilab functions and it seems that there are not many modifications needed to make your code work. Most of the comments added by m2sci just inform you that you may have a problem but in your case it is not (for example the comments added for the function string in zernipolynomials). For other functions such as subplot, the use you make of these functions is just similar than the use we have in Scilab and it should work. The problem is for functions that do not exist in Scilab ; for them you should have a look to Scilab help and find an equivalent. Vincent Sylvestre Ledru a ?crit : > Le mercredi 25 juin 2008 ? 18:28 +0530, anil sharma a ?crit : > >> i am facing problem in executing the code in scilab. >> > Can you detail the "problem" you encounter ? > It would be helpful ;) > > S > > > > -- ============================================== Vincent COUVERT Centre de Recherche INRIA Paris-Rocquencourt Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex ============================================== Equipe Projet SCILAB B?timent 1B - Bureau 013 Email : vincent.couvert at inria.fr T?l : +33 (0)1 39 63 54 46 Fax : +33 (0)1 39 63 55 94 ============================================== From sanilg81 at gmail.com Wed Jun 25 20:04:34 2008 From: sanilg81 at gmail.com (anil sharma) Date: Wed, 25 Jun 2008 23:34:34 +0530 Subject: [scilab-Users] help for executing the mat2sci converted file In-Reply-To: <48626E53.1020602@inria.fr> References: <1214398944.6049.186.camel@korcula.inria.fr> <48626E53.1020602@inria.fr> Message-ID: Thanks vincent, i will just look for the corrections needed and correct the code regards Anil SHarma On Wed, Jun 25, 2008 at 9:42 PM, Vincent COUVERT wrote: > Hi, > > I just had a look to your Scilab functions and it seems that there are not > many modifications needed to make your code work. Most of the comments added > by m2sci just inform you that you may have a problem but in your case it is > not (for example the comments added for the function string in > zernipolynomials). > > For other functions such as subplot, the use you make of these functions is > just similar than the use we have in Scilab and it should work. > > The problem is for functions that do not exist in Scilab ; for them you > should have a look to Scilab help and find an equivalent. > > Vincent > > Sylvestre Ledru a ?crit : > > Le mercredi 25 juin 2008 ? 18:28 +0530, anil sharma a ?crit : >> >> >>> i am facing problem in executing the code in scilab. >>> >>> >> Can you detail the "problem" you encounter ? It would be helpful ;) >> >> S >> >> >> >> >> > > -- > ============================================== > Vincent COUVERT > Centre de Recherche INRIA Paris-Rocquencourt > Domaine de Voluceau - B.P. 105 > 78153 Le Chesnay Cedex > ============================================== > Equipe Projet SCILAB > B?timent 1B - Bureau 013 > Email : vincent.couvert at inria.fr > T?l : +33 (0)1 39 63 54 46 > Fax : +33 (0)1 39 63 55 94 > ============================================== > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnusci at gmail.com Wed Jun 25 21:47:00 2008 From: gnusci at gmail.com (Edmanuel Torres) Date: Wed, 25 Jun 2008 21:47:00 +0200 Subject: Graph window does not work on SUSE 10.3 Compiz, Message-ID: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> Dear all, I been using Scilab for many years, but last month my institute did upgrade the system to SUSE 10.3 and I am using the Compiz desktop. Scilab run without problems, I also did compile it. But the graphic windows does not works, I can display graphics. Does anyone the problem? Thanks a lot, Gnusci From sylvestre.ledru at inria.fr Thu Jun 26 18:27:52 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Thu, 26 Jun 2008 18:27:52 +0200 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> Message-ID: <1214497672.6185.15.camel@zlarin.inria.fr> > I been using Scilab for many years, but last month my institute did > upgrade the system to SUSE 10.3 and I am using the Compiz desktop. > Scilab run without problems, I also did compile it. But the graphic > windows does not works, I can display graphics. Does anyone the > problem? What kind of problem do you have ? Can you send a screenshot ? Which version of Scilab do you use ? Does it occur with Scilab 5 beta ? Thx S From lester at arctica1.wanadoo.co.uk Thu Jun 26 19:22:32 2008 From: lester at arctica1.wanadoo.co.uk (Lester Anderson) Date: Thu, 26 Jun 2008 18:22:32 +0100 Subject: Convert matlab m file to scilab sci format Message-ID: <000b01c8d7b1$37b82f60$0202a8c0@your24biuqhy5h> Hello I have a Matlab file I would like to convert to sci (scilab) format but it fails to work. I am using scilab 4.1.2 I am not a Matlab user so cannot say why it is failing: I get the following error: Startup execution: loading initial environment -->mfile2sci(); ****** Beginning of mfile2sci() session ****** File to convert: D:/3D_Inver/3dinver.m Result file path: D:/Temp/ Recursive mode: OFF Only double values used in M-file: NO Verbose mode: 3 Generate formated code: NO M-file reading... M-file reading: Done Syntax modification... Syntax modification: Done !--error 37 incorrect function at line 1 at line 190 of function mfile2sci called by : line 64 of function m2sci_gui called by : line 16 of function mfile2sci called by : mfile2sci(); --> I have listed the file here in case someone can see what the issue is Thanks Lester %3DINVER.M: A MATLAB program to invert the gravity anomaly over a 3-D horizontal density interface by Parker-Oldenburg's algorithm %David Gomez Ortiz and Bhrigu N P Agarwal % %Iterative process of Oldenburg(1974) %using the Parker's (1973) equation %Given a gravity map as input (bouin)in mGal %as well as density contrast (contrast) in gr/cm3 %and the mean source depth (z0) in Km %the program computes the topography of the interface (topoout) in Km % %density contrast is positive (e. g. mantle-crust) %mean depth reference is positive downwards(z0) %It is also necessary to include map length in Km (longx and longy) %considering a square area, the number of rows or columns (numrows and numcolumns) %and the convergence criterion (criterio) in Km % %The maximum number of iterations is 10 % %The program computes also the gravity map (bouinv) due to the computed relief(forward modelling) %The cut-off frequencies (SH and WH) for the filter in order to achieve %convergence have to be also previously defined (as 1/wavelength in Km) % bouin='c:\gravityinput.dat'; %path and name of the input gravity file, e.g. c:\gravityinput.dat topoout='c:\topooutput.dat'; %path and name of the output topography file, e.g. c:\topooutput.dat bouinverted='c:\bouinv.dat'; %path and name of the output gravity file, e.g. c:\bouinv.dat numrows=112; %e. g. 112 data in Y direction numcolumns=112; % e. g. 112 data in X direction longx=666; %e.g. 666 Km data length in X direction longy=666; %e.g. 666 Km data length in Y direction contrast=0.4; %density contrast value in g/cm3, e. g. 0.4 criterio=0.02; %convergence criterion in Km, e. g. 0.02 z0=30; %mean reference depth in Km, e. g. 30 Km WH=0.01; %smaller cut-off frequency (1/wavelength in Km) e. g. 0.01, i.e. 1/100 Km SH=0.012; %greater cut-off frequency (1/wavelength in Km) e. g. 0.012, i.e. 1/83.3 Km truncation=0.1 %truncation window data length in % per one, i.e, 10% fid=fopen(bouin); bou=fscanf(fid,'%f',[numcolumns numrows]); %open the input gravity file, read it and stores it in variable 'bou' fclose(fid) % Calculate mean value of the gravity map fftbou=fft2(bou); %fft2 computes the 2-D FFT of a 2-D matrix (bou, in this case) meangravity=(fftbou(1,1)/(numrows*numcolumns)); %the first term of the 2-D fft array divided by the product of the number of rows and columns provides the mean gravity value of the map % Demean data disp('Data sets demeaned') %displays the text 'Data sets demeaned' on the screen bou=bou-meangravity; %input gravity map is demeaned %A cosine Tukey window with a truncation of 10% default is applied wrows = tukeywin(numrows,truncation); %this computes a 1-D cosine Tukey window of the same length as the original matrix input rows and with the truncation defined by the variable 'truncation' wcolumns = tukeywin(numcolumns,truncation); %this computes a 1-D cosine Tukey window of the same length as the original matrix input columns and with the truncation defined by the variable 'truncation' w2 =wrows(:)* wcolumns(:).'; %this generates a 2-D cosine Tukey window multipliying the 1-D windows bou=bou.*w2'; %the original gravity input matrix, previously demeaned, is multiplied by the cosine window mapabou=bou'; %the original gravity input matrix after demeaning is transposed surf(mapabou) %then it is drawn only for visualization title('Observed gravity anomaly map (mGal)') %this is the title of the graph fftbou=fft2(mapabou); %the 2-D FFT of the gravity input matrix is computed after demeaning spectrum=abs(fftbou(1:numrows/2, 1:numcolumns/2)); %this computes the amplitude spectrum figure surf(spectrum) %and the spectrum is drawn only for visualization title('Amplitude spectrum of the Observed gravity map') %this is the title of the new graph %the matrix with the frequencies of every harmonic is computed for f=1:abs((numrows/2)+1); for g=1:abs((numcolumns/2)+1); frequency(f, g)=sqrt(((f-1)/longx)^2+((g-1)/longy)^2); end; end; %the matrix of the negative frequencies is also computed frequency2=fliplr(frequency); frequency3=flipud(frequency); frequency4=fliplr(flipud(frequency)); entero=round(numcolumns/2); if ((numcolumns/2)- entero)==0 frequency2(:,1)=[]; frequency3(1,:)=[]; frequency4(:,1)=[]; frequency4(1,:)=[]; frequencytotal=[frequency frequency2;frequency3 frequency4]; else frequencytotal=[frequency frequency2;frequency3 frequency4]; end frequencytotal(end,:)=[]; frequencytotal(:,end)=[]; frequencytotal=frequencytotal.*(2*pi); %the frequency (1/wavelength) matrix is transformed to wavenumber (2*pi/wavelength) matrix %The iterative process starts here %The first term of the series, that is constant, is computed and stored in variable 'constant' up=-(fftbou.*(exp((z0*100000)*(frequencytotal.*(1/100000))))); down=(2*pi*6.67*contrast); constant=up./down; %The high-cut filter is constructed filter=frequencytotal.*0; %the filter matrix is set to zero frequencytotal=frequencytotal./(2*pi); for f=1:numrows; for g=1:numcolumns; if frequencytotal(f,g)=criterio %it determines if the rms error is greater than the convergence criterion topo3=(((frequencytotal.^(1))./(prod(1:2))).*(fft2(finaltopoinverse.^2)))+((((frequencytotal.^(2))./(prod(1:3))).*(fft2(finaltopoinverse.^3)))); %the third term of the series is computed using the new topography approach topo3=topo3.*filter; %the filter is applied to the third term of the series topo3=constant-topo3; %the new topography approach is computed topoinverse3=real(ifft2(topo3)); %and transformed to space domain diference3=topoinverse3-topoinverse2; %the diference between the last two topography approaches is computed diference3=diference3.^2; rms3=sqrt(sum(sum(diference3))/(2*(numrows*numcolumns))); %the new rms error is computed rms=rms3; finaltopoinverse=topoinverse3; %the new topography approach is stored in variable finaltopoinverse iter=3; %it indicates the iteration step reached if rms3>=criterio %it determines if the convergence criterion has been reached or not topo4=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse3.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse3.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse3.^4)))); %the fourth term of the series is computed, and so on... topo4=topo4.*filter; topo4=constant-topo4; topoinverse4=real(ifft2(topo4)); diference4=topoinverse4-topoinverse3; diference4=diference4.^2; rms4=sqrt(sum(sum(diference4))/(2*(numrows*numcolumns))); rms=rms4; finaltopoinverse=topoinverse4; iter=4; if rms4>=criterio topo5=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse4.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse4.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse4.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse4.^5)))); topo5=topo5.*filter; topo5=constant-topo5; topoinverse5=real(ifft2(topo5)); diference5=topoinverse5-topoinverse4; diference5=diference5.^2; rms5=sqrt(sum(sum(diference5))/(2*(numrows*numcolumns))); rms=rms5; finaltopoinverse=topoinverse5; iter=5; if rms5>=criterio topo6=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse5.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse5.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse5.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse5.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse5.^6)))); topo6=topo6.*filter; topo6=constant-topo6; topoinverse6=real(ifft2(topo6)); diference6=topoinverse6-topoinverse5; diference6=diference6.^2; rms6=sqrt(sum(sum(diference6))/(2*(numrows*numcolumns))); rms=rms6; finaltopoinverse=topoinverse6; iter=6; if rms6>=criterio topo7=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse6.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse6.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse6.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse6.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse6.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse6.^7)))); topo7=topo7.*filter; topo7=constant-topo7; topoinverse7=real(ifft2(topo7)); diference7=topoinverse7-topoinverse6; diference7=diference7.^2; rms7=sqrt(sum(sum(diference7))/(2*(numrows*numcolumns))); rms=rms7; finaltopoinverse=topoinverse7; iter=7; if rms7>=criterio topo8=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse7.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse7.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse7.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse7.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse7.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse7.^7))))+((((frequencytotal.^(7))/(prod(1:8))).*(fft2(topoinverse7.^8)))); topo8=topo8.*filter; topo8=constant-topo8; topoinverse8=real(ifft2(topo8)); diference8=topoinverse8-topoinverse7; diference8=diference8.^2; rms8=sqrt(sum(sum(diference8))/(2*(numrows*numcolumns))); rms=rms8; finaltopoinverse=topoinverse8; iter=8; if rms8>=criterio topo9=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse8.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse8.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse8.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse8.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse8.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse8.^7))))+((((frequencytotal.^(7))/(prod(1:8))).*(fft2(topoinverse8.^8))))+((((frequencytotal.^(8))/(prod(1:9))).*(fft2(topoinverse8.^9)))); topo9=topo9.*filter; topo9=constant-topo9; topoinverse9=real(ifft2(topo9)); diference9=topoinverse9-topoinverse8; diference9=diference9.^2; rms9=sqrt(sum(sum(diference9))/(2*(numrows*numcolumns))); rms=rms9; finaltopoinverse=topoinverse9; iter=9; if rms9>=criterio topo10=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse9.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse9.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse9.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse9.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse9.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse9.^7))))+((((frequencytotal.^(7))/(prod(1:8))).*(fft2(topoinverse9.^8))))+((((frequencytotal.^(8))/(prod(1:9))).*(fft2(topoinverse9.^9))))+((((frequencytotal.^(9))/(prod(1:10))).*(fft2(topoinverse9.^10)))); topo10=topo10.*filter; topo10=constant-topo10; topoinverse10=real(ifft2(topo10)); diference10=topoinverse10-topoinverse9; diference10=diference10.^2; rms10=sqrt(sum(sum(diference10))/(2*(numrows*numcolumns))); rms=rms10; finaltopoinverse=topoinverse10; iter=10; end end end end end end end end; iter %it displays the iteration number at which the process has stopped rms %it displays the rms error at the end of the iterative process figure %it opens a new figure surf(finaltopoinverse+z0) %it draws the final topography relief map obtained adding the mean reference depth title('Topography of the inverted interface obtained from the Bouguer gravity map (Km)') %this is the title of the new graph %the matrix is transposed to their output to a surfer file trans=(finaltopoinverse+z0)'; fid=fopen(topoout, 'w'); fprintf(fid,'%6.2f\n',trans); %this opens and writes the output matrix in a ASCII file with a single data column with depths fclose(fid); %At this point, the forward modelling starts. The final topography obtained before is used in the Parker's formula in order to compute the gravity anomaly due to that interface. The number of terms of the series is the same that the number of iterations reached in the inverse modelling. sumas=1; %initialize variables. The maximum number of sums is 10, because the maximum number of iterations in the inverse modelling is 10. sumtotal=[]; sum2=[]; sum3=[]; sum4=[]; sum5=[]; sum6=[]; sum7=[]; sum8=[]; sum9=[]; sum10=[]; constantbouinv=-(2*pi*6.67*contrast)*(exp(-(z0*100000).*(frequencytotal.*(1/100000)))); %the constant term of the series is computed %The sum of fourier transforms starts here. At each step, a new term of the series is computed and added to the previous one. Then, if the number of sums is lower than the number of iterations, the process continues. sumtotal=(((frequencytotal.^(0))/(prod(1:1))).*(fft2(finaltopoinverse.^1))); sums=2; if sums<=iter sum2=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(finaltopoinverse.^2))); sums=3; sumtotal=sumtotal+sum2; if sumas<=iter sum3=((((frequencytotal.^(2))/(prod(1:3))).*(fft2(finaltopoinverse.^3)))); sums=4; sumtotal=sumtotal+sum3; if sums<=iter sum4=((((frequencytotal.^(3))/(prod(1:4))).*(fft2(finaltopoinverse.^4)))); sums=5; sumtotal=sumtotal+sum4; if sums<=iter sum5=((((frequencytotal.^(4))/(prod(1:5))).*(fft2(finaltopoinverse.^5)))); sums=6; sumtotal=sumtotal+sum5; if sums<=iter sum6=((((frequencytotal.^(5))/(prod(1:6))).*(fft2(finaltopoinverse.^6)))); sums=7; sumtotal=sumtotal+sum6; if sums<=iter sum7=((((frequencytotal.^(6))/(prod(1:7))).*(fft2(finaltopoinverse.^7)))); sums=8; sumtotal=sumtotal+sum7; if sums<=iter sum8=((((frequencytotal.^(7))/(prod(1:8))).*(fft2(finaltopoinverse.^8)))); sums=9; sumtotal=sumtotal+sum8; if sums<=iter sum9=((((frequencytotal.^(8))/(prod(1:9))).*(fft2(finaltopoinverse.^9)))); sums=10; sumtotal=sumtotal+sum9; if sums<=iter sum10=((((frequencytotal.^(9))/(prod(1:10))).*(fft2(finaltopoinverse.^10)))); sumtotal=sumtotal+sum10; end end end end end end end end end sumtotal=sumtotal.*constantbouinv; %after the summatory, the final map in frequency domain is computed multipliying the constant term sumtotal(1,1)=0; bouinv=real(ifft2(sumtotal)); %the inverse 2-D FFT provides the gravity map in space domain figure %opens a new figure surf(bouinv) %it displays the gravity map obtained only for visualization title('Gravity map due to the interface calculated (mGal)') %this is the title of the new figure figure %opens a new figure surf(bouinv-mapabou) %it displays the map with the diference between the gravity map input and the gravity map of the forward modelling title('Diference between the input gravity map and the one due to the calculated interface (mGal)') %this is the title of the new figure bouinvtras=bouinv'; %the matrix is transposed to their output to a surfer file fid=fopen(bouinverted, 'w'); fprintf(fid,'%6.2f\n',bouinvtras+meangravity); %this opens and writes the output matrix (adding the mean gravity value substracted prior to the FFT) in a ASCII file with a single data column with gravity anomaly fclose(fid); -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.vincent at ac-creteil.fr Thu Jun 26 20:50:46 2008 From: christian.vincent at ac-creteil.fr (Christian Vincent) Date: Thu, 26 Jun 2008 20:50:46 +0200 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> Message-ID: <4863E506.4090008@ac-creteil.fr> Edmanuel Torres a ?crit : > Dear all, > > I been using Scilab for many years, but last month my institute did > upgrade the system to SUSE 10.3 and I am using the Compiz desktop. > Scilab run without problems, I also did compile it. But the graphic > windows does not works, I can display graphics. Does anyone the > problem? > > Thanks a lot, > > Gnusci > > I am under Linux Ubuntu + Compiz-Cubic. When I launch a graphic window, it opens on another face of the cube? Christian V From gnusci at gmail.com Thu Jun 26 21:07:51 2008 From: gnusci at gmail.com (Edmanuel Torres) Date: Thu, 26 Jun 2008 21:07:51 +0200 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <1214497672.6185.15.camel@zlarin.inria.fr> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> <1214497672.6185.15.camel@zlarin.inria.fr> Message-ID: <81e7f11c0806261207x1217406co133d105beca691cc@mail.gmail.com> Hello, Sorry for my vague description of the of the problem. I am using Scilab 4.1.2, the problem is when I try to make a plot then the graphic window fails to open, for instance the following code: > x = [1:100]; > y=x; > plot(x,y) If I type it, the graphic editor window just open for one second and then crash without display the plot. I also tried with Scilab 5.0 beta but just froze my system and then reboot. Thanks a lot for your help, Gnusci On Thu, Jun 26, 2008 at 6:27 PM, Sylvestre Ledru wrote: >> I been using Scilab for many years, but last month my institute did >> upgrade the system to SUSE 10.3 and I am using the Compiz desktop. >> Scilab run without problems, I also did compile it. But the graphic >> windows does not works, I can display graphics. Does anyone the >> problem? > What kind of problem do you have ? Can you send a screenshot ? > Which version of Scilab do you use ? > Does it occur with Scilab 5 beta ? > > Thx > S > > > From sylvestre.ledru at inria.fr Thu Jun 26 23:41:12 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Thu, 26 Jun 2008 23:41:12 +0200 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <81e7f11c0806261207x1217406co133d105beca691cc@mail.gmail.com> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> <1214497672.6185.15.camel@zlarin.inria.fr> <81e7f11c0806261207x1217406co133d105beca691cc@mail.gmail.com> Message-ID: <1214516472.19901.13.camel@zlarin.inria.fr> Le jeudi 26 juin 2008 ? 21:07 +0200, Edmanuel Torres a ?crit : > Hello, > > Sorry for my vague description of the of the problem. I am using > Scilab 4.1.2, the problem is when I try to make a plot then the > graphic window fails to open, for instance the following code: > > > x = [1:100]; > > y=x; > > plot(x,y) > > If I type it, the graphic editor window just open for one second and > then crash without display the plot. hmhm, weird... > I also tried with Scilab 5.0 beta > but just froze my system and then reboot. Hmm, that really sucks and it is pretty weird! Does it happen each time you try it ? Sylvestre From vincent.couvert at inria.fr Fri Jun 27 09:07:51 2008 From: vincent.couvert at inria.fr (Vincent COUVERT) Date: Fri, 27 Jun 2008 09:07:51 +0200 Subject: [scilab-Users] Convert matlab m file to scilab sci format In-Reply-To: <000b01c8d7b1$37b82f60$0202a8c0@your24biuqhy5h> References: <000b01c8d7b1$37b82f60$0202a8c0@your24biuqhy5h> Message-ID: <486491C7.701@inria.fr> Hi, Conversion does not fails for me under Scilab 4.1.2 with your options. Anybody else can reproduce the bug ? Vincent Lester Anderson a ?crit : > Hello > > I have a Matlab file I would like to convert to sci (scilab) format > but it fails to work. I am using scilab 4.1.2 > > I am not a Matlab user so cannot say why it is failing: > > I get the following error: > > Startup execution: > loading initial environment > > -->mfile2sci(); > ****** Beginning of mfile2sci() session ****** > File to convert: D:/3D_Inver/3dinver.m > Result file path: D:/Temp/ > Recursive mode: OFF > Only double values used in M-file: NO > Verbose mode: 3 > Generate formated code: NO > M-file reading... > M-file reading: Done > Syntax modification... > Syntax modification: Done > !--error 37 > incorrect function at line 1 > at line 190 of function mfile2sci called by : > line 64 of function m2sci_gui called by : > line 16 of function mfile2sci called by : > mfile2sci(); > > > --> > > I have listed the file here in case someone can see what the issue is > > Thanks > > Lester > > %3DINVER.M: A MATLAB program to invert the gravity anomaly over a 3-D > horizontal density interface by Parker-Oldenburg's algorithm > %David Gomez Ortiz and Bhrigu N P Agarwal > % > %Iterative process of Oldenburg(1974) > %using the Parker's (1973) equation > %Given a gravity map as input (bouin)in mGal > %as well as density contrast (contrast) in gr/cm3 > %and the mean source depth (z0) in Km > %the program computes the topography of the interface (topoout) in Km > % > %density contrast is positive (e. g. mantle-crust) > %mean depth reference is positive downwards(z0) > %It is also necessary to include map length in Km (longx and longy) > %considering a square area, the number of rows or columns (numrows and > numcolumns) > %and the convergence criterion (criterio) in Km > % > %The maximum number of iterations is 10 > % > %The program computes also the gravity map (bouinv) due to the > computed relief(forward modelling) > %The cut-off frequencies (SH and WH) for the filter in order to achieve > %convergence have to be also previously defined (as 1/wavelength in Km) > % > > bouin='c:\gravityinput.dat'; %path and name of the input gravity > file, e.g. c:\gravityinput.dat > topoout='c:\topooutput.dat'; %path and name of the output topography > file, e.g. c:\topooutput.dat > bouinverted='c:\bouinv.dat'; %path and name of the output gravity > file, e.g. c:\bouinv.dat > numrows=112; %e. g. 112 data in Y direction > numcolumns=112; % e. g. 112 data in X direction > longx=666; %e.g. 666 Km data length in X direction > longy=666; %e.g. 666 Km data length in Y direction > contrast=0.4; %density contrast value in g/cm3, e. g. 0.4 > criterio=0.02; %convergence criterion in Km, e. g. 0.02 > z0=30; %mean reference depth in Km, e. g. 30 Km > WH=0.01; %smaller cut-off frequency (1/wavelength in > Km) e. g. 0.01, i.e. 1/100 Km > SH=0.012; %greater cut-off frequency (1/wavelength in > Km) e. g. 0.012, i.e. 1/83.3 Km > > truncation=0.1 %truncation window data length in % per one, > i.e, 10% > > fid=fopen(bouin); > bou=fscanf(fid,'%f',[numcolumns numrows]); %open the input gravity > file, read it and stores it in variable 'bou' > fclose(fid) > > % Calculate mean value of the gravity map > fftbou=fft2(bou); %fft2 computes the 2-D FFT of a 2-D matrix (bou, > in this case) > meangravity=(fftbou(1,1)/(numrows*numcolumns)); %the first term of the > 2-D fft array divided by the product of the number of rows and columns > provides the mean gravity value of the map > > % Demean data > disp('Data sets demeaned') %displays the text 'Data sets demeaned' on > the screen > bou=bou-meangravity; %input gravity map is demeaned > > %A cosine Tukey window with a truncation of 10% default is applied > wrows = tukeywin(numrows,truncation); %this computes a 1-D cosine > Tukey window of the same length as the original matrix input rows and > with the truncation defined by the variable 'truncation' > wcolumns = tukeywin(numcolumns,truncation); %this computes a 1-D > cosine Tukey window of the same length as the original matrix input > columns and with the truncation defined by the variable 'truncation' > > w2 =wrows(:)* wcolumns(:).'; %this generates a 2-D cosine Tukey window > multipliying the 1-D windows > bou=bou.*w2'; %the original gravity input matrix, previously > demeaned, is multiplied by the cosine window > > mapabou=bou'; %the original gravity input matrix after demeaning is > transposed > surf(mapabou) %then it is drawn only for visualization > title('Observed gravity anomaly map (mGal)') %this is the title of the > graph > > fftbou=fft2(mapabou); %the 2-D FFT of the gravity input matrix is > computed after demeaning > spectrum=abs(fftbou(1:numrows/2, 1:numcolumns/2)); %this computes the > amplitude spectrum > figure > surf(spectrum) %and the spectrum is drawn only for visualization > title('Amplitude spectrum of the Observed gravity map') %this is the > title of the new graph > > %the matrix with the frequencies of every harmonic is computed > for f=1:abs((numrows/2)+1); > for g=1:abs((numcolumns/2)+1); > frequency(f, g)=sqrt(((f-1)/longx)^2+((g-1)/longy)^2); > end; > end; > %the matrix of the negative frequencies is also computed > frequency2=fliplr(frequency); > frequency3=flipud(frequency); > frequency4=fliplr(flipud(frequency)); > entero=round(numcolumns/2); > if ((numcolumns/2)- entero)==0 > frequency2(:,1)=[]; > frequency3(1,:)=[]; > frequency4(:,1)=[]; > frequency4(1,:)=[]; > frequencytotal=[frequency frequency2;frequency3 frequency4]; > else > frequencytotal=[frequency frequency2;frequency3 frequency4]; > end > frequencytotal(end,:)=[]; > frequencytotal(:,end)=[]; > > frequencytotal=frequencytotal.*(2*pi); %the frequency (1/wavelength) > matrix is transformed to wavenumber (2*pi/wavelength) matrix > > %The iterative process starts here > %The first term of the series, that is constant, is computed and > stored in variable 'constant' > up=-(fftbou.*(exp((z0*100000)*(frequencytotal.*(1/100000))))); > down=(2*pi*6.67*contrast); > constant=up./down; > %The high-cut filter is constructed > filter=frequencytotal.*0; %the filter matrix is set to zero > frequencytotal=frequencytotal./(2*pi); > for f=1:numrows; > for g=1:numcolumns; > if frequencytotal(f,g) filter(f,g)=1; > elseif frequencytotal(f,g) > filter(f,g)=0.5.*(1+cos((((2*pi)*frequencytotal(f,g))-(2*pi*WH))/(2*(SH-WH)))); > else > filter(f,g)=0; > end > end; > end; > constant=constant.*filter; %the filter is applied to the first term > of the series > > topoinverse=real(ifft2(constant)); %the real part of the inverse 2-D > FFT of the first term provides the first topography approach stored in > the variable 'topoinverse' > frequencytotal=frequencytotal.*(2*pi); > > %It starts the computation of the second term of the series with a > maximum of 10 iterations > > topo2=(((frequencytotal.^(1))./(prod(1:2))).*(fft2(topoinverse.^2))); > %the function 'prod' computes the factorial of the number inside the > brackets > > topo2=topo2.*filter; %the filter is applied to the second term of > the series > > topo2=constant-topo2; %the new topography approach is computed > substracting the first term to the second one > > topoinverse2=real(ifft2(topo2)); % the real part of the 2-D inverse > FFT provides the new topography approach in space domain > > diference2=topoinverse2-topoinverse; % this compute the diference > between the two conscutive topography approaches > diference2=diference2.^2; > rms2=sqrt(sum(sum(diference2))/(2*(numrows*numcolumns))); %it > computes the rms error between the last two iterations > iter=2; %the number of the iteration reached is stored in variable 'iter' > rms=rms2; > finaltopoinverse=topoinverse2; %the new topography approach is stored > in the variable 'finaltpoinverse' > if rms2>=criterio %it determines if the rms error is greater than > the convergence criterion > > topo3=(((frequencytotal.^(1))./(prod(1:2))).*(fft2(finaltopoinverse.^2)))+((((frequencytotal.^(2))./(prod(1:3))).*(fft2(finaltopoinverse.^3)))); > %the third term of the series is computed using the new topography > approach > > > topo3=topo3.*filter; %the filter is applied to the third term of the > series > > topo3=constant-topo3; %the new topography approach is computed > topoinverse3=real(ifft2(topo3)); %and transformed to space domain > diference3=topoinverse3-topoinverse2; %the diference between > the last two topography approaches is computed > diference3=diference3.^2; > rms3=sqrt(sum(sum(diference3))/(2*(numrows*numcolumns))); %the > new rms error is computed > rms=rms3; > finaltopoinverse=topoinverse3; %the new topography approach is > stored in variable finaltopoinverse > iter=3; %it indicates the iteration step reached > if rms3>=criterio %it determines if the convergence criterion has > been reached or not > > topo4=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse3.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse3.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse3.^4)))); > %the fourth term of the series is computed, and so on... > > topo4=topo4.*filter; > > topo4=constant-topo4; > topoinverse4=real(ifft2(topo4)); > diference4=topoinverse4-topoinverse3; > diference4=diference4.^2; > rms4=sqrt(sum(sum(diference4))/(2*(numrows*numcolumns))); > rms=rms4; > finaltopoinverse=topoinverse4; > iter=4; > if rms4>=criterio > > topo5=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse4.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse4.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse4.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse4.^5)))); > > topo5=topo5.*filter; > > topo5=constant-topo5; > topoinverse5=real(ifft2(topo5)); > diference5=topoinverse5-topoinverse4; > diference5=diference5.^2; > rms5=sqrt(sum(sum(diference5))/(2*(numrows*numcolumns))); > rms=rms5; > finaltopoinverse=topoinverse5; > iter=5; > if rms5>=criterio > > topo6=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse5.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse5.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse5.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse5.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse5.^6)))); > > topo6=topo6.*filter; > > topo6=constant-topo6; > topoinverse6=real(ifft2(topo6)); > diference6=topoinverse6-topoinverse5; > diference6=diference6.^2; > rms6=sqrt(sum(sum(diference6))/(2*(numrows*numcolumns))); > rms=rms6; > finaltopoinverse=topoinverse6; > iter=6; > if rms6>=criterio > > topo7=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse6.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse6.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse6.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse6.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse6.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse6.^7)))); > > topo7=topo7.*filter; > > topo7=constant-topo7; > topoinverse7=real(ifft2(topo7)); > diference7=topoinverse7-topoinverse6; > diference7=diference7.^2; > rms7=sqrt(sum(sum(diference7))/(2*(numrows*numcolumns))); > rms=rms7; > finaltopoinverse=topoinverse7; > iter=7; > if rms7>=criterio > > topo8=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse7.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse7.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse7.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse7.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse7.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse7.^7))))+((((frequencytotal.^(7))/(prod(1:8))).*(fft2(topoinverse7.^8)))); > > topo8=topo8.*filter; > topo8=constant-topo8; > topoinverse8=real(ifft2(topo8)); > diference8=topoinverse8-topoinverse7; > diference8=diference8.^2; > rms8=sqrt(sum(sum(diference8))/(2*(numrows*numcolumns))); > rms=rms8; > finaltopoinverse=topoinverse8; > iter=8; > if rms8>=criterio > > topo9=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse8.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse8.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse8.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse8.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse8.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse8.^7))))+((((frequencytotal.^(7))/(prod(1:8))).*(fft2(topoinverse8.^8))))+((((frequencytotal.^(8))/(prod(1:9))).*(fft2(topoinverse8.^9)))); > > topo9=topo9.*filter; > topo9=constant-topo9; > topoinverse9=real(ifft2(topo9)); > diference9=topoinverse9-topoinverse8; > diference9=diference9.^2; > rms9=sqrt(sum(sum(diference9))/(2*(numrows*numcolumns))); > rms=rms9; > finaltopoinverse=topoinverse9; > iter=9; > if rms9>=criterio > > topo10=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(topoinverse9.^2)))+((((frequencytotal.^(2))/(prod(1:3))).*(fft2(topoinverse9.^3))))+((((frequencytotal.^(3))/(prod(1:4))).*(fft2(topoinverse9.^4))))+((((frequencytotal.^(4))/(prod(1:5))).*(fft2(topoinverse9.^5))))+((((frequencytotal.^(5))/(prod(1:6))).*(fft2(topoinverse9.^6))))+((((frequencytotal.^(6))/(prod(1:7))).*(fft2(topoinverse9.^7))))+((((frequencytotal.^(7))/(prod(1:8))).*(fft2(topoinverse9.^8))))+((((frequencytotal.^(8))/(prod(1:9))).*(fft2(topoinverse9.^9))))+((((frequencytotal.^(9))/(prod(1:10))).*(fft2(topoinverse9.^10)))); > > topo10=topo10.*filter; > topo10=constant-topo10; > topoinverse10=real(ifft2(topo10)); > diference10=topoinverse10-topoinverse9; > diference10=diference10.^2; > > rms10=sqrt(sum(sum(diference10))/(2*(numrows*numcolumns))); > rms=rms10; > finaltopoinverse=topoinverse10; > iter=10; > end > end > end > end > end > end > end > end; > > iter %it displays the iteration number at which the process has > stopped > rms %it displays the rms error at the end of the iterative process > figure %it opens a new figure > surf(finaltopoinverse+z0) %it draws the final topography relief map > obtained adding the mean reference depth > title('Topography of the inverted interface obtained from the Bouguer > gravity map (Km)') %this is the title of the new graph > %the matrix is transposed to their output to a surfer file > trans=(finaltopoinverse+z0)'; > fid=fopen(topoout, 'w'); > fprintf(fid,'%6.2f\n',trans); %this opens and writes the output > matrix in a ASCII file with a single data column with depths > fclose(fid); > > %At this point, the forward modelling starts. The final topography > obtained before is used in the Parker's formula in order to compute > the gravity anomaly due to that interface. The number of terms of the > series is the same that the number of iterations reached in the > inverse modelling. > > sumas=1; %initialize variables. The maximum number of sums is 10, > because the maximum number of iterations in the inverse modelling is 10. > sumtotal=[]; > sum2=[]; > sum3=[]; > sum4=[]; > sum5=[]; > sum6=[]; > sum7=[]; > sum8=[]; > sum9=[]; > sum10=[]; > constantbouinv=-(2*pi*6.67*contrast)*(exp(-(z0*100000).*(frequencytotal.*(1/100000)))); > %the constant term of the series is computed > %The sum of fourier transforms starts here. At each step, a new term > of the series is computed and added to the previous one. Then, if the > number of sums is lower than the number of iterations, the process > continues. > > sumtotal=(((frequencytotal.^(0))/(prod(1:1))).*(fft2(finaltopoinverse.^1))); > sums=2; > if sums<=iter > > sum2=(((frequencytotal.^(1))/(prod(1:2))).*(fft2(finaltopoinverse.^2))); > sums=3; > sumtotal=sumtotal+sum2; > if sumas<=iter > > sum3=((((frequencytotal.^(2))/(prod(1:3))).*(fft2(finaltopoinverse.^3)))); > sums=4; > sumtotal=sumtotal+sum3; > if sums<=iter > > sum4=((((frequencytotal.^(3))/(prod(1:4))).*(fft2(finaltopoinverse.^4)))); > sums=5; > sumtotal=sumtotal+sum4; > if sums<=iter > > sum5=((((frequencytotal.^(4))/(prod(1:5))).*(fft2(finaltopoinverse.^5)))); > > sums=6; > sumtotal=sumtotal+sum5; > if sums<=iter > > sum6=((((frequencytotal.^(5))/(prod(1:6))).*(fft2(finaltopoinverse.^6)))); > sums=7; > sumtotal=sumtotal+sum6; > if sums<=iter > > sum7=((((frequencytotal.^(6))/(prod(1:7))).*(fft2(finaltopoinverse.^7)))); > sums=8; > sumtotal=sumtotal+sum7; > if sums<=iter > > sum8=((((frequencytotal.^(7))/(prod(1:8))).*(fft2(finaltopoinverse.^8)))); > sums=9; > sumtotal=sumtotal+sum8; > if sums<=iter > > sum9=((((frequencytotal.^(8))/(prod(1:9))).*(fft2(finaltopoinverse.^9)))); > sums=10; > sumtotal=sumtotal+sum9; > if sums<=iter > > sum10=((((frequencytotal.^(9))/(prod(1:10))).*(fft2(finaltopoinverse.^10)))); > sumtotal=sumtotal+sum10; > end > end > end > end > end > end > end > end > end > > > sumtotal=sumtotal.*constantbouinv; %after the summatory, the final > map in frequency domain is computed multipliying the constant term > sumtotal(1,1)=0; > bouinv=real(ifft2(sumtotal)); %the inverse 2-D FFT provides the > gravity map in space domain > > figure %opens a new figure > surf(bouinv) %it displays the gravity map obtained only for visualization > title('Gravity map due to the interface calculated (mGal)') %this is > the title of the new figure > figure %opens a new figure > surf(bouinv-mapabou) %it displays the map with the diference between > the gravity map input and the gravity map of the forward modelling > title('Diference between the input gravity map and the one due to the > calculated interface (mGal)') %this is the title of the new figure > > bouinvtras=bouinv'; %the matrix is transposed to their output to a > surfer file > fid=fopen(bouinverted, 'w'); > fprintf(fid,'%6.2f\n',bouinvtras+meangravity); %this opens and writes > the output matrix (adding the mean gravity value substracted prior to > the FFT) in a ASCII file with a single data column with gravity anomaly > fclose(fid); -- ============================================== Vincent COUVERT Centre de Recherche INRIA Paris-Rocquencourt Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex ============================================== Equipe Projet SCILAB B?timent 1B - Bureau 013 Email : vincent.couvert at inria.fr T?l : +33 (0)1 39 63 54 46 Fax : +33 (0)1 39 63 55 94 ============================================== From lester at arctica1.wanadoo.co.uk Fri Jun 27 09:58:45 2008 From: lester at arctica1.wanadoo.co.uk (Lester Anderson) Date: Fri, 27 Jun 2008 08:58:45 +0100 Subject: Convert matlab m file to scilab sci format Message-ID: <001e01c8d82b$a1b312c0$0202a8c0@your24biuqhy5h> Hi Vincent Seems odd it works - and yet fails for me. I am using the Windows/XP version of Scilab 4.1.2 would that make a difference? I just used the Application option to do the convert Not sure how to get around this problem. Obviously, I need to be able to convert the matlab file so I can alter input components so it's good to know how to get it working. Simple matlab files work ok as far as I can see. Could you upload the scilab version ? Still learning things here! Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnusci at gmail.com Fri Jun 27 10:44:11 2008 From: gnusci at gmail.com (Edmanuel Torres) Date: Fri, 27 Jun 2008 10:44:11 +0200 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <1214516472.19901.13.camel@zlarin.inria.fr> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> <1214497672.6185.15.camel@zlarin.inria.fr> <81e7f11c0806261207x1217406co133d105beca691cc@mail.gmail.com> <1214516472.19901.13.camel@zlarin.inria.fr> Message-ID: <81e7f11c0806270144w5e92533fi3cec36baed9bcb3c@mail.gmail.com> >> I also tried with Scilab 5.0 beta >> but just froze my system and then reboot. > Hmm, that really sucks and it is pretty weird! Does it happen each time > you try it ? I tried three times, and it happen every time after I runned a test with graphics, now I am afraid to try again. On Thu, Jun 26, 2008 at 11:41 PM, Sylvestre Ledru wrote: > Le jeudi 26 juin 2008 ? 21:07 +0200, Edmanuel Torres a ?crit : >> Hello, >> >> Sorry for my vague description of the of the problem. I am using >> Scilab 4.1.2, the problem is when I try to make a plot then the >> graphic window fails to open, for instance the following code: >> >> > x = [1:100]; >> > y=x; >> > plot(x,y) >> >> If I type it, the graphic editor window just open for one second and >> then crash without display the plot. > hmhm, weird... Any suggestion? > > > Sylvestre > > > -- --- Cheers, Gnusci From Simone.Mannori at inria.fr Fri Jun 27 10:54:20 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Fri, 27 Jun 2008 10:54:20 +0200 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <81e7f11c0806270144w5e92533fi3cec36baed9bcb3c@mail.gmail.com> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> <1214497672.6185.15.camel@zlarin.inria.fr> <81e7f11c0806261207x1217406co133d105beca691cc@mail.gmail.com> <1214516472.19901.13.camel@zlarin.inria.fr> <81e7f11c0806270144w5e92533fi3cec36baed9bcb3c@mail.gmail.com> Message-ID: <1214556860.2923.10.camel@pinarellu.inria.fr> Scilab 4.1.2 does NOT work with Compiz or others 3D fancy desktop tools :( (tested on my fedora 7 PCs) Simone Mannori - Scilab Consortium Scilab/Scicos Embedded Applications //**--------------------------------------------------------------- On Fri, 2008-06-27 at 10:44 +0200, Edmanuel Torres wrote: > >> I also tried with Scilab 5.0 beta > >> but just froze my system and then reboot. > > Hmm, that really sucks and it is pretty weird! Does it happen each time > > you try it ? > > I tried three times, and it happen every time after I runned a test > with graphics, now I am afraid to try again. > > On Thu, Jun 26, 2008 at 11:41 PM, Sylvestre Ledru > wrote: > > Le jeudi 26 juin 2008 ? 21:07 +0200, Edmanuel Torres a ?crit : > >> Hello, > >> > >> Sorry for my vague description of the of the problem. I am using > >> Scilab 4.1.2, the problem is when I try to make a plot then the > >> graphic window fails to open, for instance the following code: > >> > >> > x = [1:100]; > >> > y=x; > >> > plot(x,y) > >> > >> If I type it, the graphic editor window just open for one second and > >> then crash without display the plot. > > hmhm, weird... > > Any suggestion? > > > > > > > Sylvestre > > > > > > > > > From vincent.couvert at inria.fr Fri Jun 27 13:42:35 2008 From: vincent.couvert at inria.fr (Vincent COUVERT) Date: Fri, 27 Jun 2008 13:42:35 +0200 Subject: [scilab-Users] Re: Convert matlab m file to scilab sci format In-Reply-To: <001e01c8d82b$a1b312c0$0202a8c0@your24biuqhy5h> References: <001e01c8d82b$a1b312c0$0202a8c0@your24biuqhy5h> Message-ID: <4864D22B.8080509@inria.fr> Hi, I found the reason of your problem. In Scilab, function names can not begin with a digit and I think your m-file is named 3dinver.m. This morning, I made my test using a file called test.m. mfile2sci considers your script is a function with the same name as the file. If you rename your file, it will work perfectly. Vincent Lester Anderson a ?crit : > Hi Vincent > > Seems odd it works - and yet fails for me. I am using the Windows/XP > version of Scilab 4.1.2 would that make a difference? I just used the > Application option to do the convert > > Not sure how to get around this problem. Obviously, I need to be able > to convert the matlab file so I can alter input components so it's > good to know how to get it working. Simple matlab files work ok as far > as I can see. > > Could you upload the scilab version ? Still learning things here! > > Lester > > -- ============================================== Vincent COUVERT Centre de Recherche INRIA Paris-Rocquencourt Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex ============================================== Equipe Projet SCILAB B?timent 1B - Bureau 013 Email : vincent.couvert at inria.fr T?l : +33 (0)1 39 63 54 46 Fax : +33 (0)1 39 63 55 94 ============================================== From lester at arctica1.wanadoo.co.uk Fri Jun 27 14:32:29 2008 From: lester at arctica1.wanadoo.co.uk (Lester Anderson) Date: Fri, 27 Jun 2008 13:32:29 +0100 Subject: Convert matlab m file to scilab sci format Message-ID: <000501c8d851$de519be0$0202a8c0@your24biuqhy5h> Hi Vincent Yes, indeed renaming the file did work in the conversion. Now I need to figure out what the conversion messages mean, as there are clearly some matlab specific ones that scilab can't figure out: -->mfile2sci(); ****** Beginning of mfile2sci() session ****** File to convert: D:/3D_Inver/Gravinv.m Result file path: D:/3D_Inver/ Recursive mode: OFF Only double values used in M-file: NO Verbose mode: 3 Generate formated code: NO M-file reading... M-file reading: Done Syntax modification... Syntax modification: Done Macro to tree conversion... Conversion of M-tree... L.40: No simple equivalent, so mtlb_fscanf() is called !! L.52: Matlab toolbox(es) function tukeywin not converted, original calling sequence used !! L.53: Matlab toolbox(es) function tukeywin not converted, original calling sequence used !! L.64: Matlab function figure not yet converted !! L.64: Matlab function figure not yet converted, original calling sequence used !! L.114: Matlab function ifft2 not yet converted, original calling sequence used !! L.125: Matlab function ifft2 not yet converted, original calling sequence used !! L.140: Matlab function ifft2 not yet converted, original calling sequence used !! L.153: Matlab function ifft2 not yet converted, original calling sequence used !! L.166: Matlab function ifft2 not yet converted, original calling sequence used !! L.179: Matlab function ifft2 not yet converted, original calling sequence used !! L.192: Matlab function ifft2 not yet converted, original calling sequence used !! L.204: Matlab function ifft2 not yet converted, original calling sequence used !! L.216: Matlab function ifft2 not yet converted, original calling sequence used !! L.228: Matlab function ifft2 not yet converted, original calling sequence used !! L.246: Matlab function figure not yet converted !! L.246: Matlab function figure not yet converted, original calling sequence used L.252: No simple equivalent, so mtlb_fprintf() is called !! L.321: Matlab function ifft2 not yet converted, original calling sequence used !! L.323: Matlab function figure not yet converted !! L.323: Matlab function figure not yet converted, original calling sequence used !! L.326: Matlab function figure not yet converted !! L.326: Matlab function figure not yet converted, original calling sequence used L.332: No simple equivalent, so mtlb_fprintf() is called Conversion of M-tree: Done Macro to tree conversion: Done Translation may be wrong (see the //!! comments) ****** End of mfile2sci() session ****** I guess it is a case of trying to find the equivakent operation in scilab or a series of functions that will work. I'm guessing that ifft2 for example is a inverse fast fourier transform (might have to find a matlab guide to these things). Well it's good to know that these matlab files can be converted Thanks for the help Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.auerbach at uvm.edu Fri Jun 27 16:43:29 2008 From: joshua.auerbach at uvm.edu (Joshua Auerbach) Date: Fri, 27 Jun 2008 10:43:29 -0400 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <1214556860.2923.10.camel@pinarellu.inria.fr> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> <1214497672.6185.15.camel@zlarin.inria.fr> <81e7f11c0806261207x1217406co133d105beca691cc@mail.gmail.com> <1214516472.19901.13.camel@zlarin.inria.fr> <81e7f11c0806270144w5e92533fi3cec36baed9bcb3c@mail.gmail.com> <1214556860.2923.10.camel@pinarellu.inria.fr> Message-ID: <4864FC91.5000609@uvm.edu> I use 4.1.2 on my machine running Ubuntu 8.04 and compiz-fusion. Works fine, though as someone else stated sometimes the graphics window will pop up on a different desktop (i use a cube with 6 sides) from the one the main scilab window is in. -Josh Simone Mannori wrote: > Scilab 4.1.2 does NOT work with Compiz or others 3D fancy desktop > tools :( (tested on my fedora 7 PCs) > > Simone Mannori - Scilab Consortium > Scilab/Scicos Embedded Applications > > //**--------------------------------------------------------------- > > > > > On Fri, 2008-06-27 at 10:44 +0200, Edmanuel Torres wrote: > >>>> I also tried with Scilab 5.0 beta >>>> but just froze my system and then reboot. >>>> >>> Hmm, that really sucks and it is pretty weird! Does it happen each time >>> you try it ? >>> >> I tried three times, and it happen every time after I runned a test >> with graphics, now I am afraid to try again. >> >> On Thu, Jun 26, 2008 at 11:41 PM, Sylvestre Ledru >> wrote: >> >>> Le jeudi 26 juin 2008 ? 21:07 +0200, Edmanuel Torres a ?crit : >>> >>>> Hello, >>>> >>>> Sorry for my vague description of the of the problem. I am using >>>> Scilab 4.1.2, the problem is when I try to make a plot then the >>>> graphic window fails to open, for instance the following code: >>>> >>>> >>>>> x = [1:100]; >>>>> y=x; >>>>> plot(x,y) >>>>> >>>> If I type it, the graphic editor window just open for one second and >>>> then crash without display the plot. >>>> >>> hmhm, weird... >>> >> Any suggestion? >> >> >>> Sylvestre >>> >>> >>> >>> >> >> From gnusci at gmail.com Fri Jun 27 20:32:03 2008 From: gnusci at gmail.com (Edmanuel Torres) Date: Fri, 27 Jun 2008 20:32:03 +0200 Subject: [scilab-Users] Graph window does not work on SUSE 10.3 Compiz, In-Reply-To: <4864FC91.5000609@uvm.edu> References: <81e7f11c0806251247m55ddf4baj2a27b1a1ddbe4ea@mail.gmail.com> <1214497672.6185.15.camel@zlarin.inria.fr> <81e7f11c0806261207x1217406co133d105beca691cc@mail.gmail.com> <1214516472.19901.13.camel@zlarin.inria.fr> <81e7f11c0806270144w5e92533fi3cec36baed9bcb3c@mail.gmail.com> <1214556860.2923.10.camel@pinarellu.inria.fr> <4864FC91.5000609@uvm.edu> Message-ID: <81e7f11c0806271132h395cfab3y7e26a93fec01829a@mail.gmail.com> Hi all... I just followed the steps carfully described by Simone Mannori in his post. So I did open Scilab in the Desktop 1 and I tried once again to plot a curve. surprisingly the graphic editor window popped up in the Desktop 2. So I was not completely sure, so I did some complex graphics and everything ran like a charm. Thanks a lot Simone. So the lesson for the 3D desktop people is: open Scilab in the Desktop 1 and look for the graphic editor in the Desktop 2, after that you can move the graphic editor to the Desktop 1 if you like :) Best, Edmanuel On Fri, Jun 27, 2008 at 4:43 PM, Joshua Auerbach wrote: > I use 4.1.2 on my machine running Ubuntu 8.04 and compiz-fusion. Works > fine, though as someone else stated sometimes the graphics window will pop > up on a different desktop (i use a cube with 6 sides) from the one the main > scilab window is in. > > -Josh > > Simone Mannori wrote: >> >> Scilab 4.1.2 does NOT work with Compiz or others 3D fancy desktop >> tools :( (tested on my fedora 7 PCs) >> >> Simone Mannori - Scilab Consortium >> Scilab/Scicos Embedded Applications >> >> //**--------------------------------------------------------------- >> >> >> >> >> On Fri, 2008-06-27 at 10:44 +0200, Edmanuel Torres wrote: >> >>>>> >>>>> I also tried with Scilab 5.0 beta >>>>> but just froze my system and then reboot. >>>>> >>>> >>>> Hmm, that really sucks and it is pretty weird! Does it happen each time >>>> you try it ? >>>> >>> >>> I tried three times, and it happen every time after I runned a test >>> with graphics, now I am afraid to try again. >>> >>> On Thu, Jun 26, 2008 at 11:41 PM, Sylvestre Ledru >>> wrote: >>> >>>> >>>> Le jeudi 26 juin 2008 ? 21:07 +0200, Edmanuel Torres a ?crit : >>>> >>>>> >>>>> Hello, >>>>> >>>>> Sorry for my vague description of the of the problem. I am using >>>>> Scilab 4.1.2, the problem is when I try to make a plot then the >>>>> graphic window fails to open, for instance the following code: >>>>> >>>>> >>>>>> >>>>>> x = [1:100]; >>>>>> y=x; >>>>>> plot(x,y) >>>>>> >>>>> >>>>> If I type it, the graphic editor window just open for one second and >>>>> then crash without display the plot. >>>>> >>>> >>>> hmhm, weird... >>>> >>> >>> Any suggestion? >>> >>> >>>> >>>> Sylvestre >>>> >>>> >>>> >>>> >>> >>> > > -- --- Cheers, Gnusci