Of Matlab and Extreme Blogging

"What excites or interests you about coding?"

I'd like to preface this post by saying that this was written over the course of 20 minutes. Ok? Let's go!

It happened during a cold winter in Chicago, Illinois. I was studying to be a biomedical engineer and on my (somewhat misguided) path for med school. All engineers at my school had to learn Matlab, a programming language. For those of you who don't have much experience with it, Matlab has many built-in functions. Due to this, it runs slow but is very easy to use. Great for working with matrices.

Continuing on, there was a weekly lab session that I (on a team of four people) had to prepare for. We were going to measure a person's heart rate (using an EKG signal) against that same person's lung volume. And display it. Using Matlab. In real time.

Using some dummy data, I prepared the Matlab program for the lab day. The program did two tasks in real time: 1) Took in the individual's respiration flow using a spirometer attached to the mouth and graphed the lung volume against time. 2) Captured EKG signals and graphed beats per minute.

And so, the day I anxiously anticipated had arrived. Not only did I write the program to do this, but they attached the EKG wires and spirometer to me as well. Guinea pig time. We got going and began to collect data. And here's the result:

Your heart is super sensitive.

Now, I'm not saying this in that you're emotional or receptive to those around you. I'm saying that it responds to events happening in your body almost immediately.

Imagine your lung volume. It goes up and down in a sinusoidal fashion. My Matlab program showed this on the screen. Your heart rate actually follows the same sinusoid except that it does the opposite. Confusing? Okay, stay with me here. As your lung volume goes down (from exhaling), your heart rate increases. And as your lung volume goes up (inhaling), your heart rate decreases. Just like that. Your heart responds to factors and impulses being sent from other portions of your body in real time. And I could see this all happening on my screen in my Matlab program.

Cool stuff, huh? Breathe in, heart rate decreases. Breathe out, heart rate increases. See it in real time. Preparation and implementation. Touched it all with Matlab.