Using listdlg with tables

조회 수: 3 (최근 30일)
Jack Smillie
Jack Smillie 2019년 4월 28일
I don't understand how to get the output of listdlg to be submitted to my table. I'm not sure what [index,tf] is in the listdlg documentation so I assumed it could be replaced with a variable name (SpaceType in this case).
buildingTable=table(SpaceType,FloorNumber,SpaceX,SpaceY,SpaceZ,SpaceCoordX,SpaceCoordY);
answerTotalNoSpaces=inputdlg('Enter','Total Number Of Spaces');
totalNoSpaces=str2double(answerTotalNoSpaces{1});
for i=1:1:totalNoSpaces
list = {'Residential','Office','Education','Toilet','Storage'};
SpaceType = listdlg('ListString',list);
answerSpace=inputdlg('Enter','Number of Floors');
FloorNumber=str2double(answerSpace{1});
answerSpaceX=inputdlg('Enter','Number of Floors');
SpaceX=str2double(answerSpaceX{1});
answerSpaceY=inputdlg('Enter','Number of Floors');
SpaceY=str2double(answerSpaceY{1});
answerSpaceZ=inputdlg('Enter','Number of Floors');
SpaceZ=str2double(answerSpaceZ{1});
answerCoordX=inputdlg('Enter','Number of Floors');
SpaceCoordX=str2double(answerCoordX{1});
answerCoordY=inputdlg('Enter','Number of Floors');
SpaceCoordY=str2double(answerCoordY{1});
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by