热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

matlab留学生作业代做,代写Canvas留学生作业、MatLab编程语言作业调试、MatLab实验作业代做、代写program课程作业...

代写Canvas留学生作业、MatLab编程语言作业调试、MatLab实验作业代做、代写program课程作业日期:2019-12-0710:14YourCRNorC

代写Canvas留学生作业、MatLab编程语言作业调试、MatLab实验作业代做、代写program课程作业

日期:2019-12-07 10:14

Your CRN or Class ID: _________________ Your Name:____________________________

MatLab Take-Home Test

(Take-Home Tests, Strictly Individual, 50 Points)

This is a take-home test, meaning that you may use course-provided materials or outside references as study

aids. However, you may NOT copy solutions from the Internet or another student and submit them as

your own work. Be sure to read and sign the Honor Pledge at the bottom of this page.

You must return this page to your instructor in person to receive credit for this assignment. Grades will be

posted on Canvas as usual.

Please print your name and CRN or Class ID at the top and bottom of this page.

There are two problems in this assignment. The second problem uses an external data file. The data file can be

found on the Canvas home page, and is named as TravelingTrucks_Coordinates.csv. A version of this file with

headers is also available on the Canvas home page for reference.

SAVE YOUR FILES OFTEN – If MatLab crashes, you won’t lose all of your work.

HONOR PLEDGE:

I have neither given or received unauthorized aid on this assignment, including solutions to assignment problems

obtained from other students or the Internet. I will not share or make available in any way any information about

this assignment to anyone until after the graded assignment has been returned to me.

SIGNATURE: _______________________________________________________________________

Printed Name (Last, First):_____________________________________________________________

Your CRN or Class ID: _________________ Your Name:______________________

Problem 1

Part 1:

Create a MatLab script file funcVector_pid.m which accepts two vectors: names of marathon runners, and

their respective finish time from the user, and then outputs the name of the winner and his/her finish time. For

this problem, do not use loops. The user creates the names of the runners and their finishing times.

Hint: https://www.mathworks.com/help/matlab/ref/min.html

Submit the following to the Canvas site for this test as follows:

? A pdf including:

o Listing of the code for your program

o Screen shot showing results

? Your .m file for the code.

Be sure to label all files with your PID, and NOT with your numeric ID.

Part 2:

Write a MATLAB script file named vectorPattern_pid.m that will:

1. create a vector for a variable A with value [-99 -98 -97 . . . . -1]

2. using the vector A, create a second vector B which has the same numbers as A at its even indexes, but

the numbers at odd index values are replaced by the value 0.

3. Starting from the index value 16, replace every 5th element of vector B with the value 100

4. Multiply each element of B with the value -3

5. Display only the 29th – 50th elements of B.

Submit the following to the Canvas site for this test as follows:

? A pdf including:

o Listing of the code for your program

o Screen shot showing results

? Your .m file for the code.

Be sure to label all files with your PID, and NOT with your numeric ID.

Problem 2

A local manufacturing company wants to find out the total time it takes to

deliver its products to retail stores from its manufacturing plant. The company

has 2 delivery trucks for this purpose. Truck 1 can travel at a speed of 54

km/hr and truck 2 can travel at 28 km/hr. The trucks go from store to store

delivering the products and then the trucks return to the factory. All deliveries

have been made.

The locations of the retail stores are given as a set of kilometers west/east and

north/south. For example, (0, -15) means that the truck is only moving south 15 km or (-10, 30) means that the

truck is moving west 10 km and north 30 km. The trucks depart from the factory at the same time and travel from

one store to another until they eventually return to the original starting point. Make sure to account for the distance

needed to travel back to the starting point/factory. Each coordinate set is the distance from a starting point to

a destination.

(Northwest)   (Northeast)

Southwest)   (Southeast)

Part 1:

Download the file named TravelingTrucks_Coordinates.csv and save it in your MatLab folder. This file can be

found on the Canvas home page.

Part 2:

Write a MATLAB script that does the following:

1. Reads in the data from TravelingTrucks_Coordinates.csv. The file will contain 4 columns:

a. Column 1: Truck 1 west/east

b. Column 2: Truck 1 north/south

c. Column 3: Truck 2 west/east

d. Column 4: Truck 2 north/south

2. Outputs to travelingtrucks.txt, the total distance and time covered by both trucks for the full trip, both

individually and combined. The distance value should be in kilometers and accurate to two decimal

places (e.g., 1.34 km). Make sure to account for the distance needed to travel back to the starting

point/factory. You might use fopen/fclose or writematrix to write your results to a file.

3. To the same txt file, outputs which truck arrives back to the factory first.

4. Generate a single plot showing the paths traveled by both trucks.

NOTE: you can use the Pythagorean theorem ( a2

+ b2

= c2.) to calculate the straight-line distance of a given

store from another location, such as the warehouse or another store.

Submit the following to the Canvas site for this test as follows:

? A pdf including:

o Listing of the code for your program

o Sample run (aka information in txt file)

o Screen shot of the plot

? Your .m file for the code.

? The .txt file containing your output.

Be sure to label all files with your PID, and NOT with your numeric ID.

Please see the next page for an example of the inputs and outputs for Problem 2 using different data.

Example Input and Output: DEMONSTRATION ONLY – NOT THE CORRECT SOLUTION TO

THIS PROBLEM

Truck 1 Speed: 40 km/hr

Truck 2 Speed: 70 km/hr

Sample Input for truck 1 Sample Input for truck 2

Sample Output

Total distance travelled by truck 1: 169.50 km

Total time travelled by truck 1: 4.24 hours

Total distance travelled by truck 2: 117.51 km

Total time travelled by truck 2: 1.68 hours

Total combined distance travelled by the trucks: 287.01 km

Total combined time travelled by the trucks: 5.92 hours

East/West North/South East/West North/South

0 0 0 0

20 0 -20 0

30 -15 -30 -15

15 40 -10 -10

-10 30 0 -30

-20 5 10 -10

0 0 0 0



推荐阅读
  • Web动态服务器Python基本实现
    Web动态服务器Python基本实现 ... [详细]
  • td{border:1pxsolid#808080;}参考:和FMX相关的类(表)TFmxObjectIFreeNotification ... [详细]
  • Python3爬虫入门:pyspider的基本使用[python爬虫入门]
    Python学习网有大量免费的Python入门教程,欢迎大家来学习。本文主要通过爬取去哪儿网的旅游攻略来给大家介绍pyspid ... [详细]
  • 本文详细介绍了如何正确设置Shadowsocks公共代理,包括调整超时设置、检查系统限制、防止滥用及遵守DMCA法规等关键步骤。 ... [详细]
  • 在Qt框架中,信号与槽机制是一种独特的组件间通信方式。本文探讨了这一机制相较于传统的C风格回调函数所具有的优势,并分析了其潜在的不足之处。 ... [详细]
  • selenium通过JS语法操作页面元素
    做过web测试的小伙伴们都知道,web元素现在很多是JS写的,那么既然是JS写的,可以通过JS语言去操作页面,来帮助我们操作一些selenium不能覆盖的功能。问题来了我们能否通过 ... [详细]
  • 如何高效学习鸿蒙操作系统:开发者指南
    本文探讨了开发者如何更有效地学习鸿蒙操作系统,提供了来自行业专家的建议,包括系统化学习方法、职业规划建议以及具体的开发技巧。 ... [详细]
  • 一、使用Microsoft.Office.Interop.Excel.DLL需要安装Office代码如下:2publicstaticboolExportExcel(S ... [详细]
  • 本文分享了作者在使用LaTeX过程中的几点心得,涵盖了从文档编辑、代码高亮、图形绘制到3D模型展示等多个方面的内容。适合希望深入了解LaTeX高级功能的用户。 ... [详细]
  • 春季职场跃迁指南:如何高效利用金三银四跳槽季
    随着每年的‘金三银四’跳槽高峰期的到来,许多职场人士都开始考虑是否应该寻找新的职业机会。本文将探讨如何制定有效的职业规划、撰写吸引人的简历以及掌握面试技巧,助您在这关键时期成功实现职场跃迁。 ... [详细]
  • 本文详细介绍如何安装和配置DedeCMS的移动端站点,包括新版本安装、老版本升级、模板适配以及必要的代码修改,以确保移动站点的正常运行。 ... [详细]
  • 尽管在WPF中工作了一段时间,但在菜单控件的样式设置上遇到了一些基础问题,特别是关于如何正确配置前景色和背景色。 ... [详细]
  • Android与JUnit集成测试实践
    本文探讨了如何在Android项目中集成JUnit进行单元测试,并详细介绍了修改AndroidManifest.xml文件以支持测试的方法。 ... [详细]
  • 本文将深入探讨 Unreal Engine 4 (UE4) 中的距离场技术,包括其原理、实现细节以及在渲染中的应用。距离场技术在现代游戏引擎中用于提高光照和阴影的效果,尤其是在处理复杂几何形状时。文章将结合具体代码示例,帮助读者更好地理解和应用这一技术。 ... [详细]
  • 本文详细介绍如何在华为鲲鹏平台上构建和使用适配ARM架构的Redis Docker镜像,解决常见错误并提供优化建议。 ... [详细]
author-avatar
東東1959
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有