https://devhubby.com/thread/how-to-write-and-call-a-function-in-matlab