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

Solution 154102

Submitted on 25 Oct 2012 by Ryszard Maciol

Correct

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

```%%
w = createDWTBlockMap(0, 1, 1)
y_correct = 1;
assert(isequal(w,y_correct))
```
```w =
1
```
2
Pass

```%%
w = createDWTBlockMap(2, 1, 1)
y_correct = [     1     2     5     5
4     3     5     5
7     7     6     6
7     7     6     6];
assert(isequal(w,y_correct))
```
```w =
1     2     5     5
4     3     5     5
7     7     6     6
7     7     6     6
```
3
Pass

```%%
w = createDWTBlockMap(2, 2, 1)
y_correct = [
1     2     5     5
1     2     5     5
4     3     5     5
4     3     5     5
7     7     6     6
7     7     6     6
7     7     6     6
7     7     6     6];
assert(isequal(w,y_correct))
```
```w =
1     2     5     5
1     2     5     5
4     3     5     5
4     3     5     5
7     7     6     6
7     7     6     6
7     7     6     6
7     7     6     6
```
4
Pass

```%%
w = createDWTBlockMap(2, 1, 2)
y_correct = [
1     1     2     2     5     5     5     5
4     4     3     3     5     5     5     5
7     7     7     7     6     6     6     6
7     7     7     7     6     6     6     6];
assert(isequal(w,y_correct))
```
```w =
1     1     2     2     5     5     5     5
4     4     3     3     5     5     5     5
7     7     7     7     6     6     6     6
7     7     7     7     6     6     6     6
```
5
Pass

```%%
w = createDWTBlockMap(1, 3, 3)
y_correct =     [
1     1     1     2     2     2
1     1     1     2     2     2
1     1     1     2     2     2
4     4     4     3     3     3
4     4     4     3     3     3
4     4     4     3     3     3];
assert(isequal(w,y_correct))
```
```w =
1     1     1     2     2     2
1     1     1     2     2     2
1     1     1     2     2     2
4     4     4     3     3     3
4     4     4     3     3     3
4     4     4     3     3     3
```
6
Pass

```%%
w = createDWTBlockMap(0, 3, 3);
y_correct = ones(3);
assert(isequal(w,y_correct))
```