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
Name Size Bytes Class Attributes Row1_1 1x9 18 char Row1_2 1x6 12 char Row1_3 1x1 8 double

回答 (1 件)

chicken vector
chicken vector 2023 年 5 月 12 日
Are you looking for something like this?

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by