First draft of HW1, matlab and C code