- Callbacks in app designer: https://www.mathworks.com/help/matlab/creating_guis/write-callbacks-for-gui-in-app-designer.html
- Properties in app designer: https://www.mathworks.com/help/matlab/creating_guis/share-data-across-callbacks-in-app-designer.html
Save table row into a vector in appdesigner
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello,
I have 4 rows in a table which I want to save each row in an vector everytime I change a value in any cell. How can I do that?
So far, I have this but no idea on how to follow.
댓글 수: 0
답변 (1개)
Hornett
2024년 9월 6일
I understand that you want to push data from your table rows to a vector whenever the value changes in table.
I want to inform you that the APP Designer in MATLAB provides callbacks that allow you to call functions based on user actions within the app.
You can refer to the sample code below. It demonstrates how to append data to a vector whenever table values are updated in App Designer.
% Creates a variable that can be used anywhere in app
properties (Access = public)
datavec=[] % Array to store data
end
% Cell edit callback: UITable
function UITableSelectionChanged(app, event)
app.datavec = [app.UITable.Data, app.datavec];
display(app.datavec)
end
Additionally, you can refer to the following documentation for further guidance:
I hope this information resolves your query.
댓글 수: 0
참고 항목
카테고리
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!