When you want to change the enable of several UIs, You can use this function. #Function %// how to call function TargetUIs = [app.TextArea, app.EditField, app.Label]; EnablChanger('off', TargetUIs); EnablChanger('on', TargetUIs); %// Below is the function function EnablChanger(Task, TargetUIs); CountList = length(TargetUIs); for i = 1 : CountList if (strcmp(Task, 'on')) TargetUIs(i).Enable = 'on..