Two designs for a prosthetic arm are being considered for further development by the company CompMethods215. Several design considerations are scored for each design by the design engineering team as shown in the table below. Consider a higher score best in all categories.
Design factor | Design 1 | Design 2 |
Durability | 9.82 | 9.64 |
Cost per unit | 7.43 | 8.97 |
Supply availability | 8.12 | 5.49 |
Compactability | 6.65 | 7.82 |
Aesthetic | 7.37 | 8.41 |
a.Write a program that uses 'find' to determine how many categories each design won.
b.Use the 'mean' function to determine each design's average score.
c.Comment on which design you would choose and why.
Please find the required MATLAB script as the following:
%==============================================================
design1 = [9.82,7.43,8.12,6.65,7.37];
design2 = [9.64,8.97,5.49,7.82,8.41];
fprintf('Winning categories for Design 1:')
disp(find(design1>design2));
fprintf('Winning categories for Design 2:')
disp(find(design2>design1));
fprintf('Mean score Design 1 = %f\n',mean(design1));
fprintf('Mean score Design 2 = %f\n',mean(design2))
%=============================================================
output:
Winning categories for Design 1: 1 3
Winning categories for Design 2: 2 4 5
Mean score Design 1 = 7.878000
Mean score Design 2 = 8.066000
As you can observe:
- Design 2 win's in 3 categories (more than 2 category wins for Design 1);
- Design 2 has a better average score 8.066000 than Design 1's average score 7.878000
Hence I would choose Design 2 !!
Get Answers For Free
Most questions answered within 1 hours.