added matlab and C code.