% Name : % GT Number : % Lab : Lab 4 - lab4_script % Course : cs1321 % Instructor : % Lecture Time : % % This script will demonstrate some basic matrix & plotting operations. % Then it will plot a most important plot of some information gathered % during recent swallow testing. % % Clear out any old graphs which may cause problems [this is done % for you]. clf reset; % Here you should create the matrix a (this is the same matrix a % that is shown in the Matrices section on the lab page). a= % Now do the same for the b matrix. b = % Now create a vector c which contains the numbers 1->42, use the % colon (:) function to do this the easy way. c = % Now use the scalor divide operator (./) to make a vector, c_inv, % which takes the inverse of each number in the matrix c... % % Example: IFF c = [1 2 3], then c_inv = [1/1 1/2 1/3] which will % show up as c_inv = [1.0000 0.5000 0.3333] in MATLAB c_inv = % Now we'll plot c vs c_inv [note: this is done for you]. % If you did the above correctly, then you will see a graph % which looks just like the graph A shown on the "check % your answers page". plot(c, c_inv); % Now let's make the script pause for a second so we can take a % good look at the graph. [This is also done for you.] disp('Press enter to contiue'); pause; % ------------------------------------------------------------ % Now we're going to plot a graph just like that from the "Graphing % and Plotting" section of the lab. However this time you will use % the data gathered in a different experiment. The data to use is as % follows: % ALTITUDE & VELOCITY OF AN UNLADEN SWALLOW % Time (s) | Altitude (ft) | Velocity (ft/s) % 0 | 0 | 0 % 6 | 1 | 3 % 8 | 5 | 15 % 132 | 110 | 33 % 512 | 235 | 32 % 531 | 237 | 33 % Create the Time, Altitude & Velocity vectors. % Now plot the *two* graphs with titles and labels. You will need % to use the subplot function (shown on the lab page). If you are % unsure as to how your plot should look, check out the "check your % answers page." % If you did the above correctly, then you will see a graph % which looks just like the graph B shown on the "check % your answers page".