added matlab plot function and example