Question: Using two approaches, write the MATLAB code to compute the percentage of concussions overall (i.e., not classified by gender or sport) in the concuss.dat dataset.

Using two approaches, write the MATLAB code to compute the percentage of concussions overall (i.e., not classified by gender or sport) in the concuss.dat dataset. a. Approach 1: Use a loop to iterate over each data record, incrementing tallies as appropriate. b. Approach 2: Do NOT use a loop. Instead, index into your matrix to define the relevant vectors. Then use a logical mask to identify the subset of interest. For both approaches, use an fprintf statement to produce this output: Overall, 0.074 6% of the athletes sustained concussions. Notes: Be sure to load the data file into memory (once is sufficient). You may NOT use MATLAB's sum function in Approach 1. To produce the % sign in fprintf, use %%. Do NOT hard-code the 0.0746!! Comments are NOT required. As a reminder, here are the first few records (rows) contained in the concuss.dat file. The columns, in order, represent sport, gender, year, concussion and count
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
