set data into UITABLE

조회 수: 7 (최근 30일)
sermet
sermet 2013년 11월 11일
답변: Walter Roberson 2013년 11월 11일
%I have a n*m matrix which all elements strings
num1=[1;2;3] %points id
num2=[30.45;32.55;33.85] %points latitudes
num3=[40.55;41.22;43.62] %points longitudes
num=[num1 num2 num3] %points id, latitude longitude
num=num2str(num)
set(handles.listbox1, 'String', num) %to write into the listbox in the GUI
% How can I write these data into UITABLE in GUI like as I write into listbox above?

채택된 답변

Walter Roberson
Walter Roberson 2013년 11월 11일
Before converting with num2str(), use
num_as_cell = num2cell(num);
and then
set(Uitable_Handle_Goes_Here, 'Data', num_as_cell)

추가 답변 (1개)

ES
ES 2013년 11월 11일
편집: ES 2013년 11월 11일
set(handles.uitable1,'Data',num)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by