필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Having trouble inserting data into my GUI table.

조회 수: 1 (최근 30일)
Surafel Taddesse
Surafel Taddesse 2017년 12월 7일
마감: MATLAB Answer Bot 2021년 8월 20일
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{:});

답변 (1개)

KL
KL 2017년 12월 7일
편집: KL 2017년 12월 7일
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);

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by