필터 지우기
필터 지우기

How can a create uitable with dynamic columns?

조회 수: 2 (최근 30일)
Febin Benjamin
Febin Benjamin 2014년 7월 8일
댓글: Jan 2014년 7월 12일
I want to allow user to enter the total number of columns and then when the user will click 'submit' button, below I will get a table with user-specified number of columns. Can this be achieved in Matlab?
  댓글 수: 1
Jan
Jan 2014년 7월 12일
I've deleted the duplicate question. Please post question only once.

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

답변 (2개)

Vijay Nahar
Vijay Nahar 2014년 7월 8일
You could create a GUI using GUIDE. Use an edit box for the user to input a number for the rows and another edit box for the columns. Then use a pushbutton to extract the information and set up the table. The numbers can be extracted from the edit boxes by using:
row=get(handles.edit1,'string');
column=get(handles.edit2,'string');
The table can then be set using uitable. Check matlab help for correct syntax for uitable.
This code must be within the pushbutton callback, so it is activated when the pushbutton is pressed.

Joseph Cheng
Joseph Cheng 2014년 7월 8일
I would check out the function uitable()

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by