How to plot in 2D this equation?
1 次查看(过去 30 天)
显示 更早的评论
I have an equation and need to plot this like
3 个评论
Dyuman Joshi
2023-4-20
I think 'r' is not supposed to be a constant in the definition of E and in the function handle, f. Can you clarify this?
采纳的回答
KSSV
2023-4-20
x0 = linspace(-5,5,200);
y0 = x0;
n=10;a=0.1;
w0=0.01;m=0;
[x0,y0] = meshgrid(x0,y0) ;
r=(sqrt(x0.^2 +y0.^2));
f = @(x0,y0) ((sinh(r./w0)).^n).*exp(-(r.^2/w0^2)).*((x0+1i.*y0).^m);
surf(x0,y0,abs(f(x0,y0)))
shading interp
0 个评论
更多回答(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!