Tuesday 25 December 2012

Finding solutions

10:30 am

So, the first problem that I am having is that the radius of the artery that I am going to be receiving will be changing for every instance of simulation. I need to pass it on to a file which is called in the embedded matlab block which inputs this changing radius.

To make it sound simple, I will create a simpler scenario, make it work on my scenario, and then test it on the actual case. Now, what we have currently is a file that takes in a pulse generated value, and a sin wave, sums it and gives the output to a scope.

I'll do this, let the pulse output be the Arterial Cross Sectiional area variations. Let the sin wave be the pressure from the heart. The embedded MATLAB block will take the CS, calculate radius, save it to the workspace as the variable r, and call another function baby. Baby will take the updated radius increment it by 10. This incremented value will be multiplied to the sin wave and output will be shown.

So, what we have to do in simulink is

1. Sin block
2. Pulse generator block
3. Embedded matlab block with the above as inputs.
4. Calculate radius and save into a workspace variable and call baby
5. Baby takes radius, multiplies by 10 and returns value.
6. This value is then multiplied to sin wave and shown as output.

In all of the above steps, steps 4 and 5 are difficult. How do we do that?