How to plot these equations as a 3d surface plot?

2 ビュー (過去 30 日間)
ajay
ajay 2011 年 4 月 4 日
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 !

採用された回答

Matt Tearle
Matt Tearle 2011 年 4 月 4 日
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)

その他の回答 (1 件)

ajay
ajay 2011 年 4 月 4 日
Thanks for your input Matt.
It was what I was looking for.. !

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by