Add new rows to Table (GUI uitable)

조회 수: 38 (최근 30일)
BSantos
BSantos 2013년 7월 4일
Hey guys! After some research, I still can't find the solution for my problem. I have a table that it's filled with info from user, when a button is pushed. The idea is that once new information is inserted and the "add" button pushed, a new row is created on the table and the info copied there, without deleting/overwrite previous data.
Does any of you have a suggestion?? Your help is very much appreciated!
Thanks! BS.
  댓글 수: 4
Jan
Jan 2013년 7월 4일
The linked thread is totally unrelated to the topic of uitable. Therefore we cannot guess, how you try to write to the 2nd row. Please post your code instead of hoping, that we have crystal balls ;-)
BSantos
BSantos 2013년 7월 4일
Crystal balls would be nice every now and then... ;) Thanks for the support anyway. With Tom's answer I could solve my problem!
Cheers, BS.

댓글을 달려면 로그인하십시오.

채택된 답변

Tom
Tom 2013년 7월 4일
%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)
  댓글 수: 1
BSantos
BSantos 2013년 7월 4일
Tom, Thanks a LOT!!! This just solved my problem!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by