[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: transform a string with variable length to a matrix
From: |
Goebel, Juergen |
Subject: |
RE: transform a string with variable length to a matrix |
Date: |
Thu, 28 Aug 2008 12:55:23 +0200 |
> Jaroslav Hajek wrote:
> This is possible via mat2cell. But getting the bit representation is
> actually simpler, just do:
> nb = floor (log2 (x)) + 1;
> b = bitget (x, nb:-1:1);
Great, as I'd said: wizard (aka computer expert).
Thanks a lot,
Jürgen