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

11 vues (au cours des 30 derniers jours)
Cathy Chen
Cathy Chen le 1 Fév 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!

Réponses (1)

Walter Roberson
Walter Roberson le 1 Fév 2017
result will contain everything that you disp() or fprintf() with no fid or fprintf() with fid of 1.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by