"John " <firstname.lastname@example.org> wrote in message news:email@example.com... > "Nasser M. Abbasi" wrote in message <firstname.lastname@example.org>... >> On 4/4/2013 2:26 PM, John wrote: >> > I want to run a shell script within MATLAB, but the script is csh. >> > When I try running >> >it in MATLAB it says /bin/bash commande does not exist. How do I get >> >MATLAB >> >to run the UNIX command using csh and not bash? >> > >> >> When you explain a problem, it helps to also show what you actually >> typed. No one can see your screen from here to figure what you >> typed. >> >> But may be this helps >> >> http://www.mathworks.com/help/matlab/ref/system.html >> >> "system >> >> Execute operating system command and return output" > > [s,w]=unix('to3d -session e126 -prefx 4244_run_01 -epan -time:zt 28 104 > 1800 altplus ./s1037/*MRDC*') > /bin/bash: to3d: command not found > > That is what I run and the error I get. Using system produces the same > error. The problem is MATLAB is trying to run it through a bash shell, > and its a command for a c-shell(csh).
Are you certain that's the problem?
Where is this to3d command located? If it is in your current directory, try:
If it's somewhere else, you will need to either use the path to that location in your UNIX command or you will need to ensure that location is on the _system_ path (it doesn't matter whether or not it is on the MATLAB path.)
> I need to know how to get MATLAB to execute the command in a c-shell. and > ! will not work either for the exact same reason.
Before we go blaming the shell without hard-and-fast proof, quickly check for other causes that provoke the same symptoms.