Microcontroller › 8051 › CODE FOR CAR PARKING SYSTEM › car parking in mat lab
December 25, 2016 at 8:58 pm
#14294
Guest
plese can any one help me with this code
A building of 10 floors is used for parking cars. The area of each floor can be used for parking 100 cars. An automatic parking system is used to detect which parking slot is free at each moment. So, the user will check at first which locations are free and select one of them. Then, send a message to the driver informing him about the selected location and a signal to open the gate. Assume that the building spaces as elements of a matrix, write a Matlab program for this parking system. Draw the required flow chart.
i=1:10; j=1:100;
isempty (i);
isempty (j);
Floor=input('which floor do you want to parck your car:');
Location=input ('which location do you want to park:');
for i=Floor;
for j=Location;
if ~isempty(i&&j)
disp ('this floor is available')
disp ('plese go to your location')
disp(i)
else isempty(i&&j)
disp ('this floor is not available')
disp ('sorry we will find another car park for you')
disp(i)
end
end
end