how to get the output when run a .exe under MATLAB command
Show older comments
Hello,
I wrote an function, which has 2 inputs and 1 output, the 2 input are two input data filenames, the one output is a 2-dimensional data array. I converted this function to a .exe file using MATBLAB compiler, then under the command line,
[status,result]=system(['cal_sss.exe C:\ss\data\data1.h5 C:\ss\data\data2.h5'])
I assume the output data array would be stored in 'result'. However, there is nothing in the returned 'result'. 'status' is zero, which indicated the .exe runs completely.
Anyone know how to write the syntx to get the output data array?
Thank you very much!
Answers (1)
Walter Roberson
on 1 Feb 2017
0 votes
result will contain everything that you disp() or fprintf() with no fid or fprintf() with fid of 1.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!