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

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

# Solution 302587

Submitted on 12 Aug 2013 by Richard Zapor

Correct

16Size
Leading solution size is 14.
`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=uint32(5);
B=uint32(6);
C=uint32(4);
s_exp=3;
s=uint_function(A,B,C);
assert(isequal(s,s_exp),sprintf('s = %3i',s))
```

2
Pass

```%%
A=uint32(7);
B=uint32(6);
C=uint32(12);
s_exp=13;
s=uint_function(A,B,C);
assert(isequal(s,s_exp),sprintf('s = %3i',s))
```

3
Pass

```%%
A=uint16(1);
B=uint16(6);
C=uint16(5);
s_exp=0;
s=uint_function(A,B,C);
assert(isequal(s,s_exp),sprintf('s = %3i',s))
```

4
Pass

```%%
A=uint64(12);
B=uint64(14);
C=uint64(3);
s_exp=1;
s=uint_function(A,B,C);
assert(isequal(s,s_exp),sprintf('s = %3i',s))
```

5
Pass

```%%
A=uint8(4);
B=uint8(8);
C=uint8(4);
s_exp=0;
s=uint_function(A,B,C);
assert(isequal(s,s_exp),sprintf('s = %3i',s))
```