From help-request at octave dot org Sun Apr 16 10:52:52 2006 Subject: Re: Mkoctfile cygwin From: "Keith Goodman" To: "Keshab Man Shrestha (Dr)" Cc: help at octave dot org Date: Sun, 16 Apr 2006 08:51:10 -0700 On 4/16/06, Keith Goodman wrote: > On 4/16/06, Keith Goodman wrote: > > On 4/16/06, Keshab Man Shrestha (Dr) wrote: > > > > > > > > > I installed windows version of octave 2.1.73 (by downloading > > > octve-2-1.73-inst.exe). I could create the oregonator.oct file by issuing > > > the following commant inside octave > > > > > > >> system("mkoctfile oregonator.cc") > > > > > > I get > > > > > > ans = 0 > > > return. However, when I type "oregonator ([1,2,3],0)" inside octave. It > > > closes the octave window. > > > > > > Any help is highly appreciated. > > > > > > > > > Keshab > > > > Looking at the code for oregonator.cc, I see that it takes only one > > input argument. And since it is a simple example it does not check if > > you supplied the right number of input arguments. If you supply the > > wrong number you will get a segmentation fault. > > > > So try "oregonator ([1,2,3])". > > > > (Why does oregonator.m take two input arguments? Only the first on is used.) > > > > Why didn't I test that before answering? Forget what I said. > > >> which oregonator > oregonator is the dynamically-linked function from the file > /home/me/oregonator.oct > >> oregonator([1,2,3]) > ans = > > 77.269353 > -0.012942 > -0.322000 > > >> oregonator([1,2,3],0) > ans = > > 77.269353 > -0.012942 > -0.322000 > > >> oregonator() > error: octave_base_value::matrix_value(): wrong type argument > `dynamically-linked function' > >> version > ans = 2.9.4 > OK. I found it: >> oregonator panic: Segmentation fault -- stopping myself... Segmentation fault Calling it without even () does cause a segmentation fault. ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------