matlab pass recent loaded value to next gui
1 view (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Sean de Wolski
on 28 Feb 2012
leaf is destroyed at the end of the function. To pass it to the next function, see the FAQ:
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!