Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please Help me with the following problems using Matlab 1. 2. 3. 4. Challenge 9.

ID: 2082595 • Letter: P

Question

Please Help me with the following problems using Matlab

1.

2.

3.

4.

Challenge 9.7.1: Concatenating strings. This activity uses a 3rd party app. Though your activity may be recorded, a refresh may be required to update the banner to the left. Concatenating strings Write a statement that assigns fullName with firstName, a space, then lastName. Note: fullName should remain a row array of single characters Hint: Construct the row array by providing a row array's elements within brackets Your Function Save C Reset M MATLAB Documentation E 1 function fullName Combine Names (firstName, lastName) 2 firstName: User specified string 3 lastName: User specified string Write a statement that assigns fullName with firstName a space then lastName fullName firstName 8 end Code to call your function C Reset

Explanation / Answer

combineNames.m

function fullName = combineNames(firstName,lastName)
fullName = [firstName, ' ',lastName];
end

CreateString.m

function alphaString = CreateString(endLetter)
letters = ['abcdefghijklmnopqrstuvwxyz'];
idx = find(letters==endLetter)
alphaString = letters(1:idx);
end

EuclideanDist.m

function y = EuclideanDist(x1,x2,y1,y2)
y = sqrt(((x1-x2)^2)+((y1-y2)^2))
end