Question: 1.5 More advanced MATLAB script using VECTORIZATION and 3-D PLOTTING A systems-engineering assessment of a doll-head making machine has determined that the daily produc>on of

1.5 More advanced MATLAB script using VECTORIZATION and 3-D PLOTTING A systems-engineering assessment of a doll-head making machine has determined that the daily produc>on of heads can be modeled by the equa>on where P is the number of doll heads produced on day t. t is the day of opera>on (star>ng at day t = 1 when its first turned on), s is the machine seXng (percent of max opera>on, between 0 = off and 100 = max opera>on), Assume P can be any number 0. Even frac>ons are OK. But if you ever calculate P < 0 (nega>ve produc>on??) just assume P = 0 that day. 7 pts HW1B (1.3 1.5) Due by Beginning of Class, Friday January 19 P =10 s s 2 106 e s 30 (t 1)2 Aside: Just to make sure you understand the equa>on, first check that you agree with all the following: If s = 0 (0% max opera>on) then P = 0 for all >me t (i.e. no dolls are ever made). This makes sense because the machine is always off! At t = 1 (the first day you start opera>ng the machine) P = 10 s, so the machine can produce between 0 to 1000 heads that first day depending on the machine se[ng from s = 0 to 100. For a fixed se[ng s, as >me goes on, the daily rate of head produc>on P(t) drops, presumably because the machine gets old and doesnt operate as efficiently. In fact, for higher se[ngs (as s goes to 100) the machine overheats faster and the rate of efficiency drop-off can get so big that P drops to 0! (See my plot of P(t) at right for s = 100) Once P hits 0 or goes nega>ve, assume the machine is now broken, and can no longer product doll heads for later >mes. The plot at right is of P(t) for s = 100, and shows the trends I described above: See P starts at 1000 dolls/day at t = 1, then drops off rapidly over >me, finally breaking and producing no more heads (P = 0) for t 846. 0 200 400 600 800 1000 0 500 1000 Create a MATLAB script called DOLLHEAD.m that does all the following: a) Creates a column vector s of all se[ngs from 0 to 100, skipping by 5, so s = . b) Creates a vector t of days from 1 to 1200, so t = [1 2 3 1200]. c) Uses a single, vectorized equa>on to create a matrix of values P for all the s and t values in the vectors above. You can NOT use any for or while loops to do this calcula>on! The equa>on must be cleverly vectorized to calculate P with a single equa>on using the en>re s and t vectors at once. d) Overrides all values of P < 0 to be equal to zero (i.e. no produc>on when the machine is broken). Now you should have a [21 x 120] matrix for P, where each row represents the daily produc>on of heads for one par>cular se[ng. You should double-check that the row corresponding to s = 100 (max opera>on) has exactly the shape of the plot I show above before moving on. (If you choose to con>nue this adventure, please go to next page ) 0 5 10 ! 100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!