Answered step by step
Verified Expert Solution
Question
1 Approved Answer
THIS IS IN THE MATLAB PROGRAMMING LANGUAGE The aim of this assignment is to write a function to called simulate, which models a population change
THIS IS IN THE MATLAB PROGRAMMING LANGUAGE
The aim of this assignment is to write a function to called simulate, which models a population change over time. The inputs to the function are: A time vector start:end) The Leslie matrix (square matrix) The initial conditions (column vector) The function should return a results matrix, with the following details for each time step. Time Time X X X Sum Percentage Change Run the following script. clear: L = [09 12; 1/3 0 0; 0 1/20]; X = [0; 0; 1); res = simulate(10:20,L,X); Observe the following output: res = 10 0 0 1 14 12 0 1 0 12 1100 4 -66.667 38 850 36 -5.2632 122 238.89 184 50.82 438 138.04 796 81.735 1682 111.31 3264 94.055 16 36 24 108 144 372 648 1404 2688 4 62 216 468 108 The aim of this assignment is to write a function to called simulate, which models a population change over time. The inputs to the function are: A time vector start:end) The Leslie matrix (square matrix) The initial conditions (column vector) The function should return a results matrix, with the following details for each time step. Time Time X X X Sum Percentage Change Run the following script. clear: L = [09 12; 1/3 0 0; 0 1/20]; X = [0; 0; 1); res = simulate(10:20,L,X); Observe the following output: res = 10 0 0 1 14 12 0 1 0 12 1100 4 -66.667 38 850 36 -5.2632 122 238.89 184 50.82 438 138.04 796 81.735 1682 111.31 3264 94.055 16 36 24 108 144 372 648 1404 2688 4 62 216 468 108Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started