Using logical indexing to plot points meeting a specific criteria only.
>> L = logical([0 1 0 1])
L =
0 1 0 1
>> a = [1 2 3 4]
a =
1 2 3 4
>> a(L)
ans =
2 4
- Category:
- Level: Basic,
- Topic: Practical example
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.