77范文网 - 专业文章范例文档资料分享平台

光学拍的计算机模拟(完整)(7)

来源:网络收集 时间:2019-01-10 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

武汉理工大学毕业设计(论文)

% 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)在线全文阅读。

光学拍的计算机模拟(完整)(7).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/416571.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: