Hello,
I would like to take an 2-dim array like
IND=[4 3 2; 1 2 3];
and create a 3-dim of logicals like
GOAL(:,:,1)=[0 0 0 1; 1 0 0 0]GOAL(:,:,2)=[0 0 1 0; 0 1 0 0]GOAL(:,:,3)=[0 1 0 0; 0 0 1 0]
So the first second dimension is newly created, it is as long as the highest number in IND and is zero(false), except for the indice, that is 1(true)
I really need it to be fast, so a for loop will not do.
Many thanks Marcus
Best Answer