Question: write in MATLAB coding language Exercise 3.2 In Exercise 2.12 you wrote a script m-file to compute the Injury Severity Score (ISS) given an array

write in MATLAB coding language  write in MATLAB coding language Exercise 3.2 In Exercise 2.12 you
wrote a script m-file to compute the Injury Severity Score (ISS) given
an array of 6 Abbreviated Injury Scale (AIS) values. Mod- ify your

Exercise 3.2 In Exercise 2.12 you wrote a script m-file to compute the Injury Severity Score (ISS) given an array of 6 Abbreviated Injury Scale (AIS) values. Mod- ify your solution so that it uses a function m-file rather than a script m-file. Specifically, the function should take an array of 6 AIS values as its only input argument, and produce the ISS value as its output. As described in Exercise 2.12, the ISS is computed from the AIS values as follows: Find the three highest AIS values in the array. Square their values. Sum the squares. Also, write a short script m-file that defines the AIS array (3 0 4 5 3 0] and contains a call to your function using this array as an argument. The correct ISS value for the array should be 50. %Exercise 2.12 clear; close all; % ISS exercise ais = (3 0453 0); iss = 0; for x=1:3 % find value/index of maximum ais score [c,i] = max(ais); % add on square of highest ais to iss iss = iss + c*c; % remove highest ais from list ais = [ais(1:1-1) ais(i+1:end)]; end iss Exercise 3.3 Modify your solution to Exercise 3.2 so that the function m-file is contained 03.E Exercises 73 in a different location in the file system. For example, make a sub-directory of the directory containing your script m-file, and move the function m-file into it. Then, modify your script so that it is still able to find the function m-file

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!