Is properties like global variables?

Hi! :)
Is properties in matlab app designer like global variables in matlab program? I am a little confused..

Antworten (2)

Matt J
Matt J am 21 Feb. 2023
Bearbeitet: Matt J am 21 Feb. 2023

0 Stimmen

No, they are not like global variables. They are attached to the app object used by the callbacks and must be accessed similarly to structs:
app.property1=...
app.property2=...

1 Kommentar

Walter Roberson
Walter Roberson am 21 Feb. 2023
Also the object class can be designed to restrict read or write access (though I am not sure how much support App Designer provides for this)

Melden Sie sich an, um zu kommentieren.

chrisw23
chrisw23 am 22 Feb. 2023

0 Stimmen

see the first line of a mlapp file
classdef app1 < matlab.apps.AppBase
Each AppDesigner app is nothing more than a class definition following the same rules.

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 21 Feb. 2023

Beantwortet:

am 22 Feb. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by