Finding the resultant of 3 perpendicular complex vectors
8 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to find the resultant vector of 3 perpendicular complex vectors in x-, y-, and z-direction.
Please see the code below:
MATLAB CODE:
%% Define parameters
N = 8;
r = 0.075;
l = 2;
%% Feed Locations OR Element Position
for n = 1: N
pos(n,:) = [r*cos(2*pi*(n-1)/N) r*sin(2*pi*(n-1)/N) 0];
end
%% Phase Shift assigned on each element (depends on l)
phs_element = NaN(N,1);
for n = 1 : N
phs_element(n,:) = (2*pi*n*l/N)*(180/pi);
end
%% Define array
arr = conformalArray;
dip = dipole;
dip.Length = 0.058709;
dip.Width = 0.0012491;
arr.Element = dip;
arr.ElementPosition = pos;
arr.PhaseShift = phs_element;
%% Calculate Fields on x-y plane
x = [0.5:0.5:1];
y = [0.5:0.5:1];
[X,Y] = meshgrid(x,y);
p = [X(:)';Y(:)';1*ones(1,prod(size(X)))];
[E,H] = EHfields(arr,2.4e9,p);
p
E
The E field vector is a 3x4 matrix, where 1st column of E represents the x-, y-, and z- component respectively at position given by the 1st column of the "p" matrix.(NOTE: The column of matrix "p" represent the x-, y-, and z- coordinates)
How do I find the resultant of E field at those points on p?
Thank You.
Biplob Biswas
Research Scholar
0 个评论
采纳的回答
Aakash
2023-6-23
To calculate the magnitude of the resultant E field at each point in p, sum up the components and divide by magnitude at each point.
You can try the code below:
E_mag = vecnorm(E); % Calculates the magnitude of each E field vector
E_res = sum(E)./E_mag; % Sums up the x-, y-, and z- components and divides by the magnitude
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Inertias and Loads 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!