function r=lifeordeath(x1,y1,x0,y0) %This file computes the number of illumatons. %that arrive at the point (x1,y1), assuming the death, %ray strikes 1 meter above the point (x0,y0). %If that number exceeds 100,a "1" is returned in the %variable "r"; otherwise a "0" is returned for "r". dosage=10000/(4*pi*((x1-x0)^2 + (y1-y0)^2 + 1)); if dosage>50 r=1; else r=0; end