I have a column matrix with numbers a=[0 1 2 3 4 5] and I want to get matrix b=[0 0 2 2 4 4] Basically all the number should be displayed as their closest even number. Please help me with the logic. It is a column matrix ,I am not sure how to show it in the question as it only shows up as a row matrix
The numbers shown is just an example and the numbers on the matrix a could be random as well. but the solution to matrix b should be the nearest even number, that wouldnt change
Best Answer