教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 范文大全 > 资料大全 >

计算方法Matlab 课后习题

来源:网络收集 时间:2026-01-18
导读: 1 Math6111-Numericalmethods Coursework2 Due:14December2011 Youmustsubmitelectronically(viaBlackboard)acopyoftheMatlabm- lesrequiredbythetasksbelow.Thedeadlineis12:00Wednesday,December14th2011. Penaltiesforlatesubmission:10%ofthetotalmarksf

1

Math6111-Numericalmethods

Coursework2

Due:14December2011

Youmustsubmitelectronically(viaBlackboard)acopyoftheMatlabm- lesrequiredbythetasksbelow.Thedeadlineis12:00Wednesday,December14th2011.

Penaltiesforlatesubmission:10%ofthetotalmarksfortheassignmentperworkingdayaftertheassignmentisdue(whereaworkingdayisa24hourperiodstartingformoriginalhandindeadline,skippingdaysonwhichtheUniversityisclosed),forupto5workingdays.Nomarkswillbeobtainedforsubmissionsthatarelaterthan5workingdays.

AssessmentCriteria:Assessmentwillprimarilybebasedonthesuccessfulsolutionoftheproblemsandyourmethodofsolution,whichshouldbejusti ed.Youwillalsobeassessedontheclarityofyourcode.PleaseensurethatallofitiswritteningoodMatlabstyle,isproperlycommentedandisrobust;e.g.,allinputargumentsshouldbeexplainedandchecked.Figuresproducedshouldbeclearlypresentedwithlabels,titles,etc.

Plagiarism:Yourareencouragedtodiscussyourworkwithyourcolleaguesingeneralterms,butyoursubmittedworkMUSTbeyourown.

1Photorefractiveliquidcrystalcells

Aphotorefractiveliquidcrystalcellis

formedbytheinteractionofaphotoconductinglayerwithastandardliquidcrystalcell,asshownbyFigure1.Thetransmissionofopticalbeamsthroughthecellwillinduceanexchangeofenergy,observedasachangeinamplitudes,fromtheincidentbeamsintoadiscretesetofNoutputbeamswhereNisde nedbytheseparationintheinputbeams.Thisprocessisknownasopticalcoupling.FurtherdetailsaregiveninapaperbyDalyetal,AppliedPhysicsB.95:3589–596(2009).Figure1:Photorefractiveliquidcrystalcell,aliquidcrystallayerissandwichedbetweentwoalignmentlayersPI,apolymer,andPVK,aphotoconductor.Theinteractionofthephotoconductorwiththeliquidcrystalcellcausesenergyfromtheincidentbeamstobecoupledintoadiscretesetofoutputbeams.

Yourtaskisto ndtheamplitudesofthedifferentwavesastheypropagatethroughthephotorefractiveliquidcrystalcell.YoumayuseanyinbuiltMatlabtool,butmustjustifyyourchoiceofalgorithmindetail,andcheckthatitworks.

2Opticalcouplingequations

Wewritetheopticalamplitudesy(z)asavector eldofsizeN(i.e.,foreverylocationz,y(z)isavectorofsizeN).Wewillonlyconsideracoordinaterangeof0≤z≤5.Foreachcomponentofy(z),the

1

variationintheamplitudeasthewavepassesthroughtheliquidcrystalcellisgivenby

dy1(z)=ik1y1(z)+if(z)[y2(z)],dz

dyn(z)=iknyn(z)+if(z)[yn 1(z)+yn+1(z)],dz

dyN(z)=ikNyN(z)+if(z)[yN 1(z)],dz

√n=2,...,N 1,wherei=andthevectorkwithcomponentsknisde nedas

nπkn=10sin.N+1(2)

Iff(z)=C,aconstant,thenequation(1)canbesolvedasaneigenvalueproblem.WewritethesolutionasalinearcombinationofNvector eldsy(k)(z),tobedetermined,as

y(z)=A(k)y(k)(z)(3)

k

andthenusethesubstitution

y(k)=v(k)eiλ(k)z(4)

toobtainequationsfortheconstantvectorsv(k).Thebehaviourofthewavesdescribedbyequation(1)nowbecomestheeigenvalueproblem

λ(k)v(k)=Mv(k),(5)

