Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a Create two strings: OSU_name_1 = The Ohio State University OSU_name_2 = THE OHIO STATE UNIVERSITY b. Use the Matlab function strcmp (which is an

image text in transcribed

a Create two strings: OSU_name_1 = "The Ohio State University OSU_name_2 = "THE OHIO STATE UNIVERSITY b. Use the Matlab function strcmp (which is an abbreviation of string compare) to compare the two strings and store the result (which will be true if the strings match and false if they do not) in a variable called prob3b. c. Use the Matlab function strcmpi(which is an abbreviation of string compare - case insensitive) to compare two strings and store the result which will be true if the strings match and false if they do not) in a variable called prob3c. If the difference between strcmp and strcmpi is not obvious from the example, look them up in the Matlab documentation d. Create two character arrays containing the name of the university: OSU_name_3 = 'The Ohio State University OSU_name_4 = 'THE OHIO STATE UNIVERSITY e. Compare the letters in the two char arrays using the == operator, and use the sum() function to count how many are the same. Store the result in a variable called prob3e. LOOK CAREFULLY AT THE RESULTS OF PARTS b, c, and e, and make sure that you understand them. Best Solution Solution 1:2 of 3 tests passed (67%) Submitted 12 minutes ago ID: 53355828 Size: 30 1 OSU_name_1 = "The Ohio State University" 2 OSU_name_2 = "THE OHIO STATE UNIVERSITY" 3 4 prob3b-strcmp (OSU_name_1, osu_name_2) 6 prob3c-strcmpi (osu_name_1, osu_name_2) 8 OSU_name_3 = 'The Ohio State University' 9 Osu_name_4 = 'THE OHIO STATE UNIVERSITY 10

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

More Books

Students also viewed these Databases questions

Question

1. In what ways has flexible working revolutionised employment?

Answered: 1 week ago