I have a matrix a=[1,2,3,4……….,20] Now I want to multiply every other element in 'a' with -1 to get a=[1,-2,3,-4…………….-20]. please help me with this……!!
MATLAB: I have a matrix a=[1,2,3,4……….,20], Now I want to multiply every other element in a with -1 to get a=[1,-2,3,-4……..……..-20].
every othermatrix manipulationmultiply
Best Answer