《专题软件开发实践报告.docx》由会员分享,可在线阅读,更多相关《专题软件开发实践报告.docx(4页珍藏版)》请在第一文库网上搜索。
1、教学实践报告“反问题”的数值求解学生姓名专业信息与计算科学班级1123202指导教师2014年9月5日第一周实践报告一、任务安排1.1 时间计划本次实践共三周,又第二周上课时间只有两天,所以总共开发时间12天。经讨论小组将第一周开发最初的界面,第二周整合各组员的界面,第三周修改代码、程序调试、优化界面。1.2 任务分工计划小组成员,界面开发程序Fi1teJfn、Gen_data等六个,每人负责两个程序的界面开发,实现组员之间分工清晰、相互合作。二、熟悉“反问题”的数值解法研究2.1 文献资料的翻译通过指导老师及谷歌翻译得到资料的大致翻译,对研究问题有一个比较清晰的理解。2.2 “反问题”数值解
2、法三、第一周所做:3.1 反问题的理解及翻译3.2 设置整体的界面及控件CanbaCk3.3 把图形画到指定的区域3.4 设置变量调用函数四、程序理解:functionvarargout=d(varargin)%Executesonbuttonpressinpushbutton1.%hbject%eventdatafunctionpushbutton1Ca11back(hbject,eventdata,hand1es)彩设置的控件反应versionofMAT1ABhand1etopushbutton1(seeGCBO)reserved-tobedefinedinafuture%hand1ess
3、tructurewithhand1esanduserdata(seeGUIDATA)fg6调用函数%Executesonbuttonpressinpushbutton2.functionpushbutton2_Ca11back(hbject,eventdata,hand1es)%hbject%eventdatahand1etopushbutton2(seeGCBO)reserved-tobedefinedinafutureversionofMAT1AB%hand1esstructurewithhand1esanduserdata(seeGUIDATA)jiemian;%Executesonbu
4、ttonpressinpushbutton3.functionpushbutton3_Ca11back(hbject,eventdata,hand1es)%hbject%eventdatahand1etopushbutton3(seeGCBO)reserved-tobedefinedinafutureversionofMAT1AB%hand1esstructurewithhand1esanduserdata(seeGUIDATA)s1=str2doub1e(get(hand1es.edit2,String)书从文本框中获得数据赋值给S1s2=str2doub1e(get(hand1es.edi
5、t3z,String)从文本框中获得数据赋值给s2s3=str2doub1e(get(hand1es.edit4,String,)需从文本框中获得数据赋值给s3h=1/s1;x=h/2:h:1-h/2,;%ComputematrixKcorrespondingtoconvo1utionwithGaussiankerne1.kerne1=(1sqrt(pi)s2)*exp(-(x-h2).2s22);K=toep1itz(kerne1)*h;%Setuptrueso1utionf_trueanddatad=K*f_true+error.f_true=.75*.1xx.25)+.25*(.3x&x
6、.32)+(.5xx1).*sin(2*pi*x).4;Kf=K*f_true;eta=s3100*norm(Kf)*randn(si,1)/sqrt(si);d=Kf+eta;%Disp1aythedata.%figure(2)p1ot(x,f_true,x,d,o,x,Kf,-)x1abe1(,xaxis,)axes(hand1es.axes1);多把图形画到指定的位置%Executesonbuttonpressinpushbutton4.functionpushbutton4_Ca11back(hbject,eventdata,hand1es)%hbjecthand1etopushbut
7、ton4(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMAT1AB%hand1esstructurewithhand1esanduserdata(seeGUIDATA)s1=str2doub1e(get(hand1es.edit2,String)s2=str2doub1e(get(hand1es.edit3,String,)s3=str2doub1e(get(hand1es.edit4,String)%Setupgrid.h=1/s1;x=h/2:h:1-h/2,;%ComputematrixKcorrespondingtoc
8、onvo1utionwithGaussiankerne1.kerne1=(1sqrt(pi)s2)*exp(-(x-h2).2s22);K=toep1itz(kerne1)*h;%figure(1)mesh(K)tit1e(,MeshP1otRepresentationofMatrixK,)axes(hand1es.axes3);%Executesonbuttonpressinpushbuttons.functionpushbutton5_Ca11back(hbject,eventdata,hand1es)%hbjecthand1etopushbuttons(seeGCBO)%eventdat
9、areserved-tobedefinedinafutureversionofMAT1AB%hand1esstructurewithhand1esanduserdata(seeGUIDATA)s1=str2doub1e(get(hand1es.edit2,String)s2=str2doub1e(get(hand1es.edit3,String)s3=str2doub1e(get(hand1es.edit4,String)%Setupgrid.h=1/s1;x=h/2:h:1-h/2;%ComputematrixKcorrespondingtoconvo1utionwithGaussianke
10、rne1.kerne1=(1sqrt(pi)s2)*exp(-(x-h2).2s22);K=toep1itz(kerne1)*h;%Setuptrueso1utionf_trueanddatad=K*f_true+error.f_true=.75*(.1x&x.25)+.25*(.3x&x.32)+(.5xSx1).*sin(2*pi*x).4;Kf=K*f_true;eta=s3100*norm(Kf)*randn(si,1)/sqrt(si);d=Kf+eta;%Disp1aythedata.%ComputeaneigendecompositionofK.Kissymmetric,sothisis%equiva1enttoanSVD.V,sva1s=eig(K);sva1s,indx=sort(-diag(sva1s);%Sort-eigenva1uesindecreasingorder.sva1s=-sva1s;%+eigsareinincreasingorder.V=V(:,indx);%Correspondingeigenvectors.%figure(3)semi1ogy(sva1s,o,)x1abe1(,indexi,)y1abe1(,sigma_i,)tit1e(,Singu1arVa1uesofK,)axes(hand1es.axes1);