필터 지우기
필터 지우기

Showing the Value of Variable in Figure Tab

조회 수: 2 (최근 30일)
Alvi Syahrin
Alvi Syahrin 2013년 5월 12일
I'm working with MATLAB GUI. And I'm stuck in show the table.
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 coloumns of cobat file, + cluster index (g). But when I run it on GUI, I put this code, and it doesn't show anything. So, I need something like 'figure' tab to show up the result of this script. It shall 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 variable's value in figure tab or whatever like that? Anyone can help me what I should do to make this happen? Can you please show me the sample script to do it?
Thank you.

채택된 답변

Image Analyst
Image Analyst 2013년 5월 12일
Unfortunately, there is no tab control in MATLAB. You can use panels and radio button groups as an inferior alternate. Click on the radio button and set the desired panel visible (which can have any controls, such as a uitable, inside it), and set the other panels invisible.
I know you can "dock" figures in a single window with the "WindowStyle" property, but I forgot how to do that. Perhaps "docking" is what you meant when you said "tabbed" figures.
  댓글 수: 3
Alvi Syahrin
Alvi Syahrin 2013년 5월 12일
Hi, Image Analyst. I changed the title of my question. Still not change the meaning of the post, but I hope I think this is more simple to understand and hope you got another idea how to do this thing.
Image Analyst
Image Analyst 2013년 5월 12일
편집: Image Analyst 2013년 5월 12일
After 3 attempts to fix errors in your code, I gave up. Please post code that will actually run. By the way, I don't have the Stats toolbox so I can't run kmeans(), but others will be able to if they have that toolbox.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by