Question: Using Matlab create the following script: 1. Stores a first and last name as a string in a variable called fullname. The name should be

Using Matlab create the following script:

1. Stores a first and last name as a string in a variable called fullname. The name should be separated by a space.

2. Initializes an empty string called firstname. ( firstname = ' ' )

3. Use a while loop to concatenate elements of fullname to the variable firstname until firstname contains only the first name.

4. Use a for loop to replace every third letter in firstname with capital N.

5. Displays 'your new first name is (value of firstname).'

6. Ask user to input someone else's first name and store it in a variable called othername

7. Check to see if othername and firstname are equivalent. if they are, display 'Yes' and if not display 'No'

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!