Recently, I was looking at both Mathematica and Matlab to fill a need I had.  I was looking for a framework that could correct/validate my Mathematics homework, but something that would extend beyond that… to incorporate learning new skills in Machine Learning, modeling and prototyping.

While opensource frameworks could suffice (such as Python’s various libraries), I was looking for something more cohesive.

Matlab

In this investigation, I got a trial of Matlab, and I picked two toolkits (“toolkits” are what Matlab calls code libraries) for review: Finance Toolkit and DB Toolkit.

Matlab Toolkits

My point of frustration with Matlab centers around the toolkits.  Unlike Mathematica (or open source solutions), you have to pay for each library you want to use.  While Matlab starts at a great price point, each of these toolkits ads up as separate costs.

However, I heard that Matlab was a “great performer” and a “workhorse” and I figured I’d give it a fair trial.  I also heard that Matlab could export/share content as Java Jar’s which is a big plus (if that were true.)  During my trial, I never found the ability to export to a jar… it may be possible, it certainly wasn’t obvious via the interface.

Matlab DB Toolkit Frustrations

I gave up on Matlab pretty quickly and here’s why.  You have to consider that this is commercial software.  If you buy the base package, and then an “add-on” to connect with external databases (Oracle, MySQL, etc.), you’d expect it to… I don’t know… work, right?

Missing Advanced Connection Features

After installing Matlab and the toolkit trials, I launched it and quickly went to the DB Explorer.  First impressions, this isn’t usable for most folks I know.  For modern security reasons, most DB’s are behind some sort of security layer – like SSH.  Every MySQL client I have has these advanced connection features.  Matlab… none.  Matlab is simply: username, password, schema name, db location and port.

Missing JDBC Drivers!!

While not having advanced features might be a problem for some, the missing JDBC drivers was a big inconvienance for me.  I was under the impression, that if I installed a DB Toolkit with Matlab, I could simply connect to a db.  Sadly, it required a bunch of user set up to get the db connection working (after all my JDBC driver is on the class path) – and none of this set up was even offered in the documentation. I had to Google around for a solution.

The solution amounted to taking my existing JDBC driver and copying it to the Matlab sub folder for Java / Jars.  Next, I had to open the hidden Library folder on my Mac, and navigate about 7 or 8 sub directories and create a txt file that referenced the JDBC Mysql jar file path.

This process, evidently, needs to be done on each database you want to connect… but why?  The drivers are already on the classpath.  Even if they weren’t, surely Matlab could provide drivers with their toolbox.  Further yet, if both cases were omitted for whatever reason, surely Matlab could provide a UI link to “find the Mysql JDBC jar.”

Crashing my local Database!!

I have a local webserver running. It runs every few min, collects data online and stores it in MYSQL locally.  It’s been running for 6 years or so, and gives me a good database of results to test with.

After getting the JDBC driver working with MySQL, I logged in and noticed the DB Explorer showed my table structure, but the SQL syntax window was greyed out!  Weird. Anyway, I clicked one of the table names, and then it happened….

Matlab locked up, with a spinner on the DB Explorer.  Then my webserver died… MySQL had maxed my CPU!

I had to restart everything to verify it.  But I think what happened was that just by selecting a table in the DB Explorer, it must have done a NON-LIMITED open query… and that table having millions of records, must have killed it.

Every DB Client I’ve used (MySQL Workbench, Sequel Pro, etc.) has default limits on any select via the UI.  Without the limit, I killed my server.

Also, why was the SQL field greyed out and unaccessible??

Compared to Mathematica

I wanted to be fair… I pulled up Mathematica and did a db connection to my local db.  Unlike Matlab, I didn’t need a special ($$) library. DB connection was included with Mathematica (although without the fancy UI.)

Also, Mathematica could connect to the DB fine. It found my MySQL JDBC driver (or it used it’s own driver) and I didn’t have to do that archaic manual configuration.

Uninstalling Matlab

I never got around to checking the Financial toolkit (which I hear is pretty amazing), because I felt that a product that sells you each library separtely, should in the least be solid.  The fact that this db library in Matlab couldn’t find or use JDBC drivers on hand, that it needed manual configuration and that it crashed my local DB… let me feeling it was paramount to freeware.

If that’s an example of toolkit, I didn’t want to waste time with any others.

Matlab might be an awesome product for a variety of applications… sadly, I just couldn’t get past the failure of the database toolkit for my needs.

#

Comments are closed

Archives
Categories