MATLAB中使用load动态载入mat文件

subPath = 'data';
pathFolder = strcat(currentPath,subPath);
addpath(pathFolder);


nodesNum = char('800_','1K_','1K5_','2K_');
nodes = cellstr(nodesNum);


% distributionType = sym('_uni');% |rnd
preName = 'myED_';
distributionType = {'uni_','rnd_'};
commDis = [10 15 20 25];%15|20|25
matName = strcat(preName,distributionType{1});
matName = strcat(matName,nodes{1});
matName = strcat(matName,num2str(commDis(1)));
matName = strcat(matName,'.mat');

load(matName);


参考:http://codego.net/481092/

------------------------------------------------------------------------------------

你可能感兴趣的:(Matlab)