Error in dolphchebyshev array

3 visualizzazioni (ultimi 30 giorni)
Kugen Raj
Kugen Raj il 8 Apr 2012
% Function Called: planar_dolphcheby
%
N = 8;
M = 8;
RdB = 20;
dx = 0.5;
dy = 0.5;
steer_theta = 20;
steer_phi = 40;
steer_ux = sin((steer_theta/180)*pi)*cos((steer_phi/180)*pi)
steer_uy = sin((steer_theta/180)*pi)*sin((steer_phi/180)*pi)
null_theta = 80;
null_phi = -30;
null_ux = sin((null_theta/180)*pi)*cos((null_phi/180)*pi)
null_uy = sin((null_theta/180)*pi)*sin((null_phi/180)*pi)
% Finding the Dolph-Chebyshev weight matrix for the array
w = planar_dolphcheby(dx, dy, N, M, RdB); *_ERROR HERE!!!_*
wd = w(:);
% Defining the Null constraint
null_ux2 = null_ux-steer_ux;
null_uy2 = null_uy-steer_uy;
m = (1:M)';
C = exp(j*pi.*((m*null_ux2)+null_uy2));
for n = 2:N
C = [C; exp(j*pi.*(m*null_ux2+n*null_uy2))];
end
% Finding the optimum weighting in presence of null (4.78)
wo = wd-(wd'*C*inv(C'*C)*C')';
% Applying the optimum weights and steering the main beam
ux_grid = -1:0.02:1;
uy_grid = -1:0.02:1;
for x = 1:length(ux_grid)
ux = ux_grid(x);
for y = 1:length(uy_grid)
uy = uy_grid(y);
B(x, y) = 0;
for m = 1:M
for n = 1:N
B(x, y) = B(x, y)+wo((n-1)*N+m)*exp(-j*2*pi*(m*ux*dx+n*...
uy*dy))*exp(j*2*pi*(m*steer_ux*dx+n*steer_uy*dy));
end
end
end
end
B = abs(B)/max(max(abs(B)));
grid on
surf(ux_grid, uy_grid, (20*log10(B))');
axis([-1 1 -1 1 -70 0])
when i run this program, i hv an error.
??? Undefined function or method 'planar_dolphcheby' for input arguments of type
'double'.
Error in ==> planardolphcheby at 17
w = planar_dolphcheby(dx, dy, N, M, RdB);
I dont really understand what this error means. How do I rectify this problem?

Risposte (1)

Wayne King
Wayne King il 8 Apr 2012
Where is the function planar_dolphcheby defined?
You must have an M-file called planar_dolphcheby.m somewhere on your path that has the function definition and the code for that function.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by