Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: running other applications
Date: Fri, 6 Jul 2007 13:45:56 -0400
Organization: The MathWorks, Inc.
Lines: 36
Message-ID: <f6lv4k$3jt$1@fred.mathworks.com>
References: <ef5c942.-1@webcrossing.raydaftYaTP> <ef5c942.0@webcrossing.raydaftYaTP> <ef5c942.1@webcrossing.raydaftYaTP> <ef5c942.2@webcrossing.raydaftYaTP> <f6lh2p$4ie$1@fred.mathworks.com> <ef5c942.4@webcrossing.raydaftYaTP>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1183743956 3709 144.212.105.187 (6 Jul 2007 17:45:56 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 6 Jul 2007 17:45:56 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:417634




"Ender" <jr147@msstate.edu> wrote in message 
news:ef5c942.4@webcrossing.raydaftYaTP...
> Steven Lord wrote:

*snip*

>> Don't use EVAL -- you don't need to in this case. Use SYSTEM, DOS,
>> or UNIX
>> instead of !.
>>
>>
>> theprogram = '"C:\Program Files\SomeProgram\executable.exe"';
>> thearguments = 'foo bar';
>> system(sprintf('%s %s', theprogram thearguments))
>>
>>
>> --
>> Steve Lord
>> slord@mathworks.com
>>
>>
>> What is the 'foo bar' command? Is 'foo bar' the file that I want to
> open?

Foo and bar are just 'dummy' arguments.  I wanted to show how to pass 
arguments to the executable.exe that you wanted to call using ! or system, 
so I used them as placeholder arguments.

http://en.wikipedia.org/wiki/Foo

-- 
Steve Lord
slord@mathworks.com