0

I'm working with k-means in MATLAB GUI. I want to show the iterations of the process on the GUI when they press the push button. But I am not able to do this. I only can do this by command window--and all of us can.

Here is the snippet of the iteration process:

c(i,:)=mean(data(find(g==i),:),1)

It can only be shown on command window. I added this line to show the iteration process on GUI, but it's not working:

CCC = mean(data(find(g==i),:),1);
t=uitable;
set(t,'Data',CCC)

What shall I do to show the iteration on GUI?

I appreciate all the answers. Thank you.

Alvi Syahrin
  • 373
  • 3
  • 7
  • 16

1 Answers1

1

Try adding the drawnowcommand after you set the data in t. See the documentation: http://www.mathworks.com/help/matlab/ref/drawnow.html

user2482876
  • 288
  • 4
  • 15