How to draw a electromagnetic wave and plot it in 3D

98 vues (au cours des 30 derniers jours)
Olivia Hagedorn
Olivia Hagedorn le 23 Mar 2019
Commenté : josue contreras le 17 Jan 2020
I have an equation for an electric and magentic wave. Very simply they look like and . where A, ω, k are just constants. I want to plot these in a 3-dimensional space. I'm not sure if I even need to include the time t since I only need a snap shot at one instance in time. I have tried surface plot and fplot3 to no success. I want something that looks like: Capture.PNG

Réponse acceptée

Star Strider
Star Strider le 23 Mar 2019
I’m not certain what you want.
Try this:
E = 2;
H = 3;
t = linspace(0, 2*pi);
omega = 2;
k = pi/2;
x = ones(size(t));
c = cos(omega*t - k*x);
figure
patch([t fliplr(t)], [c zeros(size(c))], [zeros(size(t)) zeros(size(t))], 'b')
hold on
patch([t fliplr(t)], [zeros(size(t)) zeros(size(t))], [c zeros(size(c))], 'r')
hold off
grid on
view(40, 40)
producing this figure:
How to draw a electromagnetic wave and plot it in 3D - 2019 03 23.png
  1 commentaire
josue contreras
josue contreras le 17 Jan 2020
excuse me so how can i get the lhcp of that particular wave

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by