Write a matlab script to calculate the cardiac output

Assignment Help MATLAB Programming
Reference no: EM131687633

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.

Reference no: EM131687633

Questions Cloud

Explain how a high inventory turnover rate : Explain how a high inventory turnover rate can be considered either a good condition or a bad condition in evaluating a company's performance.
Write a user-friendly user interface : The intent here is not to write a user-friendly user interface; what you're actually doing is building a program that we can test automatically
Is all evidence sufficiently analyzed : What is the writer's thesis. If you can't identify the thesis, how could the writer make it clearer
What implications will the affordable care act have : Analyze the role of the advanced practice nurse in the changing health care environment. How will this role augment physicians' practice?
Write a matlab script to calculate the cardiac output : 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
What leadership role should you take in solving the dilemma : What leadership role (if any) should you take in solving this dilemma? Should you ignore the problem and schedule yourself for only one holiday.
What were the results of the companys efforts : Results-what were the results of the company's efforts? Did they work? Why or why not? References-list all research references used.
Discuss the ethical issue and argue your position : provide supporting evidence for argument. format turabian style: APA format with a minimum of one academic reference
Create a scheduling nightmare : Would this create a scheduling nightmare? Will you limit the number of 12-hour shifts that staff could work in a week?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd