Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Ads

Discussion Groups

Discussion Groups | Matlab DSP | call exe file with 2 arguments as variable

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

call exe file with 2 arguments as variable - Shailen Segobin - Apr 11 7:04:04 2008



Hi,
 
I wanted to know if anyone has ever tried running an .exe file from an .m file, passing 2
arguments as input variables to the exe file?
 
Example>>> run('C:\directory\file.exe <arg1> <arg2>')
 
<arg1> and <arg2> are stored as variables in the matlab .m file

Many thanks,
 
Shailen

______________________________
New Year Gift for Members of DSPRelated.com.  Details here.


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: call exe file with 2 arguments as variable - Nanda Kishore - Apr 13 11:18:31 2008

Hi,

You can do this by using !  symbol before the command with arguments. Or use
'system' command in the Matalab. See Matlab help for more details.

Regards,
Nanda Kishore.
On Thu, Apr 10, 2008 at 4:41 PM, Shailen Segobin <s...@hotmail.com>
wrote:

>   Hi,
>
> I wanted to know if anyone has ever tried running an .exe file from an .m
> file, passing 2 arguments as input variables to the exe file?
>
> Example>>> run('C:\directory\file.exe <arg1> <arg2>')
>
> <arg1> and <arg2> are stored as variables in the matlab .m file
> Many thanks,
>
> Shailen
>  
>

______________________________
New Year Gift for Members of DSPRelated.com.  Details here.


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: call exe file with 2 arguments as variable - arkkimede - Apr 13 11:18:36 2008

Try the instruction matlab  dos

ex.
string  = 'name_program.exe 12  45';
 dos(string);

in the string you can also put the path to reach the executable
I hope this help you
Best Regards

On Thu, Apr 10, 2008 at 1:11 PM, Shailen Segobin <s...@hotmail.com>
wrote:

>   Hi,
>
> I wanted to know if anyone has ever tried running an .exe file from an .m
> file, passing 2 arguments as input variables to the exe file?
>
> Example>>> run('C:\directory\file.exe <arg1> <arg2>')
>
> <arg1> and <arg2> are stored as variables in the matlab .m file
> Many thanks,
>
> Shailen
>  
>

______________________________
New Year Gift for Members of DSPRelated.com.  Details here.


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

RE: call exe file with 2 arguments as variable - Shailen Segobin - Apr 13 11:18:51 2008

thanks mate,
 
i have actually found out that dos(string) is the command to be used and not run(string).
run(string) is used rather for matlab .m files. It is better to put the string between
"" as if a folder contains spaces, the command does not run properly
 
example string="cd\program files"
dos(string)

cheers,
 
Shailen
Date: Fri, 11 Apr 2008 16:53:24 +0200From: a...@gmail.comTo: s...@hotmail.comSubject: Re:
[matlab] call exe file with 2 arguments as variableCC: m...@yahoogroups.comTry the instruction
matlab  dosex.string  = 'name_program.exe 12  45'; dos(string);in the string you can also put
the path to reach the executableI hope this help youBest Regards
On Thu, Apr 10, 2008 at 1:11 PM, Shailen Segobin <s...@hotmail.com> wrote:

Hi,I wanted to know if anyone has ever tried running an .exe file from an .m file, passing 2
arguments as input variables to the exe file?Example>>> run('C:\directory\file.exe
<arg1> <arg2>')<arg1> and <arg2> are stored as variables in the matlab
.m fileMany thanks,Shailen 

______________________________
New Year Gift for Members of DSPRelated.com.  Details here.


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )