Matlab Final Project

Matlab Project代写 This project is to be done in groups of 2 people. Only one group per section may have 3 people in the group to account…

1 Description

This project is to be done in groups of 2 people. Only one group per section may have 3 people in the group to account for an odd number of students. This group of 3 must speak with Dr. White.

You work for a group that is researching robotic wheelchairs that drive themselves. Three designs have been tested for how well they follow a programmed track. Your job is to create a script to analyze the test data.

You have been given fifive fifiles:

  • project_time.mat – Array of times (in units of seconds) at which the location of the robots were recorded.
  • project_track.mat – A series of x, y coordinates (in units of feet) of the programmed track.
  • project_path1.mat,  project_path2.mat,  project_path3.mat –  Recorded x, y coordinates (in units of feet) of each robot at the times given in time.mat.

2 Specififications Matlab Project代写

The below sub-sections describe the requirements of your script. You may use it like a check-list to help you determine that your script has met the requirements.

2.1 Ask the user to select the desired robot path to analyze or to quit.

If the user enters an invalid input, the program should say that the input was invalid and ask again.

After analyzing a set of data, the script should ask the user to make another selection. It will only exit when the user selects the option to quit.

2.1.1 Selecting test data

The user should enter a single number which represents the test data number.

Extra: The user can enter the complete fifile name of any test data .mat fifile. The script can assume that the fifile is in the correct format and has a single variable named path.

2.1.2 Exiting the script Matlab Project代写

If the user enters any of the following inputs, the script should exit:

  • q, quit, done

The script should close all the fifigures that it created.

The script should not clear the output it made in the Command Window.

The script should output “Goodbye…” when it exits.

2.2 Create a Figure 1 that plots the top view (y versus x coordinates ) of the desired programmed track and the actual path of the selected robot.

The desired path should be plotted using a solid black line with no markers.

The robot’s path should use a dotted line with markers.

The fifigure should use appropriate labels.

The fifigure’s title should say which set of data the plot represents.

2.3 Create a Figure 2 that plots the x coordinates of the  robot’s path versus time. Matlab Project代写

2.4 Create a function to calculate the x-error of the selected robot’s track in feet RMS.

The most appropriate way to calculate the magnitude of the error is using the root-mean-squared error (It is calculated in reverse of its name). The equation

is:

Where i is the i-th x-data point, xrobot(i) is the i-th robot’s x-coordinate, xtrack  is the i-th programmed x-coordinate, and N is the number of data points.

Create a function named RMS_error which has two inputs, path and track, and outputs the calculated RMS error value (one number).

The script should output this number to the Command Window in a sentence, for example:

Robot 1, x-track error is 2.54 feet RMS.

Where numbers are correct for the robot the user selected.

Matlab Project代写
Matlab Project代写

2.5 Calculate the maximum velocity of the robot in feet  per second. Matlab Project代写

This part is for extra credit.

This is the vector velocity in the x-y plane, not the x-velocity only.

The script should output the result like the example:

maximum velocity = 7.2 (ft/s)

3 Submission requirements Matlab Project代写

Create a folder to hold all the fifiles for your project. Name the folder after the names of your group members:

name1_name2

Your main script fifile must be named:

robot_analysis.m

In your folder you also must include the fifile for your RMS_error(path, track) function.

Each script and function must include % comments to help describe the sections and operations in the fifile. Points will be taken offff for fifiles with no or bad comments.

Each .m fifile must be easy to read. Use spaces, blank lines, and comments so that your code looks nice. Use variable names that have a good meaning for what values they are holding. Points will be taken offff for code that is diffiffifficult to  read even if it works .

Your folder should also contain the data .mat fifiles and a copy of the project_description HTML or PDF fifile.

Late projects will not be graded and will receive a score of 0.