[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with matrices operator
From: |
Carlo de Falco |
Subject: |
Re: problem with matrices operator |
Date: |
Fri, 9 Oct 2009 07:46:07 +0200 |
On 9 Oct 2009, at 04:44, febty febriani wrote:
for year in 2009
do
for month in 01 ....12 (12 months)
do
for day in 01 ....31 (31 days)
do
for hour in 00....23 (23 hours)
do
for min in 00
do
for sec in 00
do
dir=...... (I define my folder, because I use different
folder for data, result and program. It is just for folder
arrangement )
octave -q <<EOF
octave scripts
EOF
you could do the same just with an octave script
----------8<--------------
#!/path/to/octave ##so that you can run the script from bash
year=2009
for month=1:12
for day=1:31
for hour=0:23
min=0; sec=0;
dir=<...>;
filename=sprintf("%s/data-1day-1Hz/fft-%d%2.2d.dat", dir, year,
month);
fid=fopen(filename,"r"); # or:
# load (filename);
## other octave commands
plot (...)
print (...) ## to save the plot to a file
fclose (fid)
endfor
endfor
endfor
----------8<--------------
this should be __MUCH__ faster as it would not fire up many
different instances of octave and gnuplot.
HTH,
c.