|
From: | Quentin Spencer |
Subject: | Re: Including Octave files? |
Date: | Mon, 05 Apr 2004 11:23:46 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 |
John A. Crow wrote:
Is there some way to include one Octave file in another? --- something like#! /usr/bin/octave include("myfuncs.h"); a = [ ... ];where the included file contains Octave matrices, functions, constants, etc., I've writtenand want to reuse? Thanks!
Create a script called myfuncs.m with the declarations. If you're running octave in batch mode as your example suggests, replace
include("myfuncs.h"); with myfuncs;For running octave interactively, you could put all of this stuff in your .octaverc file which resides in your home directory.
-Quentin ------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |