フィルターのクリア

share/load data (mat-file) AppDesigner

4 ビュー (過去 30 日間)
dario cecchetti
dario cecchetti 2018 年 5 月 12 日
コメント済み: Ameer Hamza 2018 年 5 月 13 日
Hy everybody, I would share soma variable from mat-file (workspace_invaso.mat) in AppDesigner, but I can't do it. I don't want to load the mat-file in every callback function. Best regard, Dario
% code
classdef Volume_invaso_1 < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
UIFigure matlab.ui.Figure
UITable matlab.ui.control.Table
VOLUMEUTILEDINVASOLabel matlab.ui.control.Label
CapacitTextAreaLabel matlab.ui.control.Label
CapacityTextArea matlab.ui.control.TextArea
Button_Filo_Teso matlab.ui.control.Button
Button_Rippl matlab.ui.control.Button
Button_Peaks matlab.ui.control.Button
end
properties (Access = private)
load workspace_invaso.mat % Share variables
end
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
load workspace_invaso.mat;
app.UITable.Data=[Q_serie.annuale,Ve,Qu,Vu,Vc];
app.UITable.RowName={'Gennaio';'Febbraio';'Marzo';'Aprile';'Maggio';...
'Giugno';'Luglio';'Agosto';'Settembre';'Ottobre';'Novembre';'Dicembre'};
end
  1 件のコメント
dario cecchetti
dario cecchetti 2018 年 5 月 12 日
Very clear! Great! Thanks!

サインインしてコメントする。

採用された回答

Ameer Hamza
Ameer Hamza 2018 年 5 月 12 日
The startupFcn just execute once, at the start of the app, so you are loading the file just once, not at every callback.
  4 件のコメント
dario cecchetti
dario cecchetti 2018 年 5 月 12 日
Great! Thanks for all!!!
Ameer Hamza
Ameer Hamza 2018 年 5 月 13 日
You are welcome.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by