Abstract Experiment is an essential part of physics learning。 However, some physics experiments are difficult to carry out in real life。 Especially the optical portion of the experiment。 Its demanding is very harsh, In the experiment teaching even if they can meet these criteria, but due to the influence of external conditions。 Results and phenomena of experiment are often unsatisfactory。 Therefore, in experimental teaching, the vast majority of colleges and universities use Simulation experiments instead of actual experiments。 the operation of simulation experiment is Simple and quick, simulation experiment is not affected by the environment and location, it enables people in different places at the same time to experiment。 In addition, results and phenomenon of Simulation experiment can reflect the optical theory and Obtain scientific data。 It does not require a large amount of laboratory instruments and equipment as a result avoid the loss of the instrument effectively。
This article tells us how to use MATLAB which we study in university to develop a Simulation Young's double slit experiment software in details。 The development of The software is based on GUI of MATLAB, GUI is also known as graphical user interface。 Young's double-slit experiment phenomenon is spaced stripes of light and dark on the screen, position of light and dark stripes is related to wavelength, distance between the two slits and the distance of two slits to the screen。 On the GUI interface, designed two axes, one of the axes used to display double-slit interference experiment produce light and dark stripes, another axis is used to indicate changes in light intensity curve, On the right side of these two axes。 There are three editable text boxes and three static text box and a button, Static text box strings are set to the wavelength, the distance between the double slit and distance of double slit to the screen, then complete the set of static text box is placed above the editable text box as a description of each function in an editable text box。 After you finish setting, Clicking the Run button, MATLAB will automatically generate a series of codes, move the cursor to the button corresponding to the code and Young's double- slit interference experiment principle code is entered into, command results are displayed in grayscale design completed two axes。