Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Having trouble inserting data into my GUI table.

1 visualizzazione (ultimi 30 giorni)
Surafel Taddesse
Surafel Taddesse il 7 Dic 2017
Chiuso: MATLAB Answer Bot il 20 Ago 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{:});

Risposte (1)

KL
KL il 7 Dic 2017
Modificato: KL il 7 Dic 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);

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by