Unformatted text preview: Using the following information x 1 = 1 y 1 = 1 θ 1 = 90 x 2 = 3 y 2 = 1 θ 2 = 90 r 1 = √ 2 φ 1 =45 yields r 2 = √ 2 and φ 2 = 45. Test your code for x 1 = 0 . 5 y 1 =1 θ 1 = 107 x 2 = 5 y 2 = 7 θ 2 = 270 r 1 = 3 φ 1 =40 Write a MATLAB function that 3. Calculates the average and standard deviation of a data set, x . The average and standard deviation are given by average = μ = 1 N N X k =1 x k standard deviation = v u u t 1 N N X k =1 ( x kμ ) 2 Your function should input the data set, x , and output both the average and standard deviation. Note that you are not allowed to use any builtin MATLAB functions to complete these calculations. Test your function for x = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10....
View
Full Document
 Spring '07
 Hayes
 Standard Deviation

Click to edit the document details