How can i plot this equation using surface plot in Matlab?

6 visualizaciones (últimos 30 días)
Ali Moosazadeh
Ali Moosazadeh el 13 de Feb. de 2024
Comentada: Voss el 18 de Feb. de 2024
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

Respuesta aceptada

Voss
Voss el 13 de Feb. de 2024
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

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by