Unformatted text preview: Week 5: Reading Data files, Functions and using array indices I have put 2 MATLAB data files on the web site for you. You cannot ‘open’ these files and look at them. Save them in a MATLAB directory. Your MATLAB code will load values from these files into variables in your program. 1. Use Loops and Array indices for all of these operations. Write a function to calculate the average and the standard deviation of a data set {d i }. 1 2 1 / ( ) N i i N i i Average d N d STD Deviation N μ μ = = = = = ∑ ∑ The input is an array, {d i }, and the output is Average & STD deviation. 2. The file data1.mat contains data values for 2 arrays x and y and a value for N, which is the length of the arrays. Load the data and calculate the average and standard deviation for both of the arrays. (You will pass the arrays to the function you wrote in #1. Terrain Navigation – Using 2D arrays. PROGRAM: Terrain Navigation Terrain Navigation is very important in the application of remotelypiloted extraterrestrial vehicles. The Terrain Navigation is very important in the application of remotelypiloted extraterrestrial vehicles....
View
Full Document
 Fall '07
 Hayes
 Geodesy, Topography, Summit, Landform

Click to edit the document details