0

I'm working with MATLAB GUI, and I'm stuck to show the table/result of the script.

Well, I have this code:

[g,c] = kmeans(cobat,3,'dist','SqEuclidean'); %cobat is the file of mine
y = [cobat, g]

If I run y=[cobat,g] in command window, it will appear the rows and columns of cobat file, + cluster index (g). But when I run it on GUI, then I put this code, it doesn't show anything. So, I need something like 'figure' tab to show up the result of this script. It should be appeared as a table. I know that there is table on GUI, but I want it to show in figure tab (it will be better if the figure tab shown as table, too). Or simply how to show the value of variable in Figure tab? Anyone can help me what I should do to make this happen?

Can you please show me the sample script to do this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Alvi Syahrin
  • 373
  • 3
  • 7
  • 16

1 Answers1

0

One solution of your problem is to display your data in the edit text (if you only ask how to display value of your variable in GUI, by using the edit text reference). Second one is to display with the help of graph, like bar chart, if you are comparing two values of a table. I had the same issue and had to ultimately resolve it then by using graph and I honestly searched a lot on this topic!!!

Syra
  • 41
  • 5