Post by Nathan Orloffh = msgbox('This could be a minute. Patience, grasshopper...','Importing Images','help');
child = get(h,'Children');
delete(child(3))
The correct is child(1).
Full function:
function h = MessageBox(message,title,messageType,hideOk)
% Show message box
% Source: https://www.mathworks.com/matlabcentral/newsreader/view_thread/117288
if ~exist('messageType','var')
messageType = 'help';
end
if ~exist('hideOk','var')
hideOk = 1;
end
h = msgbox(message,title,messageType);
child = get(h,'Children');
if hideOk
delete(child(1)); % Removes ok button
drawnow;
end
end