playing with C and matlab