Write a matlab script to calculate the cardiac output of


Question 1:

Cardiac output (the volume of blood being pumped by the heart, Q [liters/min]) can be measured by giving a rapid intravenous injection of a known amount of an indicator dye, and then measuring the dye concentration downstream in the arterial blood (after circulation through the heart). The rate at which the dye becomes diluted is a measure of the cardiac output (Q) or the paper by Band et al. J Physiol 498.1 225-229 (1997) on Sakai.

The data below was collected following an i.v. injection of 5.4 mg of indicator dye:

Time [s]

Concentration [mg/L]

Time [s]

Concentration [mg/L]

5

0

21

2.3

7

0.1

23

1.1

9

0.11

25

0.9

11

0.4

27

1.75

13

4.1

29

2.06

15

9.2

31

2.25

17

8.1

33

2.33

19

4.3

35

2.45

(a) Use Matlab to plot the data from the table using a linear scale showing time ranging from 0-40 seconds. Why does the measured concentration show an increase after approximately 25 seconds?

(b) Plot the data again, this time using a log10 scale for the y-axis.

(c) Notice that by linearly extrapolating the data from time points t = 17-23 seconds, you can estimate what the concentration values at times 25, 27,and 29 seconds would be, if the increase which begins around t = 25 seconds was not present. (Extrapolation is similar to interpolation, except we are estimating a value for f(x) at an x value which does not lie in between x0 and x1).

(i) Perform linear extrapolation to estimate the circulating dye concentration c [mg/L] at these additional three time points. (Remember you are extrapolating the log10 values, not the raw concentration values). Use Matlab's interpolation / extrapolation function.

(ii) Plot these estimated concentration values on the same plots you generated in (a) and (b), using a different marker (different color or shape). Be careful with the signs in this calculation. Your plots should tell you if the calculated answers make sense.

(d) Cardiac output in liters per minute can be calculated from the following equation:

Q = M/A x 60

where M is the mass of injected dye [5.6 mg in this case] and A is the area under the concentration - time curve (after correcting with the extrapolation in part (c)).

Write a Matlab script to calculate the cardiac output of this patient in liters per minute by using the trapezoid rule to estimate the area (A) under the corrected concentration vs time curve. Use a step size (segment) of 2 seconds. Use this value for A to determine the cardiac output Q [l/min].

(e) Compare your solution in part (d) with the value obtained from Matlab's trapz() function.

Question 2:

(a) Exoskeletons are robotic frames which are worn on the body and provide additional power for movement, lifting, rehabilitation, carrying heavy objects or other activities. To function properly, exoskeleton design requires information on true human motion including gait analysis (walking motion). For more details beyond the homework question, see the paper by K H Low et al. in Sakai.

Input data on knee, ankle, and hip angle during walking is often collected by human motion capture techniques. The table below gives a set of data points for the knee:

Time [s]

0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

1.8

2.0

Angle [rad]

0

-0.05

-0.13

-0.35

-0.55

-0.35

-0.33

-0.31

-0.22

-0.12

0

Generate two plots showing:

(i) the individual data points with a single polynomial fit which passes through all the points.

(ii) the individual data points with a cubic spline fit which passes through all the points.

Comment in 1 sentence on the key difference between applying each interpolation method to this dataset.

(b) Raman spectroscopy is a technique commonly used to study the molecular "fingerprint" of a material. Different molecules exhibit unique sets of peaks at different wavenumbers (wavenumber [cm-1] = 2Π/λ). Raw spectra often need to be processed to (i) remove noise, and (ii) remove the background level, in order to see the Raman peaks more clearly.

Read in the data file "Obsidian.txt" using A = load(‘Obsidian.txt') in Matlab. You should have a variable "A" where column 1 contains wavenumber values and column 2 contains Raman intensity values.

(i) Plot the raw Raman spectrum (intensity versus wavenumber).

(ii) Filter out some of the noise in the raw spectrum. Plot the new (smoothed) spectrum.

(iii) To remove the background, we will use a technique of fitting the background intensity level to a polynomial function. The following data points were selected from the filtered spectrum:

Wavenumber

235

286.2

370

590

755

850

950

985

Intensity

0.2107

0.3136

0.4973

0.4052

0.2026

0.1652

0.2157

0.2278

On top of the filtered spectrum in (ii), plot the data points from the table with individual markers.

Generate a polynomial curve which passes through all the data points in the table. Plot this curve as a line, with the individual points from the table.

(iv) Subtract the polynomial curve calculated in part (iii) from the smoothed spectrum generated in part (ii). Plot the resulting spectrum, which has had noise filtered out and background removed.

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: Write a matlab script to calculate the cardiac output of
Reference No:- TGS02483160

Expected delivery within 24 Hours