How can i plot this equation using surface plot in Matlab?
1 次查看(过去 30 天)
显示 更早的评论
I want to plot the equation in attached picture. I will be appreciated if anybody help me . Coefficients are W=0.34*10^-3 Lambda=0.15*10^-6 t=400*10^-9 j0=1
0 个评论
采纳的回答
Voss
2024-2-13
W=0.34e-3;
Lambda=0.15e-6;
t=400e-9;
j0=1;
x = linspace(-W/2,W/2,100);
jxy = NaN(1,numel(x));
idx = abs(x) < W/2-Lambda^2/t;
jxy(idx) = j0./sqrt(1-(2*x(idx)/W).^2);
jxy(~idx) = j0*sqrt(W*t)/(2*Lambda);
NY = 100; % Note: the choice of y is arbitrary, as j(x,y) does not depend on y
surf(x,1:NY,jxy(ones(1,NY),:),'EdgeColor','none')
colorbar
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!