Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions