Skip to content
Snippets Groups Projects
Commit fb7ffd5c authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Update removePltIdFiles.m

parent c7256d2d
Branches
Tags
1 merge request!44Update removePltIdFiles.m
Pipeline #601264 failed
function [fListClean] = removePltIdFiles(fList)
%removePltIdFiles removes functions that are part of PlotID out of flist
% Detailed explanation goes here
%addpath('..\fcn_core');
[~,names,ext] = fileparts(fList);
names = strcat(names, ext); % add ext for comparison
% Get a list of all .m files that are part of Plot id
PltID_flist = struct2table(dir('+PlotID')); %get list of files
[~,~,PltID_flist.ext(:)] = fileparts(PltID_flist.name(:)); % add ext column
PltID_flist = PltID_flist(strcmp(PltID_flist.ext,'.m'),:);
packageContent = what('PlotID');
% packageContent.classes has no extensions
PltID_classlist = packageContent.classes;
% Class Methods need to be listed in an additional function
Class_flist = cell(1,numel(packageContent.classes)); %preallocate
for i=1:numel(packageContent.classes)
temp = what(['PlotID',filesep,'@',PltID_classlist{i}]);
Class_flist{i} = temp.m;
end
Class_flist = vertcat(Class_flist{:});
% all plotID .m files:
PltID_flist = [packageContent.m; Class_flist];
% Comparison and filter
fListClean = fList(~ismember(names,PltID_flist.name));
fListClean = fList(~ismember(names,PltID_flist));
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment