how to get fresnel diffraction output using freqspace????????i need circles in output which have less frequency near the centre and far away more frequencies...
1 次查看(过去 30 天)
显示 更早的评论
Lambda=633*10^-9;
>> dis=10*10^-3;
>> x= [1;150];
>> y=[1;150];
>> [p,q]=freqspace([1 : 150]);
>> [X,Y]=meshgrid(p,q);
>> R=(X.^2 + Y.^2);
>> F = exp((i.*pi.*R)./(Lambda.*dis));
>> mesh(F);
plzzz guys i'm very new to matlab...please help me to get the ouutput
i need circles in output which have less frequency near the centre and far away more frequencies...
i have error like this
Warning: Z must not be a scalar or vector, not rendering surface
Warning: Z must not be a scalar or vector, not rendering surface
Warning: Z must not be a scalar or vector, not rendering surface
Warning: Z must not be a scalar or vector, not rendering surface
Warning: Z must not be a scalar or vector, not rendering surface
Warning: Z must not be a scalar or vector, not rendering surface
another way [
x,y]=meshgrid(-150:0:150);
x= [1:4:150];
y=[1:4:150];
[p,q]=freqspace(38);
[X,Y]=meshgrid(p,q);
Lambda=633*10^-9;dis=10*10^-3;
R=(X.^2 + Y.^2);
plot(R,'DisplayName','R','YDataSource','R');figure(gcf)
F = exp((i.*pi.*R)./(Lambda.*dis));
plot(F);figure(gcf)
mesh(X,Y,F);
error:
Error using ==> mesh at 80
X, Y, Z, and C cannot be complex.
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!