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...

3 views (last 30 days)
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.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!