function charex(a) %charex takes a real number a as input and graphs sin(ax) over the interval %[0, 2pi]. There is no output other than the graph. x = linspace(0,2*pi); y = sin(a*x); plot(x,y) xlabel('x') ylabel('y') title(['Graph of y = sin(',num2str(a),'x)']) axis tight end