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



推荐阅读
  • 使用 Azure Service Principal 和 Microsoft Graph API 获取 AAD 用户列表
    本文介绍了一段通用代码示例,该代码不仅能够操作 Azure Active Directory (AAD),还可以通过 Azure Service Principal 的授权访问和管理 Azure 订阅资源。Azure 的架构可以分为两个层级:AAD 和 Subscription。 ... [详细]
  • 本文详细介绍了Akka中的BackoffSupervisor机制,探讨其在处理持久化失败和Actor重启时的应用。通过具体示例,展示了如何配置和使用BackoffSupervisor以实现更细粒度的异常处理。 ... [详细]
  • UNP 第9章:主机名与地址转换
    本章探讨了用于在主机名和数值地址之间进行转换的函数,如gethostbyname和gethostbyaddr。此外,还介绍了getservbyname和getservbyport函数,用于在服务器名和端口号之间进行转换。 ... [详细]
  • 如何在窗口右下角添加调整大小的手柄
    本文探讨了如何在传统MFC/Win32 API编程中实现类似C# WinForms中的SizeGrip功能,即在窗口的右下角显示一个用于调整窗口大小的手柄。我们将介绍具体的实现方法和相关API。 ... [详细]
  • 本文介绍如何在 Android 中通过代码模拟用户的点击和滑动操作,包括参数说明、事件生成及处理逻辑。详细解析了视图(View)对象、坐标偏移量以及不同类型的滑动方式。 ... [详细]
  • 优化ListView性能
    本文深入探讨了如何通过多种技术手段优化ListView的性能,包括视图复用、ViewHolder模式、分批加载数据、图片优化及内存管理等。这些方法能够显著提升应用的响应速度和用户体验。 ... [详细]
  • Explore how Matterverse is redefining the metaverse experience, creating immersive and meaningful virtual environments that foster genuine connections and economic opportunities. ... [详细]
  • 本文详细介绍了 Dockerfile 的编写方法及其在网络配置中的应用,涵盖基础指令、镜像构建与发布流程,并深入探讨了 Docker 的默认网络、容器互联及自定义网络的实现。 ... [详细]
  • 数据库内核开发入门 | 搭建研发环境的初步指南
    本课程将带你从零开始,逐步掌握数据库内核开发的基础知识和实践技能,重点介绍如何搭建OceanBase的开发环境。 ... [详细]
  • 本文详细介绍了如何使用 Yii2 的 GridView 组件在列表页面实现数据的直接编辑功能。通过具体的代码示例和步骤,帮助开发者快速掌握这一实用技巧。 ... [详细]
  • 本文深入探讨 MyBatis 中动态 SQL 的使用方法,包括 if/where、trim 自定义字符串截取规则、choose 分支选择、封装查询和修改条件的 where/set 标签、批量处理的 foreach 标签以及内置参数和 bind 的用法。 ... [详细]
  • 本文详细介绍了Java中org.eclipse.ui.forms.widgets.ExpandableComposite类的addExpansionListener()方法,并提供了多个实际代码示例,帮助开发者更好地理解和使用该方法。这些示例来源于多个知名开源项目,具有很高的参考价值。 ... [详细]
  • 深入解析Spring Cloud Ribbon负载均衡机制
    本文详细介绍了Spring Cloud中的Ribbon组件如何实现服务调用的负载均衡。通过分析其工作原理、源码结构及配置方式,帮助读者理解Ribbon在分布式系统中的重要作用。 ... [详细]
  • 在前两篇文章中,我们探讨了 ControllerDescriptor 和 ActionDescriptor 这两个描述对象,分别对应控制器和操作方法。本文将基于 MVC3 源码进一步分析 ParameterDescriptor,即用于描述 Action 方法参数的对象,并详细介绍其工作原理。 ... [详细]
  • XNA 3.0 游戏编程:从 XML 文件加载数据
    本文介绍如何在 XNA 3.0 游戏项目中从 XML 文件加载数据。我们将探讨如何将 XML 数据序列化为二进制文件,并通过内容管道加载到游戏中。此外,还会涉及自定义类型读取器和写入器的实现。 ... [详细]
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社区 版权所有