creating a simple table and edit it.

조회 수: 1 (최근 30일)
Del
Del 2013년 1월 24일
What is the best way to create a simple table in matlab? I read somewhere that you could use
Mytable = ModelAdvisor.Table(2,3);
But what this gives me is just:
Mytable =
ModelAdvisor.Table
I want to be able to open it, edit it and put numbers and text in the table.
How does it work?

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 24일
편집: Azzi Abdelmalek 2013년 1월 24일
Use uitable
doc uitable
  댓글 수: 2
Del
Del 2013년 1월 25일
Thanks, However, I would like to have both numbers and characters in my table, unfortunately, I can't figure out how to do it.
For example I would like to have a table that looks like this:
4 Yes 0.997
1 Yes 7.998
7 No 5.308
Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 25일
편집: Azzi Abdelmalek 2013년 1월 25일
f = figure('Position',[100 100 400 250]);
dat =[num2cell([1;4;7]) {'yes';'no';'yes'} num2cell([1 ;2;7])]
colname = {'a', 'test', 'b'};
colformat = {'numeric', 'char', 'numeric' }
t=uitable('Units','normalized','Position',[0.1 0.1 0.7 0.8],'Data', dat,...
'RowName',{'1','2','3'}, 'ColumnName',colname,'ColumnFormat', colformat)

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

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by