Gesture Recognition using machine learning

I want to implement gesture recognition using an accelerometer(ADXL335) and a machine learning algorithm(Dynamic time warping).

To do that, I planned to sample the serial data from the arduino and place it in an array(recording gestures) and then use the machine learning algorithm on my data but sadly I'm a complete newb to arduino programming so I'd appreciate some advice on how to go about the sampling part.

Also, is there any alternative to using MATLAB or labVIEW for this project?

First, buy an Arduino and an accelerometer and learn to read it. Then come back with questions.