Thursday, November 26, 2009

MATLAB vs. GNU Octave

My ME 352 class provided me with the opportunity to examine the suitability of an open source alternative to MATLAB. For those who don't know, MATLAB is a very powerful tool for data analysis and programming. The purpose of this project was to determine the forces in a machine as it moved through it's operation. I have published my results (which are partially incorrect for the dynamic friction cases) at my Purdue website. The source code for the project is there as well (released under the GNU GPL), if you would like to reproduce these tests or improve upon the code.

There are a few things in my life that I hold to be axioms. Open source is better than proprietary, and free is better than for pay. Purdue, fortunately for me, makes it very easy to be an engineering student. MATLAB usually costs about $100 for a very bare bones version, but Purdue has a license that allows each mechanical engineering student to install the full version of the software on their personal computer for free. However, this still requires the use of Windows, which I hate. I have been wondering if it is possible to go through mechanical engineering at Purdue while using Linux. Some coursework requires LabVIEW and a program called EES, so MATLAB isn't the only obstacle but it is an important first step, since a majority of my work is done in MATLAB. I will note that unlike most software there is a direct Linux port of MATLAB, but again Purdue does not offer that to students.

The open source alternative to MATLAB is GNU Octave. It is a free software package that claims to be mostly compatible with MATLAB. Since I have already written those 1200+ lines of code, I decided to test it out with Octave and see how compatible it was. I tested both the Linux and Windows versions of Octave, though I found both experiences to be similar. Since the program required for the project is pretty simple (just a few loops and some matrix operations) I was fully expecting the results to match, and they did. The plots generated by MATLAB exactly matched the plots generated by Octave. There wasn't even so much as a warning or any errors. I do have a few issues.

First, the user interface of the plots. When you plot something in MATLAB, it looks like this;


As you can see, you get options to zoom, print, save, pan, rotate, etc. MATLAB makes it very easy to manipulate the plot once it has been generated. Further, it is easy to then save this plot in a variety of formats and then put into a report or onto a website. In fact, the entire website where my results are published came from a menu option in the MATLAB Editor. The plots generated by Octave look like this;

As you can see, there are no options. If you right click you can zoom in to a box on the figure, but beyond that the options are seriously limited. In fact, the only way I found to alter the plot or to save it is to code those commands into the script that generates the plot and rerun the script. It shouldn't be that hard to simply save a plot. I believe this has to do with the use of a separate program called gnuplot that takes care of the plot generation. Perhaps in future versions, these programs will be better integrated to allow for more features and a more useful interface for plots generated by Octave.

The next few issues are pretty minor compared to the plotting. Octave runs in a terminal window, whereas MATLAB has a user environment that provides quite a bit of useful information, such as the names of stored variables and the contents of the working directory. Finally, Octave was noticeably slower than MATLAB in executing the code. I suspect that this is largely due to the plotting part of the code, since the plot windows came up at a much slower rate than the MATLAB figures. Again, this may be more of an issue with gnuplot rather than Octave specifically. Finally, Octave would occasionally freeze if I would close all of the figure windows and run the script again. That is an issue that I never had with MATLAB.

In the end, I'd say that I absolutely could have accomplished this project using Octave rather than MATLAB. It may have been slightly more difficult to handle the plots at first, but I think with practice it would have become second nature to me as MATLAB has. The problems with Octave were not technical, but rather just usability. I'll definitely be following the Octave project in the future.

Wednesday, November 25, 2009

Are you saying 9/11 didn't change everything?



"We did not have a terrorist attack on our country during President Bush's term."

Whoops.

Via Talking Points Memo

Wednesday, August 19, 2009

Bush vs. Obama; Protest Edition

I just had a really quick thought. Remember during the Bush years how peaceful protestors were getting arrested for wearing anti-Bush slogans on their clothes, and they were called anti-American? So, why is it now acceptable for a bunch of people to show up where the president is with loaded rifles and handguns, during a time when right wing extremism is rising and our president is receiving more death threats than any in history, that no one is getting arrested? I'd just like the conservatives to keep that in mind the next time they plan to call Obama a freedom hating socialist. To recap; anti-Bush shirts will get you arrested under a conservative administration trying to bring freedom to Iraq, but assault rifles are fine under a "fascist." In fact, it is such a stark contrast that the White House is defending these people who bring guns where the president is speaking. I bet those arrested under Bush didn't get off so easy.

Sunday, August 02, 2009

Full Post on Facebook?

I'm just writing this post to see if I can get the full text of my posts into my Facebook note feed. If anyone else is looking to do something like that, all you need is a blog with an RSS or Atom feed and the instructions from this video. Of course the Facebook feed doesn't include links to my references, videos, or pictures, but in the end it is always good to get more readers for a blog.

In other news, just to get the word count on this post up, Entourage is on and it looks like it is going to be an Ari-centric episode (my favorite kind). I have to say though, it seems like they are making Vince a lot less likable this season. Look at the hubris last week (and during the recap) where Vince is talking about how his shadow is getting bigger. I am thinking that they are setting Vince up for a big fall again. Also, gratuitous boobs have become a more permanent fixture this season and I have to say I am a fan.

Still needing a few more words, I'll just leave this joke;

One day a hippie gets a ride on a public bus and sees a hot young nun. He sits down next to her and promptly asks if she would like to have sex, to which she immediately says no and walks off the bus. The bus driver leans over and says “Hey guy I know how to get that nun to have sex with you…”

Naturally the hippie asks, and the bus driver tells him that every night at midnight the nun goes to an old graveyard to pray for god to forgive her for her past, and that he should dress up like god and tell the nun she will be forgiven if she has sex with you.

The hippie gives his thanks and runs to the nearest costume shop.

