Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Having trouble inserting data into my GUI table.

1 vue (au cours des 30 derniers jours)
Surafel Taddesse
Surafel Taddesse le 7 Déc 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
My table originally is a 5x5 zeros. I want to input the random digits into the table but I get this error. "Requires character array or cell array of character vectors as inputs."
values = randi(10,5) valuesAsCell = num2cell(values) set(handles.Input_matrix,'data',valuesAsCell{:});

Réponses (1)

KL
KL le 7 Déc 2017
Modifié(e) : KL le 7 Déc 2017
It's simply,
f = figure;
t = uitable(f);
t.Data = randi(10,5);
and if you're using appdesigner,
app.UITable.Data = randi(10,5);

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by