answerTotalNoSpaces=inputdlg('Enter','Total Number Of Spaces');
totalNoSpaces=str2double(answerTotalNoSpaces{1});
SpaceType=(totalNoSpaces);
FloorNumber=(totalNoSpaces);
SpaceX=(totalNoSpaces);
SpaceY=(totalNoSpaces);
SpaceZ=(totalNoSpaces);
SpaceCoordX=(totalNoSpaces);
SpaceCoordY=(totalNoSpaces);
for i=1:1:totalNoSpaces
list={'Residential','Office','Education','Toilet','Storage'};
[selectionindex,ok]=listdlg('ListString',list);
if ok
SpaceType(i)=list(selectionindex);
end
answerFloorNumber=inputdlg('Enter','Floor Number');
FloorNumber(i)=str2double(answerFloorNumber{1});
answerSpaceX=inputdlg('Enter','Space X distance (m)');
SpaceX(i)=str2double(answerSpaceX{1});
answerSpaceY=inputdlg('Enter','Space Y distance (m)');
SpaceY(i)=str2double(answerSpaceY{1});
answerSpaceZ=inputdlg('Enter','Space Z distance (m)');
SpaceZ(i)=str2double(answerSpaceZ{1});
answerCoordX=inputdlg('Enter','Space X coord');
SpaceCoordX(i)=str2double(answerCoordX{1});
answerCoordY=inputdlg('Enter','Space Y coord');
SpaceCoordY(i)=str2double(answerCoordY{1});
end
buildingTable=table(SpaceType,FloorNumber,SpaceX,SpaceY,SpaceZ,SpaceCoordX,SpaceCoordY);