Two-slit interference intensity and interference fringe _matlab of light

Source: Internet
Author: User
% light double slit interference intensity and interference fringes
Clear,n=3;dphi= ( -1:0.01:1) *n*2*pi;
I=4*cos (DPHI/2). ^2;
Figure,subplot (2,1,1)
Plot (dphi,i, ' linewidth ', 2), grid On,axis tight
Set (GCA, ' XTick ', (-n:n) *2*pi)
Fs=16;title (' Light's double seam interference intensity and interference stripe ', ' fontsize ', FS)
Xlabel (' Difference \delta\it\phi ', ' fontsize ', FS)
Ylabel (' Relative Strength \iti/i\rm_0 ', ' fontsize ', FS)
Subplot (2,1,2), C=linspace (0,1,64) ';
ColorMap ([c,0*c,0*c]);
Image (I*16)

Axis Off,title (' light's double seam interference intensity and interference stripe ', ' fontsize ', FS)


The usage analysis of imshow and image

Same point:
Both imshow and image produce an image object.

The difference is as follows:
Two ways to use 1.imshow:
1) imshow (path and filename string)
2) imshow (image matrix)
If the current figure has an axis, Imshow will display the resulting image object (that is, the object) in the current axis;
If the current figure does not exist, Imshow produces a hidden axis and displays the resulting image object in it;
2.imshow (path and filename string) is equivalent to: m=imread (path and filename string); Imshow (M);
3.imshow does not expand the fill image data, that is, does not stretch the image to fill the axis, but change the axis aspect ratio to adapt to the image data;
The use of 4.image:
M=imread (path and filename string); image (M);
The 5.image does not change the size of the axis, but rather expands the fill image matrix so that it fills the axis area.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.