




下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、-PAGE . z. - - s-實(shí)驗(yàn)報(bào)告課程名稱: MATLAB Programming實(shí)驗(yàn)工程: Position and Velocity of a Ball 專業(yè)班級(jí):通信工程1501班姓 名:*文亞 學(xué) 號(hào):150404116實(shí)驗(yàn)室號(hào): 信息樓220實(shí)驗(yàn)組號(hào):16實(shí)驗(yàn)時(shí)間:2017年5月18日批閱時(shí)間:指導(dǎo)教師:*笑楠成 績(jī):*工業(yè)大學(xué)實(shí)驗(yàn)報(bào)告適用計(jì)算機(jī)程序設(shè)計(jì)類專業(yè)班級(jí):通信工程1501班 *:150404116 :*文亞實(shí)驗(yàn)名稱:Position and Velocity of a Ball1.實(shí)驗(yàn)?zāi)康模?Mastering methods for creating and in
2、itializing variables in MATLAB.including assignment statements, shortcut e*pressions,built-in functions,keyboard input.2 Understand the difference between array multiplication and matri* multiplication.3Learn how to draw and icons, colors, etc.2.實(shí)驗(yàn)內(nèi)容:Position and Velocity of a BallIf a stationary ba
3、ll is released at a height h0 above the surface of the Earth with a vertical velocity v0,the position and velocity of the ball as a function of time will be given by the equationsWhere g is the acceleration due to gravity(-9.81m/s2),h is the height above the surface of the Earth(assuning no air fric
4、tion),and v is the vertical ponent of velocity.Write a MATLAB program that prompts a user for the initial height of the ball in meter and velocity of the ball in meters per second,and plots the height and velocity as a function of time. Be sure to include proper labels in your plots.3. 實(shí)驗(yàn)方案程序設(shè)計(jì)說明包括算
5、法設(shè)計(jì)思路,必要的流程圖,界面設(shè)計(jì)說明、使用模塊及變量的說明等。(1)確定輸入變量h0,v0,t1。h0是開場(chǎng)高度,v0是開場(chǎng)速度,t1為時(shí)間。(2)由公式 計(jì)算在時(shí)間變化的情況下,h v的變化情況并得到多組數(shù)據(jù) 3由數(shù)據(jù)畫出h,v與t的關(guān)系曲線4. 實(shí)驗(yàn)步驟或程序經(jīng)調(diào)試后正確的源程序填寫主要步驟與程序代碼等。見附件A5程序運(yùn)行結(jié)果6出現(xiàn)的問題及解決方法附件A *工業(yè)大學(xué)實(shí)驗(yàn)報(bào)告適用計(jì)算機(jī)程序設(shè)計(jì)類專業(yè)班級(jí):通信工程1501班 *:150404116 :*文亞實(shí)驗(yàn)步驟或程序:可加附頁(yè)4. 實(shí)驗(yàn)步驟或程序經(jīng)調(diào)試后正確的源程序1創(chuàng)立程序%Script file:calc_height and ve
6、locity.m%Purpose:%To calculate and plot the height and velocity as a function of time.%Record of revisions:% Date Programmer Description of change% = = =%17/05/18 liuwenyaOriginal code%Define variables:%h0 - A height above the surface of the Earth%v0 - A vertical velocity in the begining%t1 - Time %
7、g- The acceleration due to gravity(-9.81m/s2)h0=input(enter date:)v0=input(enter date:)t1=input(enter date:)%g - The acceleration due to gravity(-9.81m/s2)g=-9.81%t - Increments at 0.1 and ends at t1t=0:0.1:t1%Figure out a height above the surface in the final h=(g.*t.2)./2+v0.*t+h0%Figure out a ver
8、tical velocity in the finalv=-g.*t+v0%Plot the height and velocity as a function of timeplot(t,h,r-,t,v,b-);title(plot of t);*label(t);ylabel(h);ylabel(v);legend(h,v);grid on;2輸入數(shù)據(jù)Untitledenter date:120h0 = 120enter date:0v0 = 0enter date:5t1 = 55程序運(yùn)行結(jié)果g = -9.8100t = Columns 1 through 11 0 0.1000 0.
9、2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000 Columns 12 through 22 1.1000 1.2000 1.3000 1.4000 1.5000 1.6000 1.7000 1.8000 1.9000 2.0000 2.1000 Columns 23 through 33 2.2000 2.3000 2.4000 2.5000 2.6000 2.7000 2.8000 2.9000 3.0000 3.1000 3.2000 Columns 34 through 44 3.3000 3.4000 3.500
10、0 3.6000 3.7000 3.8000 3.9000 4.0000 4.1000 4.2000 4.3000 Columns 45 through 51 4.4000 4.5000 4.6000 4.7000 4.8000 4.9000 5.0000h = Columns 1 through 10 120.0000 119.9510 119.8038 119.5586 119.2152 118.7738 118.2342 117.5965 116.8608 116.0270 Columns 11 through 20 115.0950 114.0650 112.9368 111.7106
11、 110.3862 108.9638 107.4432 105.8246 104.1078 102.2929 Columns 21 through 30 100.3800 98.3689 96.2598 94.0525 91.7472 89.3438 86.8422 84.2426 81.5448 78.7490 Columns 31 through 40 75.8550 72.8630 69.7728 66.5846 63.2982 59.9138 56.4312 52.8505 49.1718 45.3949 Columns 41 through 50 41.5200 37.5469 33
12、.4758 29.3066 25.0392 20.6737 16.2102 11.6485 6.9888 2.2309 Column 51 -2.6250v = Columns 1 through 10 0 0.9810 1.9620 2.9430 3.9240 4.9050 5.8860 6.8670 7.8480 8.8290 Columns 11 through 20 9.8100 10.7910 11.7720 12.7530 13.7340 14.7150 15.6960 16.6770 17.6580 18.6390 Columns 21 through 30 19.6200 20.6010 21.5820 22.5630 23.5440 24.5250 25.5060 26.4870 27.4680 28.4490 Columns 31 through 40 29.4300 30.4110 31.3920 32.3730 33.3540 34.3350 35.3160 36.2970 37.2780 38.2590 Columns 41 through 50 39.2400 40.22
溫馨提示
- 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 代寫課題申報(bào)書多少錢
- 成囊材料市場(chǎng)分析及競(jìng)爭(zhēng)策略分析報(bào)告
- 企業(yè)生產(chǎn)線用工合同范本
- 中國(guó)傳統(tǒng)文化學(xué)習(xí)心得體會(huì)
- 廠家求購(gòu)鋼材合同范本
- 臨床護(hù)理習(xí)題(附答案)
- 機(jī)械制造基礎(chǔ)模擬試題含答案
- 代理經(jīng)營(yíng)承包協(xié)議合同范本
- 箱包維修合同范本
- 流體力學(xué)復(fù)習(xí)題(含答案)
- 2024年2型糖尿病中醫(yī)防治指南解讀課件
- 2024年遼寧省中考物理試題
- 2024年湖南電氣職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)適應(yīng)性測(cè)試題庫(kù)含答案
- CJJ 82-2012 園林綠化工程施工及驗(yàn)收規(guī)范
- 數(shù)據(jù)庫(kù)原理及應(yīng)用(第3版)
- 預(yù)防流感健康知識(shí)講座總結(jié)
- 國(guó)際標(biāo)準(zhǔn)《風(fēng)險(xiǎn)管理指南》(ISO31000)的中文版
- 幼兒園中班語(yǔ)言《猜燈謎》
- 煙花爆竹經(jīng)營(yíng)
- 射頻同軸電纜簡(jiǎn)介
- 2023-2024全球及中國(guó)企業(yè)組織活力報(bào)告(中文版)
評(píng)論
0/150
提交評(píng)論