Purchase Solution

Matlab normal equations model to analyze response

Not what you're looking for?

Ask Custom Question

(See attached file for full problem description)

---
This model is used to analyze the body's response to a bolus injection of this antibiotic:
B(t) = B0e(-k*t)
Using this model, and data provided for the average plasma concentration data in ug/ml with time in hours :
a) perform linear regression on this penicillin clearance using the normal equations
b) plot the concentration data and re-plot the log of the concentration data to show that it appears linear.
c) Determine initial concentration, B0, and elimination rate constant, k

Concentration (ug/ml) Time (min)
89 22
60 44
30 88
15 132
7 176

a) for linear regression
ln( B ) = ln( B0 )- Kt

I'm not sure how to use the normal equations in MATLAB to plot this? We're not supposed to use polyfit function... I think you have to make a 2 column matrix with a column of 1's and a column of the time?
---

(See attached file for full problem description)

Attachments
Purchase this Solution

Solution Preview

Answer:

From what you write I understand that you are to perform linear regression for the logarithmic fit: ln(B) = ln(B_0) - Kt

If you find out otherwise, please tell me, and I shall try to help, but now I proceed with the stated understanding.

BTW, the ln(B) = ln(B_0) - Kt fit would do exactly the same as the polyfit (x, y, 1) function of MatLab, but here you are apparently requested to do "manually" what the polyfit does.

First I shall try to explain about the normal equations and linear regressions.
For convenience, let us rename x_1 = ln(B_0) and x_2 = K.
Then the equations based on the input data which you are supposed to try to fit as best you can are:

1 * x_1 - 22 * x_2 = ln(89)
1 * x_1 - 44 * x_2 = ln(60)
1 * x_1 - 88 * x_2 = ln(30)
1 * x_1 - 132 * x_2 = ln(15)
1 * x_1 - 176 * x_2 = ln(7)

You see here 5 equations for only 2 unknowns. Obviously it is not likely possible to find a solution that will make all these equations true. Instead, what ...

Purchase this Solution


Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C# variables and classes

This quiz contains questions about C# classes and variables.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.