How can I utlized an external program through MATLAB
古いコメントを表示
Hello - I'd like to run some data analysis through MATLAB, but one part requires the use of another program. Is there a way to automatically run the program through the use of MATLAB, meaning I do all the work from MATLAB and just code what I'd like the other program to do? Thank you
12 件のコメント
OCDER
2018 年 7 月 2 日
Depends on if the external program can be run without a user interface and takes inputs and generates outputs. Does the external program takes inputs and outputs, something like this?
ExternalProgram.exe -input myimage.png -output myprocessedimage.png
Victoria
2018 年 7 月 2 日
OCDER
2018 年 7 月 2 日
You could use the system command to call the exe file as you would in the command prompt of windows. But if the program cannot accept inputs/outputs, then all your matlab program could do is open the exe file, and then the user would have to intervene and use the external program. Not sure how you'll get an automated way to run an external program from then.
Victoria
2018 年 7 月 2 日
OCDER
2018 年 7 月 2 日
Is it an exe file?
system('c:\path_to_program\externprogram.exe')
or
winopen('c:\path_to_program\externprogram.exe')
Victoria
2018 年 7 月 2 日
OCDER
2018 年 7 月 2 日
That's what I was asking you about. Different exe files may have different input/output capabilities. You have to look for the document on using this external program - see if there's a way to pass inputs to the program directly when opening the software. I don't know what this external program is, so I can't help you at this point.
Hopefully you can do this:
system('externprogram.exe -input myimage.png -output mimage.png')
Then you can automate everything.
Victoria
2018 年 7 月 2 日
Victoria
2018 年 7 月 2 日
Walter Roberson
2018 年 7 月 2 日
You could try
!externprogram.exe /help
or
!externprogram.exe -help
/help and -help and --help and /? are the commonly used methods of asking for a description of the program arguments
It is possible that you might end up needing to use Java Robot class to automate use of the program.
Victoria
2018 年 7 月 6 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!