Info

此问题已关闭。 请重新打开它进行编辑或回答。

Can anyone help me with this coding. will i be able to plot a 3d graph? what is that tranpose is suppose to mean?

1 次查看(过去 30 天)
% %refer to manolakis book page 634-637
% % note: check polar representation, something's wrong
close all;clear all;
freq=400e6;%input('frequency (e.g 900e6 for 900MHz):');
lambda=3e8/freq
d_ratio=2;%input('ratio of lambda/d:');
d=0.2;%lambda/d_ratio;
M=7;%input('M, number of elements:');
phi_s=50;%input('angle of interest(-90 to 90):');
u_s=(d/lambda)*sin(phi_s*pi/180);
x=.5; %step up for plotting graph
SS=zeros(M,1);
ZZ=zeros(1,M);
YY=zeros(1,(180/x));
s=exp(-i*2*pi*u_s*(0:(M-1)))/sqrt(M); %impulse response of the signal (array response vector)
s=s';%change signal to vector Mx1
c_mf=s';%hermitian transpose the array response vector, in vector 1xM
J=0;
for angle=-180:x:180
J=J+1;
W=zeros(1,M);
u_s=(d/lambda)*sin(angle*pi/180);
SS=zeros(M,1);
for I=1:M
SS(I,1)=exp(-i*2*pi*u_s*(I-1))/sqrt(M); %impulse response of the signal (array response vector)
end
YY(:,J)=c_mf*SS;
end
YY=abs(YY);
YY=YY/max(YY);
J=0;
angle=-180:x:180;
figure(1),close all
plot(angle,YY,'m'), axis([-90 90 0 1]),hold on;
figure(2);
polar(angle,YY); %this doesn't work well, the polar graph is wrong

回答(1 个)

Walter Roberson
Walter Roberson 2011-10-10
hermitian transpose is the conjugate transpose. As well as doing the transpose, it flips the signs of the complex parts. This is, apparently, often used in physics. If the code specifically mentions hermitian transponse, chances are that the ' transpose operator used there is correct.
The alternative, non-conjugate transpose, is coded in MATLAB by the .' operator (dot apostrophe). You could try that, but I do not imagine it would help.
Please, when submitting a large block of code for other people to look at -- Comment it abundantly!

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by