First working version of matlab code. Feature vector is constructed and being written to a CSV file