clear; %% m file to compute the 4 functions in the ML lab x=0:2^7-1; %% all have length 128 y0= zeros(1,128); %% first is the sine funtion y1= zeros(1,128); %% second is the multi step function y2= zeros(1,128); %% uniform random numbers y3= zeros(1,128); %% symmetric triangular plot(x,y0,'k-',x,y1,'k--',x,y2,'k.',x,y3,'k-.'); legend('sine','multi step','random','triangular') xlabel('Sample');ylabel('Amplitude');title('4 Functions generator') axis([0 127 0 1.1*2^14]); print -djpeg funcgen.jpg LUT=[y0, y1, y2, y3];