Info

This question is closed. Reopen it to edit or answer.

input file cannot be opened when run a .exe in MATLAB

4 views (last 30 days)
Hello, anybody can help?
I made a function using MATLAB, which has 2 input files, and one output. The two input files, are hdf5 files, and the output is a 2-dimensional data array. Using MATLAB Compiler, I generated a .exe file. The reason I generate this .exe file is to wrap the function like a box. So others can just use it without looking at the original code.
My question is: when I execute the .exe file under MATLAB command line, it always pops out errors saying that the filename cannot be read. But it is so weird because I can read that file correctly under command line.
My .exe file is: cal_sal_sat_gom.exe
My original function is: sal_MODIS_NN.m
The command I use to execute the .exe is:
fnanme_sst='C:\Users\sl\Documents\MATLAB\data\sst\A20072631915.l3_gsfc_gcoos_map.1KM.h5'
fname_oc='C:\Users\sl\Documents\MATLAB\data\oc\A20072631915.l3_gsfc_gcoos_map.1KM.h5'
[status,result]=system('cal_sal_sat_gom.exe fname_sst fname_oc'); %(fname_sst and fname_oc are the two input files).
The error I got is: could not open file 'fname_oc'.
Anybody got a clue? Waiting online... Thanks!

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!