please Pay attention to the figure below function 1: enter image description here
enter image description here
I want to have a function in matlab that does the fo