[Top][All Lists]

[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: 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

#! /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,:));

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

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:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]