Hi @Bruno Luong. I like your answer and I would like to learn from you. If you can help, I have an question about this problem but in the case of the matix A has 3 or 6 column , for example:
A=[ 4 2 5
7 4 3
3 5 1
6 8 1];
I wish to learn how to create a new matrix C which is a part of A and necessary to have two column and contain the elements of B: