I have a problem to organize a binary representation that I calculate in Matlab, like this:
for i = 1:2^NJ-1
struct(i,:) = dec2bin(i,NJ);
This gives me this result:
7×3 char array
The problem is that I need this binary representation to have the following order:
I really need this to be done by the code because if you increase the number in NJ, it is no longer practical to do the manual change, as the amount of struct data increases exponentially.
I appreciate any help, Thank you.