c = menu('Choose a plot', 'sine', 'cos', 'decaying exp') t = 0:.1:5; if (c == 1) y=sin(10*t); plot(t,y) elseif (c == 2) y = cos(6*t); plot(t,y) else y = exp(-t); plot(t,y) end