Question: USE MATLAB TO ANSWER: 1. Write a function file that takes as input a character string consisting of integers and the character x, deletes the
USE MATLAB TO ANSWER:
1. Write a function file that takes as input a character string consisting of integers and the character x, deletes the xs, and produces as output a character string consisting only of the integers. For example, if the input string is 1x23x456x7 the output string should be 1234567 Hint: Use strfind to locate the xs and then delete those entries from the string.
2. Write a function file that takes as input a word in the form of a character string, scrambles the letters, and returns the scrambled word as output. For example, if the input is MATLAB the output might be LAMBAT Hint: You might find the randperm command helpful. randperm(n) returns a random permutation of the integers 1 through n.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
