help-octave
[Top][All Lists]
Advanced

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

Re: gnuplot like I/O


From: Akira Nishimura
Subject: Re: gnuplot like I/O
Date: Mon, 29 Jan 2001 20:24:45 +0900

From: "Osvaldo Clua" <address@hidden>
Subject: gnuplot like I/O
Date: Mon, 29 Jan 2001 07:38:23 -0500 (EST)
Message-ID: <address@hidden>

>       Is there any way of doing I/O into/from files in gnuplots 
>format (i.e, one column per variable, "#"s as comments, ascii) other than
>"programming" it with "c" style and loops?
>       Any workaround appreciated

Is there any good solution other than the following commands?

input:

load gnuplot_data_file.txt
# if you want divide a matrix into vectors
for k=1:size(gnuplot_data_file,2)
   cmd = sprintf('var%d = gnuplot_data_file(:,k);', k);
   eval(cmd);
end


output:

comment = ["# your comments on data"; "# you can give many lines"; "# ...
like this"];
save -ascii gnuplot_data_file.txt comment your_data;

_/_/_/   _/  _/            _/            _/_/        Akira NISHIMURA
 _/     _/  _/            _/             |    Dept. of Information Systems
_/okyo  _/_/niversity of _/nformation _/_/ciences address@hidden
                   http://www.rsch.tuis.ac.jp/~akira



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