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
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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
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); [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)];
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!