altmany / export_fig

A MATLAB toolbox for exporting publication quality figures
BSD 3-Clause "New" or "Revised" License
1.28k stars 368 forks source link

Error parsing regexprep: Brace indexing is not supported for variables of this type. #338

Closed samsrabin closed 3 years ago

samsrabin commented 3 years ago

Warning thrown: "Error parsing regexprep: Brace indexing is not supported for variables of this type."

Originates at line 578 in print2eps.m. I did not provide a -regexprep argument, so export_options.regexprep is empty, leading to this error (caught and re-thrown as warning) when trying to access export_options.regexprep{1}.

Uncommenting the end of the conditional at line 576 resolves the issue.

MATLAB R2020a, export_fig v3.15.

altmany commented 3 years ago

@samsrabin thanks - I have no idea why that part of the conditional was commented-out in the first place, it makes little sense... Anyway, it's fixed now, thanks again :-)