Info

This question is closed. Reopen it to edit or answer.

How to write this function in Matlab?

7 views (last 30 days)
Kiyoko Christian Mwizu
Kiyoko Christian Mwizu on 20 Oct 2020
Closed: KSSV on 20 Oct 2020
Where indicated in the script below, write a function, called myflip, which accepts one vector, v, (either a column or row), and outputs the same vector, v, of the same dimensions, but with the values in reverse order (as the MATLAB built-in flip() function does). In other words, v will be overwritten by its flipped version. In your function, you may use only the built-in MATLAB functions, length( ) and floor(), the latter of which will be useful for stopping the loop. (You need only one loop here, as opposed to nested loops.)

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!