This is a fairly simple question but my Matlab knowledge is still very limited.
I want to take a given binary number (or rather, a bistring) of length $mn$ and generate an $m \times n$ matrix whose entries correspond to the bit values.
For example, if the given bitstring is $b = 1001110101$ (which is the binary value of the base-10 number 629), and since $b$ has length 10 which can be represented as 2*5, I am looking for a sequence of Matlab commands to convert $b$ to this matrix $A$:
$$ A = \begin{pmatrix} 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 \end{pmatrix}.$$
I have come close in the past using cell and string commands, but I never actually seem to get the matrix in the proper sense that I can compute things like $AA'$.
In case it helps, my application program will always generate bitstrings that are of a given length $b = mn$. That is, $m$ and $n$ are known so there is no guesswork when it comes to the size of the desired matrix.