武汉理工大学毕业设计(论文)
% 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 output from handles structure varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) scale1=str2double(get(handles.edit1,'String')); scale2=str2double(get(handles.edit2,'String')); scale3=str2double(get(handles.edit3,'String')); scale4=str2double(get(handles.edit4,'String')); w1=scale1; w2=scale2; k1=scale3; k2=scale4; t=0.1:0.2:1.3; a =1;x =0:0.001:5;
A2= a*cos(k2*x-w2*t(end)); A1= a*cos(k1*x-w1*t(end)); axes(handles.axes1); plot(x,A1,x,A2) set(gcf,'color',[0 1 0]); set(gca,'YTick',[-1:0.5:1]); set(gca,'XTick',[0:1:5]); xlabel('变量 X') ylabel('振幅变化 A') title('两列单色平面波') legend('wave1','wave2')
28
武汉理工大学毕业设计(论文)
axes(handles.axes2); %%plot the optical beats x =0:0.001:20;k =0;
m2= moviein(length(0.1:0.2:1.3)); for t=0.1:0.2:1.3 k = k+1;
A =2*a*cos((k1-k2)/2*x-(w1-w2)/2*t); v = a*cos(k1*x -w1*t)+a*cos(k2*x-w2*t); plot(x,v,'k-',x,A,x,-A); axis([0 20 -2 2]); set(gcf,'color',[0 1 0]) set(gca,'YTick',[-2:1:2]) set(gca,'XTick',[0:5:20]) xlabel('变量 X') ylabel('振幅变化 A') title('合成波即光学拍') legend('wave','amp1','amp2') m2(:,k) = getframe; end movie(m2,3) axes(handles.axes3); x =0:0.001:20;
A =2*a*cos((k1-k2)/2*x-(w1-w2)/2*t(end)); l= A.*A; plot(x,l)
set(gcf,'color',[0 1 0]) set(gca,'YTick',[0:1:4]) set(gca,'XTick',[0:5:20]) xlabel('变量 X') ylabel('振幅变化 A') title('合成波光强曲线')
legend('intensity of synthesis of wave')
function edit1_Callback(hObject, eventdata, handles) % hObject handle to edit1 (see GCBO)
29
武汉理工大学毕业设计(论文)
% 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,'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)
% eventdata 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
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); 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(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 edit2_CreateFcn(hObject, eventdata, handles) % hObject handle to edit2 (see GCBO)
30
武汉理工大学毕业设计(论文)
% eventdata 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
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit3_Callback(hObject, eventdata, 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 contents 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 after all CreateFcns called
% Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
31
武汉理工大学毕业设计(论文)
function edit4_Callback(hObject, eventdata, handles) % hObject handle to edit4 (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 edit4 as text
% str2double(get(hObject,'String')) returns contents of edit4 as a double
% --- Executes during object creation, after setting all properties. function edit4_CreateFcn(hObject, eventdata, handles) % hObject handle to edit4 (see GCBO)
% eventdata 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
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
32
武汉理工大学毕业设计(论文)
致谢
毕业论文即将完成,我的学生生涯也要告一段落了。借此机会,我要对四年来帮助过我的人表示深深的感谢。
我的论文的设计及其完成,有自己的辛劳也有同学和老师的帮助和指导,在此,我感谢我的指导老师李贤芳老师,给我全面的帮助指导。
吴成才
2009
33
年5月30日
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库光学拍的计算机模拟(完整)(7)在线全文阅读。
相关推荐: