MATLAB Answers

Matlab AD components creation and performance

3 views (last 30 days)
Robin L.
Robin L. on 7 May 2019
Edited: Robin L. on 7 May 2019
Hello the community !
I come today with a new question about Matlab App Designer, and especially about the components creation.
Let's build a very simple app, composed of the button.
Using the graphical tool, the generated code is :
% Create DirebonjourButton
app.DirebonjourButton = uibutton(app.UIFigure, 'push');
app.DirebonjourButton.ButtonPushedFcn = createCallbackFcn(app, @DirebonjourButtonPushed, true);
app.DirebonjourButton.Position = [60 395 100 36];
app.DirebonjourButton.Text = 'Dire bonjour';
I copy all the code of the .mlapp file and paste it inside a new blank .m file.
Then, replace the autogenerated code below by :
% Create DirebonjourButton
app.DirebonjourButton = uibutton(app.UIFigure, 'push', 'ButtonPushedFcn', createCallbackFcn(app, @DirebonjourButtonPushed, true), 'Position', [60 395 100 36], 'Text', 'Dire bonjour');
Results in a lower code file, BUT do I get in terms of performance ? Or on the contrary is it worse ?
Waiting for your opinion (my app contains arround 200 components and takes more than 20 secondes to be ready after starting up !)


Sign in to comment.

Answers (0)




Community Treasure Hunt

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

Start Hunting!