Effacer les filtres
Effacer les filtres

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 vue (au cours des 30 derniers jours)
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.

Réponses (1)

Ankit Bhatnagar
Ankit Bhatnagar le 16 Mai 2017
Hi,
Use ./ for your divisions and .* for your multiplications.

Catégories

En savoir plus sur FPGA, ASIC, and SoC Development dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by