Question: IN MATLAB Write a function that, given a vector as the input calling argument, returns the reversed version of that vector. Note that this is

IN MATLAB

Write a function that, given a vector as the input calling argument, returns the reversed version of that vector. Note that this is not asking to put the elements in ascending or descending order. You must use a loop with the appropriate indexing to accomplish this task. Note that the result is returned by the function, not printed by the function. For example, given an input [1 2 10 4 5], the reversed would be [5 4 10 2 1]. For example, given an input [1 3 5 6 4 2], the reversed would be [2 4 6 5 3 1].For example, given an input [1 1 1 3 3 3 2 2 2], the reversed would be [2 2 2 3 3 3 1 1 1]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!