help-octave
[Top][All Lists]
Advanced

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

Re: Can I pass filename to script called in shell?


From: Terry Duell
Subject: Re: Can I pass filename to script called in shell?
Date: Sat, 21 Feb 2009 09:13:49 +1100
User-agent: Opera Mail/9.63 (Linux)

On Fri, 20 Feb 2009 23:45:36 +1100, Francesco Potorti` <address@hidden> wrote:

I have a script file (run-psd.m), as follows...

        file = read(argv(){2});
        acc = dlmread(file);
        psd = autspec(acc,dt,win,raw);
        save -ascii psddata psd

What is "read"?  I suppose you meant

 file = argv(){2};

That has fixed the problem.
I had searched for info on how to do this and found a posting (not sure if it was in this group archive) that suggested the 'file = read(argv(){1});' syntax and the response at the time was that it worked...so that is what I had been trying.

 acc = dlmread(file);
 psd = autspec(acc,dt,win,raw);
 save -ascii psddata psd

But then, what is "autspec" and "psddata"?

Well, 'autspec' is a local function that I have written, and 'psddata' is the file that resulting data is written to.

I had spend some time trying to sort this proble, so many thanks for your advice.

Cheers,
--
Regards,
Terry Duell


reply via email to

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