Later that evening the hippie gets ready for his big night and drives down to the graveyard and sees the nun praying, on her knees. He says “Behold, I have heard your prayers and you shall be forgiven if you have sex with me!”

The nun agrees but asks if they can have anal sex in order to keep her virginity. The hippie agrees and once they are finished the hippie jumps back and pulls off his mask and says “Surpise, its me the Hippie!”

The nun jumps up and pulls off her mask and says “Surprise, its me the bus driver!"

Why We Need Healthcare Reform

In 2007 Cigna HealthCare denied coverage to a 17 year old girl for a liver transplant. When she was ours from death and doctor's described her condition as "hopeless," they decided to cover the transplant. She died. [CBS2.com] Really a clever move on Cigna's part, as you can't say they wouldn't cover the transplant, but they don't have to pay for it because they waited until it was too late.

The reason I bring up a 2 year old story is because it so moved a executive at Cigna that he left the company and now works to bring healthcare reform. That former executive is Wendell Potter and this is what he has to say;

"I just didn't want to be the spokesperson for an industry that I felt often was not doing the right thing for the American public," said Potter.

Potter believes the push to reform health care in the U.S. faces an uphill battle and warns the public not to believe a common insurance industry argument that setting up a public health care plan will put a government bureaucrat between patients and their doctors.

"Right now we have a corporate bureaucrat who's calling the shots, who's very much between you and your doctor," Potter said. [CBS5.com]

Potter even went before the Senate, "detailing such industry practices as purging, the dumping of small businesses when their employees make medical claims that exceed expectations, and sending explanation-of-benefits documents that are so incomprehensible that policyholders can't tell what services they're getting." [San Francisco Chronicle] In the end, Potter's statements beg the question; are these companies treating their customers fairly? This is a question that Michael Hiltzik at answers;

The firms take billions of dollars out of the U.S. healthcare wallet as profits, while imposing enormous administrative costs on doctors, hospitals, employers and patients. They've introduced complexity into the system at every level. Your doctor has to fight them to get approval for the treatment he or she thinks is best for you. Your hospital has to fight them for approval for every day you're laid up. Then they have to fight them to get their bills paid, and you do too.

One Wendell Potter reminded a Senate committee in June that health insurance executives had assured Congress in 1993 they would work to secure universal medical coverage and end denials of coverage to people with pre-existing conditions. Then they moved heaven and earth to kill reform.

They've made the same promises now, Potter observed. But they're in an even better position to throttle reform. Mergers and acquisitions have turned the industry into a cartel of huge corporations.

"The industry is bigger, richer and stronger, and it has a much tighter grip on our healthcare system," he said. The last thing they want is a government program set up as their competition.

...

Why do we tolerate this? The industry loves to promote surveys indicating that most Americans are "satisfied" with their current health insurance -- 37% are "very satisfied" and 17% "extremely satisfied," according to one such study.

Yet these figures are misleading. Most people are satisfied with their current insurance because most people never have a complex encounter with the health insurance bureaucracy. Medical care generally follows the so-called 80-20 statistical pattern -- 20% of patients consume 80% of care. If your typical encounter is an annual checkup or treatment of the kids' sniffles, or even a serious but routine condition such as a heart attack, your experience is probably satisfactory.

But it's on the margins where the challenges exist. Anyone whose condition is even slightly out of the ordinary knows the sinking feeling of entering health insurance hell -- pre-authorizations, denials, appeals, and days, weeks, even months wasted waiting for resolution. [Los Angeles Times]

Surely, there must be someone out there outside of the insurance industry who is pulling for them. The American public isn't, since a New York Times poll showed that of those polled, "49 percent said they supported fundamental changes, and 33 percent said the health care system needed to be completely rebuilt." Doctors aren't on the insurance industry's side, since the American Medical Association supports reforming healthcare this year. That support is also coming on the heels of a class action lawsuit the AMA filed against the insurance industry. So, aside from the politicians that have been bought by insurance companies (both Democrat and Republican) who is keeping this from happening? Why isn't this getting done? Doctors don't like the system, patients don't like the system, and increasingly it seems like the only people against reform are the people profiting from the current farce that we call healthcare. I just hope that reform can get done before the insurance industry gets to muddy public support with their misleading ads, as they have already begun to do.

Friday, July 31, 2009

Take Back the Beep

One of my biggest pet peeves is the robot lady voice that comes on when you get someone's voicemail. I've already heard my friend talk, why do I have to waste my minutes listening to some recording tell me to leave a message. I know, I have used a phone in the last 20 years. Everyone knows that the slow talking recording is just a way to screw you out of more minutes. So, David Pogue of the New York Times has started a campaign to "Take Back the Beep," and ask the major cell phone carriers to eliminate the messages.

In 2007, I spoke at an international cellular conference in Italy. The big buzzword was ARPU–Average Revenue Per User. The seminars all had titles like, “Maximizing ARPU In a Digital Age.” And yes, several attendees (cell executives) admitted to me, point-blank, that the voicemail instructions exist primarily to make you use up airtime, thereby maximizing ARPU.

Right now, the carriers continue to enjoy their billion-dollar scam only because we’re not organized enough to do anything about it. But it doesn’t have to be this way. You don’t have to sit there, waiting to leave your message, listening to a speech recorded by a third-grade teacher on Ambien.

Let’s push back, and hard. We want those time-wasting, money-leaking messages eliminated, or at least made optional.

...

And here’s how we’re going to do it.

We’re going to descend, en masse, on our carriers. Send them a complaint, politely but firmly. Together, we’ll send them a LOT of complaints.

If enough of us make our unhappiness known, I’ll bet they’ll change.


I kicked an e-mail off to AT&T in support of this. Clicking the link to the story above will let you know where to contact your carrier about this campaign.