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에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!