How do you define a triangular two-dimensional array using just vectors, not arraysor pointers?
ENGR 121 11/21/2016 Spencer Kociba ● Statistics ○ Mean ■ Average of numbers ○ Standard deviation and variance ■ 2 ways of determining the spread of data ○ mode(x) ■ Identifies the most frequently occurring value ○ sort(x) ■ Sorts vector from minimum value to max value ○ median(x) ■ Finds the middle number in a vector ■ Note: to find the median of a set of data, sort it first then use the median function ○ Median Filtering ■ Size of a median filter is calculating the median of every n values in that size ■ function medFiltVec = medianNFilter(signal) ■ medFiltVec = signal; ■ for i = 2:length(signal)-1 ■ medFiltVec(i) = median(signal(i-1 : i+1)); ■ end ■ End ○ Outlier ■ A number much larger or smaller than the rest of the data set ● Must remove these numbers from the data set ■ Ex. vector x has a set of data values in it ■ Newx = x((x~=min(x))&(x~=max(x))) ● Searching and Sorting ○ idx=0 ■ For i=1:length(vec) ● If (vec(i)==key) ○ idx=i; ○ Break ● End ■ End ○ idx=[]