Add new row to UITable

11 views (last 30 days)
Marcel
Marcel on 15 Nov 2022
Hi i've done some research and was curious if there was a more "effecient" way on how to add new rows with data to a UITable in R2021a using the App-Designer. I got it to work but to me it feels like it would take a lot of afford to keep reading all the existing data and then add the new one to it.
%hTable: handle to the table
%newRow : the row of data you want to add to the table.
oldData = get(hTable,'Data');
newData = [oldData; newRow];
set(hTable,'Data',newData)
This for sure works just fine but im going to display quite a lot of data in there overtime. Right now i can display about 150 rows, which is kinda fine when thinking about it being used as a log, but is still important to view.
I approach to this right now is to append the lines to a file and then clear the UITable from time to time so it wont start lagging. Like i said its all working fine for me but im curious if there is something better to this

Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!