版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
MATLAB仿真平面電磁波在不同媒介分界面上的入射、反射和折射一、 實驗?zāi)康模?、 進一步學(xué)習(xí)MATLAB,初步掌握GUI界面的編程。2、 通過編程實現(xiàn)電磁波仿真效果圖。3、 進一步理解平面電磁波的入射、反射和折射現(xiàn)象二、 實驗要求:1、 以電場為例,動態(tài)演示平面電磁波的傳播情況。2、 可以任意設(shè)置媒介的介電常數(shù)和入射角。3、 考慮金屬導(dǎo)體和空氣的分界面平面電磁波的入射、反射情況.三、 實驗原理:一 種媒質(zhì)入射到第二種媒質(zhì)時,分界面使一部分能量反射回第一種媒質(zhì),另一部分能量折射到第二種媒質(zhì)中,反射波和折射波得大小和相位取決于分界面兩側(cè)的媒質(zhì)特性、極化方向和入射角大小等,當電磁波入射到理想導(dǎo)體表面時,會發(fā)生全反射。這一過程中包括的主要原理有以下三點.1、正弦平面波在媒質(zhì)分界面的反射和折射規(guī)律波、反射波和折射波場強為:波對分界面的入射是任意的,但為了方便,我們假設(shè)入射面與zox面重合。波在z〉0時發(fā)生入射和反射,在z<0時發(fā)生折射并令空間任意一點;處的入射波、反射波和折射波場強為:E=Ee-jK.r=Ee-jK1(xsinO.+ZcosO.)<E=Ee-jK.r=Ee-jK1(xsinOr+zcos0r)E=Ee-jK.r=Ee-jK\(xsinOf+zcosOf)It tO ' 10圖表1正弦波斜入射示意圖根據(jù)在z=0的界面上電場強度的切線分量相等的邊界條件,有E(x,y,0)=E(x,y,0)=E(x,y,0)故必'有 ksinO=ksinO=ksinO1i1r2t反射定律: O=O.r折射定律: ksinO=ksinO1 . 2r2、正弦平面波對理想介質(zhì)的斜入射①垂直極化波垂直極化波對理想介質(zhì)斜入射如圖所示,由折射和反射定律,我們可以得到在任意媒質(zhì)中的場強.在第一煤質(zhì)中E=E(e-jk1zcosO]+Rejk1zcos01)e-jk1xsin011y z0<H=(—Hcos0)(e-jk1zcos01—Rejk1zcos01)e-jk1xsin01H=(Hsin0)(e-jk1zcos01+Rejk]Zcos0])e-jk]Xsin0]I1zi0 1在第二煤質(zhì)中E_叩cos0一叩cos0er0叩cos0+叩cos0i02qcos0E_ 2 1 Et0叩cos0+叩cos0i0E_Ee-jk2(Xsin02+xcos02)<H _(—Hcos0)e-jk2(Xsin02+Xcos02)H _(Hsin0)e-jk2(xsin。2+xcos。?)I 2z 10 2圖表錯誤!未定義書簽。垂直極化波斜入射②平行極化波平行極化波對理想介質(zhì)斜入射如圖所示,由折射和反射定律,我們可以得到在任意媒質(zhì)中的場強。在第一煤質(zhì)中E_(Ecos0)(e-jk1zcos01+Rejk1zcos0])e-jk1xsin011x i0 1<E_(—Esin0)(e-jk1zcos01—Rejk1zcos01)e-jk1xsin01H_H.(e-jk1zcos0]—Rejk1zcos01)e-jk1xsin01在第二煤質(zhì)中E_叩cos0一叩cos0er0叩cos0+叩cos0i02qcos0E_ -2 1—Et0叩cos0+叩cos0i0E_(Ecos0)e-jk2(xsin02+zcos02)E_(—Esin0)e-jk2(xsin02+zcos02)H_H€—jk2(xsin02+zcos%)圖表錯誤;未定義書簽。平行極化波斜入射3、正弦平面波對理想導(dǎo)體表面的斜入射①垂直極化波垂直極化波對理想導(dǎo)體斜入射如圖所示,入射波在導(dǎo)體表面發(fā)生全反射,我們可以得到在任意媒質(zhì)中的場強。E_E+E_E(€jkxcos0—€-jkxcos0)e—jkzsin0_j2Esin(kxcos0)e-jkzsin。H_—Hsin0—Hsin0_—H.sin0[ejkxcos0—e—jkxcos0]e—jkzsin0_—j2Hsin0sin(kxcos0)e-jkzsinoH_—Hcos0+Hcos0_—Hcos0[ejkxcos0+e-jkxcos0]e-jkzsin0z i r_—2Hcos0cos(kxcos0)e-jkz.sin0i0②平行極化波
垂直極化波對理想導(dǎo)體斜入射如圖所示,入射波在導(dǎo)體表面發(fā)生全反射,我們可以得到在任意媒質(zhì)中的場強.E=2Esin0cos(kxcos0)e-jkzsine<E=j2Ecos0sin(kxcos0)e-jkzsineH-2Hcos(kxcos0)e-jkzsinely i0四、實驗程序;實驗程序比較長,可參見此文件夾中的Mm文件。(附件)生成的界面:五、實驗總結(jié);這次實驗總體感覺收獲比較大。首先,之前學(xué)習(xí)的MATLAB都是基于圖片之類的編程,沒有學(xué)習(xí)過GUI的使用。通過這次實驗,我初步學(xué)習(xí)了一下GUI,算是現(xiàn)學(xué)現(xiàn)賣吧。雖然學(xué)的不是很深,但是對于基本的功能的使用應(yīng)該還是可以的。再次,對于電磁場地學(xué)習(xí)都是停留在書面作業(yè)上,通過這次實驗,加深了我對電磁場傳播的理解。最后,其實如果只有我一個人,應(yīng)該是很難完成這次實驗的,在這期間有同學(xué)的幫忙和合作。通過這次實驗,感受到合作的力量,不懂要問吶。程序代碼:
functionvarargout=jm(varargin)%JMM—fileforjm。fig% JM,byitself,createsanewJMorraisestheexisting% singleton*.%% H=JMreturnsthehandletoanewJMorthehandleto% theexistingsingleton*%% JM(’CALLBACK’,hObject,eventData,handles,。..)callsthelocal% functionnamedCALLBACKinJM.Mwiththegiveninputarguments%% JM('Property'’Value’,。..)createsanewJMorraisesthe% existingsingleton*.Startingfromtheleft,propertyvaluepairsare% appliedtotheGUIbeforejm_OpeningFcngetscalledAn% unrecognizedpropertynameorinvalidvaluemakespropertyapplication% stop.Allinputsarepassedtojm_OpeningFcnviavarargin.%%大SeeGUIOptionsonGUIDE'sToolsmenu.Choose”GUIallowsonlyone% instancetorun(singleton)"。%%Seealso:GUIDE,GUIDATA,GUIHANDLES%EdittheabovetexttomodifytheresponsetohelpjmLastModifiedbyGUIDEv2.513—May—201100:01:24NOTEDITmfilenamegui_Singleton,.@jm_OpeningFcnNOTEDITmfilenamegui_Singleton,.@jm_OpeningFcn,@jm_OutputFcn, .口,.。.口);gui_State=struct(’gui_Name','gui_Singleton’,’gui_OpeningFcn','gui_OutputFcn','gui_LayoutFcn’,’gui_Callback',ifnargin&&ischar(varargin{1}gui_State.gui_Callback=str2func(varargin{1});endifnargout[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,end%Endinitializationcode-DONOTEDIT% Executesjustbeforejmismadevisible。functionjm_OpeningFcn(hObject,eventdata,handles,varargin)%Thisfunctionhasnooutputargs,seeOutputFcn.%hObjecthandletofigure%eventdatareserved—tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%varargincommandlineargumentstojm(seeVARARGIN)%Choosedefaultcommandlineoutputforjmhandlesooutput=hObject;%Updatehandlesstructureguidata(hObject,handles);%UIWAITmakesjmwaitforuserresponse(seeUIRESUME)%uiwait(handles。figure1);%———Outputsfromthisfunctionarereturnedtothecommandlineofunctionvarargout=jm_OutputFcn(hObject,eventdata,handles)%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);%hObjecthandletofigure%eventdatareserved—tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Getdefaultcommandlineoutputfromhandlesstructurevarargout{1}=handles。output;% Executesonbuttonpressinpushbutton1。functionpushbutton1_Callback(hObject,eventdata,handles)axes(handles.axes1);mu1=1;%czAp^AE1mu2=1;%c'Ap蛔AE2w=get(handlesoedit5);w=str2num(w.String);%蛔<<?^pAEa=get(handles.edit3);epsilon1=str2num(a。String);%^e0E1pAIa^0^epQ3£Eyb=get(handles.edit4);epsilon2=str2num(b.String)%^eOE2pAIa^O^epQ3£Ey;k1=w*sqrt(mu1*epsilon1);k2=w*sqrt(mu2火epsilon2);sita=get(handles.editl);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);%%>〉〉>2^Bto-Eyx=—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);%%〉〉〉?zEa2^Bto-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);%%〉>>dUEa2^Blo—Eyx2=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)%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)eventdatareservedfunctionedit2_Callback(hObject,%eventdata,handles)hObjecthandletoedit2(seeGCBO)eventdatareserved—tobedefinedinafutureversionofMATLABhandlesstructurewithhandlesanduserdata(seeGUIDATA)Hints:get(hObject,'String')returnscontentsofedit2astextstr2double(ge(hObject,’String'))returnscontentsofedit2asdouble% Executesduringobjectcreation,aftersettingallpropertiesofunctionedit2_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareserved—tobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.% SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,’BackgroundColor’),get(0,'defaultUicontrolBackgroundColor’))set(hObject'BackgroundColor’,’white’);end%hObjecthandletopushbutton1(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)eventdata,handles)functionedit3_Callback(hObject,eventdata,handles)%hObjecthandletoedit3(seeGCBO)%eventdatareserved—tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String’)returnscontentsofedit3astext% str2doubl(get(hObject%hObjecthandletoedit3(seeGCBO)%eventdatareserved—tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String’)returnscontentsofedit3astext% str2doubl(get(hObject,'String’))returnscontentsofedit3asadouble% Executesduringobjectcreation,aftersettingallproperties.functionedit3_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit3(seeGCBO1%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesempty—handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.% SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,’BackgroundColor’),get(0,'defaultUicontrolBackgroundColor’))set(hObject,’BackgroundColor','white');endfunctionedit1_Callback(hObject,eventdata,handles)%hObjecthandletoedit1(seeGCBO)%eventdatareservedtobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String’)returnscontentsofedit1astext% str2double(ge(hObject,’String'))returnscontentsofedit1asadouble% Executesduringobjectcreation,aftersettingallproperties。functionedit1_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit1(seeGCBO)%eventdatareserved—tobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows。% SeeISPCandCOMPUTERifispc&&isequal(get(hObject,'BackgroundColor’),get(0,'defaultUicontrolBackgroundColor'))set(hObject'BackgroundColor',’white');endfunctionedit5_Callback(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofedit2astext% str2double(get(hObject,'String’))returnscontentsofedit2asadouble% Executesduringobjectcreation,aftersettingallproperties.functionedit5_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows。% SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject'BackgroundColor’,'white');endfunctionedit8_Callback(hObject,eventdata,handles)%hObjecthandletoedit8(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%hObject%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:%handles% str2double(get(hObject’String'))returnscontentsofedit8asadouble% Executesduringobjectcreation,aftersettingallpropertiesofunctionedit8_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit8(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handles%handles%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows。% SeeISPCandCOMPUTER.ifispc&&isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))set(hObject,’BackgroundColor','white’);endfunctionedit10_Callback(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String’)returnscontentsofedit2astext%handles% str2double(get(hObjec,t’String'))returnscontentsofedit2asadouble% Executesduringobjectcreation,aftersettingallproperties.functionedit10_CreateFcn(hObject,eventdata,handles)%hObject%eventdata%handleshandle
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025版屋面防水工程承包合同(含屋頂綠化植物養(yǎng)護服務(wù))3篇
- 2025版外貿(mào)信用保險合同范本英文版3篇
- 《我的家鄉(xiāng)》課件
- 2025年度美容院美容院員工福利保障合同4篇
- 2025年個人房產(chǎn)抵押合同修訂版
- 二零二五年度鐵路施工挖機作業(yè)安全與保障合同3篇
- 二零二五版綠色環(huán)保民房物業(yè)管理合同4篇
- 2025版宅基地買賣轉(zhuǎn)讓合同含農(nóng)村土地整治及補償協(xié)議3篇
- 二零二五版幕墻工程節(jié)能評估與認證合同4篇
- 二零二五版電商代運營項目綜合管理合同范本3篇
- 消防產(chǎn)品目錄(2025年修訂本)
- 地方性分異規(guī)律下的植被演替課件高三地理二輪專題復(fù)習(xí)
- 光伏項目風(fēng)險控制與安全方案
- 9.2提高防護能力教學(xué)設(shè)計 2024-2025學(xué)年統(tǒng)編版道德與法治七年級上冊
- 催收培訓(xùn)制度
- 練習(xí)20連加連減
- 五四制青島版數(shù)學(xué)五年級上冊期末測試題及答案(共3套)
- 商法題庫(含答案)
- 鋼結(jié)構(gòu)用高強度大六角頭螺栓連接副 編制說明
- 溝通與談判PPT完整全套教學(xué)課件
- 移動商務(wù)內(nèi)容運營(吳洪貴)項目四 移動商務(wù)運營內(nèi)容的傳播
評論
0/150
提交評論