help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feval in .oct files?


From: Heber Farnsworth
Subject: feval in .oct files?
Date: Fri, 12 Oct 2001 10:57:30 -0500

I haven't been on the list for about a year.  Now my research has taken
me back into using Octave and I'm having a problem with some old .oct
files I wrote.  I used to use feval quite often to access builting
functions like rand from within a .oct file.  Now mkoctfile is
complaining that 

        `feval' undeclared (first use this function)

I'm using octave-2.1.33.

As long as I'm asking questions I have one other.  It seems octave has
gotten pickier.  I used to be able to write a .oct file that took
arguments which were the dimensions of the matrix the function would
return.  I would reference such a thing as

        double NumTrials = args(0).double_value();

and then create a matrix with NumTrials rows for instance.  I thought it
was strange to use a double as a dimension for a matrix but it worked
and there didn't seem to be a way to make an int out of args(0).  Now
octave complains
        
        warning: passing `double' for argument 1 of `Matrix::Matrix (int, int,
double)'

What is the right way to do this?

Heber

P.S. I haven't yet got back on the list so please respond to this
address.



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]