Is properties like global variables?

2 ビュー (過去 30 日間)
Muazma Ali
Muazma Ali 2023 年 2 月 21 日
回答済み: chrisw23 2023 年 2 月 22 日
Hi! :)
Is properties in matlab app designer like global variables in matlab program? I am a little confused..

回答 (2 件)

Matt J
Matt J 2023 年 2 月 21 日
編集済み: Matt J 2023 年 2 月 21 日
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:
  1 件のコメント
Walter Roberson
Walter Roberson 2023 年 2 月 21 日
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)


chrisw23 2023 年 2 月 22 日
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.


Find more on Develop Apps Using App Designer 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!

Translated by