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

# Solution 320975

Submitted on 19 Sep 2013 by Tobias Schäfer

Correct

85Size
`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

```%%
tic
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
2
Pass

```%%
names={{'Dr_Evil' 'Devastation'} {'Dr_Evil' 'Southpaw'} {'Dr_Evil' 'Lagomorph'} {'Dr_Evil' 'Rampage'} {'Dr_Evil' 'Unicron'} {'Dr_Evil' 'Magenta'} {'Dr_Evil' 'Silver_Swan'} {'Dr_Evil' 'Zaladane'} {'Dr_Evil' 'Jason_Kreis'} {'Dr_Evil' 'Lotso'} };
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
3
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
4
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
5
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
6
Pass

```%%
names={{'Princess_Python' 'Abominatrix'} {'Mai_Shen' 'Devastation'} {'Abominatrix' 'Mai_Shen'} {'Devastation' 'Princess_Python'} };
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
7
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
8
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
9
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
10
Pass

```%%
names={{'Spider_Girl' 'Blue_Snowman'} {'Blue_Snowman' 'Roulette'} {'Roulette' 'Spider_Girl'} };
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
11
Pass

```%%
names={{'Rampage' 'Fury_Leika'} {'Tigress' 'Princess_Python'} {'Syndrome' 'Animora'} {'Maxima' 'Prank'} {'Queen_Of_Fables' 'Queen_Bee'} {'Queen_Of_Fables' 'Doctor_Cyber'} {'Magpie' 'Queen_Bee'} {'Shimmer' 'Golddigger'} {'Rampage' 'Queen_Clea'} {'Magpie' 'Abominatrix'} {'Maxima' 'Titania'} {'Tigress' 'Prank'} {'Decay' 'Prank'} {'Spider_Girl' 'Jewelee'} {'Magpie' 'Princess_Python'} {'Eviless' 'Abominatrix'} {'Shimmer' 'Doctor_Cyber'} {'Star_Sapphire' 'Animora'} {'Star_Sapphire' 'Jinx'} {'Yellowjacket' 'Blue_Snowman'} {'Star_Sapphire' 'Queen_Clea'} {'Black_Mamba' 'Jewelee'} {'Star_Sapphire' 'Blue_Snowman'} {'Magpie' 'Titania'} {'Spider_Girl' 'Abominatrix'} {'Lashina' 'Dr_Evil'} {'Margaret_Love' 'Prank'} {'Lotso' 'Fury_Leika'} {'Maxima' 'Abominatrix'} {'Decay' 'Queen_Clea'} {'Star_Sapphire' 'Doctor_Cyber'} {'Maxima' 'Queen_Clea'} {'Yellowjacket' 'Abominatrix'} {'Syndrome' 'Sun_Girl'} {'Rampage' 'Windfall'} {'Lotso' 'Titania'} {'Syndrome' 'Blue_Snowman'} {'Plastique' 'Queen_Clea'} {'Magpie' 'Sun_Girl'} {'Lady_Clay' 'Queen_Clea'} {'Eviless' 'Princess_Python'} {'Fake_Thomas_Jefferson' 'Blue_Snowman'} {'Rampage' 'Animora'} {'Fake_Thomas_Jefferson' 'Sun_Girl'} {'Star_Sapphire' 'Abominatrix'} {'Black_Mamba' 'Poundcakes'} {'Plastique' 'Sun_Girl'} {'Lady_Clay' 'Titania'} {'Fake_Thomas_Jefferson' 'Windfall'} {'Shimmer' 'Osira'} {'Lady_Clay' 'Ursa'} {'Syndrome' 'Queen_Bee'} {'Maxima' 'Blue_Snowman'} {'Lady_Clay' 'Dr_Evil'} {'Decay' 'Amy_Madison'} {'Tigress' 'Jinx'} {'Spider_Girl' 'Jinx'} {'Margaret_Love' 'Titania'} {'Star_Sapphire' 'Poundcakes'} {'Plastique' 'Doctor_Cyber'} {'Black_Mamba' 'Amy_Madison'} {'Tigress' 'Titania'} {'Lashina' 'Golddigger'} {'Eviless' 'Dr_Evil'} {'Magenta' 'Windfall'} {'Yellowjacket' 'Princess_Python'} {'Syndrome' 'Prank'} {'Shimmer' 'Poundcakes'} {'Decay' 'Fury_Leika'} {'Decay' 'Windfall'} {'Black_Mamba' 'Golddigger'} {'Rampage' 'Abominatrix'} {'Syndrome' 'Golddigger'} {'Maxima' 'Fury_Leika'} {'Eviless' 'Jewelee'} {'Lashina' 'Blue_Snowman'} {'Lady_Clay' 'Jinx'} {'Lady_Clay' 'Windfall'} {'Magpie' 'Ursa'} {'Eviless' 'Prank'} {'Tigress' 'Abominatrix'} {'Star_Sapphire' 'Eviless'} {'Tigress' 'Fury_Leika'} {'Magenta' 'Ursa'} {'Yellowjacket' 'Jewelee'} {'Yellowjacket' 'Ursa'} {'Plastique' 'Osira'} {'Tigress' 'Sun_Girl'} {'Tigress' 'Golddigger'} {'Spider_Girl' 'Windfall'} {'Fake_Thomas_Jefferson' 'Amy_Madison'} {'Magenta' 'Fury_Leika'} {'Star_Sapphire' 'Amy_Madison'} {'Magenta' 'Blue_Snowman'} {'Plastique' 'Ursa'} {'Fake_Thomas_Jefferson' 'Abominatrix'} {'Lotso' 'Jewelee'} {'Lotso' 'Jinx'} {'Maxima' 'Animora'} {'Magenta' 'Sun_Girl'} };
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
12
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
13
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
14
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
15
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
16
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
17
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
18
Pass

