Page 1 of 1

Which of the following code is correct to change the vector x from 1 2 3 4 5 6 7 8 9 10 to the vector 24 6 8 10 9 7 5 3

Posted: Fri May 20, 2022 11:50 am
by answerhappygod
Which Of The Following Code Is Correct To Change The Vector X From 1 2 3 4 5 6 7 8 9 10 To The Vector 24 6 8 10 9 7 5 3 1
Which Of The Following Code Is Correct To Change The Vector X From 1 2 3 4 5 6 7 8 9 10 To The Vector 24 6 8 10 9 7 5 3 1 (33.84 KiB) Viewed 26 times
Which of the following code is correct to change the vector x from 1 2 3 4 5 6 7 8 9 10 to the vector 24 6 8 10 9 7 5 3 1 O A. y = x(end:-1:1); [x(2:2:end), y(1:2:end)]; O B. y = x(end:-2:1); [x(2:2:end), y); O C. y = x(end-1:-2:2); [x(2:2:end), y]; O D.y = x(1:2:end); [x(2:2:end), y(end:-1:1)];