matlab pass recent loaded value to next gui

I'm new to matlab and i make two GUI using the guide, i get an error on my second GUI that variable is undefined. here is the code from first gui:
{
function load_image_Callback(hObject, eventdata, handles)
[Filename, Pathname] = uigetfile('*.*', 'Select leaf image');
% Data input; fetches for the image file.
leaf = fullfile(Pathname, Filename);
[y,x,z]=size(leaf);
if x>800
leaf=imresize(leaf,0.5);
end
}
the error says that 'leaf' is undefined. how can i fix this ? please help. thanks

 Réponse acceptée

Sean de Wolski
Sean de Wolski le 28 Fév 2012

0 votes

leaf is destroyed at the end of the function. To pass it to the next function, see the FAQ:

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by