wherethematrixMistridiagonalwiththediagonalentriesbeingthevectorkandthe rstoff-diagonalentriesbeingC.Forexample,whenN=2wehave

π (k) (k)v10sinC v1λ(k)1=(6)2π(k)(k).C10sinv2v2

Henceλ(k)aretheeigenvaluesandv(k)theeigenvectorsofthematrixM.

ToreconstructthesolutionyweneedtheweightingA(k)ofeachterminthesplitgivenbyequation(3),whichisrelatedtothechoiceofinitialdatay(0)≡y0.Iftheeigenvectorsv(k)formthecolumnsofthematrixVthentheweightsA(k)canbefoundasthecomponentsofthevectorAsatisfyingthelinearsystem

VA=y0.

√(7)ForthesimplecasewhereN=2theeigenvaluesareλ(k)=10±Cwitheigenvectorsv=(1,±1)T.

TWiththeinitialconditionsy1(0)=Randy2(0)=StheweightingsareA=1

((R+S),(R S)),

whichgivestheanalyticsolution

√1y1(z)1(10√2+C)iz11e+(R S)e(102 C)iz.(8)=(R+S)1 1y2(z)22

Inarealphotorefractiveliquidcrystalcellf(z)=C.Ifthisisthecasethenequation(1)mustbesolvedasaninitialvalueproblem.Inparticularwewillalwaysusetheinitialconditiongivenbythesincfunction,

yn(0)=sinc(n nin),(9)

whereninisgivenbytheMATLABcommand:floor(N/2).

1

3Tasks

1.Solveequation(1)usingMATLAB’seigfunctionforN=2andcomparewiththeanalyticso-lution,equation(8),forR=1,S=0andC=1.Yourcodeshouldproduceasingle g-ureoutputpidedintothreesubplots,oneshowingtheanalyticsolutionfortheopticalintensityIn(z)=|yn(z)|2,onethesolutioncalculatedusingMATLAB’seigfunctionandthe naloneshowingtheabsolutedifferencebetweenthetwoasafunctionofthecoordinatez.

2.Solveequation(1)forN=4,10,20andf(z)=1usingbothaneigenvaluemethodandyourchoiceofIVPsolvingmethod.ForeachvalueofNplottheopticalintensityIn(z)asafunctionofthecoordinatezforn=nincomputedusingboththeeigenvaluemethodandtheIVPsolution,andthedifferencebetweenthetwo.YoushouldinadditionshowhowthedifferenceconvergesastheaccuracyofyourIVPsolutionisimprovedinanappropriateway.

http://inganappropriatemethodsolveequation(1)forf(z)=1+αsin(2πz/5)exp( (z 5/2)2)withN=4andαintherange[0,1/2].Comparetheresultsagainstusingtheaveragevalue,f(z)=1.Youshouldproduceasingle gurewithtwosubplots,oneshowingthemaximumdifferencebetweentheamplitudesy(z)computedbythetwomethodsfordifferentvaluesofα,theothershowingthemaximumdifferenceoftheintensityI(5)http://mentontheaccuracyofthef(z)=1approximation;inwhatsense,ifatall,isitaccurate?

3.1Summaryandassessmentcriteria

YoushouldsubmittheMatlabcodeelectronicallyasnotedabove.

Theprimaryassessmentcriteriawillbethechoiceandjusti cationofthealgorithmimplemented.Thecorrectnessofthealgorithmsmustbeclear,andmustbedemonstratedbythoroughtestingwhichshouldbecarefullyexplained.Thejusti cationsofyouralgorithmsmaybemanygrounds-exampleswouldincludeef ciency,conceptualorcomputationalsimplicity,ortheeaseofimplementationinMatlab-butmustbedetailedforeachstageofyourchosenmethod.Thejusti cationshouldbegivenincommentswithintheMatlabcode,preferablyatthestartofthemasterscript.

Theclarityandrobustnessofyourcodeandtheclarityofyouroutputwillalsobeassessed,asincoursework1.Thecommentswillbeexaminedcloselyforjusti cationsofth …… 此处隐藏:3743字,全部文档内容请下载后查看。喜欢就下载吧 ……

计算方法Matlab 课后习题.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/fanwen/2193906.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)