Finding the resultant of 3 perpendicular complex vectors
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Aakash
am 23 Jun. 2023
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Inertias and Loads finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!