FUNCTION REFERENCE
matlab.apps.AppBase.runStartupFcn
Execute the startup function of a matlab.apps.AppBase subclass instance.
Execute the startup function of a matlab.apps.AppBase subclass instance.
Syntax
runStartupFcn(app, @startupFcn)Syntax
runStartupFcn(app, @(app)startupFcn(app, varargin{:}))Invokes the startup function with access to private methods of app's class, deleting app if the startup function errors.
Example
d = tempname; mkdir(d); addpath(d); writelines(["classdef StartMHelpApp < matlab.apps.AppBase","properties","UIFigure matlab.ui.Figure","Ready logical = false","end","methods (Access = private)","function startupFcn(app)","app.Ready = true;","end","end","methods","function app = StartMHelpApp","app.UIFigure = uifigure('Visible','off');","registerApp(app, app.UIFigure);","runStartupFcn(app, @startupFcn);","end","end","end"], fullfile(d, "StartMHelpApp.m")); a = StartMHelpApp; a.Ready; delete(a); rmpath(d); rmdir(d, 's')These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.