structSort2 - end end end S = vec while x <= r...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 function S = structSort2(A,str) a = A b = A [r c] = size(A) vec = [] if r == 1 a = A [v loc] = minStruct(a,str) vec = [vec v] a(loc) = [] else for x = 1:r for y = 1:c [v loc] = minStruct(b,str) vec = [vec v] b(loc(1),loc(2)).str = 'empty'
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end end end S = vec while x <= r && y <= c if b(x,y).str == 'empty' x = x + 1 else [v loc] = minStruct(b,str) vec = [vec v] b(loc(1),loc(2)).str = 'empty' end if x == r x = 1 y = y + 1 else y = y x = x + 1 end end...
View Full Document

This note was uploaded on 07/06/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Institute of Technology.

Ask a homework question - tutors are online