function y= tel(t,a,b,c,d) [n,m]=size(t); y=zeros(t); for j=1:m, for i=1:n if t(i,j) > a then if t(i,j) <=b then y(i,j)= (t(i,j)-a)/ (b-a) elseif t(i,j) > b & t(i,j) < c then y(i,j)= ones (t(i,j)) elseif t(i,j)< d then y(i,j)=(d-t(i,j))/(d-c) end end, end,end, endfunction y1=tel(0:1:20,3,6,9,12)