comparison scripts/set/ismember.m @ 27248:a23f25cc2aae

ismember.m: Add parentheses to make indexing expression easier to read. * ismember.m: Add parentheses to make indexing expression easier to read.
author Rik <rik@octave.org>
date Fri, 12 Jul 2019 17:20:07 -0700
parents c17bdf3b3841
children 6ac42f6615bb
comparison
equal deleted inserted replaced
27247:9e5a825bb966 27248:a23f25cc2aae
128 [s, is] = sort (s); 128 [s, is] = sort (s);
129 endif 129 endif
130 130
131 ## Remove NaNs from table because lookup can't handle them 131 ## Remove NaNs from table because lookup can't handle them
132 if (isreal (s) && ! isempty (s) && isnan (s(end))) 132 if (isreal (s) && ! isempty (s) && isnan (s(end)))
133 s = s(1:end - sum (isnan (s))); 133 s = s(1:(end - sum (isnan (s))));
134 endif 134 endif
135 135
136 if (nargout > 1) 136 if (nargout > 1)
137 s_idx = lookup (s, a, "m"); 137 s_idx = lookup (s, a, "m");
138 tf = logical (s_idx); 138 tf = logical (s_idx);