I have 5 matrices of different dimensions (n = 256, 512, 1024, 2048, and 4096) and I was wondering how I could store them in an array (which I could iterate through in a for loop later). I tried just doing {\tt matArray = [A B C D E];} but it said that horzcat needed dimensions that agreed. I also tried using cells but I might not be using them correctly because I'm getting an error that says, 'Conversion to cell from double is not possible'. Here is the piece of code that's giving me an error:
A=randi(9, 256);
B=randi(9, 512);
C=randi(9, 1024);
D=randi(9, 2048);
E=randi(9, 4096);
matArray=cell(1,5);
matArray(1)=A;
matArray(2)=B;
matArray(3)=C;
matArray(4)=D;
matArray(5)=E;
Do you guys have any idea what's going on? Thanks in advance.
;causes vertical concatenation -and since the first dimension is the same, that will work).