decryptMyWaltz - r [x idx] = sort(rand(32,1)); [ for k = 1...

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

View Full Document Right Arrow Icon
function truth = decryptMyWaltz(sdata, key) f % Recover the original order of the structures in structure array sdata % given key, the state value used in Matlab's random number generator % rand('state',key) % since you know key for decryption, use it to set random state
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r [x idx] = sort(rand(32,1)); [ for k = 1 : length(idx) % iterate through length of idx vector truth(idx(k)) = sdata(k) % assemble truth vector end e...
View Full Document

This note was uploaded on 09/12/2009 for the course CS 100 taught by Professor Fan/vanloan during the Fall '07 term at Cornell University (Engineering School).

Ask a homework question - tutors are online