热门标签 | 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



推荐阅读
  • PRML读书会第十四章 Combining Models(committees,Boosting,AdaBoost,决策树,条件混合模型)...
    主讲人网神(新浪微博:豆角茄子麻酱凉面)网神(66707180)18:57:18大家好,今天我们讲一下第14章combiningmodel ... [详细]
  • 这是原文链接:sendingformdata许多情况下,我们使用表单发送数据到服务器。服务器处理数据并返回响应给用户。这看起来很简单,但是 ... [详细]
  • Nginx使用(server参数配置)
    本文介绍了Nginx的使用,重点讲解了server参数配置,包括端口号、主机名、根目录等内容。同时,还介绍了Nginx的反向代理功能。 ... [详细]
  • Windows下配置PHP5.6的方法及注意事项
    本文介绍了在Windows系统下配置PHP5.6的步骤及注意事项,包括下载PHP5.6、解压并配置IIS、添加模块映射、测试等。同时提供了一些常见问题的解决方法,如下载缺失的msvcr110.dll文件等。通过本文的指导,读者可以轻松地在Windows系统下配置PHP5.6,并解决一些常见的配置问题。 ... [详细]
  • Webmin远程命令执行漏洞复现及防护方法
    本文介绍了Webmin远程命令执行漏洞CVE-2019-15107的漏洞详情和复现方法,同时提供了防护方法。漏洞存在于Webmin的找回密码页面中,攻击者无需权限即可注入命令并执行任意系统命令。文章还提供了相关参考链接和搭建靶场的步骤。此外,还指出了参考链接中的数据包不准确的问题,并解释了漏洞触发的条件。最后,给出了防护方法以避免受到该漏洞的攻击。 ... [详细]
  • 使用正则表达式爬取36Kr网站首页新闻的操作步骤和代码示例
    本文介绍了使用正则表达式来爬取36Kr网站首页所有新闻的操作步骤和代码示例。通过访问网站、查找关键词、编写代码等步骤,可以获取到网站首页的新闻数据。代码示例使用Python编写,并使用正则表达式来提取所需的数据。详细的操作步骤和代码示例可以参考本文内容。 ... [详细]
  • MySQL中的MVVC多版本并发控制机制的应用及实现
    本文介绍了MySQL中MVCC的应用及实现机制。MVCC是一种提高并发性能的技术,通过对事务内读取的内存进行处理,避免写操作堵塞读操作的并发问题。与其他数据库系统的MVCC实现机制不尽相同,MySQL的MVCC是在undolog中实现的。通过undolog可以找回数据的历史版本,提供给用户读取或在回滚时覆盖数据页上的数据。MySQL的大多数事务型存储引擎都实现了MVCC,但各自的实现机制有所不同。 ... [详细]
  • 本文介绍了响应式页面的概念和实现方式,包括针对不同终端制作特定页面和制作一个页面适应不同终端的显示。分析了两种实现方式的优缺点,提出了选择方案的建议。同时,对于响应式页面的需求和背景进行了讨论,解释了为什么需要响应式页面。 ... [详细]
  • 本文介绍了NetCore WebAPI开发的探索过程,包括新建项目、运行接口获取数据、跨平台部署等。同时还提供了客户端访问代码示例,包括Post函数、服务器post地址、api参数等。详细讲解了部署模式选择、框架依赖和独立部署的区别,以及在Windows和Linux平台上的部署方法。 ... [详细]
  • LaTeX使用XeLaTeX入门基础(一)
    主机平台:GentooLinux11.2内核版本:LinuxKernel3.2.1编译环境:XeTeX3.1415926-2.3-0. ... [详细]
  • 使用python输入PDF编号自动下载freepatentsonline.com的文档#!usrbinenvpython3#codingutf-8#Version:python3. ... [详细]
  • 检查两个3Dnumpy数组是 ... [详细]
  • Imtryingtousethisforabasicsearchwithpagination:我正在尝试使用此分区进行基本搜索:$construct?AND? ... [详细]
  • 1print过程procprint<data数据集名><选项>;*label指定打印输出标签noobs制定不显示观测序号*by变量名1< ... [详细]
  • 【原创】利用Python进行河流遥感处理的PyRIS软件开发
    今天开始着手改造pyris1.0.文章地址:https:doi.org10.1016J.ENVSOFT.2018.03.028Monegaglia,2 ... [详细]
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社区 版权所有