Please help. I've made the variable for in_vector, but I'm having trouble figuring out how to get the vector to return a row vector of num_or_digits of length 10.

Write a script that takes a vector of single-digit integers and counts the occurrences of each digit, from 0 to 9, in the vector. Your script takes a vector in_vector of arbitrary length which contains single-digit integers and returns a row vector num_of_digits of length 10. Here, the k-th entry in num_of_digits should contain the number of occurrences in in_vector of digit (k-1). For example, the number of zeros in in_vector would be listed as the first entry in num_of_digits, and so on. If in_vector is [0,0,1,3,2] then num_of_digits should be [2,1,1,1,0,0,0,0,0,0].

Caution : Do not use more than one loop.

To solve this problem and get the row vector num_of_digits of length 10, you can follow these steps:

1. Initialize the num_of_digits vector with zeros using the zeros() function in MATLAB/Octave or the numpy.zeros() function in Python. This will create a row vector of length 10 with all elements set to 0.

2. Iterate over each element of the in_vector using a loop. In MATLAB, you can use a for loop. In Python, you can use a for loop or the numpy.nditer() function.

3. For each element in the in_vector, use it as an index to update the corresponding entry in the num_of_digits vector by incrementing the count.

4. After the loop, num_of_digits will contain the count of each digit in the in_vector.

Here's an example solution in MATLAB:

```matlab
in_vector = [0,0,1,3,2];
num_of_digits = zeros(1, 10);

for i = 1:length(in_vector)
digit = in_vector(i) + 1; % Adding 1 to index properly
num_of_digits(digit) = num_of_digits(digit) + 1;
end

num_of_digits
```

And here's the equivalent solution in Python using numpy:

```python
import numpy as np

in_vector = np.array([0,0,1,3,2])
num_of_digits = np.zeros((1, 10))

for digit in np.nditer(in_vector):
num_of_digits[digit] += 1

num_of_digits
```

Both solutions will give you the desired row vector num_of_digits with the count of each digit. In the example given, it will output [2, 1, 1, 1, 0, 0, 0, 0, 0, 0], which represents the count of each digit from 0 to 9 in the in_vector.