Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 46796

Submitted on 20 Feb 2012 by @bmtran

Correct

36Size
Leading solution size is 17.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
A=[0.9 0.81];
B=[0.9 0.80];
C=[1.3 2.6];
good = goodness(A,B,C);
good_correct = 'A';
assert(isequal(good,good_correct))

                    
2
Pass
 
%%
A=[0.9 0.80];
B=[0.9 0.81];
C=[1.3 2.6];
good = goodness(A,B,C);
good_correct = 'B';
assert(isequal(good,good_correct))

                    
3
Pass
 
%%
A=[0.4 0.064];
B=[0.3 0.067];
C=[1.2 3.6];
good = goodness(A,B,C);
good_correct = 'A';
assert(isequal(good,good_correct))