필터 지우기
필터 지우기

Write a function that is called like this: mbd = spherical_​mirror_abe​rr(fn,D), where all arguments are scalars, fn is the “f-number” of a concave spherical mirror, D is its diameter in millimeters, and mbd is the mean blur diameter in millimeters. Th

조회 수: 1 (최근 30일)
I am getting problem in answer please help me to find it.
function mbd= spherical_mirror_aberr(fn,D)
format long
f= fn.*D;
Delta_x= 0.01;
x= 0:Delta_x:D/2;
theta= asin(x/2.*f);
d= 2.*f.*tan(2.*theta).*((1./cos(theta))-1);
mbd= (((8.*Delta_x)/D^2).* sum(x(:).*d(:)));
end
ans for (8,152) is 0.029743954651679 but i am not getting this.

답변 (1개)

Ankit Bhatnagar
Ankit Bhatnagar 2017년 5월 16일
Hi,
Use ./ for your divisions and .* for your multiplications.

카테고리

Help CenterFile Exchange에서 FPGA, ASIC, and SoC Development에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by