This preview shows page 1. Sign up to view the full content.
Unformatted text preview: suit and rank , that store the appropriate strings. The structure array should be of length 52. Do a perfect shue 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
This test prep was uploaded on 02/15/2008 for the course CS 100 taught by Professor Fan/vanloan during the Fall '07 term at Cornell University (Engineering School).
- Fall '07