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

 Accepted Answer

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

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!