版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、MATLABf真平面電磁波在不同媒介分界面上的入射、反射和折射、實驗目的:1、進一步學習MATLAB初步掌握GUI界面的編程。2、通過編程實現(xiàn)電磁波仿真效果圖。3、進一步理解平面電磁波的入射、反射和折射現(xiàn)象二、實驗要求:1、以電場為例,動態(tài)演示平面電磁波的傳播情況。2、可以任意設置媒介的介電常數(shù)和入射角。3、考慮金屬導體和空氣的分界面平面電磁波的入射、反射情況。三、實驗原理:電磁波從一種媒質入射到第二種媒質時,分界面使一部分能量反射回第一種 媒質,另一部分能量折射到第二種媒質中,反射波和折射波得大小和相位取決于 分界面兩側的媒質特性、極化方向和入射角大小等,當電磁波入射到理想導體表 面時,會發(fā)
2、生全反射。這一過程中包括的主要原理有以下三點。1、正弦平面波在媒質分界面的反射和折射規(guī)律波對分界面的入射是任意的,但為了方便,我們假設入射面與zox面重合。r.入鴕面Er0產 入射波 等相位面夕Ei°ejKirEi °ejK(xsin izcos i)JejKjEr0ejK(xsin r zcos)Et°ejKjdejK(xsin tz cos t )Ei波在z>0時發(fā)生入射和反射,在z<0時發(fā)生折射并令空間任意一點r處 的入射 波、反射波和折射波場強為:圖表1正弦波斜入射示意圖根據(jù)在z=0的界面上電場強度的切線分量相等的邊界條件,有故必有Ei(x,
3、y,0)Er(x,y,0) Et(x, y,0)K sin ik1 sin rk2 sin t反射定律:k1 sin ik2 sin r折射定律:2、正弦平面波對理想介質的斜入射垂直極化波垂直極化波對理想介質斜入射如圖所示, 由折射和反射定律,我們可以得到 在任意媒質中的場強。在第一煤質中jkizcos ijkizcos ijkpsin 1EiyEio(e11 Re 1)e 1jkizcos 1jk1 zcos 1jkxsin 1H1x ( Hi0 cos 1)(e1 Re 11 )e 1jzcos 1jk1zcos 1jxsin 1H 1z (H i0 sin 1)(eRe )e在第二煤質中
4、2 cos 11 cos 2Er0Ei 02 cos 11 cos 2Et0Ei02 2 cos 12 cos 11 cos 2E2yEt0ejk2 (xsin 2xcos 2)H2xH2z(Hto cos 2)e(Htosin 2)ejk2 (xsin 2 xcos 2)jk2 (xsin 2 xcos 2)圖表2垂直極化波斜入射平行極化波平行極化波對理想介質斜入射如圖所示, 由折射和反射定律,我們可以得到 在任意媒質中的場強。在第一煤質中E1x(Eiocos 1)(eE1z ( Eiosin 1)(ejzcos 1j/zcos 1Rejk1zc0s 1)eRejk1zcos1)ejxsin
5、 1jxsin 1H1y 也。侄 jk1zcos1Rejk1zcos 3 jk1xsin 1在第二煤質中2 cos 21 cos 1Er0Ei 02 cos 21 cos 1EtoE2xE2z(Eto cos 2)e(Eto sin 1)ejk? (xsin 2 zcos 2)jk2(xsin 2 zcos 2)2 2 cos 1 lEi 02 cos 21 cos 1jk2(xsin 2 zcos 2)H 2yHtoe圖表3平行極化波斜入射3、正弦平面波對理想導體表面的斜入射垂直極化波垂直極化波對理想導體斜入射如圖所示,入射波在導體表面發(fā)生全反射,我們可以得到在任意媒質中的場強。Ey Ei
6、Er Eio(ejkxcos e jkxcos )e jkzsinj2Ei0sin(kxcos )e jkzsinjkxcosjkxcos jkzsinHx Hi sin Hr sin Hio sin e e ej2Hi0sin sin(kxcos )e jkzsinjkxcosjkxcos jkzsinHz Hi cos Hr cos Hi0 cos e e e2Hi0cos cos(kxcos )e jkzs1n平行極化波雅舄麗川垂直極化波對理想導體斜入射如圖所示,入射波在導體表面發(fā)生全反射,我 們可以得到在任意媒質中的場強。Ex 2Ei0sin cos(kxcos )e jkzsinEz
7、 j 2Ei0 cos sin(kxcos )e jkzsinHy 2H i0cos(kxcos )e jkzsin四、實驗程序;實驗程序比較長,可參見此文件夾中的肛與_文件。(附件)生成的界面:五、實驗總結;這次實驗總體感覺收獲比較大。首先,之前學習的 MATLABTB是基于圖片之類的編程,沒有學習過GUI的使用。通過這次實驗,我初步學習了一下 GUI,算是現(xiàn)學現(xiàn)賣吧。雖然學的不是很深,但是對于基本的功 能的使用應該還是可以的。再次,對于電磁場地學習都是停留在書面作業(yè)上,通過這次實驗,加深了我對電磁場傳播的理解。最后,其實如果只有我一個人,應該是很難完成這次實驗的,在這期間有同學的幫忙和合作
8、。通過這次實驗,感受到合作的力量,不懂要問吶。程序代碼: 器 Srfunction varargout = jm(varargin)% JM M-file for jm.fig% JM, by itself, creates a new JM or raises the existing% singleton*.% H = JM returns the handle to a new JM or the handle to% the existing singleton*.% JM('CALLBACK',hObject,eventData,handles,)calls the
9、local% function named CALLBACK in JM.M with the given input arguments.%JM('Property','Value',)creates a new JM or raises thepairs% existing singleton*. Startingfrom the left, property valueare% applied to the GUI before jm_OpeningFcn gets called. An% unrecognized property name or inv
10、alid value makes property application% stop. All inputs are passed to jm_OpeningFcn via varargin. % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to he
11、lp jm% Last Modified by GUIDE v2.5 13-May-2011 00:01:24% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name' ,mfilename,'gui_Singleton',gui_Singleton,'gui_OpeningFcn',jm_OpeningFcn,'gui_OutputFcn',jm_OutputFcn,'gui_LayoutFcn'
12、,口,.'gui_Callback',);if nargin && ischar(varargin1)gui_State.gui_Callback = str2func(varargin1); end if nargoutvarargout1:nargout = gui_mainfcn(gui_State, varargin:);elsegui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT% - Executes just before jm is made vi
13、sible.function jm_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line argumen
14、ts to jm (see VARARGIN)% Choose default command line output for jm handles.output = hObject;% Update handles structure guidata(hObject, handles);% UIWAIT makes jm wait for user response (see UIRESUME) % uiwait(handles.figure1);% - Outputs from this function are returned to the command line. function
15、 varargout = jm_OutputFcn(hObject, eventdata, handles)% varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Get default command line ou
16、tput from handles structure varargout1 = handles.output;% - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles) axes(handles.axes1);mu1=1; %c' ?心?6 1mu2=1; %c' ?心?62w=get(handles.edit5);w=str2num(w.String);%? ? ? ea=get(handles.edit3);epsilon1=s
17、tr2num(a.String);%?6 ? 6 1 心? d ? e 心?3£ e y 尚品b=get(handles.edit4);epsilon2=str2num(b.String)%?6 ? 6 2 心? d ? e ?3£ e y;k1=w*sqrt(mu1*epsilon1);k2=w*sqrt(mu2*epsilon2);sita=get(handles.edit1);sita=str2num(sita.String);sita1=asind(k1*sind(sita)./k2);xv = 0:pi/10:20*pi;ym=xv;%plot(ym)er=0.5
18、;for i=1:900yv = sin(xv+pi/30*i);%>>>>2 D?o-e yx=-xv*sind(sita);y=xv*cosd(sita);x=x+cosd(sita)*yv;y=y+sind(sita)*yv;xv1 = 0:pi/10:20*pi;yv1 = sqrt(1-er*er)*sin(xv-pi/30*i);%>>> ' ? ?2 - D?o- 6 yx1=xv1*sind(sita);y1=xv1*cosd(sita);x1=x1-2*cosd(sita)*yv1;y1=y1+sind(sita)*yv1;x
19、v2 = 0:pi/10:20*pi;yv2 = er*sin(xv-pi/30*i);%>>>? ?2 - D?o- e yx2=xv2*sind(sita1);y2=xv2*cosd(sita1);x2=x2-cosd(sita1)*yv2;y2=y2+sind(sita1)*yv2;%plot(zeros(1:81)%plot(-40:0.01:40,0)%hold on%plot(0,-60:0.01:60)器 Sr%hold onplot(x,y,x1,y1,x2,-y2,-50 50,0 0,'k' ,0 0,-50 50,'k')
20、;su=get(handles.edit2);su=str2num(su.String);sudu=1/su;pause(sudu)end function edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hOb
21、ject,'String') returns contents of edit2 as text% str2double(get(hObject,'String') returns contents of edit2 as a double% - Executes during object creation, after setting all properties.function edit2_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventda
22、ta reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' ),get(0, 'defa
23、ultUicontrolBackgroundColor')set(hObject, 'BackgroundColor' , 'white' );end% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLABfunction% handles structure with handles and user data (see GUIDATA)edit3_Callback(hObject, event
24、data, handles)% hObject handle to edit3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit3 as text% str2double(get(hObject,'String') returns c
25、ontents of edit3 as a double% - Executes during object creation, after setting all properties.function edit3_CreateFcn(hObject, eventdata, handles) % hObject handle to edit3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until afte
26、r all CreateFcns% Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' ),get(0, 'defaultUicontrolBackgroundColor')set(hObject, 'BackgroundColor' , 'white' ); end function edit1
27、_Callback(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit1 as text% str2double(get(hObject,
28、9;String') returns contents of edit1 as a double% - Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)calledcalled% eventdata reserved - to be defined in a future version of MATLAB % handles empt
29、y - handles not created until after all CreateFcns % Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' ),get(0, 'defaultUicontrolBackgroundColor')尚品93set(hObject, 'BackgroundColor' ,
30、 'white' ); end function edit5_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edi
31、t2 as text% str2double(get(hObject,'String') returns contents of edit2 as a double% - Executes during object creation, after setting all properties.function edit5_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future versio
32、n of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' ),get(0, 'defaultUicontrolBackgroundColor')set(hObject,
33、'BackgroundColor' , 'white' );end function edit8_Callback(hObject, eventdata, handles)% hObject handle to edit8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String'
34、;) returns contents of edit8 as text% str2double(get(hObject,'String') returns contents of edit8 as a double% - Executes during object creation, after setting all properties. function edit8_CreateFcn(hObject, eventdata, handles)% hObject handle to edit8 (see GCBO)% eventdata reserved - to be
35、 defined in a future version of MATLABcalledcalled臂舄的川% handles empty - handles not created until after all CreateFcns% Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' ),get(0, 'defaultUicont
36、rolBackgroundColor')set(hObject, 'BackgroundColor' , 'white' ); end function edit10_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDA
37、TA)% Hints: get(hObject,'String') returns contents of edit2 as text% str2double(get(hObject,'String') returns contents of edit2 as a double% - Executes during object creation, after setting all properties.function edit10_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - han
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 陰道縱隔的健康宣教
- 前置胎盤的健康宣教
- JJF(陜) 048-2021 一體化振動變送器校準規(guī)范
- 學期課程評估與反饋機制計劃
- 行政部效率提升項目實施計劃
- 城市規(guī)劃保安工作計劃
- 心肺復蘇急救措施培訓緊急救護與護理課件
- 提高供水質量的實施方案計劃
- 活動現(xiàn)場的保安組織與指揮計劃
- 成本優(yōu)化與價值鏈管理培訓
- 國開人力資源管理1-13章自測試題及答案
- 部編版六年級語文上第八單元復習課件
- 企業(yè)年終頒獎晚會公司年會PPT
- 最新VTE指南解讀(靜脈血栓栓塞癥的臨床護理指南解讀)
- 湘教版勞動教育初中第八課生炒檸檬鴨教案
- (格式已排好)國家開放大學電大《計算機應用基礎(專)》終結性考試大作業(yè)答案任務一
- 課程與教學論(王本陸)PPT通用課件
- 麗聲北極星分級繪本第一級上 I Can See課件
- BUCK電路的Saber仿真設計說明
- word公章模板
- 古代文論知識點總結
評論
0/150
提交評論