[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mkoctfile cygwin
From: |
Keith Goodman |
Subject: |
Re: Mkoctfile cygwin |
Date: |
Sun, 16 Apr 2006 08:44:22 -0700 |
On 4/16/06, Keith Goodman <address@hidden> wrote:
> On 4/16/06, Keshab Man Shrestha (Dr) <address@hidden> 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
-------------------------------------------------------------
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
-------------------------------------------------------------