Matlab creates empty file when compiled and deployed -
im developing matlab app generates config.ini file during run. when run code in matlab works fine , ini files generated expected. when compile code, using matlab compiler (mcc) , run executable generates empty config ini. idea why different output compiled vs. not-compiled?
this code printing
fid = fopen(file_name, 'w'); if (fid ~= -1) str = obj.tostring(); fprintf(fid, '%s', str); fclose(fid); status = true; else status = false; return; end
system ubuntu 12.04, matlab 2015b
resolved - problem in order generate new config read empty config templete. running within matlab need provide file name (as on build path) , when deployed need provide full path of template config...so file generated empty because there no string loaded template...
Comments
Post a Comment