A Guide to MATLAB for Beginners and Experienced Users, Second Edition

Suppose that we need to decide where to put light fixtures on the ceiling of a room measuring 10 m by 4 m by 3 m high in order to illuminate it best. For aesthetic reasons, we are asked to use a small number of incandescent bulbs. We want the bulbs to total a maximum of 300 watts. For a given number of bulbs, how should they be placed to maximize the intensity of the light in the darkest part of the room? We also would like to see how much improvement there is in going from one 300-watt bulb to two 150-watt bulbs to three 100-watt bulbs, and so on. To keep things simple, we assume that there is no furniture in the room and that the light reflected from the walls is insignificant compared with the direct light from the bulbs.
If there is only one bulb, then we want to put the bulb in the center of the ceiling. Let s picture how well the floor is illuminated. We introduce coordinates x running from 0 to 10 in the long direction of the room, and y running from 0 to 4 in the short direction. The intensity at a given point, measured in watts per square meter, is the power of the bulb, 300, divided by 4 ? times the square of the distance from the bulb. Since the bulb is 3 m above the point (5, 2) on...