-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathselected.m
More file actions
33 lines (28 loc) · 758 Bytes
/
selected.m
File metadata and controls
33 lines (28 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% evaluate the selected x and y
% and call back the available parameters
function alist=selected(xselect,yselect,wd)
alist={};
[xi, ~] = detect(xselect);
[yi, ~] = detect(yselect);
emptycells = cellfun(@isempty,wd(2:end,:));
xnonempty = find(emptycells(:,xi) == 0);
ynonempty = find(emptycells(:,yi) == 0);
nonempty = intersect(xnonempty, ynonempty);
if (isempty(nonempty) == 1)
alist = {};
return
end %if
for i=1:size(emptycells,2)
if ((i ~= xi) && (i ~= yi))
eliminate = 0;
for j = nonempty
if (emptycells(j,i) == 1)
eliminate = 1;
break
end %if
end %j
if (eliminate == 0)
alist = [alist,detect0(i)];
end %if
end %if
end %i