From help-octave-request at bevo dot che dot wisc dot edu Mon Jan 29 06:16:07 2001 Subject: Re: gnuplot like I/O From: Akira Nishimura To: help-octave at bevo dot che dot wisc dot edu Date: Mon, 29 Jan 2001 20:24:45 +0900 From: "Osvaldo Clua" Subject: gnuplot like I/O Date: Mon, 29 Jan 2001 07:38:23 -0500 (EST) Message-ID: <0a2625739101d11MAIL2 at mail2 dot arnet dot com dot ar> > 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 akira at rsch dot tuis dot ac dot jp 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 -------------------------------------------------------------