FUNCTION REFERENCE

matlab.apps.AppBase.registerApp

Register a UIFigure with a matlab.apps.AppBase subclass instance.

Register a UIFigure with a matlab.apps.AppBase subclass instance.

Syntax

registerApp(app, fig)

Links app and fig so closing or deleting fig deletes app, deleting app deletes fig, and a zero-output constructor keeps app alive while fig stays open.

Example

d = tempname; mkdir(d); addpath(d); writelines(["classdef RegMHelpApp < matlab.apps.AppBase","properties","UIFigure matlab.ui.Figure","end","methods","function app = RegMHelpApp","app.UIFigure = uifigure('Visible','off');","registerApp(app, app.UIFigure);","end","end","end"], fullfile(d, "RegMHelpApp.m")); a = RegMHelpApp; close(a.UIFigure); ~isvalid(a); rmpath(d); rmdir(d, 's')

Differences from MATLAB: Only registers uifigure handles; classic figure handles and RunningAppInstance tracking are not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.