how to get the output when run a .exe under MATLAB command

11 visualizaciones (últimos 30 días)
Cathy Chen
Cathy Chen el 1 de Feb. de 2017
Respondida: Walter Roberson el 1 de Feb. de 2017
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!

Respuestas (1)

Walter Roberson
Walter Roberson el 1 de Feb. de 2017
result will contain everything that you disp() or fprintf() with no fid or fprintf() with fid of 1.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by