```%%
names={{'Magpie' 'Blue_Snowman'} {'Magpie' 'Lafety_Le_Fei'} {'Magpie' 'Lady_Quark'} {'Magpie' 'Lady_Shiva'} {'Magpie' 'The_Crimson_Ghost'} {'Magpie' 'Purgatori'} {'Magpie' 'Titania'} {'Magpie' 'Nyssa_Raatko'} {'Magpie' 'Mephista'} };
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
19
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
20
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
21
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
22
Pass

```%%
names={{'Genevieve_Savidge' 'Queen_Of_Fables'} {'Genevieve_Savidge' 'Spider_Girl'} {'Gru' 'Trinity'} {'Genevieve_Savidge' 'Trinity'} {'Gru' 'Spider_Girl'} {'Unicron' 'Queen_Of_Fables'} {'Unicron' 'Trinity'} {'Unicron' 'Spider_Girl'} {'Gru' 'Queen_Of_Fables'} };
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
23
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
24
Pass

```%%
names={{'The_Lightning' 'Saturn_Queen'} {'The_Lightning' 'Tigress'} {'Princess_Python' 'Superwoman'} {'Princess_Python' 'Tigress'} {'The_Lightning' 'Black_Mamba'} {'The_Lightning' 'Osira'} {'Princess_Python' 'Osira'} {'Princess_Python' 'Saturn_Queen'} {'Princess_Python' 'Black_Mamba'} {'The_Lightning' 'Superwoman'} };
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
25
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
26
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
27
Pass

```%%
exp=1;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
1
```
28
Pass

```%%
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
29
Pass

```%%
names={{'Mai_Shen' 'Windfall'} {'Syndrome' 'Queen_Bee'} {'Dr_Horrible' 'Mai_Shen'} {'Windfall' 'Animora'} {'New_Wave' 'Dr_Horrible'} {'Animora' 'Syndrome'} {'Queen_Bee' 'New_Wave'} };
exp=0;
TF=Make_Teams(names);
assert(TF==exp)
```
```ans =
0
```
30
Pass

```%%
```ans =
```%%