Can you make an empty table that allows the user (through an app) to graphically click on a cell and input either a string or a double?
조회 수: 3 (최근 30일)
이전 댓글 표시
I am trying to make a uitable that will enable users to click on a cell and input either a char or a double value.
I created a table which allows me to programatically enter different types of data in each table element and then verify that the data type is what it should be. This shows that I can easily make a table with different variable classes, but I can NOT figure out how to do this using a uitable that a user can interact with and click on any cell within the table and input either a char or double.
After reading several other posts it seems like there is no offical way to make an "empty" table, but that is in essence what i need. A table that is a certain size and allows the user to define what class of data they input to each cell. Or is this simply not possible with matlab and I should consider different methods.
%% Create Figure
%f=figure;
%% Create uitable
g=uitable();
% Creating First Row
g.Data{1,1}='imsharpen';
g.Data{1,2}='Amount';
g.Data{1,3}=1;
g.Data{1,4}='Radius';
g.Data{1,5}=20;
% Creating First Row
g.Data{2,1}='imsharpen';
g.Data{2,2}='Amount';
g.Data{2,3}=1.5;
g.Data{2,4}='Threshold';
g.Data{2,5}=0.01;
%% Checking variable types
Row1_1=g.Data{1,1};
Row1_2=g.Data{1,2};
Row1_3=g.Data{1,3};
whos Row1_1 Row1_2 Row1_3
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!