In Matlab, I have a variable X containing training data (rollise). In addition, there is a variable S with a data class. How do I get all X records with a special (e.g. negative) class?
Example:
X = [1 2;3 4;5 6;7 8;9 10]; S = [1 -1 -1 1 -1];
Should give:
ans = [3 4;5 6;9 10];
You just need to do:
X(S<0,:)
This array will contain strings X for which is S negative.
X
S
The best