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

# Solution 263329

Submitted on 19 Jun 2013 by Damien Garcia

Correct

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

```%%
n = 1:10;
d_correct = '1415926535';
assert(isequal(PIdigits(n),d_correct))
```
```ans =
1415926535
```
2
Pass

```%%
n = [11:15 25:35];
d_correct = '8979338327950288';
assert(isequal(PIdigits(n),d_correct))
```
```ans =
8979338327950288
```
3
Pass

```%%
n = [1 4 1 5 9 2 6 5 3 5];
d_correct = '1519342919';
assert(isequal(PIdigits(n),d_correct))
```
```ans =
1519342919
```
4
Pass

```%%
n = PIdigits(666);
d_correct = '5';
assert(isequal(PIdigits(n),d_correct))
```
```ans =
3
ans =
5
```
5
Pass

```%%
n = 10000:-1:9901;
d_correct = '8765736525561010065029518869596522989996384621016485727889425592297560139754672901208824732610065462';
assert(isequal(PIdigits(n),d_correct))
```
```ans =
8765736525561010065029518869596522989996384621016485727889425592297560139754672901208824732610065462
```
6
Pass

```%%
n = [7061 319 2770 462 972 8235 6949 3171 9503 345];
d_correct = '0142348015';
assert(isequal(PIdigits(n),d_correct))
```
```ans =
0142348015
```