![MATLAB仿真平面電磁波在不同媒介分界面上的入射_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-5/5/8859fd58-73e9-4db4-9d68-37527e8127ff/8859fd58-73e9-4db4-9d68-37527e8127ff1.gif)
![MATLAB仿真平面電磁波在不同媒介分界面上的入射_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-5/5/8859fd58-73e9-4db4-9d68-37527e8127ff/8859fd58-73e9-4db4-9d68-37527e8127ff2.gif)
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、看品呎MATLAB仿真平面電磁波在不同媒介分界面上的入射、反射和折射一、實驗目的:1、進一步學習MATLAB,初步掌握GUI界面的編程。2、通過編程實現(xiàn)電磁波仿真效果圖。3、進一步理解平面電磁波的入射、反射和折射現(xiàn)象二、實驗要求:1、以電場為例,動態(tài)演示平面電磁波的傳播情況。2、可以任意設置媒介的介電常數(shù)和入射角。3、考慮金屬導體和空氣的分界面平面電磁波的入射、反射情況。二、實驗原理:種媒質入射到第二種媒質時,分界面使一部分能量反射回第一種媒質,另一部分能量折射到第二種媒質中,反射波和折射波得大小和相位取決于分界面兩側的媒質特性、極化方向和入射角大小等,當電磁波入射到理想導體表面時,會發(fā)生全反
2、射。這一過程中包括的主要原理有以下二點。1、正弦平面波在媒質分界面的反射和折射規(guī)律波對分界面的入射是任意的,但為了方便,我們假設入射面與zox面重合。波在z>o時發(fā)生入射和反射,在z<o時發(fā)生折射并令空間任意一點r處的入射根據(jù)在z=0的界面上電場強度的切線分量相等的邊界條件,有E(x,y,0)=E(x,y,0)=E(x,y,0)irt故必有ksin0=ksin0=ksin01i1r2反射定律:0=0ir折射定律:ksin0=ksin01i2r2、正弦平面波對理想介質的斜入射垂直極化波垂直極化波對理想介質斜入射如圖所示,由折射和反射定律,我們可以得到在任意媒質中的場強。在第一煤質中E
3、=E(e-jkZcos%+Rejk$cos%)e-jk1xsin011yi0<H=(Hcos6)(e-jk1zcos%Rejk1zcos6)ejkXsin61xi01H=(Hsin6)(ejk1zcos%+Rejk1z.cosOi)ejkxsin011zi01111111在第二煤質中&J耳cos6耳cos6E=t+2Er0耳cos6+qcos6i021122qcos6E=21E10耳cos6+qcos6i02112E二Eejk2(xsin62+xcos62)2y10<H=(Hcos6)ejk2(xsin62+xcos62)2x102H=(Hsin6)ejk2(xsin62+
4、xcos62)2zt02圖表2垂直極化波斜入射平行極化波平行極化波對理想介質斜入射如圖所示,由折射和反射定律,我們可以得到在任意媒質中的場強。在第一煤質中E=(Ecos6)(e-jkZcos%+Rejk1z.cos%)ejkxsin611xi01<E-(-Esin6)(ejk1zcos61Rejk1zcos61)ejk1xsin611zi01HH(e-jkZcos6Rejkfcos6)e-jkxsin61yi0在第二煤質中耳cos0一耳cos0,E=2211Er0耳cos0+qcos0i02211Et0Ei02qcos021耳cos0+qcos02211E-(Ecos0)e一j&
5、2(xsin0?+zcos&2)2x102<E-(一Esin0)e一jk2(xsin02+zcos。?)2z101HHe-jk2(xsin02+zcos02)2yt0圖表3平行極化波斜入射3、正弦平面波對理想導體表面的斜入射垂直極化波垂直極化波對理想導體斜入射如圖所示,入射波在導體表面發(fā)生全反射,我們可以得到在任意媒質中的場強。EE+EE(ejkxcos0e-jkxcos0)e-jkzsin0yiri0-j2Esin(kxcos0)e-jkzsin0i0H-Hsin0Hsin0-Hsin0ejkx罰e-jkxcos0e-jkzsin0/xiri0-j2Hsin0sin(kxcos
6、0)e-jkzsinei0H-Hcos0+Hcos0-Hcos0ejxcos0+e-jkxcos0e-jkzsin0ziri0-2Hcos0cos(kxcos0)e-jkzsinei0平行極化波AX垂直極化波對理想導體斜入射如圖所示,入射波在導體表面發(fā)生全反射,我們可以得到在任意媒質中的場強。2Vgf,-ZE=2Esin0cos(kxcos0)ejsinexi0<E-j2Ecos0sin(kxcos0)e-jkzsinezi0H-2Hcos(kxcos0)e-jkzsinelyi0四、實驗程序;實驗程序比較長,可參見此文件夾中的j.m文件。(附件)生成的界面:/.、50電嵐皺的折射與丘射
7、30AJpftS2D0運行-r3窕五、實驗總結;這次實驗總體感覺收獲比較大。首先,之前學習的MATLAB都是基于圖片之類的編程,沒有學習過GUI的使用。通過這次實驗,我初步學習了一下GUI,算是現(xiàn)學現(xiàn)賣吧。雖然學的不是很深,但是對于基本的功能的使用應該還是可以的。再次,對于電磁場地學習都是停留在書面作業(yè)上,通過這次實驗,加深了我對電磁場傳播的理解。最后,其實如果只有我一個人,應該是很難完成這次實驗的,在這期間有同學的幫忙和合作。通過這次實驗,感受到合作的力量,不懂要問吶。程序代碼:functionvarargout=jm(varargin)%JMM-fileforjm.fig%JM,byits
8、elf,createsanewJMorraisestheexisting%singleton*.%H=JMreturnsthehandletoanewJMorthehandleto%theexistingsingleton*.%JM('CALLBACK',hObject,eventData,handles,.)callsthelocal%functionnamedCALLBACKinJM.Mwiththegiveninputarguments.%JM('Property','Value',.)createsanewJMorraisesthe%ex
9、istingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforejm_OpeningFcngetscalled.An%unrecognizedpropertynameorinvalidvaluemakespropertyapplication%stop.Allinputsarepassedtojm_OpeningFcnviavarargin.%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone%instancetorun
10、(singleton)".%Seealso:GUIDE,GUIDATA,GUIHANDLES%EdittheabovetexttomodifytheresponsetohelpjmBegininitializationcode-DOgui_Singleton=1;gui_StateNOTEDIT%LastModifiedbyGUIDEv2.513-May-201100:01:24=struct('gui_Name','gui_Singleton','gui_OpeningFcn','gui_OutputFcn','
11、;gui_LayoutFcn','gui_Callback',&&ischar(varargin1)mfilename,.gui_Singleton,.jm_OpeningFcn,.jm_OutputFcn,.,.);ifnargingui_State.gui_Callback=str2func(varargin1);endifnargoutvarargout1:nargout=gui_mainfcn(gui_State,varargin:);elsegui_mainfcn(gui_State,varargin:);end%Endinitializati
12、oncode-DONOTEDIT%-Executesjustbeforejmismadevisible.functionjm_OpeningFcn(hObject,eventdata,handles,varargin)%Thisfunctionhasnooutputargs,seeOutputFcn.%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%varargincommandlinear
13、gumentstojm(seeVARARGIN)%Choosedefaultcommandlineoutputforjmhandles.output=hObject;%Updatehandlesstructureguidata(hObject,handles);%UIWAITmakesjmwaitforuserresponse(seeUIRESUME)%uiwait(handles.figure1);%-Outputsfromthisfunctionarereturnedtothecommandline.functionvarargout=jm_OutputFcn(hObject,eventd
14、ata,handles)%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Getdefaultcommandlineoutputfromhandlesstructurevarargout1=handles.output;%-Executesonbuttonpressinpushbu
15、tton1.functionpushbutton1_Callback(hObject,eventdata,handles)axes(handles.axes1);mu1=1;%czApAElmu2=1;%czApAE2w=get(handles.edit5);w=str2num(w.String);%T«»pAEa=get(handles.edit3);epsilon1=str2num(a.String);%e0ElpAIa0epQ3£Eyb=get(handles.edit4);epsilon2=str2num(b.String)%eOE2pAIaOepQ3
16、163;Ey;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;fori=1:900yv=sin(xv+pi/30*i);%>>>>2Bt°_Eyx=-xv*sind(sita);y=xv*cosd(sita);x=x+cosd(sita)*yv;y=y+sind(sita)*y
17、v;xv1=0:pi/10:20*pi;yv1=sqrt(1-er*er)*sin(xv-pi/30*i);%>>>zEa2Bl°Eyx1=xv1*sind(sita);y1=xv1*cosd(sita);x1=x1-2*cosd(sita)*yv1;y1=y1+sind(sita)*yv1;xv2=0:pi/10:20*pi;yv2=er*sin(xv-pi/30*i);%>>>dUEa2Bl°_Eyx2=xv2*sind(sita1);y2=xv2*cosd(sita1);x2=x2-cosd(sita1)*yv2;y2=y2+sin
18、d(sita1)*yv2;%plot(zeros(1:81)%plot(-40:0.01:40,0)%holdon%plot(0,-60:0.01:60)%holdonplot(x,y,x1,y1,x2,-y2,-5050,00,'k',00,-5050,'k');su=get(handles.edit2);su=str2num(su.String);sudu=1/su;pause(sudu)endfunctionedit2_Callback(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eve
19、ntdatareservedtobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofedit2astext%str2double(get(hObject,'String')returnscontentsofedit2asadouble%-Executesduringobjectcreation,aftersettingallproperties.functio
20、nedit2_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareservedtobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,
21、9;BackgroundColor'),get(0,'defaultUicontrolBackgroundColor')set(hObject'BackgroundColor','white');end%hObjecthandletopushbutton1(seeGCBO)%eventdatareservedtobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)functionedit3_Callback(hObject,
22、eventdata,handles)%hObjecthandletoedit3(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofedit3astext%str2double(get(hObject,'String')returnscontentsofedit3asadouble%-Executesd
23、uringobjectcreation,aftersettingallproperties.functionedit3_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit3(seeGCBO)%eventdatareservedtobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeIS
24、PCandCOMPUTER.ifispc&&isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor')set(hObject'BackgroundColor','white');endfunctionedit1_Callback(hObject,eventdata,handles)%hObjecthandletoedit1(seeGCBO)%eventdatareservedtobedefinedinafuturev
25、ersionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofedit1astext%str2double(get(hObject,'String')returnscontentsofedit1asadouble%-Executesduringobjectcreation,aftersettingallproperties.functionedit1_CreateFcn(hObject,eventdata,
26、handles)%hObjecthandletoedit1(seeGCBO)%eventdatareservedtobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,'BackgroundColor'),get(0,'
27、defaultUicontrolBackgroundColor')set(hObject'BackgroundColor','white');endfunctionedit5_Callback(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,
28、9;String')returnscontentsofedit2astext%str2double(get(hObject,'String')returnscontentsofedit2asadouble%-Executesduringobjectcreation,aftersettingallproperties.functionedit5_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofM
29、ATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor')set(hObject'BackgroundColor','white
30、39;);endfunctionedit8_Callback(hObject,eventdata,handles)%hObjecthandletoedit8(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofedit8astext%str2double(get(hObject,'String')ret
31、urnscontentsofedit8asadouble%-Executesduringobjectcreation,aftersettingallproperties.functionedit8_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit8(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusu
32、allyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor')set(hObject'BackgroundColor','white');endfunctionedit10_Callback(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCB
33、O)%eventdatareservedtobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofedit2astext%str2double(get(hObject,'String')returnscontentsofedit2asadouble%-Executesduringobjectcreation,aftersettingallproperties.functionedit10_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareservedtobedefinedinafutureversionofMATLAB%
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 科技發(fā)展與學科教育的互促關系研究
- 科技教育編程教育的普及與推廣
- DB4453T 30-2025廣藿香組培苗生產技術規(guī)程
- DB35T 2232-2024海峽兩岸共通 火龍果生產技術規(guī)程
- 東莞企業(yè)勞動合同范本
- 個人貸款房屋抵押合同模板大全
- 業(yè)務經營權轉讓合同
- 個人車位共有權買賣合同
- 臨時倉儲合同范本
- 兩人股權轉讓合同范本
- IEC-62368-1-差異分享解讀
- 如何當好學校的中層干部
- SWITCH塞爾達傳說曠野之息-1.6金手指127項修改使用說明教程
- 2022-2023學年廣東省佛山市順德區(qū)高三(下)模擬英語試卷
- 節(jié)后復工培訓內容五篇
- GB/T 33322-2016橡膠增塑劑芳香基礦物油
- GA 1051-2013槍支彈藥專用保險柜
- 某水毀公路維修工程施工方案
- 家庭病房工作制度和人員職責
- 建設工程監(jiān)理合同示范文本GF-2018-0202
- 2022質檢年終工作總結5篇
評論
0/150
提交評論