How to create a cell array by repeating a row vector
2 views (last 30 days)
I have a row vector A=[1:10]; I want to create cell array CA= cell(1,10) , where CA(1,1)= [A(1) A(1);A(1) A(1)], CA(1,2)=[A(2) A(2);A(2) A(2)]... so on and so forth. I understand that this oprtation can be done using a for loop. However, is there a way of doing this using cell array indexing, or some other faster method than a for loop ?