Sie sind auf Seite 1von 3

COMPUTATIONAL METHODS IN BIOMEDICAL ENGINEERING

Lecture-6

Redetermining the normal equation for every new model is tedious and cumbersome. A generalised method
allows us to perform least-squares linear regression much more efficiently.

Y = 0 + 1f1(x) + 2f2(x) + + nfn(x) .. (1)

If we have a data set that consists of m(x, y) pairs, then using equation (1) we can write,

Y1 = 0 + 1f1(x1) + 2f2(x1) + + nfn(x1)

Y2 = 0 + 1f1(x2) + 2f2(x2) + + nfn(x2)

Ym = 0 + 1f1(xm) + 2f2(xm) + + nfn(xm)

We can write set of m equations in compact matrix form as:

1 1 (1 ) (1 ) 0 1
1 1 (2 ) (2 ) 2
A=[ ], C =[ 1 ], Y=[ ]

1 1 ( ) ( ) 3

We seek minimum of ||r||2.

||r||2 = rTr = ( ) ( )

= (Y AC) T(Y AC)

= YTY YTAC CTATY + CTATAC

Now,

c = 0 YTA (ATY)T + CTATA + (ATAC)T = 0

YTA YTA + CTATA + CTATA = 0

CTATA = YTA

(CTATA) = (YTA)

ATAC = ATY

1
C = (ATA)-1 ATY

In MATLAB, >>(A*A)\(A*Y)

Problem-1: Hemoglobin-oxygen binding

- Hemoglobin (Hb) is a protein present in blood cells that transports oxygen from lungs to tissues.
- Hb is a tetramer and consists of two -units and two -units.
- Each unit can bind to one oxygen molecule.
- The exchange of O2 and CO2 between the lungs and tissues via blood occurs due to difference in
partial pressure of pO2 and pCO2.
- pO2 in inspired air 158 Hg
pO2 in lungs 100 Hg
pO2 in veinous blood 40 Hg
- Oxygen binds with Hb to form oxyhemoglobin.
- The oxygenated blood travels to various parts of the body and releases oxygen from Hb.

The Hills equation describes a mathematical relationship between extent of oxygen saturation of Hb and
the partial pressure of O2 in blood.

Hb(O2)n Hb + O2

[(2 ) ] (2 )
= [( =
(1)
2 ) ]+[] 50 +(2 )


The partial pressure of oxygen that results in 50% occupancy of Hb is denoted as 50 .

Data for tetrameric bovine haemoglobin binding to oxygen are given in the table below:

pO2 10 20 30 40 50 60 70 80 90 100 110 120


S 0.18 0.40 0.65 0.80 0.87 0.92 0.94 0.95 0.95 0.96 0.96 0.97

Equation (1) is not linear. So to linearise it, it can be written as,

(2 )
= ln ( ) = ln (2 ) ln 50
1 50 1


Substituting ln (1) as ; ln (2 ) as ; as 1 and ln 50 as 0,

Y = 0+1

2
In MATLAB,

>> (2 ) = [10: 10: 120]

x=log (2 )

S=[0.18;0.40;0.65;0.80;0.87;0.92;0.94;0.95;0.95;0.96;0.96;0.97]

Y=log (S/(1-S))

1 1 1
1 2
A=[ ]; C=[ 0 ]; Y=[ 2 ]
1
1 12 12

In MATLAB,

A=[ones(size(X))x]

>>C=(A*A)\(A*Y) will give you 0 and 1.

Das könnte Ihnen auch gefallen