[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: importing a matrix from stdout of another program
From: |
Mike Miller |
Subject: |
Re: importing a matrix from stdout of another program |
Date: |
Tue, 19 Jul 2005 09:45:03 -0500 (CDT) |
On Tue, 19 Jul 2005, Mike Miller wrote:
I have a perl program that will produce a matrix in its standard output.
I want to be able to bring that matrix into Octave directly, if
possible. The command syntax is like this:
seqped.pl infile
The program reads in a data file and sends a matrix to stdout. It would
be nice to have an Octave function (called 'seqped') that could call
that perl script and read in the matrix like this:
X = seqped(infile) ;
Is it possible to do that without writing a temp file and reading the
matrix from the temp file? That would be my preference, but if a temp
file must be used, what's a good way of writing that?
That was kinda dumb of me to ask that. Apparently, this will do what I
need:
X = str2num(system("seqped.pl infile")) ;
That was a lot easier than I thought it would be. Octave is great!
Mike
-------------------------------------------------------------
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
-------------------------------------------------------------