clc echo on % A look at functions help myfun pause % User functions are evaluated just like built-in functions myfun(3) myfun(0) myfun(pi) pause % Let's plot myfun % Build a grid of x-values x = 0:0.025:3; y = myfun(x); plot(x,y) title('Plot of myfun') grid on echo off