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

# Solution 94574

Submitted on 1 Jun 2012 by Richard Zapor

Correct

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

```%%
assert(~spindrome('makemake'))
```
```strv =
12     0    10     4    12     0    10     4
ans =
4
tf =
0
```
2
Pass

```%%
assert(spindrome('034649'))
```
```strv =
-49   -46   -45   -43   -45   -40
ans =
6
tf =
1
```
3
Pass

```%%
assert(~spindrome('AXAAAXAA'))
```
```strv =
-32    -9   -32   -32   -32    -9   -32   -32
ans =
4
tf =
0
```
4
Pass

```%%
assert(spindrome('AAAXXXAAA'))
```
```strv =
-32   -32   -32    -9    -9    -9   -32   -32   -32
ans =
9
tf =
1
```
5
Pass

```%%
assert(~spindrome('BBBXXXBBBXXX'))
```
```strv =
Columns 1 through 10
-31   -31   -31    -9    -9    -9   -31   -31   -31    -9
Columns 11 through 12
-9    -9
ans =
6
tf =
0
```
6
Pass

```%%
assert(spindrome('XYXYXYWXYXYXYWW'))
```
```strv =
Columns 1 through 10
-9    -8    -9    -8    -9    -8   -10    -9    -8    -9
Columns 11 through 15
-8    -9    -8   -10   -10
ans =
15
tf =
1
```