Portfolio 1 Submission Instructions Please follow the submission instructions carefully. A failure to do so will result in mark deductions. Make sure you attempt all questions in Part A and Part B. 1. Solutions to all questions (including AMS questions) must be presented within a single pdf document. 2. The submitted pdf should include your student number in its same (eg. n#######Portfolio1.pdf) 3. All working should be neatly presented (typed solutions are highly recommended). Code should be simple for your marker to understand (comment your code!). All plots should have a title and a legend when appropriate. 4. Any question starting with (AMS Submission) must also be submitted to AMS for marking. This system allows for up to 30 attempts for each question and will provide immediate feedback. AMS can be accessed via the following link: https://sefams01.qut.edu.au/ MZB126/. 5. Portfolio 1 is due at 11:59pm Friday 17th August and should be submitted through Blackboard. Late submissions will receive a mark of zero. If you make multiple submissions, the most recent on-time submission will be graded. 1 Part A (Based off week 2 Workshop content) Sam, a biological engineer, is modelling the population of bacteria (B) growing on petri dish. Sam observes that the growth over time of the bacteria fits the equation B(t) = Cert 1 + C K e rt 1. (AMS Submission) Write a MATLAB function that accepts four inputs C, r, K and t and outputs bacteria population. The function should work given t is a scalar or a vector. You may assume that all other inputs are scalars. 2. (AMS Submission) By setting r = 1, C = 100 and t = 0 : 20, plot the bacteria growth for K = 1000, K = 3000, and K = 5000. What does K represent? 3. Sam starts with 500 bacteria in his petri dish. Seven days later, the number of cells has doubled. Given that the petri dish can support a maximum of 9000 cells, calculate the values of C, r and K. Plot the solution and comment whether the plot matches Sam’s observations. 4. (AMS Submission) Assume that each time bacteria is grown, Sam records the initial bacteria population, the time it takes for the initial population to double, and the final (maximum) population. Create a function that will tell Sam the values of C, r and K. 2 Part B (Based off week 3 workshop content) An autonomous robot is being designed to step through a simple 2D obstacle course (that is a flat maze). For each step, the robot scans three points: to the left, in front, and to the right. The robot stores the results of the scan in a 1×3 vector (v) where each cell is occupied by either a 0 if no wall is scanned or a 1 if a wall is scanned (See Figure 1 for an example). When there is no wall is in front of the robot, then the robot continues to step forward. When the front of the robot is blocked, then the robot turns to face the direction without a wall present. If the robot could turn left or right, then it chooses a random direction. When the robot reaches a dead end, the robot turns by 180 degrees and steps back the way it came. 1. Write an algorithm that determines whether the input vector,v is in the correct format (must be a 1 × 3 vector containing only ones and zeros). 2. (AMS Submission) Convert the algorithm from question 1 to a MATLAB function. If v is in the correct format, then the code will output a 1, if v is in the incorrect format, then the code will output a 0. The function should accept a single input v. 3. Write an algorithm that determines which direction the robot should step (assuming v is in the correct format). 4. (AMS Submission) Convert the algorithm in question 3 to a MATLAB function. The code should accept a single input v and output a number 1, 2, 3 or 4 for ‘go straight’, ‘turn left’, ‘turn right’ or ‘turn around’ respectively. [0,1,1] Fig. 1. The robot has just taken a step, it scans the three directions around it and finds no wall to the left, a wall directly ahead and a wall to the right, it then stores this information in the vector v=[0,1,1]. The robot will then decide to turn left with an output of 2. 3

Click here to order this paper @Superbwriters.com. The Ultimate Custom Paper Writing Service