Bonjour,

Equation :
AF= ∑_(m=0)^(N-1) e^(j*m*pi*cosθ+j*m*alpha)
JE veux ploter AF (0) à n sur le même figure .
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
clc
close all
const=1; lambda=1; k=2*pi/lambda;c=3e8;f=12e8;lam=c/f;
N=input('Number of elements in array=');
theta=linspace(0,2*pi,500); 
d=lam/2 ; % distance between the elements 
I=ones(1,N); %Identical elements 
AF=zeros(1,length(theta));
f=12e9;
delta30deg=18.75e-12;
delta60deg=2;53e-11;
alpha=2*pi*f*delta30deg;
phi = linspace(0,2*pi,len);
% 3D-Plot
[T,P] = meshgrid(theta,phi);
PSY = 2.*pi.*d.*cos(T)+beta;
R = 1/N.*sin(N/2.*PSY)./sin(1/2.*PSY);
%Convert Spherical to Cartesian coordinates
[X,Y,Z] = sph2cart(T,P,R);
 
figure(3)
surf(X,Y,Z);
title('Visualization Array Factor 3D');
 
%Array factor 
for n=1:length(I) 
 
AF=AF+abs(I(n))*exp(1i*((n-1)*pi*cos(theta)+(1i)*n*alpha));
end
AF=AF/max(AF); %normal 
f1=figure(); 
set(f1,'Name','Simulation Plot for Linear Arrays of Isotropic Elements ') 
rangedb = 15; increments =3; rays = 12; 
h=polar_dB(theta,AF,15,increments,rays);
Merci