Technical discussion about Matlab and issues related to Digital Signal Processing.
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.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.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.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.