I have a MATLAB Guide project. I have a mixture of regular functions and callbacks in the same .m file.
I call a function from within a callback and as that functions runs through a for loop I wish for a string box to be updated. Here is an example:
From a callback (extract shown) I call this function:
[color] = get_color(images, handles);
set(handles.ProcessImage, 'string', 'Processing Complete');
The get_color function is located within the same .m file
function [color_corrections] = get_color(images, handles)
[n, ~, ~, ~] = size(images); % Find the number of images
for imgIdx=1:n % For each image
set(handles.ProcessImage, 'String', 'Processing Image #');
end
end
The problem is that handles.ProcessImage does not get updated during the for loop, yet it gets written to 'Processing Complete' when it returns from the function.
Any thoughts?
Thanks, TommyMac