Skip to content

Commit c80ed6c

Browse files
committed
[matlab] Add run filter function
1 parent ce3d92a commit c80ed6c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

+nix/Utils.m

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,19 @@
100100
return
101101
end
102102
end
103-
103+
104+
function currData = filter(obj, filter, val, mxMethod, objConstructor)
105+
valid = nix.Utils.valid_filter(filter, val);
106+
if(~isempty(valid))
107+
error(valid);
108+
end
109+
110+
currList = nix_mx(mxMethod, obj.nix_handle, uint8(filter), val);
111+
currData = cell(length(currList), 1);
112+
for i = 1:length(currList)
113+
currData{i} = objConstructor(currList{i});
114+
end;
115+
end
116+
104117
end;
105118
end

0 commit comments

Comments
 (0)