Two different moulds grow at different rates. The mass of the first mould (in grams) is well described by the function m1(t) = 20 log(t + 2) where the time t is measured in hours. The second mould grows according to m2(t) = t 2 . Question 3 continues on the next page.
(a) Write a MATLAB program using array operations to generate a table (with headings) of the amount of each mould each hour starting at time t = 0 up to a maximum time entered by the user. Run your program with the maximum time set to 10.
(b) Write a separate MATLAB program using the plot command to graph the amount of the two moulds on the same axes for 0 ≤ t ≤ 10. Make sure you label your axes.
(c) Use the graphical output from your MATLAB program in part (b) and the ginput command to estimate the time when the amounts of the moulds are equal.
Comments
Leave a comment