Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The goal of this MATLAB computer lab exercise is to generate a single vector, Che, that contains time-dependent values of the left ventricles compliance for

The goal of this MATLAB computer lab exercise is to generate a single vector, Che, that contains time-dependent values of the left ventricles compliance for one full heart cycle. When Che is plotted versus time, these data should look like Figure 4 in the Major Project with the same heart cycle timing as given in the Wiggers diagram in Figure 6.

Part 1: Draw a flowchart for your MATLAB program

Part 2: Write the MATLAB program. Stepwise, your code will contain these steps.

a. In the first line of your program, give your name/lecture time and description of the code in a comment statement.

b. Time vector for one heart cycle. You will first have to set up a row vector for time. For the heart cycle shown in the Wiggers diagram, the time of a complete heart cycle is 500 ms. Use a t of 0.1 ms. The time vector will be 5,000 elements long (index values 1-5,000 corresponding to t = 0-499.9 ms; t = 500 ms will map to 0 ms in the next heart cycle).

c. Systole and diastole compliance vectors. We will be using Eqn. 1 & 2 from the Major Project chapter to model the changing heart compliance during systole and diastole. Eqn. 1 represents the changing heart compliance during systole. Eqn. 2 represents the changing heart compliance during diastole. Using these equations, generate one vector for the changing compliance during systole and one vector for diastole. FOR THIS ASSIGNMENT ONLY, use the values Chs = 0.0005 L/mmHg and Chd = 0.01 L/mmHg1. Plot these vectors in separate windows (against what?)2. Title each plot with your name and the part of the heart cycle shown. Print these plots3.

1 These limits of compliance will be different in your actual Major Project MATLAB code where you will be using the values calculated as part of Checkoff 1.

2 Before the second plot command, open a new figure window by typing: figure;.

3 Do not remove the plot commands for these plots from your MATLAB code; put a % in front of the plot-related commands to comment them out after you print your plots.

d. Identify portion of systole and diastole vectors to be used. The equations that you used in part c to generate the systole and diastole compliance vectors result in vectors containing 5,000 values (corresponding to 500 ms). However, only a portion of these data is physiologically relevant since the total time combined for systole and diastole is 500 ms. Refer to your Major Project notebook for the time (in ms) you calculated for the length of systole and diastole from Figure 6. For the systole plot, draw a vertical line on the plot corresponding to the length of time for systole; repeat for the diastole plot. These vertical lines separate the useful data from the extra, unneeded data stored in the two compliance vectors. 2

e. Combine systole and diastole data to create the heart cycle compliance vector. Our goal is to use the data from the systole and diastole compliance vectors to generate a vector containing heart compliance values for an entire heart cycle. The heart compliance vector Che will have the same timing of the heart cycle phases shown in Figure 6 of the Major Project. The heart cycle in Figure 6 starts at t=0 ms near the end of diastole, is followed by systole, and ends with the beginning of diastole. Determine how the data in your systole and diastole compliance vectors will map to each of these locations in your heart cycle compliance vector. Add commands to your MATLAB m-file that copy values from your diastole and systole compliance vectors (identified in part d) into a new heart cycle compliance vector Che4. Plot your heart compliance vector Che with appropriate axis labels; include your name in the title. Does your plot look like the one below? 4 The colon in MATLAB allows you to specify locations where values are stored in a vector; these values can then be copied into locations in another vector. For example, if we want to copy values in locations 1-10 from vector B into the locations 101-110 in vector A, we would write: A(101:110)=B(1:10) If the number of values copied from one vector does not equal the number of locations specified in the destination vector, you will get the error: Subscripted assignment dimension mismatch.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

Answered: 1 week ago

Answered: 1 week ago