The heart beat rate has to be well regulated to provide enough oxygenated blood
throughout the body and so depends on feedback with the body’s oxygen demand. A simple discrete model of heart beat regulation is given by:
xt+1 = kxt(1 - xt)
Here xt represents the normalised heart beat rate at time t recorded once per minute. That is, the normalisation involves dividing the actual hear rate in beats per minute by 80 beats per minute.
The parameter k is a positive real number (hopefully) greater than 0.
a) Write a MATLAB program using array operations to generate a table (with headings) of the normalised heart beat rate per minute starting at time t = 0 with the value of x0 entered by the user. Run your program with the maximum time set to 30 minutes. Show table and MATLAB code for x0 = 0.1 and k = 2.
My answer:
x=0.1;
beats= A(1,30);
for k=1:30
A=2x*(1-x);
x=A;
disp(A)
end
(I am getting an error code and I don't know how to solve it please help me!)
Modify the power method so that the stopping condition is changed to
| ((Axn-un xn)/|Xn|) | <tolerance
where xn, μn are the current estimates of the eigenvector and eigenvalue. Demonstrate the validity of your code by running it on the matrix
3 -1 0
-1 2 -1
0 -1 3