tries to access the toolbox command instead of the 'new' built-in backend function for saving figures.
Since the function signatures differ, this results in the following error
Error using savefig (line 128)
No file name specified.
Error in saveasfig (line 7)
savefig(h, name);
Error in saveas (line 141)
feval( ['saveas' format], h, name )
Error in evaluate_template_stage_1_debug (line 389)
saveas(myPlot, 'filename', 'fig');
I think this is a compatibility issue, since everything works as expected on 2013a.
A temporary workaround for me is now to rename the savefig function in the toolbox to get rid of the shadowing, because as far as I know I am not using it from other toolbox functions. However, this would inevitably break some other functions in the toolbox, that depend on savefig.
Maybe renaming it in the toolbox and fixing the internal function calls is a permanent solution to that problem.
Hi,
as of MATLAB 2013b savefig was introduced as a built-in function. Now when adding the toolbox to the path, the function defined in
shadows the MATLAB builtin function defined in
such that the standard MATLAB command
tries to access the toolbox command instead of the 'new' built-in backend function for saving figures. Since the function signatures differ, this results in the following error
I think this is a compatibility issue, since everything works as expected on 2013a. A temporary workaround for me is now to rename the
savefig
function in the toolbox to get rid of the shadowing, because as far as I know I am not using it from other toolbox functions. However, this would inevitably break some other functions in the toolbox, that depend onsavefig
.Maybe renaming it in the toolbox and fixing the internal function calls is a permanent solution to that problem.
Cheers, Phil