**Unformatted text preview: **suit and rank , that store the appropriate strings. The structure array should be of length 52. • Do a perfect shuﬄe of the cards. 3. Assume that each structure in structure array Pts has two Felds, x and y . Write a code fragment to sort the structure array Pts so that the structures are in the order of increasing distance from (0,0). You can use built-in function sort : [y, idx]= sort(x) where x is an n-vector of numbers , y is x sorted in ascending order, and idx is an n-vector of indices such that y(i) = x(idx(i)) . (Review your notes from Lecture 19 if necessary.) 4. Review the project questions, lecture examples, and section exercises! 1...

View
Full Document

- Summer '07
- FAN/VANLOAN
- Array, Playing card, len, built-in function, structure array