MATLAB: Matlab exercise help me

exampleexercise

Hello everyone, I need help in an exercise I need to know how I can get the pairs of a square matrix of i, j (no, the even numbers of the matrix)

Best Answer

  • Try this:
    output = [A(1,1), a(1,3), A(2,2), A(3,1), A(3,2)]
    Or, for odd-size matrices
    output = A(1:2:end);