MATLAB Problems M.1 When a wave is incident on an interface at oblique incidence, the angle of the  refracted wave is controlled by Snell's law (see Fig 1). Write a MATLAB function 

advertisement
MATLAB Problems
M.1 When a wave is incident on an interface at oblique incidence, the angle of the refracted wave is controlled by Snell's law (see Fig 1). Write a MATLAB function snells_law that takes as its input the refracted angle (in degrees) and the wave speeds in the two media and returns the required incident angle (in degrees), i.e. the calling sequence should look like ang_in =snells_law(ang_out, c1, c2)
Take the two media to be water (c1 =1480 m/sec) and steel (c2 = 5900 m/sec). What are the incident angles for refracted angles of 0, 45, 70, and 90 degrees for this case? What happens if the incident angle was 15 degrees?
M.2 Write a MATLAB script that generates 200 refracted angles ranging from 0 to 75 degrees and uses the function from problem 1 to generate the corresponding incident angles. The script should then plot the resulting incident angles versus the refracted angles.
Snell's law
c
θ1
1
sin θ1 sin θ 2
=
c1
c2
θ2
c2
Fig. 1
Download