MATLAB: Create an array that has ones

cell array

Hello,
I am trying to create a 1×256 cell array where each matrix inside is 256×41. I want each matrix to have a row of ones and the rest zeroes. For example, the first matrix will have the first row be ones and the rest zeroes. The second matrix will have the second row be all ones with the first row and all the rows after the second row be zeroes. Help? I'd like to loop this.
Thanks

Best Answer

A=arrayfun(@(x) circshift([zeros(1,41);ones(255,41)],[x 1]),1:255,'un',0)