Work Is State Function Or Path Function Matlab