Borrar filtros
Borrar filtros

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 visualización (últimos 30 días)
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.

Respuestas (1)

Ankit Bhatnagar
Ankit Bhatnagar el 16 de Mayo de 2017
Hi,
Use ./ for your divisions and .* for your multiplications.

Categorías

Más información sobre FPGA, ASIC, and SoC Development en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by