フィルターのクリア

IS THERE ANY PROBLEM IN THIS PROGRAM OF FRESNEL DIFFRACTION

3 ビュー (過去 30 日間)
TULIKA
TULIKA 2014 年 8 月 9 日
コメント済み: TULIKA 2014 年 8 月 10 日
Lambda=633*10^-9;
z=10*10^-3;
x=1:150;
y=1:150;
[p,q]=freqspace([1 150],whole);
[X Y]=meshgrid(p,q);
R=(X.^2 + Y.^2);
Z=exp(1i.*pi.*lambda.*z.*R);
mesh(Z);
PLZZZ HELP,I CANT FIND..... AND GIVE ME A SOLUTION
  2 件のコメント
Geoff Hayes
Geoff Hayes 2014 年 8 月 9 日
tulika - are you saying that there is a problem, and if so, what is it? Please format your code so that it is readable. Highlight it and press the {}Code button.
TULIKA
TULIKA 2014 年 8 月 9 日
Lambda=633*10^-9;
z=10*10^-3;
x=1:150;
y=1:150;
[p,q]=freqspace([1 150],whole);
[X Y]=meshgrid(p,q);
R=(X.^2 + Y.^2);
Z=exp(1i.*pi.*lambda.*z.*R);
mesh(Z);
it didn't give any result.and i have to code through freqspace function and i cant change this...plzz help me..

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2014 年 8 月 9 日
I was able to run your code (after correcting the quotes around 'whole' and changing lambda to Lambda in your Z assignment), but it didn’t produce the results I expected.
When I went online to troubleshoot it (the Wikipedia article on Fresnel diffraction is a good source), I also discovered Fresnel diffraction in two steps on stackoverflow. You might take a look at both to see what the problem may be with your code.
  4 件のコメント
Star Strider
Star Strider 2014 年 8 月 9 日
I erased the code I used, but I probably used hold to plot the real and imag parts, and then abs to see if that made a difference. Code ran, but the plotted results weren’t as I’d expected.
TULIKA
TULIKA 2014 年 8 月 10 日
plz send me your code...i want to see the difference.and how to avoid this this problem.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by