フィルターのクリア

Error in dolphchebyshev array

1 回表示 (過去 30 日間)
Kugen Raj
Kugen Raj 2012 年 4 月 8 日
% 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?

回答 (1 件)

Wayne King
Wayne King 2012 年 4 月 8 日
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.

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by