App designer auto update table data
16 次查看(过去 30 天)
显示 更早的评论
How can i update table data when i turn on the switch?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1240687/image.png)
0 个评论
回答(1 个)
VBBV
2022-12-22
if strcmp(app.SlidecontrolSwitch,'on')
clear Q1 Q2 Q3 Q4 % clear old values
Q1 = ...
Q2 = ...
Q3 = ...
Q4 = ...
end
2 个评论
VBBV
2022-12-23
编辑:VBBV
2022-12-23
Put all the required code statements inside the if-condition as below
if strcmp(app.SlidecontrolSwitch,'on')
clear Q1 Q2 Q3 Q4 % clear old values
Q1 = app.Q1Slider.Value
Q2 = app.Q1Slider.Value
Q3 = app.Q1Slider.Value
Q4 = app.Q1Slider.Value
Transfer = ... % matrix for expression
app.UITable1.Data = Transfer
Jakobien = ... % matrix for expression
app.UITable2.Data = Jakobien
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!