联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Matlab编程Matlab编程

日期:2018-11-08 10:05

Assignment M4: MATLAB Tools: Vectors, Plotting and Input/Output (SkillBased

Assignment, Individual, 20 points)

Part 1: Boat Race Statistics (Vectors, Input/Output)

Using the dataset provided (Assignment M5 Data with No Headers.csv), write a script that will

determine each boat’s

Average velocity (in knots)

Maximum and minimum speed (in knots)

The standard deviation of the speed of each boat

Be sure to calculate these properties without using the built-in functions in MATLAB for

mean, sum, max, min, std, or other statistical functions. We want you to apply

mathematical and programming reasoning to construct these calculations.

Output these results to a file called ‘RaceStatistics.txt ’, using the fprintf command with numeric

output as you have done earlier. The following example shows one way to explain the calculated

quantities, but the numbers are not correct for your input data. You can use the wording

shown below, or re-organize the information into two statements, one for Boat 1 and one for

Boat 2. Your results should have the same numeric format as shown below:

The average instantaneous speed was 25.6 knots for Boat 1 and 24.9 knots for Boat 2.

The maximum speeds were 35.1 knots for Boat 1 and 37.3 knots for Boat 2.

The minimum speeds were 24.1 knots for Boat 1 and 25.6 knots for Boat 2.

Boat 1 had a standard deviation of 6.5 knots, and Boat 2 had a standard deviation of 5.3

knots.

Part 2: Boat Race Statistics (Plotting, Parsing Data)

By examining the data, choose a time interval in which Boat 1 traveled faster than Boat 2, and a

different time interval in which Boat 2 traveled faster than Boat 1. For each interval, plot the

total time elapsed against each boat’s speed, using different symbols or colors to show the curve

for each boat on the same set of axes. Add a title for each plot to indicate which boat was faster.

Apply a grid (MatLab command grid) and place both curves on the same plot using MatLab

command hold on.

Submit a single PDF and a single .m file for Parts 1 and 2, as well as the data file

‘RaceStatistics.txt’, before 11:55 PM on the day of your Week 12B class.

The PDF should contain:

● A listing of your code for Parts 1 and 2, with sufficient commenting.

● Two screen shots: one for Boat 1 speed>Boat 2 speed’s plot, and one for Boat 2

speed>Boat 1 speed’s plot.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp