Question: Matlab Colon operator: Counting up Construct a row array countValues from 1 to endValue, using the colon operator Ex: If endValue is 5, countValues should

 Matlab Colon operator: Counting up Construct a row array countValues from
1 to endValue, using the colon operator Ex: If endValue is 5,
Matlab

Colon operator: Counting up Construct a row array countValues from 1 to endValue, using the colon operator Ex: If endValue is 5, countValues should be [1, 2, 3, 4, 5] Function 1 function countValues CreateArray (endValue) 2 % endValue: Ending value of array countValues 3 % Construct a row array countValues from 1 to endValue, % using the colon operator countValues = 0; 4 5 6 7 8 end Code to call your function 1 CreateArray(5) Logic array: Identifying qualifying times Create a logic array qualifyingindex with true for any location where the runner is male with a running time less than 8.2. Row array runnerGenders indicate if a runner if male (M) or female (F), Row array runnerTimes indicates the corresponding runner's time Function A Save e Reset DE MATLAB Docum 1 function qualifyingIndex - FindQualifying(runnerGenders, runnerTimes) 2 % runnerGenders: Indicates if the runner is male (M) or female (F) 3% runnerTimes: Corresponding run time % Create a logic array qualifyingIndex with true for any location % where the runner is male with a running tine less than 8.2 qualifyingIndex -e; 4 5 6 7 8 9 end Code to call your function 1 FindQualifying(['M', 'F', 'M', 'M', 'F1, [8.5, 9, 7.7, 7.9, 7.2])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!