source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/prob_round.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 160 bytes
Line 
1function y = prob_round(x)
2% probabilistically round a numer.  ie, for x between 0 and 1,
3% x is rounded up with prob. x.
4f = floor(x);
5y = f + ((x-f) > rand);
Note: See TracBrowser for help on using the repository browser.