How can I read the value Speicher1 with a second button disp(Speicher1). Speicher is a class.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
% Button pushed function: WeiterButton_2
function button2(app, event)
% Typ, Betrieb, Ak; Einheit; nLaden; nEntladen; Fuel; SOH;
Speicher1=Speicher(app.Typ1DropDown.Value , 'on');
end
function DateinameEditField_2ValueChanged(app, event)
disp(Speicher1)
end
0 Kommentare
Antworten (1)
Geoff Hayes
am 27 Mai 2019
Mario - can't you just calculate Speicher1 in your other function?
function DateinameEditField_2ValueChanged(app, event)
Speicher1 = Speicher(app.Typ1DropDown.Value , 'on');
disp(Speicher1)
end
Why do you need to calculate it in the button2 function if you don't seem to use the result anywhere but in the DateinameEditFeild_2ValueChanged callback?
2 Kommentare
Geoff Hayes
am 28 Mai 2019
Mario's answer moved here
Thank you for yor help. i need it later for different calculations. like a app.Variable.
Geoff Hayes
am 28 Mai 2019
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!