Page 380 - Applied Numerical Methods Using MATLAB
P. 380
PROBLEMS 369
ž Since the speed of light in the transparent material is v = c/n (c is the
speed of light in the free space), the traveling time to be minimized
can be expressed as
d 1 nd 2 d 3
Min f(θ,d,n, L) = + + (P7.10.1)
c cos θ 1 c cos θ 2 c cos θ 3
ž The sum of the three horizontal distances traveled by the light ray must
be L:
3
g(θ,d,n, L) = d i tan θ i − L = 0 (P7.10.2)
i=1
ž The horizontal distance L and the index of refraction n are addition-
ally included in the input argument lists of both the objective function
f(θ, d,n, L) and the constraint function g(θ, d,n, L) regardless of
whether or not they are used in each function. It is because the objective
function and the constraint function of the MATLAB routine “fmin-
con()” must have the same input arguments.
(a) Compose a program “nm7p10a.m” that solves the above constrained
minimization problem to find the three angles θ 1 ,θ 2 ,and θ 3 for n =
1.52, d 1 = d 2 = d 3 = 1[cm], and different values of L = 0.6:0.3:6 and
plots sin(θ 1 )/sin(θ 2 ) and sin(θ 3 )/sin(θ 2 ) versus L.
(b) Compose a program “nm7p10b.m” that finds the three angles θ 1 ,θ 2 ,
and θ 3 for L = 3cm, d 1 = d 2 = d 3 = 1 cm, and different values of
n = 1:0.01:1.6 and plots sin(θ 1 )/sin(θ 2 ) and sin(θ 3 )/sin(θ 2 ) versus n.
P
d 1 q 1 a light ray speed of light = c
air
speed of light = c /n
d 2 q 2 transparent material
with refraction index n
air
d 3 q 3
Q
L
Figure P7.10 Refraction of a light ray at an air–glass interface.
7.11 A Constrained Optimization on OFDM System
In order to find the average modulation order x i for each userofan OFDM
(orthogonal frequency division multiplex) system that has N(128) subchan-
nels to assign to each of the four users in the environment of noise power

