MATLAB lets me save figures to filenames with parentheses in them, whether I use HGSAVE, SAVEAS, or the "File–>Save…" menu. However, if I try to open the file:
hf = figure;plot(rand(5))hgsave('test().fig')hgsave('test()2.fig')close(hf)open('test().fig')
I receive errors:
??? Error: ";" expected, "." found. Error in ==> D:\Applications\MATLAB6p5\toolbox\matlab\general\open.m On line 66 ==> fullpath = which(name);
Opening the 'test()2.fig' file gives a slightly different error:
open('test()2.fig')
??? Error: ";" expected, "identifier" found. Error in ==> D:\Applications\MATLAB6p5\toolbox\matlab\general\open.m On line 66 ==> fullpath = which(name);
I get the same errors if I open them using the "File–>Open…" menu.
I don't expect this problem. The MATLAB documentation states that I should be able to use non-alphanumeric characters if my operating system supports them. Type the following MATLAB command to see this documentation:
web([docroot '/techdoc/matlab_prog/ch16_pr3.html#60268'])
Best Answer