Accessing imread image in other functiosn in same file

I am fairly new to matlab. I have read an image using
problemImage = imread("filename")
On my function, I want to access the same file I used in another function. What is the best option, do I have to declare some sort of global variable. If so how?
function selectChannel_Callback(hObject, eventdata, handles)
% Want to access the same image file.
end

3 commentaires

Rik
Rik le 20 Sep 2018
If you want to use data in a callback in a GUI, you can use the guidata function to store and retrieve data.
thanks for that, how can i accept this answer ?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Images dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by