Hi guys I have a matrix and I want to pull a subset matrix but only with the numbers whose last digit is one. EX a= 00110, 01000, 01011, 01101. thus b= 01011, 01101
thanks Madhan. I have a= 00110, 01000, 01011, 01101. I want to get b= 01011, 01101. Matrix b is all the vectors from matrix a whose last digit=1 (when the last digit of a vector in matrix a=0 the vector is not included in matrix b).
Are the entries for the first row '00110' which is to say characters? Are they [0 0 1 1 0] which is to say distinct decimal numbers? Are they 00110 decimal, which would show up as 110, decimal one hundred and ten?
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
4 Comments
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631511
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631511
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631513
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631513
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631520
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631520
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631522
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/427510-pull-a-conditional-subset-of-a-matrix#comment_631522
Sign in to comment.