From help-octave-request at bevo dot che dot wisc dot edu Thu May 1 01:04:23 2003 Subject: Re: Calling other functions from .oct files From: Heber Farnsworth To: Peter Williams Cc: help-octave at bevo dot che dot wisc dot edu Date: Thu, 1 May 2003 01:03:57 -0500 Here is a code snipet that works (or did back when I wrote it) ColumnVector NumRands(2); NumRands(0) = 9000; NumRands(1) = 1; octave_value_list x; x(0) = octave_value(NumRands); string ranfunc = "rand" unis = feval(ranfunc,x,1); Heber On Wednesday, April 30, 2003, at 10:32 PM, Peter Williams wrote: > Hi everyone, > I'm starting to do some work with .oct files and I need a little > guidance. The classes and structures document is very useful, but > what I want to do is call functions that I would normally use in a .m > from my C++ code. I'm not really sure how to go about this, or where > to look in the source for examples. > If someone could point me in the right direction or give me a brief > example of how you would call "randn" from C++ source. I know I can > use numerical recipies inside my own code to accomplish this, but I'm > curious how/if I can access the rand.cc source from my code. Looked > through Da Coda, but I didn't see anything like this. > > Thanks, > Pete Williams > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- > ------------------------------------------------------------- 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 -------------------------------------------------------------