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 Center および File ExchangeNumeric Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by