help-octave
[Top][All Lists]
Advanced

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

save files


From: Paolo Ariano
Subject: save files
Date: Mon, 14 Oct 2002 09:12:47 -0500

hi *, 
i'm writing an octave script that have to open a data file and save an
eps file with the graph created, my script at the moment function well
froma bash but only for 1 file a time:

graphic.ve filename_in.cxy filename_out.eps

now i'd like to make it automatic passing only *.cxy and it has to save
filename_in.eps at the moment it saves filename_in.cxy.eps but the big
problem is thet it does not accept *.cxy all files ...


thanks a lot
paolo


#! /usr/bin/octave -q

function graph(filename);
  [mat] = cxy_load(filename);
  gset term postscript portrait enhanced color solid "helvetica" 10
  gset([ 'output "' ,filename, '.eps"' ]);
  gset title "(x,y) TRACK";
  gset xlabel "X";
  gset ylabel "Y";
  subplot (3,2,1);
  plot (mat(1,:),mat(2,:),".");
  gset([ 'title "', filename, '"' ]);
  gset xlabel "speed";
  gset ylabel "counts";
  for t=1:4
    [hmatt,matt] = histot(filename,t);
    subplot (3,2,t+1);
    bar (hmatt(1,:),hmatt(2,:));
  endfor
endfunction


if (nargin == 1)
  graph (argv(1,:));
else
  error ("2 arguments please ;)");
endif


-- 
Paolo Ariano                                  
Neuroscience PhD Student                      
DBAU & INFM Turin (Italy)                     

La liberta' in coppia si dimezza -- Io  


_____________________________________________________________________
For your security, this mail has been scanned and protected by Inflex



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