%此处定义一个三维矩阵
A = zeros(18,18,8);
B = zeros(18,4,8);
V = [5 10 30 50 70 90 110 130];
%8个状态点放入一个三维矩阵
for i=1:1:8
As =load (['E:/desk/**/pic1/' num2str(V(i)) '/A.mat']);%num2str()代表不同的文件夹
A(:,:,i) = As.A;
Bs =load (['E:/desk/**/pic1/' num2str(V(i)) '/B.mat']);%V(i)是文件夹的命名,此处文件名为数字
B(:,:,i) = Bs.B;
end