How can change this flowchart to Matlab code?

Top