## Matlab: How can I split my data matrix into two random subsets of column vectors while keeping the label information?

问题 I have a data matrix X (60x208) and a matrix of labels Y (1x208). I want to split my data matrix X into two random subsets of column vectors: training (which will be 70% of the data) and testing (which will be 30% of the data), but I need to still be able to identify which label from Y corresponds to each column vector. I couldn't find any function to do this, any ideas? EDIT: Thought I should add, there are only two labels in Y: 1 and 2 (not sure if this makes a difference) 回答1: That's