Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB 3. In this question, you will write a program that manipulates a text variable entered by the user. (a) Write a program that requests

image text in transcribedMATLAB

3. In this question, you will write a program that manipulates a text variable entered by the user. (a) Write a program that requests a text string from the user (b) Complete your program so that it counts the number of words contained in the text string and displays the result. HINT 1: Notice that counting the number of words comes back to counting the number of blank spaces. You will need to find the relation between the number of words and the number of spaces. HINT 2: You can use the function length) to determine the number of characters in the input string. Then you can use a while or for loop to determine the number of blank space in the string. (c) Check if the word "pizza" exists in the text string. You can display the string The word pizza is in the string." or "The word pizza is not in the string." HINT 3: strfindO I need the MATLAB code for all parts please

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

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions