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 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

chicken vector
chicken vector il 12 Mag 2023
Are you looking for something like this?

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Tag

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by