State Function And Path Function Examples In Matlab