subject

Write a MATLAB script in which you initialize the following vector:

ANIMALS = ["cow", "cat", "dog", "fox", "lion", "bear", "sea lion", "deer", "dolphin"];

a. In the script, use logical indexing to create a vector called C_ANIMALS that is comprised of the animals from the above ANIMALS vector starting with the letter c. This should be done with just one line of code. HINT: MATLAB provides a built-in function that checks whether a string starts with a specified letter. Feel free to research and use this built-in function.

b. In the script, use logical indexing to create a vector called LETTERS_3 that is comprised of the animals from the above ANIMALS vector that are three letters long. This should be done with just one line of code. HINT: MATLAB provides a built-in function that checks whether a string’s length is equal to a certain number. Feel free to research and use this built-in function.

c. In the script, use logical indexing to create a vector called D_GREATER_3 that is comprised of the animals from the above ANIMALS vector that are greater than three letters long and start with the letter d. This should be done with just one line of code.

d. Display all the vectors created in this script: ANIMALS, C_ANIMALS, LETTERS_3, and D_GREATER_3.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:20
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
question
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
You know the right answer?
Write a MATLAB script in which you initialize the following vector:

ANIMALS = ["cow", "c...
Questions
Questions on the website: 13722360