This preview shows page 1. Sign up to view the full content.
Unformatted text preview: %a valid index for the new, smaller matrix. The function should return %every valid index that was found in the order that they were found. If %the original given index is invalid, the result should be an empty %vector. [r c] = size(arr); %finds the dimensions of the array of numbers if index > c %terminating condition; if the specified index is greater than the number of columns, then the %result will be an empty vector noindex = ; %empty vector result elseif index > 0 & index <= c %condition total = sum(arr(:,index)); arr(:,index) = ; noindex = [index recursiveCol(arr,total)]; end end...
View Full Document
- Spring '08