版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、MATLABf真平面電磁波在不同媒介分界面上的入射、反射和折射、實驗?zāi)康模?、進(jìn)一步學(xué)習(xí)MATLAB初步掌握GUI界面的編程。2、通過編程實現(xiàn)電磁波仿真效果圖。3、進(jìn)一步理解平面電磁波的入射、反射和折射現(xiàn)象二、實驗要求:1、以電場為例,動態(tài)演示平面電磁波的傳播情況。2、可以任意設(shè)置媒介的介電常數(shù)和入射角。3、考慮金屬導(dǎo)體和空氣的分界面平面電磁波的入射、反射情況。三、實驗原理:電磁波從一種媒質(zhì)入射到第二種媒質(zhì)時,分界面使一部分能量反射回第一種 媒質(zhì),另一部分能量折射到第二種媒質(zhì)中,反射波和折射波得大小和相位取決于 分界面兩側(cè)的媒質(zhì)特性、極化方向和入射角大小等,當(dāng)電磁波入射到理想導(dǎo)體表 面時,會發(fā)
2、生全反射。這一過程中包括的主要原理有以下三點。1、正弦平面波在媒質(zhì)分界面的反射和折射規(guī)律波對分界面的入射是任意的,但為了方便,我們假設(shè)入射面與zox面重合。r.入鴕面Er0產(chǎn) 入射波 等相位面夕Ei°ejKirEi °ejK(xsin izcos i)JejKjEr0ejK(xsin r zcos)Et°ejKjdejK(xsin tz cos t )Ei波在z>0時發(fā)生入射和反射,在z<0時發(fā)生折射并令空間任意一點r處 的入射 波、反射波和折射波場強(qiáng)為:圖表1正弦波斜入射示意圖根據(jù)在z=0的界面上電場強(qiáng)度的切線分量相等的邊界條件,有故必有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、正弦平面波對理想介質(zhì)的斜入射垂直極化波垂直極化波對理想介質(zhì)斜入射如圖所示, 由折射和反射定律,我們可以得到 在任意媒質(zhì)中的場強(qiáng)。在第一煤質(zhì)中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在第二煤質(zhì)中
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垂直極化波斜入射平行極化波平行極化波對理想介質(zhì)斜入射如圖所示, 由折射和反射定律,我們可以得到 在任意媒質(zhì)中的場強(qiáng)。在第一煤質(zhì)中E1x(Eiocos 1)(eE1z ( Eiosin 1)(ejzcos 1j/zcos 1Rejk1zc0s 1)eRejk1zcos1)ejxsin
5、 1jxsin 1H1y 也。侄 jk1zcos1Rejk1zcos 3 jk1xsin 1在第二煤質(zhì)中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、正弦平面波對理想導(dǎo)體表面的斜入射垂直極化波垂直極化波對理想導(dǎo)體斜入射如圖所示,入射波在導(dǎo)體表面發(fā)生全反射,我們可以得到在任意媒質(zhì)中的場強(qiáng)。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平行極化波雅舄麗川垂直極化波對理想導(dǎo)體斜入射如圖所示,入射波在導(dǎo)體表面發(fā)生全反射,我 們可以得到在任意媒質(zhì)中的場強(qiáng)。Ex 2Ei0sin cos(kxcos )e jkzsinEz
7、 j 2Ei0 cos sin(kxcos )e jkzsinHy 2H i0cos(kxcos )e jkzsin四、實驗程序;實驗程序比較長,可參見此文件夾中的肛與_文件。(附件)生成的界面:五、實驗總結(jié);這次實驗總體感覺收獲比較大。首先,之前學(xué)習(xí)的 MATLABTB是基于圖片之類的編程,沒有學(xué)習(xí)過GUI的使用。通過這次實驗,我初步學(xué)習(xí)了一下 GUI,算是現(xiàn)學(xué)現(xiàn)賣吧。雖然學(xué)的不是很深,但是對于基本的功 能的使用應(yīng)該還是可以的。再次,對于電磁場地學(xué)習(xí)都是停留在書面作業(yè)上,通過這次實驗,加深了我對電磁場傳播的理解。最后,其實如果只有我一個人,應(yīng)該是很難完成這次實驗的,在這期間有同學(xué)的幫忙和合作
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)系上傳者。文件的所有權(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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 江蘇省永豐初級中學(xué)2025屆高二生物第一學(xué)期期末質(zhì)量跟蹤監(jiān)視試題含解析
- 山西省忻州市2025屆生物高一上期末質(zhì)量檢測試題含解析
- 廣東省云浮市2025屆高二生物第一學(xué)期期末質(zhì)量檢測模擬試題含解析
- 2025屆山東省淄博市第一中學(xué)生物高三上期末質(zhì)量檢測模擬試題含解析
- 浙江省蒼南縣金鄉(xiāng)衛(wèi)城中學(xué)2025屆生物高三第一學(xué)期期末統(tǒng)考試題含解析
- 2025屆上海市黃浦區(qū)高二數(shù)學(xué)第一學(xué)期期末學(xué)業(yè)水平測試試題含解析
- 黑龍江省哈爾濱市尚志中學(xué)2025屆英語高三第一學(xué)期期末聯(lián)考模擬試題含解析
- 江蘇省蘇州新草橋中學(xué)2025屆生物高三上期末經(jīng)典試題含解析
- 2025屆武昌實驗中學(xué)高二數(shù)學(xué)第一學(xué)期期末學(xué)業(yè)質(zhì)量監(jiān)測模擬試題含解析
- 安徽省濉溪縣2025屆英語高三上期末復(fù)習(xí)檢測模擬試題含解析
- JJG 643-2024標(biāo)準(zhǔn)表法流量標(biāo)準(zhǔn)裝置
- 最新地鐵隧道襯砌背后回填注漿方案
- 艾滋病初篩實驗室SOP文件
- 最新個人簡歷模板(推薦)
- 《建筑基坑支護(hù)技術(shù)規(guī)程》JGJ120-2012
- 監(jiān)控質(zhì)量保證及承諾書
- 奮斗在巴西的何氏一家
- 華南理工大學(xué)-公函-信紙-抬頭-推薦信3 (1)
- 十二相同步發(fā)電機(jī)的電路模型及仿真
- 私人管家崗位職責(zé)及工作流程(共5篇)
- 中醫(yī)內(nèi)科住院病歷范文完整版本
評論
0/150
提交評論