Hello,
I got a Matrix with different cases:
a= (6,6)0 1 0 2 0 00 2 0 1 0 00 1 0 2 0 00 1 0 2 0 00 1 0 2 0 00 2 0 1 0 0
And another matrix with different values:
b=(6,6)1 3 1 1 3 12 4 2 3 4 33 5 3 4 5 44 6 3 5 6 55 5 4 6 5 66 6 5 6 6 6
Now I would like to transfer values of second and fourth collum of b [b(x,2)&b(x,4)] into a new Matrix if condition a(x,2) or a(x,4)= 1 is fulfilled.
So the end result would look like this:
c=(6,1)335656
How can I do this with Matlab? And I would like to keep the order. So it should work from line to line. Not collum for collum.
Thanks for helping me.
Best Answer