I want to produce a cell array as below in matlab:
P= {100;010;000;000;001}
{100;000;010;000;001}
{100;000;000;010;001}
{000;100;010;000;001}
{000;100;000;010;001}
{000;000;100;010;001}
where P= {5x3 cell} {5x3 cell} {5x3 cell} {5x3 cell} {5x3 cell} {5x3 cell};
from the 5x3 matrix, the pattern should be only one '1' in each column and the third column is '1' at final row in every cell.
i.e : P{1}= 100;010;000;000;001
how should I do that?
From what I had made up till now:
PP=zeros(5,3);
P={1,6};
P={PP,PP,PP,PP,PP,PP};
how can I put the ones in the cell?
thank you so much