中国高校课件下载中心 》 教学资源 》 大学文库

西点军校:《数学建模》课程教学课件(教材讲义)PS4a1

文档信息
资源类别:文库
文档格式:PDF
文档页数:1
文件大小:14.75KB
团购合买:点击进入团购
内容简介
西点军校:《数学建模》课程教学课件(教材讲义)PS4a1
刷新页面文档预览

Appendix:MATHCADProgramforIntervisibility,byThomasRiddle)f(x):=|cos(元x) Enterthefunctionasf(x)i:=0..100j:=0..100Identify the size (n)by define variablesiandj.Partitionyintonintervals.1yr i=100F, :=f(y)Calculate functional values for eachy.F-FCalculatea line-of-sightbetweenpoints intheinterval1 .k:=0..99100Create an index variable k of size (n-1)F)2+.013Calculatethe secant distanceFak+1Define a-sub zero to equal 0.% :=0The following program is the LOS(S) algorithm.C is a m xn matrix and"arc" is a summed distanceuntilthefirst non-intervisible location.Thesearc lengths arethenplottedoverlayed withtheLOS(s) :=forme0..98save-m,m+1C-0m,mm,m+for nem+2..100C :=LOS(s)ifs≥save1arc:=C-am,n-1n.msavetotherwiseThis isaplotoftheintervisibilitycurve overlayed on the function.Thefunction isthe solid curve and theintervisibility is the dashed curveThisistheplotofthefunctionJcosrxl1.5I:FF;0.5arco 0.500.50yiyi-y;204

Appendix: MATHCAD Program for Intervisibility, by Thomas Riddle Enter the function as f(x) f( x) cos(p.x) Identify the size (n) by define variables i and j. i 0. 100 j 0. 100 Partition y into n intervals. y i i 100 F i f y Calculate functional values for each y. i s i ,j F j F i j i 100 Calculate a line-of-sight between points in the interval k 0. 99 Create an index variable k of size (n-1) Calculate the secant distance a k 1 F k 1 F k 2 .012 Define a-sub zero to equal 0. a 0 0 The following program is the LOS(S) algorithm. C is a m x n matrix and "arc" is a summed distance until the first non-intervisible location. These arc lengths are then plotted overlayed with the function. LOS(s) save s m,m 1 Cm,m 0 Cm,m 1 1 Cm,n 1 Cn,m 1 save s m,n s m,n if save Cm,n 0 otherwise for nÎ m 2. 100 for m Î 0. 98 C C LOS(s) arc C a . This is a plot of the intervisibility curve overlayed on the function. The function is the solid curve and the intervisibility is the dashed curve. This is the plot of the function |cospx|. F i arci y i y i , 0 0.5 1 0 0.5 1 1.5 F i y i 0 0.5 1 0 0.5 1 204

已到末页,全文结束
刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档