Passage
Consider the following snippet of code and answer the given sub-questions.
```
def matrix_transform(matrix):
result = []
i = 0
while i < len(matrix):
row = matrix[i]
for element in row:
if element % 2 == 1:
result.append(element * 2)
i += 1
return result
matrix = [[1, 2, 3], [4, 5], [6]]
output = matrix_transform(matrix)
print(output)
```