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!