clear; %% m file to compute the 4 functions in the ML lab x=0:2^6-1; %% all have length 64 y0= zeros(1,64); %% first is the sine funtion y1= zeros(1,64); %% second is the multi step function y2= zeros(1,64); %% uniform random numbers y3= zeros(1,64); %% 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 63 0 1.1*2^8]); print -djpeg funcgen.jpg LUT=[y0, y1, y2, y3];