eval関数を使えばいけますがめちゃくちゃお勧めしません。
一応やり方置いときます。
A = rand(36);
for jj = 1:width(A)
s = sprintf('x%i = A(:,%i);',jj,jj);
eval(s)
end
中身確認します
whos
Name Size Bytes Class Attributes
A 36x36 10368 double
cmdout 1x33 66 char
jj 1x1 8 double
s 1x14 28 char
x1 36x1 288 double
x10 36x1 288 double
x11 36x1 288 double
x12 36x1 288 double
x13 36x1 288 double
x14 36x1 288 double
x15 36x1 288 double
x16 36x1 288 double
x17 36x1 288 double
x18 36x1 288 double
x19 36x1 288 double
x2 36x1 288 double
x20 36x1 288 double
x21 36x1 288 double
x22 36x1 288 double
x23 36x1 288 double
x24 36x1 288 double
x25 36x1 288 double
x26 36x1 288 double
x27 36x1 288 double
x28 36x1 288 double
x29 36x1 288 double
x3 36x1 288 double
x30 36x1 288 double
x31 36x1 288 double
x32 36x1 288 double
x33 36x1 288 double
x34 36x1 288 double
x35 36x1 288 double
x36 36x1 288 double
x4 36x1 288 double
x5 36x1 288 double
x6 36x1 288 double
x7 36x1 288 double
x8 36x1 288 double
x9 36x1 288 double
------
for jj = 1:width(A)
C{jj} = A(:,jj);
end
C
C = 1×36 cell array
{36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double} {36×1 double}
2列目を取り出してみましょう
C{2}
ans = 36×1
0.1164
0.4850
0.7365
0.4477
0.5623
0.6490
0.1355
0.8852
0.0212
0.8059