How to plot these equations as a 3d surface plot?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to 'superimpose' E1(x, y) = 1.0 exp[-jk0(x cos(169) + y sin(169))] exp(j311) , E2(x, y) = 0.8 exp[-jk0(x cos(213) + y sin(213))] exp(j32) , E3(x, y) = 1.1 exp[-jk0(x cos(87) + y sin(87))] exp(j161) such equations and create a single 3d plot.
where the angles re in degrees and k0=2*pi/.33
any help will be appreciated !
0 Kommentare
Akzeptierte Antwort
Matt Tearle
am 4 Apr. 2011
When you use "j" do you mean the imaginary number (sqrt(-1))? If so, these functions have complex values, so how can you have a 3-D plot? Anyway, maybe something like this is what you're looking for:
[x,y] = meshgrid(linspace(-0.5,0.5,201));
k0 = 2*pi/0.33;
E1 = 1.0*exp(-1j*k0*(x*cosd(169) + y*sind(169))).*exp(1j*pi*311/180);
E2 = 0.8*exp(-1j*k0*(x*cosd(213) + y*sind(213))).*exp(1j*pi*32/180);
E3 = 1.1*exp(-1j*k0*(x*cosd(87) + y*sind(87))).*exp(1j*pi*161/180);
surf(x,y,real(E1),'linestyle','none','facealpha',0.4)
hold on
surf(x,y,real(E2),'linestyle','none','facealpha',0.4)
surf(x,y,real(E3),'linestyle','none','facealpha',0.4)
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots 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!