Skip to content
Snippets Groups Projects
Commit aa37e530 authored by Qianqian Fang's avatar Qianqian Fang
Browse files
parent 288a98fb
No related branches found
No related tags found
No related merge requests found
......@@ -143,10 +143,10 @@ end
% save to a file if FileName is set, suggested by Patrick Rapin
if(~isempty(jsonopt('FileName','',opt)))
if(jsonopt('SaveBinary',0,opt)==1)
fid = fopen(opt.FileName, 'wb');
fid = fopen(opt.filename, 'wb');
fwrite(fid,json);
else
fid = fopen(opt.FileName, 'wt');
fid = fopen(opt.filename, 'wt');
fwrite(fid,json,'char');
end
fclose(fid);
......
......@@ -117,7 +117,7 @@ end
% save to a file if FileName is set, suggested by Patrick Rapin
if(~isempty(jsonopt('FileName','',opt)))
fid = fopen(opt.FileName, 'wb');
fid = fopen(opt.filename, 'wb');
fwrite(fid,json);
fclose(fid);
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment