필터 지우기
필터 지우기

Anything to use instead of TwoD

조회 수: 1 (최근 30일)
Maitham
Maitham 2014년 5월 2일
답변: Image Analyst 2014년 5월 3일
Anything to use instead of TwoD please, I have this error when I run the simulation:
The error:
??? Undefined function or method 'TwoD' for input argument of type 'function_handle'.
k = 2*pi;
z = 1000;
qx = linspace(-200, 200, 501);
qy = linspace(-200, 200, 501);
for ii=1:length(qx)
for jj=1:length(qy)
A(ii,jj) = TwoD(@(x, y) (integrand_exact(x, y, qx(ii), qy(jj), z, k)),...
0, 2*pi, 0, 10, 'Sector', true, 'AbsTol', 1e-5);
end
end

답변 (2개)

Image Analyst
Image Analyst 2014년 5월 3일
So if you don't know what TwoD is, why did you type it in? Don't tell me. . . you just snipped out a chunk of someone else's code without really knowing what it requires, how it runs, or what the algorithm is, and just blindly attempted to run that code fragment. If so, why don't you go back to the author or source of your snippet and ask them for it.

Andrew Newell
Andrew Newell 2014년 5월 2일
It looks like integral2 might fit your needs, although it doesn't have an option called 'Sector'.
  댓글 수: 2
Maitham
Maitham 2014년 5월 3일
Thank you Andrew, I used it just now and I have same error.
Andrew Newell
Andrew Newell 2014년 5월 3일
Same error? Do you mean it doesn't recognize integral2? Maybe there is something wrong with your path. Try the following:
which integral2 -all
Does it find integral2? Is there more than one? If you don't find it, try
restoredefaultpath
This will reset your path, and you can then try looking for integral2 again.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dependency Analysis에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by