Discussion:
Sorting data
(too old to reply)
Ray
2017-12-19 02:20:45 UTC
Permalink
Raw Message
Hello,
I have sorted data to find out everytime my column 2 is greater then column 4, and vice versa. I also figured out by how much they were greater or less than . Now I have to figure out the mean for each subject (column 1) I have 72 subjects. I dont know how to do this
dpb
2017-12-19 14:53:14 UTC
Permalink
Raw Message
Post by Ray
Hello,
I have sorted data to find out everytime my column 2 is greater then column 4, and vice versa. I also figured out by how much they were greater or less than . Now I have to figure out the mean for each subject (column 1) I have 72 subjects. I dont know how to do this
ix=X(:,2)>X(:,4); % logical indexing array for greater than
mnSubj=mean(X(ix,1)); % mean for those which are greater

--

Loading...