In my 3d feature extraction example, I need to filter curvature between -1 and 0:
-1<curvature < 0
one mit website "Logical Conditions and Matrices" which was blocked showed how:
Matlab logical matrix is one important concept that needs to be acquired.
a = [1 2 3 4 5 6]
a > 3
will give you:
a_logic = [0 0 0 1 1 1]
The next step is what is clever about Matlab
a([0 0 0 1 1 1]) = [4 5 6]
a(a>3) = [4 5 6]
b = [7 8 9 10 11 12]
b(a>3) =[10 11 12]
This allows you to get only specific parts of a large matrix without loop through it.
so my previous question is solved:
SetInterval1 = ModelPoints (Curvature(1,:) < 0 & Curvature(1,:)> -1)
Type for operator details:
help ops