Re: running other applications



which one? Am a bit puzzled too..


On Fri, 29 Feb 2008 13:50:23 -0500, Josh <imahorse3@xxxxxxxxxxx> wrote:

"Josh " <imahorse3@xxxxxxxxxxx> wrote in message
<fq9frt$aqp$1@xxxxxxxxxxxxxxxxxx>...
roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson) wrote in
message <fq9fb8$s9b$1@xxxxxxxxxxxxxxxxxxxxxxx>...
> In article <fq9esh$ojv$1@xxxxxxxxxxxxxxxxxx>,
> Josh <imahorse3@xxxxxxxxxxx> wrote:
>
> >I have been trying to execute this program for matlab
using
> >the advice above but I keep getting this error:
>
> >status =
> > 128
> >result =
> > ''
>
> >icExe = 'C:\PathName\myProgram.exe';
> >FullImg = ['-i', ' ', FullImg, ' '];
> >FullSens = ['-bi', ' ', FullSens, ' '];
> >FullAA = ['-co', ' ', FullAA, ' '];
>
> >cmdLine = [FullImg, FullSens, FullAA];
> >cmdLine = sprintf('%s %s', icExe, cmdLine)
>
> As a stylistic note: if you use [] to splice together
character
> strings on the lines above this, but then use sprintf
to
splice
> together character strings here, then it may give the
onlooker
> the impression that there is something different about
the
> respective operations, and the onlooker may then waste
time trying
> to figure out what the distinction in meaning is. It is
thus
> advisable to be consistant, such as by coding
>
> cmdLine = [icExe, ' ', cmdLine];
>
> instead of using the sprintf.
>
>
> >[status,result] = system(cmdLine)
>
> >Any help on why this doesnt work?
>
> There is nothing that is obvious to me in what you show.
> However, not knowing the starting values of FullImg,
FullSens, or FullAA,
> I would speculate that perhaps one of them has a
special
character
> (such as a space or '>') that needs to be quoted to be
passed intact
> to the command line. Possibly something like,
>
> FullImg = ['-i', ' "', FullImg, '" '];
> --
> "You can't hit what you can't see." -- Walter "The
Big
Train" Johnson


Nevermind, I had to change the environment variables on my
system. Duh.

Thanks anyway.

.



Relevant Pages

  • Re: buggy behaviour of automatic string resize?
    ... Already a couple of years ago I reported some strange behaviour to ... Matlab, but nothing changed and I'm still wondering... ... disp(sprintf('%s', s)); % display again via a dummy sprintf ... Matlab automatically resizes the string, but the new elements of the ...
    (comp.soft-sys.matlab)
  • Re: reading and skipping a line of text
    ... character strings and read just columns of numbers. ... have MatLab find the lines of text to write that way. ... I don't fully understand how to use textscan to tell MatLab ... You could use getline in a loop till it reads ...
    (comp.soft-sys.matlab)
  • Re: How to automatically open multiple data files
    ... recognize variables defined by using 'sprintf'. ... the output file start from the second row of column A (i.e. ... Matlab will report errors. ... of '' for variable 'ColumnA' like this: ...
    (comp.soft-sys.matlab)
  • Re: sprintf functionality with string matrix input
    ... Rob Clemens wrote: ... Matlab being a matrix based program there has got to be a way to do ... this without the use of for loops ... now I want to use this in a sprintf command. ...
    (comp.soft-sys.matlab)
  • Re: any Mathworks people or Matlab gurus here, example provided
    ... sprintf() did the trick. ... size of the strings in Matlab and after passing it to C++. ... >> something with the fact that Matlab keeps characters ... >> Here is a string from Matlab: ...
    (comp.soft-sys.matlab)