help-octave
[Top][All Lists]
Advanced

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

Re: problem with matrices operator


From: febty febriani
Subject: Re: problem with matrices operator
Date: Fri, 9 Oct 2009 19:28:33 +0900

thank you, you are right. It is much more simple and faster than mine.
Again, thank you very much.
 
best regards,
febty

2009/10/9 Carlo de Falco <address@hidden>

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.



--

******
febty febriani
Indonesian Institute of Sciences
Research Center for Physics
Kompleks PUSPIPTEK
Serpong, Indonesia, 15314

reply via email to

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