Question: This homework came with a file called data.txt , which contains coordinates of N = 1 0 0 0 points in two dimensions. Line i
This homework came with a file called data.txt which contains coordinates of points in two dimensions. Line in the file has two numbers, and which are the coordinates of point i Write and run a Matlab program that reads this file use the load function and performs the following tasks. In your pdf file submission, make sure you include a description of your approach, your commented source code, all answers, and the figure.
a Computes and prints the range, mean, and median of the coordinates, without using the builtin mean or median functions. You can use the functions min, max, sort.
b Plots all points in the plane using symbols based on the values: blue squares, red circles, green triangles, magenta stars for the first, second, third, and fourth quartiles of the value, respectively. Note, the first quartile contains the quarter of the points that have the lowest value, etc. You may find the function sortrows helpful.
c Computes a linear fit of the data, prints out the slope and intercept of the line, and plots the line on the same figure as the data symbols. You can use the polyfit function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
