How to call function in matlab appdesigner under parforloop
Show older comments
I can not call function under parforloop in matlab appdesigner. It's showing me the following error: Functionality not supported with figures created with the uifigure function. Here is my code
function func1(app)
disp(strcat('Function 1----',datestr(now)));
pause(2);
disp(strcat('Function 1----',datestr(now)));
end
function func2(app)
disp(strcat('Function 2----',datestr(now)));
pause(2);
disp(strcat('Function 2----',datestr(now)));
end
function StartAutomationButtonPushed(app, event)
parfor i = 1:2
if i == 1
func1(app);
else
func2(app);
end
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!