nman84
nman84

Reputation: 435

clearing the contents of uitable in matlab gui

Is there a way to clear the contents of the uitable in matlab gui like you can do

cla(handles.axes1) % for clearing axes.

I dont want to delete uitable, just need the data to be cleared.

Upvotes: 2

Views: 6613

Answers (1)

macduff
macduff

Reputation: 4685

You can remove the data:

t = uitable; % or however you initialize it
set(t,'Data',[])

or just make it invisible, the data and such are still on the table

set(t,'Visible','off')

You likely want the first, but I thought I would offer both.

Upvotes: 5

Related Questions