Question: Write a MATLAB function called backthatstringup.m which takes any string (i.e. vector of char's ... a list of characters, surrounded by single quotes) and rewrites

Write a MATLAB function called backthatstringup.m which takes any string (i.e. vector of char's ... a list of characters, surrounded by single quotes) and rewrites it in reverse order. You must use either a for loop or a while loop in your code and you may not use the built-in MATLAB functions fliplr or flipud. The specifications for the function and some sample function calls are shown below. input parameter message a string to be reversed output parameter egassem the reversed message sample function calls backthatstringup ('This is a sentence.') produces '.ecnetnes a si sihT' backthatstringup('12345') produces '54321' backthatstringup ('racecar') produces 'racecar
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
