Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need the correct code, please provide a copy code Switching first names and surnames Write a function called SwitchNames that switches the first name and

image text in transcribedimage text in transcribed

Need the correct code, please provide a copy code

Switching first names and surnames Write a function called SwitchNames that switches the first name and surname of the entries in a string array. The input is an n x 1 string array with each array entry consisting of a first name and a surname placed in a string scalar. The function switches the first name and surname, and inserts a comma and space between the surname and the first name Restriction: The function must use the internal functions split and join Ex: listOfNameSurnames["Barney Google"; "Snuffy Smith";"Dagwood Bumstead"] listOfNameSurnames 3x1 string array "Barney Google" "Snuffy Smith" "Dagwood Bumstead" OutputStringsArraySwitchNames (listOfNameSurnames) OutputStringsArray- 3x1 string array "Google, Barney" "Smith, Snuffy" "Bumstead, Dagwood" Your Function Save C Reset MATLAB Documentation 1 function OutputStringArray- SwitchNames (InputStringArray) % Your code goes here % 5 end

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions