Question: Cat Array Part 2 Create a function ldentifylndexGivenCategory that given a binned categorical array finds a logical index to rows that are in a specific

 Cat Array Part 2 Create a function ldentifylndexGivenCategory that given a

Cat Array Part 2 Create a function ldentifylndexGivenCategory that given a binned categorical array finds a logical index to rows that are in a specific category. For example, the mat file rowing Data2 contains a categorical array binnedWeigths with three categories >> load rowingData2; whos Bytes Class Attributes Name binnedWeights rowingDataSet Size 438 categorical 26x1 26x3 > summary (binnedweights) 9630 cell light weight medium weight heavy weight 1e 15 Calculate a logical array that selects all the entries in the category 'medium weight' >> [indexArray]-IdentifyIndexGivenCategory (binnedWeights, medium weight'); >> indexArray ans = 1x26 logical array Columns 1 through 18 0 0 0 0 0 1 0 0 1 11 1 0 1 1 0 Columns 19 through 26 0 1 1 1 0 0 0 0 Your Function Save Reset MATLAB Documentation function [indexArray]=IdentifyIndexGivenCategory(categoricalArray , categor|eName) % Your code goes here % 4 5 end Code to call your function C Reset 1 load rowingData2: Trouble with lab

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!