Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

cell arrays and strings in MATLAB! 1.Create a function in MATLAB called whereisWaldo that receives a cell array. Each cell will contain a string or

cell arrays and strings in MATLAB!

1.Create a function in MATLAB called whereisWaldo that receives a cell array.

Each cell will contain a string or a char array.The function will return the index of cells in which the string or char array was "Waldo"(or "Waldo").

* If there is no "Waldo" return an empty array.

*If there is more than one "Waldo" return all the indices.

*A string or char array that contains "Waldo" as a substring does not count.For example,we will not want to get the index of a acell whith the string "Waldo is here".

* Hint: use cellstr or string.

2.Test your function.In the script create cell arrays with the following situations and check that your function resturns what you expect.

*There is no Waldo.

*Two Waldos

*Waldo is a string

*Waldo is a char array

*Waldo is a substring(check that you do not get that index)

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_2

Step: 3

blur-text-image_3

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

Combinatorial Testing In Cloud Computing

Authors: Wei-Tek Tsai ,Guanqiu Qi

1st Edition

9811044805, 978-9811044809

More Books

Students also viewed these Programming questions

Question

Solve each equation. a. x = x b. x(x 8) = 4(x - 9) -

Answered: 1 week ago