Hi,
This is a nice tool; I had one of my own but never nearly as extensive as this one. Unfortunately, there seems to be an issue with variable names that are also function names. I couldn't solve it, maybe you could...
If, for example, you write
S = struct('sigma',0.25);
v2struct(S);
whos
sigma
on the command prompt, you have that sigma is 0.25. However, if you wrap this into function test.m (not a script, a function) then you have this oddity:
>> test
Name Size Bytes Class Attributes
S 1x1 184 struct
sigma 1x1 8 double
??? Error using ==> sigma at 83
Not enough input arguments.
Error in ==> test at 5
sigma
where Matlab tries to call a function called sigma!?
A minor thing though... Under my installation, the private/ghostscript.m function had a minor bug that resulted in the whole function being whipped out and replaced by solely the 'gs' path. Just in case it happens to anyone else, here is a simple patch:
Please don't get it the wrong way :)
I'll create a script of my own combining it with 'fig' for instance.
I only meant well, your script is great as it is ;)
Comment only
10 May 2013
export_fig
Exports figures nicely to a number of vector & bitmap formats.
arnold: The goal of export_fig is to export what is on screen. By all means write a script that makes your figure the right size, have the correct line widths, fonts, etc., then calls export_fig with the correct resolution. Or use one of the several submissions that already do this.
Comment only
10 May 2013
export_fig
Exports figures nicely to a number of vector & bitmap formats.
Hi,
I've got another proposition: rescale figure
To make 'export_fig' even more useful for publications it'd be awesome if you added the possibility to rescale the figure to a certain size.
example:
export_fig 'test.png' -w5 -h4 -r300
This would set the width to 5" and the height to 4" and then export at 300dpi.
For us non-americans it'd be great if you added size in metric units [cm] as well.
export_fig 'test.png' -wm5 -hm4 -r300
would then set the width to 5cm etc.
Comment only