In: Mechanical Engineering
Create a structure array that contains the following information fields concerning the road bridges in a town: bridge location, maximum load (tons), year built, year due for maintenance. Then enter the following data into the array:
Array structure:
%You can create this array by typing the following either in interactive mode or in a script
%file and running it.
A(1,1)={\'bridge location\'};
A(1,2)={\'Max.load\'};
A(1,3)={\'year built\'};
A(1,4)={\'due of maintanance\'};
A{2,1} = {\'SmitSt\';\'HopeAve\';\'ClarkSt\';\'NorthRd\'};
A{2,2} = {[80;90;95;100]};
A{2,3} = {[1928;1950;1933;1960]};
A{2,4} = {[2011;2013;2012;2012]};
%Type A at the command line. You will see
%You can use the celldisp function to display the full contents. For example, typing
%celldisp(A)
Array structure:
%You can create this array by typing the following either in interactive mode or in a script