% = min and max of a, b, c
function [minv, maxv] = minmax(a, b, c)

if a<=b && a<= c
    minv= a;
elseif b <= c 
    minv= b;
else minv= c;
end

if a>=b && a>= c
    maxv= a;
elseif b >= c 
    maxv= b;
else maxv= c;
end



        