From masoud.najafi at inria.fr Sat Mar 1 00:37:58 2008 From: masoud.najafi at inria.fr (Masoud NAJAFI) Date: Sat, 1 Mar 2008 00:37:58 +0100 Subject: [scilab-Users] transmission line demo In-Reply-To: <1204314661.8260.10.camel@buta.inria.fr> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> Message-ID: <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> Hi, It works on my machine. The proof is attached! Any way, in fact, I think there should be problem with Scicos when the number of blocks is very high (I'm not sure, I should try to increase the number of blocks). And about your model, you would better create a new Modelica block in which you use "for loop" instead of using so many superblocks. I'm currently very busy, next week I'll try to send you a block for transmissio line with N RLC modules. Masoud Simone Mannori a ?it : > On Fri, 2008-02-29 at 12:16 -0500, Doug Stewart wrote: >> While learning Scicos (and scilab) I found a limit that I don't understand. >> > > Hi Stewart, > > you are right, there is a problem. > > I'm not sure if is a "cached" bug or just a memory allocation problem. > When the diagram is bigger that a fixed limit, the Modelica compiler > crash. On my PC the simulation runs OK up to 40 blocks. > > I'm sure that Masoud will diagnose and fix the problem faster than me. > > Thanks for the communication :) > > Best Regards > > Simone Mannori - Scilab/Scicos Embedded Applications Eng. > >> See the attached file. >> If I add one or more blocks to the transmission line then it gives me >> an error message >> about a compiler. >> >> Is there some reason that we are limited to 90 blocks? > > -- INRIA-Rocquencourt France Tel:(+33) 1 3963 5907 ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -------------- next part -------------- A non-text attachment was scrubbed... Name: trans.jpg Type: image/jpeg Size: 110449 bytes Desc: not available URL: From dastew at sympatico.ca Sat Mar 1 03:32:37 2008 From: dastew at sympatico.ca (Doug Stewart) Date: Fri, 29 Feb 2008 21:32:37 -0500 Subject: [scilab-Users] transmission line demo In-Reply-To: <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> Message-ID: <47C8C045.3010400@sympatico.ca> Masoud NAJAFI wrote: > Hi, > It works on my machine. The proof is attached! But try adding more blocks. > Any way, in fact, I think there should be problem with Scicos when the > number of blocks is very high (I'm not sure, I should try to increase > the number of blocks). > > And about your model, you would better create a new Modelica block in > which you use "for loop" instead of using so many superblocks. > I'm currently very busy, next week I'll try to send you a block for > transmissio line with N RLC modules. > I understand what you said. But one of my objectives is to let the students visualize the line and measure the voltage and current at different points along the line. We derive and use all the formulas (sinh and cosh) for long lines. What I am making is a demo to show the reflected wave and that it is inverted at a short and non inverted at an open etc. Thanks for your help Doug Stewart PS This is a 60 Hz power course not High frequency. We will be looking at fault currents and lighting strikes. > Masoud > > > Simone Mannori a ?it : > >> On Fri, 2008-02-29 at 12:16 -0500, Doug Stewart wrote: >>> While learning Scicos (and scilab) I found a limit that I don't >>> understand. >>> >> >> Hi Stewart, >> >> you are right, there is a problem. >> >> I'm not sure if is a "cached" bug or just a memory allocation problem. >> When the diagram is bigger that a fixed limit, the Modelica compiler >> crash. On my PC the simulation runs OK up to 40 blocks. >> >> I'm sure that Masoud will diagnose and fix the problem faster than me. >> >> Thanks for the communication :) >> >> Best Regards >> >> Simone Mannori - Scilab/Scicos Embedded Applications Eng. >> >>> See the attached file. >>> If I add one or more blocks to the transmission line then it gives me >>> an error message >>> about a compiler. >>> >>> Is there some reason that we are limited to 90 blocks? >> >> > > > From mattyalbrecht at gmail.com Sat Mar 1 03:57:01 2008 From: mattyalbrecht at gmail.com (Matthew Albrecht) Date: Sat, 1 Mar 2008 11:57:01 +0900 Subject: [scilab-Users] Keeping track of for loops In-Reply-To: References: Message-ID: Thanks, works well. On 29/02/2008, Eric Dubois wrote: > > Do : > > for i=1:n > execstr('x'+string(i)+'='+string(i)) > end > > Or more efficiently (but less general) : > > execstr('x'+string([1:n])+'='+string([1:n]) > > Eric. > > > 2008/2/29, Matthew Albrecht : > > > > I would like to keep track of the output of a for loop, so that each > > output is assigned sequentially to a new variable from 'x1' to 'xn'. > > In its most simplest form, I would like to be able to do this: > > > > for i=1:n > > x=i > > end > > x1=1 > > > > x2=2 > > > > .... > > > > xn=n > > > > > > Where currently it outputs > > x=1 > > > > x=2 > > > > ... > > > > x=n > > > > > > Thanks > > Matt > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattyalbrecht at gmail.com Sat Mar 1 03:57:01 2008 From: mattyalbrecht at gmail.com (Matthew Albrecht) Date: Sat, 1 Mar 2008 11:57:01 +0900 Subject: [scilab-Users] Keeping track of for loops In-Reply-To: References: Message-ID: Thanks, works well. On 29/02/2008, Eric Dubois wrote: > > Do : > > for i=1:n > execstr('x'+string(i)+'='+string(i)) > end > > Or more efficiently (but less general) : > > execstr('x'+string([1:n])+'='+string([1:n]) > > Eric. > > > 2008/2/29, Matthew Albrecht : > > > > I would like to keep track of the output of a for loop, so that each > > output is assigned sequentially to a new variable from 'x1' to 'xn'. > > In its most simplest form, I would like to be able to do this: > > > > for i=1:n > > x=i > > end > > x1=1 > > > > x2=2 > > > > .... > > > > xn=n > > > > > > Where currently it outputs > > x=1 > > > > x=2 > > > > ... > > > > x=n > > > > > > Thanks > > Matt > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattyalbrecht at gmail.com Sat Mar 1 10:35:26 2008 From: mattyalbrecht at gmail.com (Matthew Albrecht) Date: Sat, 1 Mar 2008 17:35:26 +0800 Subject: [scilab-Users] Keeping track of for loops In-Reply-To: References: Message-ID: I'm now having problems getting this to work with a matrix. The string function only outputs the sum from the last item in the matrix. e.g. for i=1:5 x=[1:5;6:10]; execstr('x'+string(i)+'='+string(i*x)) end x3= 30 but I need the full matrix outputted i.e. x3= 3. 6. 9. 12. 15. 18. 21. 24. 27. 30. Matt On 01/03/2008, Matthew Albrecht wrote: > > Thanks, works well. > > On 29/02/2008, Eric Dubois wrote: > > > > Do : > > > > for i=1:n > > execstr('x'+string(i)+'='+string(i)) > > end > > > > Or more efficiently (but less general) : > > > > execstr('x'+string([1:n])+'='+string([1:n]) > > > > Eric. > > > > > > 2008/2/29, Matthew Albrecht : > > > > > > I would like to keep track of the output of a for loop, so that each > > > output is assigned sequentially to a new variable from 'x1' to 'xn'. > > > In its most simplest form, I would like to be able to do this: > > > > > > for i=1:n > > > x=i > > > end > > > x1=1 > > > > > > x2=2 > > > > > > .... > > > > > > xn=n > > > > > > > > > Where currently it outputs > > > x=1 > > > > > > x=2 > > > > > > ... > > > > > > x=n > > > > > > > > > Thanks > > > Matt > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simone.Mannori at inria.fr Sun Mar 2 09:26:00 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Sun, 02 Mar 2008 09:26:00 +0100 Subject: [scilab-Users] transmission line demo In-Reply-To: <47C8C045.3010400@sympatico.ca> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> <47C8C045.3010400@sympatico.ca> Message-ID: <1204446360.19822.18.camel@buta.inria.fr> Hi: > I understand what you said. But one of my objectives is to let the > students visualize the > line and measure the voltage and current at different points along > the line. > > We derive and use all the formulas (sinh and cosh) for long lines. What > I am making is a demo to show the reflected wave and that it is > inverted at a short > and non inverted at an open etc. > Nice :) > Thanks for your help > > Doug Stewart > > PS This is a 60 Hz power course not High frequency. We will be > looking at fault currents and lighting strikes. With all the possible respect for your profession, there is absolutely no difference in the basic theory. Also in the high frequency domain we have short and open circuits, discharge in the dielectric (for power amplifier) and faults. The only difference is that our circuits are physically smaller: cm instead that Km, but the "d/lambda" is the same. By the way, the RTAI project https://www.rtai.org/ ( see also http://www.scicos.org/scicosrtai.html ) RTAI is born under ENEL sponsorship http://www.enel.it/azienda_en/chi_siamo/ Linux RTAI is currently used for alternator synchronization and load sharing. If you like, we can discuss the details :) Simone Mannori - Scilab/Scicos Embedded Applications Eng. P.S. In Europe we work ad 50Hz, 20ms ;) From dastew at sympatico.ca Sat Mar 1 13:50:11 2008 From: dastew at sympatico.ca (Doug Stewart) Date: Sat, 01 Mar 2008 07:50:11 -0500 Subject: transmission line demo 2 In-Reply-To: <47C8C045.3010400@sympatico.ca> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> <47C8C045.3010400@sympatico.ca> Message-ID: <47C95103.6040109@sympatico.ca> For those that are interested My demo can be downloaded from http://dougs.homeip.net/scicos/trans4.cos The demo as it is, shows the reflections when the load is high impedance (open circuit) with a line resistance close to zero. You can then change the load resistance to 1 ohm approximately Zo and show that there are no reflections. You can then change the load resistance to 0 ohms and show that the reflections are now inverted. You can go to "context" and change any of the line values and run the demo again. And you can put a complex load on it to demonstrate impedance matching for lossy lines. If any body can see how to improve on this I am ready and willing to listen :-) My goal was to demonstrate (in a physical way?) what the formulas are already telling them. Yes I know you could use a rope tied between two trees :-) Doug Stewart From dastew at sympatico.ca Sat Mar 1 17:23:36 2008 From: dastew at sympatico.ca (Doug Stewart) Date: Sat, 01 Mar 2008 11:23:36 -0500 Subject: disregard this email In-Reply-To: <47C8C045.3010400@sympatico.ca> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> <47C8C045.3010400@sympatico.ca> Message-ID: <47C98308.2010500@sympatico.ca> test From dastew at sympatico.ca Sun Mar 2 13:32:57 2008 From: dastew at sympatico.ca (Doug Stewart) Date: Sun, 02 Mar 2008 07:32:57 -0500 Subject: [scilab-Users] transmission line demo In-Reply-To: <1204446360.19822.18.camel@buta.inria.fr> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> <47C8C045.3010400@sympatico.ca> <1204446360.19822.18.camel@buta.inria.fr> Message-ID: <47CA9E79.2090503@sympatico.ca> Simone Mannori wrote: >> >> PS This is a 60 Hz power course not High frequency. We will be >> looking at fault currents and lighting strikes. >> > > With all the possible respect for your profession, there is absolutely > no difference in the basic theory. > Also in the high frequency domain we have short and open circuits, > discharge in the dielectric (for power amplifier) and faults. > The only difference is that our circuits are physically smaller: cm > instead that Km, but the "d/lambda" is the same. > yes I know :-) > By the way, the RTAI project > https://www.rtai.org/ > > ( see also http://www.scicos.org/scicosrtai.html ) > Wow thanks for this. I am new to scilab and really appreciate your help. Is there a way to "talk" out through the USB ports to I/O devices? > RTAI is born under ENEL sponsorship > > http://www.enel.it/azienda_en/chi_siamo/ > > Linux RTAI is currently used for alternator synchronization > and load sharing. > > If you like, we can discuss the details :) > > Simone Mannori - Scilab/Scicos Embedded Applications Eng. > > P.S. In Europe we work ad 50Hz, 20ms ;) > > I have worked on 25 Hz :-) I also have started up and synchronized alternators by hand. We had one that the water column was unstable - much fun :-0 Thanks Doug From simone.mannori at gmail.com Sat Mar 1 07:02:55 2008 From: simone.mannori at gmail.com (Simone Mannori) Date: Sat, 1 Mar 2008 07:02:55 +0100 Subject: [scilab-Users] transmission line demo In-Reply-To: <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> Message-ID: <7b6399840802292202y3b3ec68ew7a645c01b49e06a1@mail.gmail.com> Bonjour Masoud, On 01/03/2008, Masoud NAJAFI wrote: > > Hi, > It works on my machine. The proof is attached! no doubt ;) . I made the test only under Linux. Do you have tried under Linux ? Any way, in fact, I think there should be problem with Scicos when the > number of blocks is very high (I'm not sure, I should try to increase > the number of blocks). Please note that Scicos is obliged to increase Scilab's stack size. Scilab memory management is another "usual suspect". I made the tests on a Linux Fedora 7 machine with 2.5 GBYTE of RAM, so I think to have enough memory .... And about your model, you would better create a new Modelica block in > which you use "for loop" instead of using so many superblocks. That's is a very good idea. It is not very clear to me if Modelica has the "transmission line" primitive inside. Modelica works very well with with "concentrated" components; simulate distributed systems using multiple section of concentrated components is possible but very resource intensive (you need to store a ridiculous number of not useful state variables) and could produce dangerous artifacts in the simulation. Many years ago, a fiend of mine that is not with us anymore, teach me how to use concentrated components to simulate distributed system http://books.google.it/books?id=HejS_Zk8JZIC&pg=PA128&lpg=PA128&dq=bill+hewlett+distributed+amplifier&source=web&ots=8k458maQ0r&sig=5nwU5oVDe7b3aD61tjurY5U1orw&hl=it With a another friend, they have build a small - but quite successfully - company in a garage, at the time when the soldering iron was the only available programming language. They have contribuited to develop the first real debugging tool: the oscilloscope. I'm currently very busy, next week I'll try to send you a block for > transmission line with N RLC modules. Then, I will put a nice MOSFET between in the section to add some gain As Bill said : "no gain, no pain" :) I have an old news for you : you will be MORE busy in the future ;) Simone Mannori - Scilab/Scicos Embedded Application Eng. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simone.mannori at gmail.com Sat Mar 1 07:11:10 2008 From: simone.mannori at gmail.com (Simone Mannori) Date: Sat, 1 Mar 2008 07:11:10 +0100 Subject: [scilab-Users] transmission line demo In-Reply-To: <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> <20080301003758.tckjq86qm74k00go@pops-rocq.inria.fr> Message-ID: <7b6399840802292211o165309bgccf9b34a134fb1e4@mail.gmail.com> Hi, On 01/03/2008, Masoud NAJAFI wrote: > > Hi, > It works on my machine. The proof is attached! I confirm Masoud's results. Any way, in fact, I think there should be problem with Scicos when the > number of blocks is very high (I'm not sure, I should try to increase > the number of blocks). There is something wrong in the Linux version, probably a memory allocation problem. Simone Mannori - Scilab/Scicos Embedded Application Eng. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grocer.toolbox at gmail.com Sun Mar 2 22:14:36 2008 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Sun, 2 Mar 2008 22:14:36 +0100 Subject: [scilab-Users] Keeping track of for loops In-Reply-To: References: Message-ID: I am not sure to understand the flavour of the problem, but, in the case shown below: for i=1:5 x=[1:5;6:10]; execstr('x'+string(i)+'='+string(i)+'*x') end Works as intended. Eric. 2008/3/1, Matthew Albrecht : > > I'm now having problems getting this to work with a matrix. The string > function only outputs the sum from the last item in the matrix. > e.g. > > for i=1:5 > x=[1:5;6:10]; > execstr('x'+string(i)+'='+string(i*x)) > end > > x3= > 30 > > but I need the full matrix outputted i.e. > x3= > 3. 6. 9. 12. 15. > 18. 21. 24. 27. 30. > > Matt > > On 01/03/2008, Matthew Albrecht wrote: > > > > Thanks, works well. > > > > On 29/02/2008, Eric Dubois wrote: > > > > > > Do : > > > > > > for i=1:n > > > execstr('x'+string(i)+'='+string(i)) > > > end > > > > > > Or more efficiently (but less general) : > > > > > > execstr('x'+string([1:n])+'='+string([1:n]) > > > > > > Eric. > > > > > > > > > 2008/2/29, Matthew Albrecht : > > > > > > > > I would like to keep track of the output of a for loop, so that each > > > > output is assigned sequentially to a new variable from 'x1' to 'xn'. > > > > In its most simplest form, I would like to be able to do this: > > > > > > > > for i=1:n > > > > x=i > > > > end > > > > x1=1 > > > > > > > > x2=2 > > > > > > > > .... > > > > > > > > xn=n > > > > > > > > > > > > Where currently it outputs > > > > x=1 > > > > > > > > x=2 > > > > > > > > ... > > > > > > > > x=n > > > > > > > > > > > > Thanks > > > > Matt > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattyalbrecht at gmail.com Mon Mar 3 02:33:34 2008 From: mattyalbrecht at gmail.com (Matthew Albrecht) Date: Mon, 3 Mar 2008 10:33:34 +0900 Subject: [scilab-Users] Keeping track of for loops In-Reply-To: References: Message-ID: Ha ha, thanks. I was trying to figure out for hours why it wasn't working, trying all sorts of combinations and all I needed was a couple of quotation marks. Thank you very much. Matt On 03/03/2008, Eric Dubois wrote: > > I am not sure to understand the flavour of the problem, but, in the case > shown below: > for i=1:5 > x=[1:5;6:10]; > execstr('x'+string(i)+'='+string(i)+'*x') > end > > Works as intended. > > Eric. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ricci2 at unisi.it Tue Mar 4 15:10:55 2008 From: ricci2 at unisi.it (Maso Ricci) Date: Tue, 04 Mar 2008 15:10:55 +0100 Subject: matrix problems Message-ID: <47CD586F.9050408@unisi.it> Hi all, I am trying to figure out how scilab works... and I was wondering whether exists a way to convert a matrix data such as: 1.00000000000000 0.750689539248839 0.575450038685058 0.447770887731725 0.352291666599128 0.279493780281873 0.223164527313716 0.179078852155991 0.144266830446559 0.116583838853294 9.444665661607855E-002 7.666507867378637E-002 6.233082044030214E-002 5.074212100141323E-002 4.135119889501301E-002 3.372683743749021E-002 2.752720834623435E-002 2.247977865706249E-002 1.836623314137826E-002 1.501100449134708E-002 1.227245029959649E-002 1.003599544250727E-002 8.208760050464130E-003 6.715317087929489E-003 5.494323561688932E-003 4.495830903612723E-003 3.679128994505069E-003 3.011009827960343E-003 2.464368355490481E-003 2.017068214989182E-003 1.651023060847658E-003 1.351450402154765E-003 1.106264213952365E-003 9.055809291743580E-004 7.413163523581016E-004 6.068569673468328E-004 4.967917877191485E-004 4.066930964362238E-004 3.329375168798268E-004 2.725596626647907E-004 2.231324821751473E-004 to a column-wise data like: 1.0000000000000 0.750689539248839 0.575450038685058 0.447770887731725 0.352291666599128 0.279493780281873 [ . . .] thanks -- 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 habib.jreige at inria.fr Tue Mar 4 15:14:32 2008 From: habib.jreige at inria.fr (JREIGE) Date: Tue, 4 Mar 2008 15:14:32 +0100 Subject: [scilab-Users] matrix problems In-Reply-To: <47CD586F.9050408@unisi.it> References: <47CD586F.9050408@unisi.it> Message-ID: <000401c87e02$111c97a0$16335d80@rocq.inria.fr> you can do that : 1) X is a mtrix 2) X=X(:) 3) X is a vector now Tha's all -----Message d'origine----- De : Maso Ricci [mailto:ricci2 at unisi.it] Envoy? : mardi 4 mars 2008 15:11 ? : users at lists.scilab.org Objet : [scilab-Users] matrix problems Hi all, I am trying to figure out how scilab works... and I was wondering whether exists a way to convert a matrix data such as: 1.00000000000000 0.750689539248839 0.575450038685058 0.447770887731725 0.352291666599128 0.279493780281873 0.223164527313716 0.179078852155991 0.144266830446559 0.116583838853294 9.444665661607855E-002 7.666507867378637E-002 6.233082044030214E-002 5.074212100141323E-002 4.135119889501301E-002 3.372683743749021E-002 2.752720834623435E-002 2.247977865706249E-002 1.836623314137826E-002 1.501100449134708E-002 1.227245029959649E-002 1.003599544250727E-002 8.208760050464130E-003 6.715317087929489E-003 5.494323561688932E-003 4.495830903612723E-003 3.679128994505069E-003 3.011009827960343E-003 2.464368355490481E-003 2.017068214989182E-003 1.651023060847658E-003 1.351450402154765E-003 1.106264213952365E-003 9.055809291743580E-004 7.413163523581016E-004 6.068569673468328E-004 4.967917877191485E-004 4.066930964362238E-004 3.329375168798268E-004 2.725596626647907E-004 2.231324821751473E-004 to a column-wise data like: 1.0000000000000 0.750689539248839 0.575450038685058 0.447770887731725 0.352291666599128 0.279493780281873 [ . . .] thanks -- 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 vincent.couvert at inria.fr Tue Mar 4 15:23:01 2008 From: vincent.couvert at inria.fr (Vincent COUVERT) Date: Tue, 04 Mar 2008 15:23:01 +0100 Subject: [scilab-Users] matrix problems In-Reply-To: <47CD586F.9050408@unisi.it> References: <47CD586F.9050408@unisi.it> Message-ID: <47CD5B45.1020200@inria.fr> Hi, Try with a=a'; a=a(:) with a your matrix. Else you can have a look to the help page of the function called "matrix". Vincent Maso Ricci a ?crit : > Hi all, > I am trying to figure out how scilab works... and I was wondering > whether exists a way to convert a matrix data such as: > 1.00000000000000 0.750689539248839 0.575450038685058 > 0.447770887731725 0.352291666599128 0.279493780281873 > 0.223164527313716 0.179078852155991 0.144266830446559 > 0.116583838853294 9.444665661607855E-002 7.666507867378637E-002 > 6.233082044030214E-002 5.074212100141323E-002 4.135119889501301E-002 > 3.372683743749021E-002 2.752720834623435E-002 2.247977865706249E-002 > 1.836623314137826E-002 1.501100449134708E-002 1.227245029959649E-002 > 1.003599544250727E-002 8.208760050464130E-003 6.715317087929489E-003 > 5.494323561688932E-003 4.495830903612723E-003 3.679128994505069E-003 > 3.011009827960343E-003 2.464368355490481E-003 2.017068214989182E-003 > 1.651023060847658E-003 1.351450402154765E-003 1.106264213952365E-003 > 9.055809291743580E-004 7.413163523581016E-004 6.068569673468328E-004 > 4.967917877191485E-004 4.066930964362238E-004 3.329375168798268E-004 > 2.725596626647907E-004 2.231324821751473E-004 > > > to a column-wise data like: > > 1.0000000000000 > 0.750689539248839 > 0.575450038685058 > 0.447770887731725 > 0.352291666599128 > 0.279493780281873 > > [ . . .] > > thanks > > > From rcorderog at gmail.com Tue Mar 4 15:31:05 2008 From: rcorderog at gmail.com (Cordero R. ) Date: Tue, 4 Mar 2008 09:31:05 -0500 Subject: [scilab-Users] matrix problems In-Reply-To: <47CD586F.9050408@unisi.it> References: <47CD586F.9050408@unisi.it> Message-ID: <6ab64a060803040631x551e6275r6d4ff0b5c841f334@mail.gmail.com> Hi You could create a program for that. First, you should get the size of the matrix with the command size: [m,n]=size(A). Now you know the number of rows and columns. Second, create a zero vector with the command zeros: B=zeros(m*n,1) Third, use for loops: for j=1:n for i=1:m B( m*(j-1)+i )=A(i,j); end end Raymundo CIEEP-Per? 2008/3/4, Maso Ricci : > > Hi all, > I am trying to figure out how scilab works... and I was wondering > whether exists a way to convert a matrix data such as: > 1.00000000000000 0.750689539248839 0.575450038685058 > 0.447770887731725 0.352291666599128 0.279493780281873 > 0.223164527313716 0.179078852155991 0.144266830446559 > 0.116583838853294 9.444665661607855E-002 7.666507867378637E-002 > 6.233082044030214E-002 5.074212100141323E-002 4.135119889501301E-002 > 3.372683743749021E-002 2.752720834623435E-002 2.247977865706249E-002 > 1.836623314137826E-002 1.501100449134708E-002 1.227245029959649E-002 > 1.003599544250727E-002 8.208760050464130E-003 6.715317087929489E-003 > 5.494323561688932E-003 4.495830903612723E-003 3.679128994505069E-003 > 3.011009827960343E-003 2.464368355490481E-003 2.017068214989182E-003 > 1.651023060847658E-003 1.351450402154765E-003 1.106264213952365E-003 > 9.055809291743580E-004 7.413163523581016E-004 6.068569673468328E-004 > 4.967917877191485E-004 4.066930964362238E-004 3.329375168798268E-004 > 2.725596626647907E-004 2.231324821751473E-004 > > > to a column-wise data like: > > 1.0000000000000 > 0.750689539248839 > 0.575450038685058 > 0.447770887731725 > 0.352291666599128 > 0.279493780281873 > > [ . . .] > > thanks > > > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rcorderog at gmail.com Tue Mar 4 15:33:58 2008 From: rcorderog at gmail.com (Cordero R. ) Date: Tue, 4 Mar 2008 09:33:58 -0500 Subject: [scilab-Users] matrix problems In-Reply-To: <47CD586F.9050408@unisi.it> References: <47CD586F.9050408@unisi.it> Message-ID: <6ab64a060803040633g25db3ac5ua79796757d3ff339@mail.gmail.com> Hi There was an error in the for loop.The rigth command is: B( (m*(j-1)+i,1 ) = A(i,,j) Raymundo 2008/3/4, Maso Ricci : > > Hi all, > I am trying to figure out how scilab works... and I was wondering > whether exists a way to convert a matrix data such as: > 1.00000000000000 0.750689539248839 0.575450038685058 > 0.447770887731725 0.352291666599128 0.279493780281873 > 0.223164527313716 0.179078852155991 0.144266830446559 > 0.116583838853294 9.444665661607855E-002 7.666507867378637E-002 > 6.233082044030214E-002 5.074212100141323E-002 4.135119889501301E-002 > 3.372683743749021E-002 2.752720834623435E-002 2.247977865706249E-002 > 1.836623314137826E-002 1.501100449134708E-002 1.227245029959649E-002 > 1.003599544250727E-002 8.208760050464130E-003 6.715317087929489E-003 > 5.494323561688932E-003 4.495830903612723E-003 3.679128994505069E-003 > 3.011009827960343E-003 2.464368355490481E-003 2.017068214989182E-003 > 1.651023060847658E-003 1.351450402154765E-003 1.106264213952365E-003 > 9.055809291743580E-004 7.413163523581016E-004 6.068569673468328E-004 > 4.967917877191485E-004 4.066930964362238E-004 3.329375168798268E-004 > 2.725596626647907E-004 2.231324821751473E-004 > > > to a column-wise data like: > > 1.0000000000000 > 0.750689539248839 > 0.575450038685058 > 0.447770887731725 > 0.352291666599128 > 0.279493780281873 > > [ . . .] > > thanks > > > > > -- > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ricci2 at unisi.it Tue Mar 4 16:24:06 2008 From: ricci2 at unisi.it (Maso Ricci) Date: Tue, 04 Mar 2008 16:24:06 +0100 Subject: [scilab-Users] matrix problems In-Reply-To: <000401c87e02$111c97a0$16335d80@rocq.inria.fr> References: <47CD586F.9050408@unisi.it> <000401c87e02$111c97a0$16335d80@rocq.inria.fr> Message-ID: <47CD6996.1040901@unisi.it> works ! thanks a lot to all JREIGE wrote: > you can do that : > > 1) X is a mtrix > 2) X=X(:) > 3) X is a vector now > > Tha's all > > -----Message d'origine----- > De : Maso Ricci [mailto:ricci2 at unisi.it] > Envoy? : mardi 4 mars 2008 15:11 > ? : users at lists.scilab.org > Objet : [scilab-Users] matrix problems > > Hi all, > I am trying to figure out how scilab works... and I was wondering whether > exists a way to convert a matrix data such as: > 1.00000000000000 0.750689539248839 0.575450038685058 > 0.447770887731725 0.352291666599128 0.279493780281873 > 0.223164527313716 0.179078852155991 0.144266830446559 > 0.116583838853294 9.444665661607855E-002 7.666507867378637E-002 > 6.233082044030214E-002 5.074212100141323E-002 4.135119889501301E-002 > 3.372683743749021E-002 2.752720834623435E-002 2.247977865706249E-002 > 1.836623314137826E-002 1.501100449134708E-002 1.227245029959649E-002 > 1.003599544250727E-002 8.208760050464130E-003 6.715317087929489E-003 > 5.494323561688932E-003 4.495830903612723E-003 3.679128994505069E-003 > 3.011009827960343E-003 2.464368355490481E-003 2.017068214989182E-003 > 1.651023060847658E-003 1.351450402154765E-003 1.106264213952365E-003 > 9.055809291743580E-004 7.413163523581016E-004 6.068569673468328E-004 > 4.967917877191485E-004 4.066930964362238E-004 3.329375168798268E-004 > 2.725596626647907E-004 2.231324821751473E-004 > > > to a column-wise data like: > > 1.0000000000000 > 0.750689539248839 > 0.575450038685058 > 0.447770887731725 > 0.352291666599128 > 0.279493780281873 > > [ . . .] > > thanks > > > > -- 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 zli at nanometrics.com Wed Mar 5 01:19:27 2008 From: zli at nanometrics.com (Li, Zhiqiang) Date: Tue, 4 Mar 2008 16:19:27 -0800 Subject: books about scilab In-Reply-To: <47CD586F.9050408@unisi.it> References: <47CD586F.9050408@unisi.it> Message-ID: <71840CC25A51A947AED5377E1BF3F1A901594B6B@colo1-prd-xchg1.corp.nanometrics.com> Hi everyone, Completely new to scilab so need some books. Which book is good to start? Engineering and Scientific Computing with Scilab Or Numerical and Statistical Methods with Scilab for Science and Engineering Or anything else? Thanks. ZL From ricci2 at unisi.it Thu Mar 6 14:32:30 2008 From: ricci2 at unisi.it (Maso Ricci) Date: Thu, 06 Mar 2008 14:32:30 +0100 Subject: How does 'lsqrsolve ' work ? Message-ID: <47CFF26E.70904@unisi.it> Hi everyone, I would like to fit the experimental data "DAT" to the function "dx" (see the script below) by the command "lsqrsolve" in order to obtain the best value for the parameter "s". I know how to do it with other softwares but I had some difficulties in doing it by Scilab. Any suggestion is welcome. Thanks. /maso PS: Here you are the script: //---S T A R T ----- clear() DAT = [1.12; 0.9; 0.59; 0.485; 0.36; 0.49; 0.244; 0.19; 0.15; 0.14; 0.12; 0.07647; 0.0729; 0.05777; 0.04; 0.031; 0.0235; 0.02249; 0.011; 0.01008; 0.0172; 0.0135995; 0.0086413; 0.0061709; 0.0054; 0.004953; 0.00399; 0.003279; 0.0024644; 0.0020171; 0.0016510; 0.0013515; 0.0011063; 0.0009056; 0.00074; 0.0006069; 0.0004968; 0.0004067; 0.0003329; 0.0002726; 0.0002231 ]; function dx = chemical(t,x) dx =x- x*exp(s) endfunction s=5 t = 0:0.001:0.04; x0=[1.2]; x = ode(x0,0,t,chemical) ; AA=x(1,:); AA=AA(:); clf() plot2d(t,x(1,:), style = 5) plot2d(t,DAT(:,1), style = -2) //---E N D ----- -- 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 ricci2 at unisi.it Fri Mar 7 10:13:46 2008 From: ricci2 at unisi.it (Maso Ricci) Date: Fri, 07 Mar 2008 10:13:46 +0100 Subject: How does 'lsqrsolve ' work ? Message-ID: <47D1074A.8090008@unisi.it> Hi everyone, I would like to fit the experimental data "DAT" to the function "dx" (see the script below) by the command "lsqrsolve" in order to obtain the best value for the parameter "s". I know how to do it with other softwares but I had some difficulties in doing it by Scilab. Any suggestion is welcome. Thanks. /maso PS: Here you are the script: //---S T A R T ----- clear() DAT = [1.12; 0.9; 0.59; 0.485; 0.36; 0.49; 0.244; 0.19; 0.15; 0.14; 0.12; 0.07647; 0.0729; 0.05777; 0.04; 0.031; 0.0235; 0.02249; 0.011; 0.01008; 0.0172; 0.0135995; 0.0086413; 0.0061709; 0.0054; 0.004953; 0.00399; 0.003279; 0.0024644; 0.0020171; 0.0016510; 0.0013515; 0.0011063; 0.0009056; 0.00074; 0.0006069; 0.0004968; 0.0004067; 0.0003329; 0.0002726; 0.0002231 ]; function dx = chemical(t,x) dx =x- x*exp(s) endfunction s=5 t = 0:0.001:0.04; x0=[1.2]; x = ode(x0,0,t,chemical) ; AA=x(1,:); AA=AA(:); clf() plot2d(t,x(1,:), style = 5) plot2d(t,DAT(:,1), style = -2) //---E N D ----- -- 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 dblubaugh at belcan.com Fri Mar 7 17:05:34 2008 From: dblubaugh at belcan.com (Blubaugh, David A.) Date: Fri, 7 Mar 2008 11:05:34 -0500 Subject: SCICOS Message-ID: <27CC3060AF71DA40A5DC85F7D5B70F3802A54804@AWMAIL04.belcan.com> > I was wondering a great deal more about SCICOS ability to generate > C-source code. Can I generate C source code from Scilab source code?? > > > > Thanks, > > > David Blubaugh > > > This e-mail transmission contains information that is confidential and may be privileged. It is intended only for the addressee(s) named above. If you receive this e-mail in error, please do not read, copy or disseminate it in any manner. If you are not the intended recipient, any disclosure, copying, distribution or use of the contents of this information is prohibited. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please erase it from your computer system. Your assistance in correcting this error is appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simone.Mannori at inria.fr Fri Mar 7 17:54:02 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Fri, 07 Mar 2008 17:54:02 +0100 Subject: [scilab-Users] SCICOS In-Reply-To: <27CC3060AF71DA40A5DC85F7D5B70F3802A54804@AWMAIL04.belcan.com> References: <27CC3060AF71DA40A5DC85F7D5B70F3802A54804@AWMAIL04.belcan.com> Message-ID: <1204908842.19770.41.camel@buta.inria.fr> On Fri, 2008-03-07 at 11:05 -0500, Blubaugh, David A. wrote: > > > I was wondering a great deal more about SCICOS ability to generate C- > source code. Scicos can generate source code. You can use: - the Scicos internal Code Generator - the Scicos code generator for Linux RTAI (www.rtai.org) - the Scicos code generator for DSP and micro controllers (http://www.evidence.eu.com/) A lot of new features will be included with the next Scilab 5.0. > Can I generate C source code from Scilab source code?? Not yet :( We are working on this subject inside this project : http://www.hartes.org Regard M. Simone Mannori - Scilab/Scicos Embedded Applications Eng. From italo.farfan at yahoo.es Fri Mar 7 23:47:47 2008 From: italo.farfan at yahoo.es (=?iso-8859-1?Q?Italo_Alfredo_Farf=E1n_Vera?=) Date: Fri, 7 Mar 2008 22:47:47 +0000 (GMT) Subject: I need information about scilab for conference Message-ID: <290299.96867.qm@web26413.mail.ukl.yahoo.com> My parner and I, will be giving a conference of scilab,(vectorial modulation applied to inversor).Since introduction we want to show someapplications of the scilab in the industry. Control, automation,telecommunications, etc, If they had examples or projects, photos, news,managerial agreements, please might send theirs some. Thank you very much Georgette and Italo Lima-Per? Si alguien tuviera ejemplos de aplicaciones o informaci?n acerca del scilab porfavor env?enosla , muchas gracias. Pues lo que queremos es mostrar no solo lo robusto del scilba sino tambi?n sus campos de aplicaci?n (fotos, noticias , convenios, etc) Muchas gracias Georgette and Italo Lima-Per? Italo Alfredo Farf?n Vera CIEEP ----- Mensaje original ---- De: "Blubaugh, David A." Para: users at lists.scilab.org Enviado: viernes, 7 de marzo, 2008 11:05:34 Asunto: [scilab-Users] SCICOS SCICOS I was wondering a great deal more about SCICOS ability to generate C-source code. Can I generate C source code from Scilab source code?? Thanks, David Blubaugh This e-mail transmission contains information that is confidential and may be privileged. It is intended only for the addressee(s) named above. If you receive this e-mail in error, please do not read, copy or disseminate it in any manner. If you are not the intended recipient, any disclosure, copying, distribution or use of the contents of this information is prohibited. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please erase it from your computer system. Your assistance in correcting this error is appreciated. ______________________________________________ Enviado desde Correo Yahoo! Disfruta de una bandeja de entrada m?s inteligente. http://es.docs.yahoo.com/mail/overview/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simone.Mannori at inria.fr Fri Mar 7 23:50:21 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Fri, 07 Mar 2008 23:50:21 +0100 Subject: [scilab-Users] I need information about scilab for conference In-Reply-To: <290299.96867.qm@web26413.mail.ukl.yahoo.com> References: <290299.96867.qm@web26413.mail.ukl.yahoo.com> Message-ID: <1204930221.21531.18.camel@buta.inria.fr> Dear Scilab Users, I'm understanding that use a non native language can be difficult and confusing but, for the good and for the evil, English should be used on this mailing list. On Fri, 2008-03-07 at 22:47 +0000, Italo Alfredo Farf?n Vera wrote: > My patner and I, will be giving a conference of Scilab, (vectorial > modulation applied to inversor). Field oriented vector modulation (FOC, Field Orinted Control) used for inverter (three phase inverter) I suppose ... > Since introduction we want to show some applications using Scilab in > the industry. Control, automation, telecommunications, etc, If they > had examples or projects, photos, news, managerial agreements, please > might send theirs some. > If you are organizing a conference, we will be very interested to contribute: one of the missions of Scilab it is to promote itself :) www.emc.unifi.it > Thank you very much Georgette and Italo > Who ? M. Simone Mannori - Scilab/Scicos Embedded Applications Eng. From lists at kybdr.de Mon Mar 10 10:22:45 2008 From: lists at kybdr.de (Dirk Reusch) Date: Mon, 10 Mar 2008 10:22:45 +0100 Subject: Scicos Block with Different Output Port Types? Message-ID: <20080310102245.c6070651.lists@kybdr.de> Hello everybody, I am using Scilab 4.1.2/Scicos 4.2 under Linux. I've tried to build a scicos block with two outputs ports. The first is of type 1 (double) and the second is of type 3 (int32). Editing a diagram, i.e. connecting these ports with ports of other blocks of corresponding types works just fine. But, scicos compilation/simulation does not work! The compiler "thinks" that the second output port has type 1 and _not_ 3. Is that a bug, a limitation, or have I done something wrong? I've attached a small example, which should reproduce the described behaviour. Best Regards, Dirk Reusch -------------- next part -------------- A non-text attachment was scrubbed... Name: test.cosf Type: application/octet-stream Size: 19314 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TEST.sci Type: application/octet-stream Size: 1253 bytes Desc: not available URL: From Simone.Mannori at inria.fr Mon Mar 10 10:39:59 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Mon, 10 Mar 2008 10:39:59 +0100 Subject: [scilab-Users] Scicos Block with Different Output Port Types? In-Reply-To: <20080310102245.c6070651.lists@kybdr.de> References: <20080310102245.c6070651.lists@kybdr.de> Message-ID: <1205141999.6101.10.camel@buta.inria.fr> Hello, from Scilab 4.1.1 and Scilab 4.1.2 a lot of things are changed inside Scicos. I will take a look to your problem and I will post you an answer ASAP. We are working hard to improve the documentation, with a special attention to developers: http://wiki.scilab.org/Developers M. Simone Mannori - Scilab/Scicos Embedded Applications //**------------------------------------------------------------------ On Mon, 2008-03-10 at 10:22 +0100, Dirk Reusch wrote: > Hello everybody, > > I am using Scilab 4.1.2/Scicos 4.2 under Linux. > > I've tried to build a scicos block with two outputs ports. > The first is of type 1 (double) and the second is of type 3 > (int32). > > Editing a diagram, i.e. connecting these ports with ports of > other blocks of corresponding types works just fine. > > But, scicos compilation/simulation does not work! The compiler > "thinks" that the second output port has type 1 and _not_ 3. > > Is that a bug, a limitation, or have I done something wrong? > > I've attached a small example, which should reproduce the > described behaviour. > > Best Regards, > > Dirk Reusch From Simone.Mannori at inria.fr Mon Mar 10 11:43:56 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Mon, 10 Mar 2008 11:43:56 +0100 Subject: [scilab-Users] Scicos Block with Different Output Port Types? In-Reply-To: <20080310102245.c6070651.lists@kybdr.de> References: <20080310102245.c6070651.lists@kybdr.de> Message-ID: <1205145836.6101.26.camel@buta.inria.fr> Hello, please try to use this "define" section in the interfacing function TEST.sce case 'define' then // computational function model=scicos_model() model.sim=list('test',4) // inputs model.in = -1 ; model.in2= -2 ; // outputs model.out = [-1;-1] model.out2 = [-2;-2] model.blocktype='c' model.firing=[] model.dep_ut=[%t,%f] model.label='' model.nzcross=0 model.nmode=0 model.equations=list() exprs=[] // icon gr_i = list(["x=orig(1)+sz(1)*0.1;y=orig(2)+sz(2)*0.3;"; "w=sz(1)*0.8;h=sz(2)*0.4;"; "xstringb(x,y,""TEST"",w,h,''fill'');"],.. 8 ) x=standard_define([2,2],model,exprs,gr_i) Also the section "set" needs some attention. Can you be so kind to send me "test.c" ? I will be happy to debug fully your Scicos block, create a "reference" template and put it on line. Thanks in advance for your help. Simone Mannori On Mon, 2008-03-10 at 10:22 +0100, Dirk Reusch wrote: > Hello everybody, > > I am using Scilab 4.1.2/Scicos 4.2 under Linux. > > I've tried to build a scicos block with two outputs ports. > The first is of type 1 (double) and the second is of type 3 > (int32). > > Editing a diagram, i.e. connecting these ports with ports of > other blocks of corresponding types works just fine. > > But, scicos compilation/simulation does not work! The compiler > "thinks" that the second output port has type 1 and _not_ 3. > > Is that a bug, a limitation, or have I done something wrong? > > I've attached a small example, which should reproduce the > described behaviour. > > Best Regards, > > Dirk Reusch From lists at kybdr.de Mon Mar 10 14:14:37 2008 From: lists at kybdr.de (Dirk Reusch) Date: Mon, 10 Mar 2008 14:14:37 +0100 Subject: [scilab-Users] Scicos Block with Different Output Port Types? In-Reply-To: <1205145836.6101.26.camel@buta.inria.fr> References: <1205145836.6101.26.camel@buta.inria.fr> Message-ID: <20080310141437.b507daf7.lists@kybdr.de> Hello Simone, thanks for your answer! But I don't understand it. I am not concerned about port dimensions, i.e. model.in, model.in2, model.out and model.out2. However, I have tried your proposed changes but it did not work! Furthermore even the editor now gives a warning/error about incompatible types. Have you tried to "Simulate>Compile" test.cosf? I know that test.c is missing ... and that the diagram won't work ... but that is not the point. My question is simply: Is it possible to have a scicos block with different output port types. e.g. model.outtyp=[1;3]? If yes, how can this be achieved? I would be a very thankful for any comprehensible example. Thanks you very much for your help Best regards, Dirk Reusch On Mon, 10 Mar 2008 11:43:56 +0100 Simone Mannori wrote: > Hello, > > please try to use this "define" section in the interfacing function > TEST.sce > > case 'define' then > // computational function > model=scicos_model() > model.sim=list('test',4) > > // inputs > model.in = -1 ; > model.in2= -2 ; > > // outputs > model.out = [-1;-1] > model.out2 = [-2;-2] > > model.blocktype='c' > model.firing=[] > model.dep_ut=[%t,%f] > model.label='' > model.nzcross=0 > model.nmode=0 > model.equations=list() > > exprs=[] > > // icon > gr_i = list(["x=orig(1)+sz(1)*0.1;y=orig(2)+sz(2)*0.3;"; > "w=sz(1)*0.8;h=sz(2)*0.4;"; > "xstringb(x,y,""TEST"",w,h,''fill'');"],.. > 8 ) > x=standard_define([2,2],model,exprs,gr_i) > > Also the section "set" needs some attention. > > Can you be so kind to send me "test.c" ? > > I will be happy to debug fully your Scicos block, create a "reference" > template and put it on line. > > Thanks in advance for your help. > > Simone Mannori > From charles.marchetti at inrets.fr Mon Mar 10 14:23:25 2008 From: charles.marchetti at inrets.fr (marchetti) Date: Mon, 10 Mar 2008 14:23:25 +0100 Subject: SQL Message-ID: <47D5364D.2090203@inrets.fr> Bonjour, Je voudrais utiliser Scilab pour faire de la fusion de donn?es... les tableaux sont renseign?s ? partir d'une base de donn?es questionn?e par MySQL: On fait des requetes grace donc a MySql... peut on sans trop de problemes utiliser les deux logiciels... J'attends une reponse rapidement... CharlesMarchetti From sylvestre.ledru at inria.fr Mon Mar 10 14:32:10 2008 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Mon, 10 Mar 2008 14:32:10 +0100 Subject: [scilab-Users] SQL In-Reply-To: <47D5364D.2090203@inrets.fr> References: <47D5364D.2090203@inrets.fr> Message-ID: <1205155930.4708.799.camel@korcula.inria.fr> Hello, Le lundi 10 mars 2008 ? 14:23 +0100, marchetti a ?crit : > Bonjour, > Je voudrais utiliser Scilab pour faire de la fusion de donn?es... les > tableaux sont renseign?s ? partir d'une base de donn?es questionn?e par > MySQL: On fait des requetes grace donc a MySql... peut on sans trop de > problemes utiliser les deux logiciels... For now, it is not possible to connect Scilab directly to MySQL. However, you can try to export your data in the CSV format from MySQL and import it in Scilab. > J'attends une reponse rapidement... . Sylvestre From nmambre at gmail.com Mon Mar 10 14:58:50 2008 From: nmambre at gmail.com (Nelson Mambre) Date: Mon, 10 Mar 2008 09:28:50 -0430 Subject: [scilab-Users] SQL In-Reply-To: <47D5364D.2090203@inrets.fr> References: <47D5364D.2090203@inrets.fr> Message-ID: <1e604d7b0803100658u792e04f3w931b345e59e1330a@mail.gmail.com> Hi, According to http://www.zjufrontech.com/scilab/Download.html they have developed a way to save data in MySQL, but I did not fina a direct download link. Maybe Google or mailing the author directly will help you. Nelson -------------- next part -------------- An HTML attachment was scrubbed... URL: From Simone.Mannori at inria.fr Tue Mar 11 05:03:22 2008 From: Simone.Mannori at inria.fr (Simone Mannori) Date: Tue, 11 Mar 2008 05:03:22 +0100 Subject: [Fwd: Support] [scilab-Users] Scicos Block with Different Output Port Types? Message-ID: <1205208202.9059.13.camel@buta.inria.fr> Dirk, sorry for the first incomplete (untested) answer and the following delay: we are very busy for the next Scilab 5 release (Scicos is included, of course ;) . Back to our business: please try the attached files. With this interfacing function the compilation is OK. I double checked the coherency trying to invert the output connections: a warning dialog box about the data type and size appear. Mission accomplished ? I don't think so. To finish the job we need a "test.c" computational function for simulation and a "set" section inside "TEST.sci" for a nice user's interface. By the way, the standard technique to write Scicos block is to begin from an already working code of a similar block. If you have specific request, we will be happy to help/guide you. Simone Mannori - Scilab/Scicos Embedded Applications -------------- next part -------------- An embedded message was scrubbed... From: "Simone Mannori" Subject: Support Date: Tue, 11 Mar 2008 04:53:46 +0100 Size: 27487 URL: From hbailly-prof at neuf.fr Tue Mar 11 12:25:22 2008 From: hbailly-prof at neuf.fr (=?ISO-8859-1?Q?BAILLY_Herv=E9?=) Date: Tue, 11 Mar 2008 12:25:22 +0100 Subject: Autorisations Scilab Message-ID: <47D66C22.4090908@neuf.fr> Bonjour, Je vous contacte pour deux questions. J'ai r?alis? sur la plate-forme Scilab une application (*.sci) de CAO pour dessiner des parapentes. M'autorisez-vous ? commercialiser cette application ? Par ailleurs du fait maintenant de mon exp?rience sur Scilab, je souhaiterais dispenser des formations r?mun?r?es. Quelles sont les conditions requises pour ?tre formateur Scilab ? Je me tiens votre disposition pour plus de pr?cisions. Merci par avance pour toute r?ponse. Sinc?res salutations. Herv? BAILLY -------------- next part -------------- A non-text attachment was scrubbed... Name: hbailly-prof.vcf Type: text/x-vcard Size: 280 bytes Desc: not available URL: From jerrwang at yahoo.com Thu Mar 13 11:15:44 2008 From: jerrwang at yahoo.com (Jerry Wang) Date: Thu, 13 Mar 2008 03:15:44 -0700 (PDT) Subject: Solving multi-variable function Message-ID: <871005.65193.qm@web50602.mail.re2.yahoo.com> Hello Scilab-ers, Can any one point me to the right direction? I want to find the zero point of a function that has 4 variables. I want scilab to solve for the values of the 4 variables that would give me a result = 0 for the answer. I initially tried fsolve, but I discovered that fsolve only take one variable input. Any thoughts? Thanks! Jerry ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From grocer.toolbox at gmail.com Thu Mar 13 13:41:21 2008 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Thu, 13 Mar 2008 13:41:21 +0100 Subject: [scilab-Users] Solving multi-variable function In-Reply-To: <871005.65193.qm@web50602.mail.re2.yahoo.com> References: <871005.65193.qm@web50602.mail.re2.yahoo.com> Message-ID: Fsolve takes one variable input, but the input can be a vector of any size. So, collapse your 4 variables into a single vector and adapt your fonction accordingly. Eric. 2008/3/13, Jerry Wang : > > Hello Scilab-ers, > > Can any one point me to the right direction? I want to find the zero > point of a function that has 4 variables. I want scilab to solve for the > values of the 4 variables that would give me a result = 0 for the answer. I > initially tried fsolve, but I discovered that fsolve only take one variable > input. > > Any thoughts? Thanks! > > Jerry > > ------------------------------ > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerrwang at yahoo.com Thu Mar 13 19:19:10 2008 From: jerrwang at yahoo.com (Jerry Wang) Date: Thu, 13 Mar 2008 11:19:10 -0700 (PDT) Subject: [scilab-Users] Solving multi-variable function Message-ID: <958691.23255.qm@web50607.mail.re2.yahoo.com> I did attempt to collapse the 4 variables into a single vector array but I received an error after fsolve reaches the end of the first iteration. The error is: !--error 98 variable returned by scilab argument function is incorrect -------------------------------------- I add the function into the scope via: -------------------------------------- getf('func_for_fsolve.sci'); -------------------------------------- I call the function via: -------------------------------------- [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); -------------------------------------- Inside func_for_solve I have: -------------------------------------- function [y] = func_for_fsolve ( x0 ) ... ret_age = round(x0(1)); mu_tree = x0(2); delta_t = x0(3); sigma_b = x0(4); ... [statistical_sustainable] = ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); ... y = abs(statistical_sustainable(index)./100 - 0.90); ... y = y + penalties; disp('testing123'); disp('testing234'); endfunction -------------------------------------- -------------------------------------- I tried testing the code by reducing the supplied argument x0 into 1 scalar variable instead of the 4 scalar vector, and the function call worked. That's why I went ahead and assumed that fsolve takes only one variables. Can you see what I am doing wrong that's causing me to receive: !--error 98 variable returned by scilab argument function is incorrect Thank you! Jerry ps. the complete func_for_fsolve.sci is uploaded here for your viewing: http://www.imagingspot.com/scilab/func_for_fsolve.sci ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 5:41:21 AM Subject: Re: [scilab-Users] Solving multi-variable function Fsolve takes one variable input, but the input can be a vector of any size. So, collapse your 4 variables into a single vector and adapt your fonction accordingly. Eric. 2008/3/13, Jerry Wang : Hello Scilab-ers, Can any one point me to the right direction? I want to find the zero point of a function that has 4 variables. I want scilab to solve for the values of the 4 variables that would give me a result = 0 for the answer. I initially tried fsolve, but I discovered that fsolve only take one variable input. Any thoughts? Thanks! Jerry Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From grocer.toolbox at gmail.com Thu Mar 13 20:46:42 2008 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Thu, 13 Mar 2008 20:46:42 +0100 Subject: [scilab-Users] Solving multi-variable function In-Reply-To: <958691.23255.qm@web50607.mail.re2.yahoo.com> References: <958691.23255.qm@web50607.mail.re2.yahoo.com> Message-ID: Unfortunately, the function is not available at the provided address... Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order to feed the optimization program? Eric. 2008/3/13, Jerry Wang : > > I did attempt to collapse the 4 variables into a single vector array but I > received an error after fsolve reaches the end of the first iteration. The > error is: > > !--error 98 > variable returned by scilab argument function is incorrect > > -------------------------------------- > I add the function into the scope via: > -------------------------------------- > getf('func_for_fsolve.sci'); > > -------------------------------------- > I call the function via: > -------------------------------------- > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > sigma_b],func_for_fsolve); > > -------------------------------------- > Inside func_for_solve I have: > -------------------------------------- > function [y] = func_for_fsolve ( x0 ) > ... > ret_age = round(x0(1)); > mu_tree = x0(2); > delta_t = x0(3); > sigma_b = x0(4); > ... > [statistical_sustainable] = > ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); > ... > y = abs(statistical_sustainable(index)./100 - 0.90); > ... > y = y + penalties; > disp('testing123'); > disp('testing234'); > endfunction > > -------------------------------------- > -------------------------------------- > > I tried testing the code by reducing the supplied argument x0 into 1 > scalar variable instead of the 4 scalar vector, and the function call > worked. That's why I went ahead and assumed that fsolve takes only one > variables. Can you see what I am doing wrong that's causing me to receive: > !--error 98 > variable returned by scilab argument function is incorrect > > > Thank you! > > Jerry > > ps. the complete func_for_fsolve.sci is uploaded here for your viewing: > http://www.imagingspot.com/scilab/func_for_fsolve.sci > > > > > ----- Original Message ---- > From: Eric Dubois > To: users at lists.scilab.org > Sent: Thursday, March 13, 2008 5:41:21 AM > Subject: Re: [scilab-Users] Solving multi-variable function > > Fsolve takes one variable input, but the input can be a vector of any > size. > > So, collapse your 4 variables into a single vector and adapt your fonction > accordingly. > > Eric. > > > 2008/3/13, Jerry Wang : > > > > Hello Scilab-ers, > > > > Can any one point me to the right direction? I want to find the zero > > point of a function that has 4 variables. I want scilab to solve for the > > values of the 4 variables that would give me a result = 0 for the answer. I > > initially tried fsolve, but I discovered that fsolve only take one variable > > input. > > > > Any thoughts? Thanks! > > > > Jerry > > > > ------------------------------ > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > > it now. > > > > > > ------------------------------ > Never miss a thing. Make Yahoo your homepage. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerrwang at yahoo.com Thu Mar 13 21:03:05 2008 From: jerrwang at yahoo.com (Jerry Wang) Date: Thu, 13 Mar 2008 13:03:05 -0700 (PDT) Subject: [scilab-Users] Solving multi-variable function Message-ID: <842810.29786.qm@web50604.mail.re2.yahoo.com> Oh, sorry, somehow the website doesn't like the .sci extension. Please see it here: http://www.imagingspot.com/scilab/func_for_fsolve.txt Yes, I provided initial values to the 4 variables. The "caller" function has: chdir('C:\MyScilab'); getf('ABSPredictor.sci') getf('func_for_fsolve.sci'); tic(); ret_age=60; mu_tree=36000; delta_t=0.85; sigma_b=0.50; [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); time_length=toc() beep(); When debugging, the func_for_fsolve does fine for the first iteration. Then it gives that error at the end of the first iteration. Jerry ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 12:46:42 PM Subject: Re: [scilab-Users] Solving multi-variable function Unfortunately, the function is not available at the provided address... Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order to feed the optimization program? Eric. 2008/3/13, Jerry Wang : I did attempt to collapse the 4 variables into a single vector array but I received an error after fsolve reaches the end of the first iteration. The error is: !--error 98 variable returned by scilab argument function is incorrect -------------------------------------- I add the function into the scope via: -------------------------------------- getf('func_for_fsolve.sci'); -------------------------------------- I call the function via: -------------------------------------- [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); -------------------------------------- Inside func_for_solve I have: -------------------------------------- function [y] = func_for_fsolve ( x0 ) ... ret_age = round(x0(1)); mu_tree = x0(2); delta_t = x0(3); sigma_b = x0(4); ... [statistical_sustainable] = ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); ... y = abs(statistical_sustainable(index)./100 - 0.90); ... y = y + penalties; disp('testing123'); disp('testing234'); endfunction -------------------------------------- -------------------------------------- I tried testing the code by reducing the supplied argument x0 into 1 scalar variable instead of the 4 scalar vector, and the function call worked. That's why I went ahead and assumed that fsolve takes only one variables. Can you see what I am doing wrong that's causing me to receive: !--error 98 variable returned by scilab argument function is incorrect Thank you! Jerry ps. the complete func_for_fsolve.sci is uploaded here for your viewing: http://www.imagingspot.com/scilab/func_for_fsolve.sci ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 5:41:21 AM Subject: Re: [scilab-Users] Solving multi-variable function Fsolve takes one variable input, but the input can be a vector of any size. So, collapse your 4 variables into a single vector and adapt your fonction accordingly. Eric. 2008/3/13, Jerry Wang : Hello Scilab-ers, Can any one point me to the right direction? I want to find the zero point of a function that has 4 variables. I want scilab to solve for the values of the 4 variables that would give me a result = 0 for the answer. I initially tried fsolve, but I discovered that fsolve only take one variable input. Any thoughts? Thanks! Jerry Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. Never miss a thing. Make Yahoo your homepage. ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerrwang at yahoo.com Thu Mar 13 21:55:14 2008 From: jerrwang at yahoo.com (Jerry Wang) Date: Thu, 13 Mar 2008 13:55:14 -0700 (PDT) Subject: [scilab-Users] Solving multi-variable function Message-ID: <641050.42330.qm@web50607.mail.re2.yahoo.com> If you could please take a quick look at this test code for fsolve-- Am I declaring or calling something incorrectly? Even with this simple test code I am getting error 98. Thanks. http://www.imagingspot.com/scilab/test_fsolve.sci.txt http://www.imagingspot.com/scilab/test_fsolve_caller.sce.txt Jerry ----- Original Message ---- From: Jerry Wang To: users at lists.scilab.org Sent: Thursday, March 13, 2008 1:03:05 PM Subject: Re: [scilab-Users] Solving multi-variable function Oh, sorry, somehow the website doesn't like the .sci extension. Please see it here: http://www.imagingspot.com/scilab/func_for_fsolve.txt Yes, I provided initial values to the 4 variables. The "caller" function has: chdir('C:\MyScilab'); getf('ABSPredictor.sci') getf('func_for_fsolve.sci'); tic(); ret_age=60; mu_tree=36000; delta_t=0.85; sigma_b=0.50; [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); time_length=toc() beep(); When debugging, the func_for_fsolve does fine for the first iteration. Then it gives that error at the end of the first iteration. Jerry ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 12:46:42 PM Subject: Re: [scilab-Users] Solving multi-variable function Unfortunately, the function is not available at the provided address... Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order to feed the optimization program? Eric. 2008/3/13, Jerry Wang : I did attempt to collapse the 4 variables into a single vector array but I received an error after fsolve reaches the end of the first iteration. The error is: !--error 98 variable returned by scilab argument function is incorrect -------------------------------------- I add the function into the scope via: -------------------------------------- getf('func_for_fsolve.sci'); -------------------------------------- I call the function via: -------------------------------------- [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); -------------------------------------- Inside func_for_solve I have: -------------------------------------- function [y] = func_for_fsolve ( x0 ) ... ret_age = round(x0(1)); mu_tree = x0(2); delta_t = x0(3); sigma_b = x0(4); ... [statistical_sustainable] = ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); ... y = abs(statistical_sustainable(index)./100 - 0.90); ... y = y + penalties; disp('testing123'); disp('testing234'); endfunction -------------------------------------- -------------------------------------- I tried testing the code by reducing the supplied argument x0 into 1 scalar variable instead of the 4 scalar vector, and the function call worked. That's why I went ahead and assumed that fsolve takes only one variables. Can you see what I am doing wrong that's causing me to receive: !--error 98 variable returned by scilab argument function is incorrect Thank you! Jerry ps. the complete func_for_fsolve.sci is uploaded here for your viewing: http://www.imagingspot.com/scilab/func_for_fsolve.sci ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 5:41:21 AM Subject: Re: [scilab-Users] Solving multi-variable function Fsolve takes one variable input, but the input can be a vector of any size. So, collapse your 4 variables into a single vector and adapt your fonction accordingly. Eric. 2008/3/13, Jerry Wang : Hello Scilab-ers, Can any one point me to the right direction? I want to find the zero point of a function that has 4 variables. I want scilab to solve for the values of the 4 variables that would give me a result = 0 for the answer. I initially tried fsolve, but I discovered that fsolve only take one variable input. Any thoughts? Thanks! Jerry Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. Never miss a thing. Make Yahoo your homepage. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From grocer.toolbox at gmail.com Thu Mar 13 22:16:49 2008 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Thu, 13 Mar 2008 22:16:49 +0100 Subject: [scilab-Users] Solving multi-variable function In-Reply-To: <842810.29786.qm@web50604.mail.re2.yahoo.com> References: <842810.29786.qm@web50604.mail.re2.yahoo.com> Message-ID: I cannot run your function because you do not provide the function ABSPredictor. But, if your function func_for_fsolve.sci is exactly what is on your website, there are some oddities. In particular, you should not define x0 inside the function to maximise, but outside. Eric. 2008/3/13, Jerry Wang : > > Oh, sorry, somehow the website doesn't like the .sci extension. Please > see it here: > > *http://www.imagingspot.com/scilab/func_for_fsolve.txt* > > Yes, I provided initial values to the 4 variables. The "caller" > function has: > > chdir('C:\MyScilab'); > getf('ABSPredictor.sci') > getf('func_for_fsolve.sci'); > tic(); > ret_age=60; > mu_tree=36000; > delta_t=0.85; > sigma_b=0.50; > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > sigma_b],func_for_fsolve); > time_length=toc() > beep(); > > When debugging, the func_for_fsolve does fine for the first iteration. > Then it gives that error at the end of the first iteration. > > Jerry > > > ----- Original Message ---- > From: Eric Dubois > To: users at lists.scilab.org > Sent: Thursday, March 13, 2008 12:46:42 PM > Subject: Re: [scilab-Users] Solving multi-variable function > > Unfortunately, the function is not available at the provided address... > > Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order to > feed the optimization program? > > Eric. > > > 2008/3/13, Jerry Wang : > > > > I did attempt to collapse the 4 variables into a single vector array > > but I received an error after fsolve reaches the end of the first > > iteration. The error is: > > > > !--error 98 > > variable returned by scilab argument function is incorrect > > > > -------------------------------------- > > I add the function into the scope via: > > -------------------------------------- > > getf('func_for_fsolve.sci'); > > > > -------------------------------------- > > I call the function via: > > -------------------------------------- > > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > > sigma_b],func_for_fsolve); > > > > -------------------------------------- > > Inside func_for_solve I have: > > -------------------------------------- > > function [y] = func_for_fsolve ( x0 ) > > ... > > ret_age = round(x0(1)); > > mu_tree = x0(2); > > delta_t = x0(3); > > sigma_b = x0(4); > > ... > > [statistical_sustainable] = > > ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); > > ... > > y = abs(statistical_sustainable(index)./100 - 0.90); > > ... > > y = y + penalties; > > disp('testing123'); > > disp('testing234'); > > endfunction > > > > -------------------------------------- > > -------------------------------------- > > > > I tried testing the code by reducing the supplied argument x0 into 1 > > scalar variable instead of the 4 scalar vector, and the function call > > worked. That's why I went ahead and assumed that fsolve takes only one > > variables. Can you see what I am doing wrong that's causing me to receive: > > !--error 98 > > variable returned by scilab argument function is incorrect > > > > > > Thank you! > > > > Jerry > > > > ps. the complete func_for_fsolve.sci is uploaded here for your viewing: > > http://www.imagingspot.com/scilab/func_for_fsolve.sci > > > > > > > > > > ----- Original Message ---- > > From: Eric Dubois > > To: users at lists.scilab.org > > Sent: Thursday, March 13, 2008 5:41:21 AM > > Subject: Re: [scilab-Users] Solving multi-variable function > > > > Fsolve takes one variable input, but the input can be a vector of any > > size. > > > > So, collapse your 4 variables into a single vector and adapt your > > fonction accordingly. > > > > Eric. > > > > > > 2008/3/13, Jerry Wang : > > > > > > Hello Scilab-ers, > > > > > > Can any one point me to the right direction? I want to find the zero > > > point of a function that has 4 variables. I want scilab to solve for the > > > values of the 4 variables that would give me a result = 0 for the answer. I > > > initially tried fsolve, but I discovered that fsolve only take one variable > > > input. > > > > > > Any thoughts? Thanks! > > > > > > Jerry > > > > > > ------------------------------ > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > > > it now. > > > > > > > > > > > ------------------------------ > > Never miss a thing. Make Yahoo your homepage. > > > > > > ------------------------------ > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerrwang at yahoo.com Fri Mar 14 01:17:27 2008 From: jerrwang at yahoo.com (Jerry Wang) Date: Thu, 13 Mar 2008 17:17:27 -0700 (PDT) Subject: [scilab-Users] Solving multi-variable function Message-ID: <443714.99710.qm@web50601.mail.re2.yahoo.com> Thanks Eric, But what do you mean defining x0 inside vs outside? The func_for_fsolve function is declaired as function [y] = func_for_fsolve ( x0 ) and the caller provides the x0 as an vector into it... [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); Should be okay right? Also, are you able to run the simplified test_fsolve.sci and test_fsolve_caller.sce? Do they work for you? Or are you also getting error 98? http://www.imagingspot.com/scilab/test_fsolve.sci.txt http://www.imagingspot.com/scilab/test_fsolve_caller.sce.txt Jerry ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 2:16:49 PM Subject: Re: [scilab-Users] Solving multi-variable function I cannot run your function because you do not provide the function ABSPredictor. But, if your function func_for_fsolve.sci is exactly what is on your website, there are some oddities. In particular, you should not define x0 inside the function to maximise, but outside. Eric. 2008/3/13, Jerry Wang : Oh, sorry, somehow the website doesn't like the .sci extension. Please see it here: http://www.imagingspot.com/scilab/func_for_fsolve.txt Yes, I provided initial values to the 4 variables. The "caller" function has: chdir('C:\MyScilab'); getf('ABSPredictor.sci') getf('func_for_fsolve.sci'); tic(); ret_age=60; mu_tree=36000; delta_t=0.85; sigma_b=0.50; [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); time_length=toc() beep(); When debugging, the func_for_fsolve does fine for the first iteration. Then it gives that error at the end of the first iteration. Jerry ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 12:46:42 PM Subject: Re: [scilab-Users] Solving multi-variable function Unfortunately, the function is not available at the provided address... Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order to feed the optimization program? Eric. 2008/3/13, Jerry Wang : I did attempt to collapse the 4 variables into a single vector array but I received an error after fsolve reaches the end of the first iteration. The error is: !--error 98 variable returned by scilab argument function is incorrect -------------------------------------- I add the function into the scope via: -------------------------------------- getf('func_for_fsolve.sci'); -------------------------------------- I call the function via: -------------------------------------- [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); -------------------------------------- Inside func_for_solve I have: -------------------------------------- function [y] = func_for_fsolve ( x0 ) ... ret_age = round(x0(1)); mu_tree = x0(2); delta_t = x0(3); sigma_b = x0(4); ... [statistical_sustainable] = ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); ... y = abs(statistical_sustainable(index)./100 - 0.90); ... y = y + penalties; disp('testing123'); disp('testing234'); endfunction -------------------------------------- -------------------------------------- I tried testing the code by reducing the supplied argument x0 into 1 scalar variable instead of the 4 scalar vector, and the function call worked. That's why I went ahead and assumed that fsolve takes only one variables. Can you see what I am doing wrong that's causing me to receive: !--error 98 variable returned by scilab argument function is incorrect Thank you! Jerry ps. the complete func_for_fsolve.sci is uploaded here for your viewing: http://www.imagingspot.com/scilab/func_for_fsolve.sci ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 5:41:21 AM Subject: Re: [scilab-Users] Solving multi-variable function Fsolve takes one variable input, but the input can be a vector of any size. So, collapse your 4 variables into a single vector and adapt your fonction accordingly. Eric. 2008/3/13, Jerry Wang : Hello Scilab-ers, Can any one point me to the right direction? I want to find the zero point of a function that has 4 variables. I want scilab to solve for the values of the 4 variables that would give me a result = 0 for the answer. I initially tried fsolve, but I discovered that fsolve only take one variable input. Any thoughts? Thanks! Jerry Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. Never miss a thing. Make Yahoo your homepage. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -------------- next part -------------- An HTML attachment was scrubbed... URL: From grocer.toolbox at gmail.com Fri Mar 14 09:53:06 2008 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Fri, 14 Mar 2008 09:53:06 +0100 Subject: [scilab-Users] Solving multi-variable function In-Reply-To: <443714.99710.qm@web50601.mail.re2.yahoo.com> References: <443714.99710.qm@web50601.mail.re2.yahoo.com> Message-ID: Sorry for the misunderstanding. To use fsolve, you need to have as many relations as variables, which is not the case with your test. If you have less equations than variables, but your problem has one solution and only one (which is neither the case for your function test_fsolve), then use optim with the square of your initial function. ?ric. PS: by the way the error message is not as speaking as it should be... 2008/3/14, Jerry Wang : > > Thanks Eric, > > > > But what do you mean defining x0 inside vs outside? The func_for_fsolve > function is declaired as > > function [y] = func_for_fsolve ( x0 ) > and the caller provides the x0 as an vector into it... > > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > sigma_b],func_for_fsolve); > > > > Should be okay right? > > > > Also, are you able to run the simplified test_fsolve.sci and > test_fsolve_caller.sce? Do they work for you? Or are you also getting > error 98? > http://www.imagingspot.com/scilab/test_fsolve.sci.txt > http://www.imagingspot.com/scilab/test_fsolve_caller.sce.txt > > > > Jerry > > > ----- Original Message ---- > From: Eric Dubois > To: users at lists.scilab.org > Sent: Thursday, March 13, 2008 2:16:49 PM > Subject: Re: [scilab-Users] Solving multi-variable function > > I cannot run your function because you do not provide the function > ABSPredictor. But, if your function func_for_fsolve.sci is exactly what is > on your website, there are some oddities. In particular, you should not > define x0 inside the function to maximise, but outside. > > Eric. > > 2008/3/13, Jerry Wang : > > > > Oh, sorry, somehow the website doesn't like the .sci extension. Please > > see it here: > > > > *http://www.imagingspot.com/scilab/func_for_fsolve.txt* > > > > Yes, I provided initial values to the 4 variables. The "caller" > > function has: > > > > chdir('C:\MyScilab'); > > getf('ABSPredictor.sci') > > getf('func_for_fsolve.sci'); > > tic(); > > ret_age=60; > > mu_tree=36000; > > delta_t=0.85; > > sigma_b=0.50; > > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > > sigma_b],func_for_fsolve); > > time_length=toc() > > beep(); > > > > > > When debugging, the func_for_fsolve does fine for the first iteration. > > Then it gives that error at the end of the first iteration. > > > > Jerry > > > > > > ----- Original Message ---- > > From: Eric Dubois > > To: users at lists.scilab.org > > Sent: Thursday, March 13, 2008 12:46:42 PM > > Subject: Re: [scilab-Users] Solving multi-variable function > > > > Unfortunately, the function is not available at the provided address... > > > > Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order > > to feed the optimization program? > > > > Eric. > > > > > > 2008/3/13, Jerry Wang : > > > > > > I did attempt to collapse the 4 variables into a single vector array > > > but I received an error after fsolve reaches the end of the first > > > iteration. The error is: > > > > > > !--error 98 > > > variable returned by scilab argument function is incorrect > > > > > > -------------------------------------- > > > I add the function into the scope via: > > > -------------------------------------- > > > getf('func_for_fsolve.sci'); > > > > > > -------------------------------------- > > > I call the function via: > > > -------------------------------------- > > > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > > > sigma_b],func_for_fsolve); > > > > > > -------------------------------------- > > > Inside func_for_solve I have: > > > -------------------------------------- > > > function [y] = func_for_fsolve ( x0 ) > > > ... > > > ret_age = round(x0(1)); > > > mu_tree = x0(2); > > > delta_t = x0(3); > > > sigma_b = x0(4); > > > ... > > > [statistical_sustainable] = > > > ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); > > > ... > > > y = abs(statistical_sustainable(index)./100 - 0.90); > > > ... > > > y = y + penalties; > > > disp('testing123'); > > > disp('testing234'); > > > endfunction > > > > > > -------------------------------------- > > > -------------------------------------- > > > > > > I tried testing the code by reducing the supplied argument x0 into 1 > > > scalar variable instead of the 4 scalar vector, and the function call > > > worked. That's why I went ahead and assumed that fsolve takes only one > > > variables. Can you see what I am doing wrong that's causing me to receive: > > > !--error 98 > > > variable returned by scilab argument function is incorrect > > > > > > > > > Thank you! > > > > > > Jerry > > > > > > ps. the complete func_for_fsolve.sci is uploaded here for your > > > viewing: > > > http://www.imagingspot.com/scilab/func_for_fsolve.sci > > > > > > > > > > > > > > > ----- Original Message ---- > > > From: Eric Dubois > > > To: users at lists.scilab.org > > > Sent: Thursday, March 13, 2008 5:41:21 AM > > > Subject: Re: [scilab-Users] Solving multi-variable function > > > > > > Fsolve takes one variable input, but the input can be a vector of any > > > size. > > > > > > So, collapse your 4 variables into a single vector and adapt your > > > fonction accordingly. > > > > > > Eric. > > > > > > > > > 2008/3/13, Jerry Wang : > > > > > > > > Hello Scilab-ers, > > > > > > > > Can any one point me to the right direction? I want to find the > > > > zero point of a function that has 4 variables. I want scilab to solve for > > > > the values of the 4 variables that would give me a result = 0 for the > > > > answer. I initially tried fsolve, but I discovered that fsolve only take > > > > one variable input. > > > > > > > > Any thoughts? Thanks! > > > > > > > > Jerry > > > > > > > > ------------------------------ > > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > > > > it now. > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > Never miss a thing. Make Yahoo your homepage. > > > > > > > > > > > > > ------------------------------ > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > > it now. > > > > > > > ------------------------------ > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ricci2 at unisi.it Fri Mar 14 11:37:41 2008 From: ricci2 at unisi.it (Maso Ricci) Date: Fri, 14 Mar 2008 11:37:41 +0100 Subject: 'goto' command Message-ID: <47DA5575.4080301@unisi.it> Hi, does anyone know whether or not a kind of "basic" "GOTO" command in Scilab ? Thanks /maso -- 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 stephane.mottelet at utc.fr Fri Mar 14 14:24:39 2008 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Fri, 14 Mar 2008 14:24:39 +0100 Subject: [scilab-Users] 'goto' command In-Reply-To: <47DA5575.4080301@unisi.it> References: <47DA5575.4080301@unisi.it> Message-ID: <47DA7C97.5030008@utc.fr> Maso Ricci a ?crit : > Hi, > does anyone know whether or not a kind of "basic" "GOTO" command in > Scilab ? > > Thanks > > /maso > What to you want to do (there is no goto in Scilab) ? It is always possible to do the same with a if else end construct. S. -- St?phane Mottelet Laboratoire de Math?matiques Appliqu?es Universit? de Technologie de Compi?gne http://www.lmac.utc.fr/~mottelet From ricci2 at unisi.it Fri Mar 14 14:38:26 2008 From: ricci2 at unisi.it (Maso Ricci) Date: Fri, 14 Mar 2008 14:38:26 +0100 Subject: [scilab-Users] 'goto' command In-Reply-To: <47DA7C97.5030008@utc.fr> References: <47DA5575.4080301@unisi.it> <47DA7C97.5030008@utc.fr> Message-ID: <47DA7FD2.5040505@unisi.it> Thanks St?phane, you are right ... I did it :) /maso St?phane Mottelet wrote: > Maso Ricci a ?crit : >> Hi, >> does anyone know whether or not a kind of "basic" "GOTO" command in >> Scilab ? >> >> Thanks >> >> /maso >> > What to you want to do (there is no goto in Scilab) ? It is always > possible to do > the same with a > > if > > else > > end > > construct. > > S. > -- 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 masoud.najafi at inria.fr Fri Mar 14 15:21:41 2008 From: masoud.najafi at inria.fr (Masoud-NAJAFI) Date: Fri, 14 Mar 2008 15:21:41 +0100 Subject: [scilab-Users] transmission line demo In-Reply-To: <1204314661.8260.10.camel@buta.inria.fr> References: <47C82B32.4020501@univ-ubs.fr> <1204300990.6684.70.camel@buta.inria.fr> <47C83DFC.5080904@sympatico.ca> <1204314661.8260.10.camel@buta.inria.fr> Message-ID: <47DA89F5.6060500@inria.fr> Hi all, There is a demo for the transmission line demo with 100 nodes. I don't know if the outputs are really oscillatory, I mean I am not expert in power electronics to know if the simulation result is correct? can anyone help? cheers Masoud Simone Mannori a ?crit : > On Fri, 2008-02-29 at 12:16 -0500, Doug Stewart wrote: > >> While learning Scicos (and scilab) I found a limit that I don't understand. >> >> > > Hi Stewart, > > you are right, there is a problem. > > I'm not sure if is a "cached" bug or just a memory allocation problem. > When the diagram is bigger that a fixed limit, the Modelica compiler > crash. On my PC the simulation runs OK up to 40 blocks. > > I'm sure that Masoud will diagnose and fix the problem faster than me. > > Thanks for the communication :) > > Best Regards > > Simone Mannori - Scilab/Scicos Embedded Applications Eng. > > >> See the attached file. >> If I add one or more blocks to the transmission line then it gives me >> an error message >> about a compiler. >> >> Is there some reason that we are limited to 90 blocks? >> > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Transmission_Line.cosf URL: From jerrwang at yahoo.com Fri Mar 14 20:06:13 2008 From: jerrwang at yahoo.com (Jerry Wang) Date: Fri, 14 Mar 2008 12:06:13 -0700 (PDT) Subject: [scilab-Users] Solving multi-variable function Message-ID: <510253.52605.qm@web50610.mail.re2.yahoo.com> Oh I see. I was using fsolve incorrectly. Thank you Eric. Can you or someone give me an example of fsolve solving two or more variables with two or more equations? This way I can use it correctly next time? Thank you. Jerry ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Friday, March 14, 2008 1:53:06 AM Subject: Re: [scilab-Users] Solving multi-variable function Sorry for the misunderstanding. To use fsolve, you need to have as many relations as variables, which is not the case with your test. If you have less equations than variables, but your problem has one solution and only one (which is neither the case for your function test_fsolve), then use optim with the square of your initial function. ?ric. PS: by the way the error message is not as speaking as it should be... 2008/3/14, Jerry Wang : Thanks Eric, But what do you mean defining x0 inside vs outside? The func_for_fsolve function is declaired as function [y] = func_for_fsolve ( x0 ) and the caller provides the x0 as an vector into it... [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); Should be okay right? Also, are you able to run the simplified test_fsolve.sci and test_fsolve_caller.sce? Do they work for you? Or are you also getting error 98? http://www.imagingspot.com/scilab/test_fsolve.sci.txt http://www.imagingspot.com/scilab/test_fsolve_caller.sce.txt Jerry ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 2:16:49 PM Subject: Re: [scilab-Users] Solving multi-variable function I cannot run your function because you do not provide the function ABSPredictor. But, if your function func_for_fsolve.sci is exactly what is on your website, there are some oddities. In particular, you should not define x0 inside the function to maximise, but outside. Eric. 2008/3/13, Jerry Wang : Oh, sorry, somehow the website doesn't like the .sci extension. Please see it here: http://www.imagingspot.com/scilab/func_for_fsolve.txt Yes, I provided initial values to the 4 variables. The "caller" function has: chdir('C:\MyScilab'); getf('ABSPredictor.sci') getf('func_for_fsolve.sci'); tic(); ret_age=60; mu_tree=36000; delta_t=0.85; sigma_b=0.50; [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); time_length=toc() beep(); When debugging, the func_for_fsolve does fine for the first iteration. Then it gives that error at the end of the first iteration. Jerry ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 12:46:42 PM Subject: Re: [scilab-Users] Solving multi-variable function Unfortunately, the function is not available at the provided address... Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order to feed the optimization program? Eric. 2008/3/13, Jerry Wang : I did attempt to collapse the 4 variables into a single vector array but I received an error after fsolve reaches the end of the first iteration. The error is: !--error 98 variable returned by scilab argument function is incorrect -------------------------------------- I add the function into the scope via: -------------------------------------- getf('func_for_fsolve.sci'); -------------------------------------- I call the function via: -------------------------------------- [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, sigma_b],func_for_fsolve); -------------------------------------- Inside func_for_solve I have: -------------------------------------- function [y] = func_for_fsolve ( x0 ) ... ret_age = round(x0(1)); mu_tree = x0(2); delta_t = x0(3); sigma_b = x0(4); ... [statistical_sustainable] = ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); ... y = abs(statistical_sustainable(index)./100 - 0.90); ... y = y + penalties; disp('testing123'); disp('testing234'); endfunction -------------------------------------- -------------------------------------- I tried testing the code by reducing the supplied argument x0 into 1 scalar variable instead of the 4 scalar vector, and the function call worked. That's why I went ahead and assumed that fsolve takes only one variables. Can you see what I am doing wrong that's causing me to receive: !--error 98 variable returned by scilab argument function is incorrect Thank you! Jerry ps. the complete func_for_fsolve.sci is uploaded here for your viewing: http://www.imagingspot.com/scilab/func_for_fsolve.sci ----- Original Message ---- From: Eric Dubois To: users at lists.scilab.org Sent: Thursday, March 13, 2008 5:41:21 AM Subject: Re: [scilab-Users] Solving multi-variable function Fsolve takes one variable input, but the input can be a vector of any size. So, collapse your 4 variables into a single vector and adapt your fonction accordingly. Eric. 2008/3/13, Jerry Wang : Hello Scilab-ers, Can any one point me to the right direction? I want to find the zero point of a function that has 4 variables. I want scilab to solve for the values of the 4 variables that would give me a result = 0 for the answer. I initially tried fsolve, but I discovered that fsolve only take one variable input. Any thoughts? Thanks! Jerry Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. Never miss a thing. Make Yahoo your homepage. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -------------- next part -------------- An HTML attachment was scrubbed... URL: From grocer.toolbox at gmail.com Fri Mar 14 20:11:51 2008 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Fri, 14 Mar 2008 20:11:51 +0100 Subject: [scilab-Users] Solving multi-variable function In-Reply-To: <510253.52605.qm@web50610.mail.re2.yahoo.com> References: <510253.52605.qm@web50610.mail.re2.yahoo.com> Message-ID: I do not personnaly use fsolve, but you have examples in the help file (help fsolve). Eric 2008/3/14, Jerry Wang : > > Oh I see. I was using fsolve incorrectly. Thank you Eric. > > > > Can you or someone give me an example of fsolve solving two or more > variables with two or more equations? This way I can use it correctly next > time? Thank you. > > > > Jerry > > > ----- Original Message ---- > From: Eric Dubois > To: users at lists.scilab.org > Sent: Friday, March 14, 2008 1:53:06 AM > Subject: Re: [scilab-Users] Solving multi-variable function > > Sorry for the misunderstanding. > > To use fsolve, you need to have as many relations as variables, which is > not the case with your test. > > If you have less equations than variables, but your problem has one > solution and only one (which is neither the case for your function > test_fsolve), then use optim with the square of your initial function. > > ?ric. > > PS: by the way the error message is not as speaking as it should be... > > > 2008/3/14, Jerry Wang : > > > > Thanks Eric, > > > > > > > > But what do you mean defining x0 inside vs outside? The func_for_fsolve > > function is declaired as > > > > function [y] = func_for_fsolve ( x0 ) > > and the caller provides the x0 as an vector into it... > > > > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > > sigma_b],func_for_fsolve); > > > > > > > > Should be okay right? > > > > > > > > Also, are you able to run the simplified test_fsolve.sci and > > test_fsolve_caller.sce? Do they work for you? Or are you also getting > > error 98? > > http://www.imagingspot.com/scilab/test_fsolve.sci.txt > > http://www.imagingspot.com/scilab/test_fsolve_caller.sce.txt > > > > > > > > Jerry > > > > > > ----- Original Message ---- > > From: Eric Dubois > > To: users at lists.scilab.org > > Sent: Thursday, March 13, 2008 2:16:49 PM > > Subject: Re: [scilab-Users] Solving multi-variable function > > > > I cannot run your function because you do not provide the function > > ABSPredictor. But, if your function func_for_fsolve.sci is exactly what > > is on your website, there are some oddities. In particular, you should not > > define x0 inside the function to maximise, but outside. > > > > Eric. > > > > 2008/3/13, Jerry Wang : > > > > > > Oh, sorry, somehow the website doesn't like the .sci extension. > > > Please see it here: > > > > > > *http://www.imagingspot.com/scilab/func_for_fsolve.txt* > > > > > > Yes, I provided initial values to the 4 variables. The "caller" > > > function has: > > > > > > chdir('C:\MyScilab'); > > > getf('ABSPredictor.sci') > > > getf('func_for_fsolve.sci'); > > > tic(); > > > ret_age=60; > > > mu_tree=36000; > > > delta_t=0.85; > > > sigma_b=0.50; > > > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > > > sigma_b],func_for_fsolve); > > > time_length=toc() > > > beep(); > > > > > > > > > When debugging, the func_for_fsolve does fine for the first > > > iteration. Then it gives that error at the end of the first iteration. > > > > > > Jerry > > > > > > > > > ----- Original Message ---- > > > From: Eric Dubois > > > To: users at lists.scilab.org > > > Sent: Thursday, March 13, 2008 12:46:42 PM > > > Subject: Re: [scilab-Users] Solving multi-variable function > > > > > > Unfortunately, the function is not available at the provided > > > address... > > > > > > Did you provide values to ret_age, mu_tree, delta_t, sigma_b, in order > > > to feed the optimization program? > > > > > > Eric. > > > > > > > > > 2008/3/13, Jerry Wang : > > > > > > > > I did attempt to collapse the 4 variables into a single vector > > > > array but I received an error after fsolve reaches the end of the first > > > > iteration. The error is: > > > > > > > > !--error 98 > > > > variable returned by scilab argument function is incorrect > > > > > > > > -------------------------------------- > > > > I add the function into the scope via: > > > > -------------------------------------- > > > > getf('func_for_fsolve.sci'); > > > > > > > > -------------------------------------- > > > > I call the function via: > > > > -------------------------------------- > > > > [x_result,v,info]=fsolve([ret_age, mu_tree, delta_t, > > > > sigma_b],func_for_fsolve); > > > > > > > > -------------------------------------- > > > > Inside func_for_solve I have: > > > > -------------------------------------- > > > > function [y] = func_for_fsolve ( x0 ) > > > > ... > > > > ret_age = round(x0(1)); > > > > mu_tree = x0(2); > > > > delta_t = x0(3); > > > > sigma_b = x0(4); > > > > ... > > > > [statistical_sustainable] = > > > > ABSPredictor(mc,now_age,ret_age,mu_tree,delta_t,sigma_b); > > > > ... > > > > y = abs(statistical_sustainable(index)./100 - 0.90); > > > > ... > > > > y = y + penalties; > > > > disp('testing123'); > > > > disp('testing234'); > > > > endfunction > > > > > > > > -------------------------------------- > > > > -------------------------------------- > > > > > > > > I tried testing the code by reducing the supplied argument x0 into 1 > > > > scalar variable instead of the 4 scalar vector, and the function call > > > > worked. That's why I went ahead and assumed that fsolve takes only one > > > > variables. Can you see what I am doing wrong that's causing me to receive: > > > > !--error 98 > > > > variable returned by scilab argument function is incorrect > > > > > > > > > > > > Thank you! > > > > > > > > Jerry > > > > > > > > ps. the complete func_for_fsolve.sci is uploaded here for your > > > > viewing: > > > > http://www.imagingspot.com/scilab/func_for_fsolve.sci > > > > > > > > > > > > > > > > > > > > ----- Original Message ---- > > > > From: Eric Dubois > > > > To: users at lists.scilab.org > > > > Sent: Thursday, March 13, 2008 5:41:21 AM > > > > Subject: Re: [scilab-Users] Solving multi-variable function > > > > > > > > Fsolve takes one variable input, but the input can be a vector of > > > > any size. > > > > > > > > So, collapse your 4 variables into a single vector and adapt your > > > > fonction accordingly. > > > > > > > > Eric. > > > > > > > > > > > > 2008/3/13, Jerry Wang : > > > > > > > > > > Hello Scilab-ers, > > > > > > > > > > Can any one point me to the right direction? I want to find the > > > > > zero point of a function that has 4 variables. I want scilab to solve for > > > > > the values of the 4 variables that would give me a result = 0 for the > > > > > answer. I initially tried fsolve, but I discovered that fsolve only take > > > > > one variable input. > > > > > > > > > > Any thoughts? Thanks! > > > > > > > > > > Jerry > > > > > > > > > > ------------------------------ > > > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. > > > > > Try it now. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > Never miss a thing. Make Yahoo your homepage. > > > > > > > > > > > > > > > > > > > ------------------------------ > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > > > it now. > > > > > > > > > > > > > ------------------------------ > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > > it now. > > > > > > ------------------------------ > Looking for last minute shopping deals? Find them fast with Yahoo! Search. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drakkar at neuf.fr Mon Mar 17 13:53:59 2008 From: drakkar at neuf.fr (drakkar12) Date: Mon, 17 Mar 2008 13:53:59 +0100 Subject: *.bin Message-ID: <47DE69E7.5000601@neuf.fr> Bonjour, Que contiennent au juste les *.bin et lib g?n?r?s par genlib ? Merci pour toute r?ponse. Herv? BAILLY From drakkar at neuf.fr Wed Mar 19 11:44:43 2008 From: drakkar at neuf.fr (drakkar12) Date: Wed, 19 Mar 2008 11:44:43 +0100 Subject: 'checkbox' de la fonction uicontrol() Message-ID: <47E0EE9B.2080309@neuf.fr> Bonjour, Je rencontre quelques difficult?s pour initialiser une 'checkbox' de la fonction uicontrol(). 'value' prend bien la valeur initiale mais la 'checkbox' n'est pas graphiquement mise ? jour (notamment jamais coch?e). Comment proc?der ? Herv? B. From esmamian at gmail.com Fri Mar 28 00:38:46 2008 From: esmamian at gmail.com (esmamian) Date: Thu, 27 Mar 2008 18:38:46 -0500 Subject: How to set a customized decimal precision? Message-ID: <7e1354bc0803271638s686868e7i16fd60a1c43936bc@mail.gmail.com> Hi All! I need some help with floats! I have a problem to work with a precision greater than 7 decimals. Scilab, by default, is working with 7 decimals and i need to set a bigger precision. Someone knows how to set a customized precision? Thanks in advice! Sofia Mami?n -------------- next part -------------- An HTML attachment was scrubbed... URL: