Answered step by step
Verified Expert Solution
Question
1 Approved Answer
No iterations or Conditionals / MATLAB Directions: Write the code to satisify the following directions. For each part, store your answer in the variable that
No iterations or Conditionals / MATLAB
Directions: Write the code to satisify the following directions. For each part, store your answer in the variable that is specified within the parantheses. Ex. Add 1+1.(GT) That means store the value of 1+1 in the variable GT, like so: Ex. GT=1+1; For some of the problems, you can produce two answers with one function call. For instance, if we wanted you to find the minimum number of a vector and the position of the minimum, the problem would be structured as: A=[] B=[] However, when you write your answer, change these two lines into one line to use the 2 outputs of the min function like: [A,B]=min(vec) It is appropriate to use multiple lines to produce one of the variables. \%These are given variables/values that will be used in the problems str1 = 'I have the most fun when I am coding!' vec1 =[482940102234] str2 = 'ThIS is a TEsT OF THE GEORGIA tech EMERgENCY NOTIFICAtion SYSTEM!!!' \%For each of these problems, although you can see the values in the variables and could technically hardcode the answers, \%you are encouraged to figure out which appropriate functions/general lines of code help you accomplish the task. \%It is appropriate to use multiple lines to produce one of the variables. \% Create a mask that is true at all of the positions of vec1 that contain a number greater than 4 (A) A=[] \% Create a mask that is true at all positions of vec1 that contain an even number (B) B=[]; \% Create a mask that is true at all positions of vec1 that contain an even number that is greater than 4 C=[]; \%PProduce the quantity of 4's that are in vec1 (D) D=[]; \%Create a mask that is true at all positions in str1 that contain a space (E) E=[]; \%Create a mask that is true at all the positions in str1 that are NOT a space (F) F=[]; \$Delete all of the spaces in str1 and save this newly modified string in G (G) G=[]; \$Create a vector of the indices of all of the locations of the capital E's in str2 (H) H= [ ]; \$Create a vector of all of the lowercase letters in str2 (I) I=[]Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started