% ee96514.m ac power demo rev tlyeh 96,5,14
t=[0:0.01:1]'; dt=0/180*ones(size(t)); 
v=cos(2*pi*t); iv=cos(2*pi*(t+dt));
figure(1); hold off; figure(2); hold off; 
  figure(1);plot(t,[v,iv],'k');  hold on;
  figure(2);plot(t,[v.*iv],'k'); hold on; 
K=10; for k=0:(K-1),
 dt=(k/K)*ones(size(t)); iv=cos(2*pi*(t+dt));
  figure(1);plot(t,[iv+(dt*K) 0*ones(size(t))+(dt*K)]); 
  figure(2);plot(t,[v.*iv+(dt*K) 0*ones(size(t))+(dt*K)]); 
end
 