cla,clf
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%Examples on R%%%%%%%%%%%%%%%
a=randn;b=randn;
x=linspace(1,10);
plot(x,a.*x+b);
title('affine  ax+b');
xlabel('affine  ax+b');
keyboard
%%%%%%%%%%%%%%%%%%%%%%%%%%
clf 
plot(x,exp(a*x));
title('exponential    exp(ax)');
xlabel('exponential    exp(ax)');
keyboard
%%%%%%%%%%%%%%%%%%%%%%%%%%
clf 
plot(x,x.^a);
title('powers    x^a,  x pos.');
xlabel('powers    x^a,  x pos.');
keyboard
%%%%%%%%%%%%%%%%%%%%%%%%%%
clf 
p=1+10*rand;      %  >=1
x=linspace(-10,10);
plot(x,abs(x).^p);
title('powers of absolute value  |x|^p, p>=1');
xlabel('powers of absolute value  |x|^p, p>=1');
keyboard
%%%%%%%%%%%%%%%%%%%%%%%%%%
clf 
x=linspace(0.001,10);
plot(x,x.*log(x));
title('negative entropy  xlog(x) x pos.');
xlabel('negative entropy  xlog(x) x pos.');
keyboard

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%Examples on R%%%%%%%%%%%%%%%
clf 
p=1+rand;      %  >=1
[X,Y] = meshgrid(-2:.2:2, -2:.2:2);
Z = ((abs(X)).^p +(abs(Y)).^p).^(1/p);
surf(X,Y,Z);
title('p-norms');
xlabel('p-norms');
keyboard
%%%%%%%%%%%%%%%%%%%%%%%%%%
clf 
[X,Y] = meshgrid(-2:.2:2, -2:.2:2);
Z = max(abs(X),abs(Y));
surf(X,Y,Z);
title('inf-norms');
xlabel('inf-norms');
