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

Learn moreOpportunities for recent engineering grads.

Apply TodayCorrect

24Size

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

Test

Code Input and Output

1

Pass

%% Nice strong beer x = [1.085 1.005]; y_correct = 10.48; assert(isequal(brew_ABV(x),y_correct))

2

Pass

%% Regular ale x = [1.063 1.01]; y_correct = 6.94; assert(isequal(brew_ABV(x),y_correct))

3

Pass

%% Water with sugar added? x = [1.00 1.02]; y_correct = 0; assert(isequal(brew_ABV(x),y_correct))

4

Pass

%% Water x = [1.00 1.00]; y_correct = 0; assert(isequal(brew_ABV(x),y_correct))