source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/dec2decbin.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 276 bytes |
Line | |
---|---|
1 | function s=dec2bin(d,n) |
2 | %DEC2BIN Internal function generate binary matrices |
3 | |
4 | % Author Johan Löfberg |
5 | % $Id: dec2decbin.m,v 1.2 2004/07/02 08:17:30 johanl Exp $ |
6 | |
7 | [f,e]=log2(max(d)); % How many digits do we need to represent the numbers? |
8 | s=rem(floor(d(:)*pow2(1-max(n,e):0)),2); |
Note: See TracBrowser
for help on using the repository browser.