|
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) |
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 psdWhat 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
[Prev in Thread] | Current Thread | [Next in Thread] |