Filter löschen
Filter löschen

How can I save the content of an axes using gui?

4 Ansichten (letzte 30 Tage)
Sindia Casado
Sindia Casado am 16 Okt. 2012
Hello everyone,
I am trying to save a graph (previously I made the plot command) that it is in a axes , using gui. My code is the following:
guardar=getimage(handles.axes11); if guardar==0 return end if isempty(guardar) return end % guardar en formatos formatos={'*.jpg','JPEG (*.jpg)';'*.png','PNG (*.png)';... '*.tif','TIFF (*.tif)';'*.gif','GIF (*.gif)'}; [nombre,ruta]=uiputfile(formatos,'GUARDAR IMAGEN'); if nombre==0 return end fname=fullfile(ruta,nombre); imwrite(guardar,fname);
When I am going to run this code I get the next message:
Undefined function 'getimage' for input arguments of type 'double'.
I don´t know what I am doing wrong. Maybe my code is not the best one. Could anyone help me with a different idea ? Where can be the mistake?
Thanks in advanced Sindia

Akzeptierte Antwort

Sachin Ganjare
Sachin Ganjare am 16 Okt. 2012
You get this error when the function isn't on the MATLAB path or in pwd.
Probabaly 'getimage' comes with image processing toolbox & this toolbox is not avaialbale in your licese.
Check with 'ver' command whether toolbox is present.
Hope it helps!!!

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by