Digital Signal Processing Reference
In-Depth Information
A.6.2 Program f 6_3
%Digital Signal Processing:A Practitioner's Approach
%Dr.Kaluri Venkata Ranga Rao, kaluri@ieee.org
%Generates figures 6.1,6.2
clear;
rot=2;
for i=1:3
rot=rot-1;
theta=0:180;
theta=theta*pi/180;
r=(sin(theta)).^0.25;
phi=theta + rot*pi/4;
%polar (phi, r);grid;pause;
X(:,i)=phi'; Y(:,i)=r';
end
polar(X,Y);grid;pause;
%print -depsc f6_3
A=ones([271 3]);A=A*0;
A(1:181,1)=Y(1:181,1);
A(46:226,2)=Y(1:181,2);
A(91:271,3)=Y(1:181,3);
for i=1:271
s=3*i-2;e=s+2;
x(s:e)=A(i,:);
end
test=A(70,:); test=test+0.01*randn(size(test));
for i=1:271;
ek=A(i,:)-test;
Jk(i)=log(ek*ek');
end
subplot(211);plot(Jk);grid;
A.7 Library of Subroutines
This section gives subroutines needed by programs in the other sections.
A.7.1 Program Expand
%Digital Signal Processing:A Practitioner's Approach
%Dr.Kaluri Venkata Ranga Rao, kaluri@ieee.org
function y=expand(x,r)
% function y=expand(x,r)
Search WWH ::




Custom Search