How to flip an array without using the flip command ?
3 views (last 30 days)
- Given an row vector A of any size say n
- I want to create a vector B of Size n with the last element of A as the First elelment of B and the first element of A as the last element of B
- I want to create the array B without using the FLIP command but preferably by a for loop
More Answers (1)
Walter Roberson on 3 May 2022
If the vector V length is N then the first output is V(N), the second is V(N-1), the third is V(N-2)....
You should be able to generalize to what location the Kth output is from.