split program into two parts

View: New views
3 Messages — Rating Filter:   Alert me  

split program into two parts

by muka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I would like to split my program into two files, automatically generated data arrays(generated
with  perl) and the actual code. How can this be done?

Ideally I would like to have something like
"#include data.octave"
in the code.



Re: split program into two parts

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

data = load("data.octave")

Michael.


On Mon, Jan 19, 2009 at 9:02 PM, muka <avova@...> wrote:

>
> Hi,
>
> I would like to split my program into two files, automatically generated
> data arrays(generated
> with  perl) and the actual code. How can this be done?
>
> Ideally I would like to have something like
> "#include data.octave"
> in the code.
>
>
>
> --
> View this message in context: http://www.nabble.com/split-program-into-two-parts-tp21551511p21551511.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> Help-octave@...
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: split program into two parts

by Jaroslav Hajek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jan 19, 2009 at 10:02 PM, muka <avova@...> wrote:

>
> Hi,
>
> I would like to split my program into two files, automatically generated
> data arrays(generated
> with  perl) and the actual code. How can this be done?
>
> Ideally I would like to have something like
> "#include data.octave"
> in the code.
>
>
>

"source" is the equivalent to #include. But, if the perl generated
part is really only data (no code),
I suggest you consider generating data directly in Octave's ASCII
format and then load them using "load".
That will probably be much faster than sourcing a script.

cheers

--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave