Refecting Elements of an Array - MATLAB
I need to write a MATLAB function performing a symmetrical reflection of an array, so for the initial array [1 2 5 7 9], a symmetrical reflection should give [9 7 5 2 1]. Without using the built-in functions like fliplr or flipdem.
I have already done this recursively, however now need to write a code to do the same thing but non-recursively. I am unsure whether doing it non-recursively would actually require a function or not.
Any help would be great!
I have already done this recursively, however now need to write a code to do the same thing but non-recursively. I am unsure whether doing it non-recursively would actually require a function or not.
Any help would be great!
0
Comments
flipped = array(newinds);