Fernando,
The function bootstrp will take in a column vector of cells as well as a standard vector/matrix of doubles. Assuming your 3 observations are:
obs1 = [1 2; 3 4; 4 0];
obs2 = [5 6; 2 3; 9 6];
obs3 = [3 4; 7 9];
You can create a cell array to pass bootstrp like this:
data = {obs1; obs2; obs3};
Now, your data is of size = 3x1 so bootstrap will pass the correct number of samples with replacement (3 rather than 8) into the opt_function.
opt_parameters=bootstrp(10,@opt_function,data);
The only thing you will need to do is make sure opt_function handles its input as cell arrays (ie use curly brackets {} for indexing the cell array to get to the matrices). If you are writing your own opt_function, then this is straightforward. However, if you are using a built in function that is expecting the data in matrix or vector form, you will need to create a wrapper function to perform the necessary data conversion.
Lastly, make sure that opt_function returns the same number data elements in each call, since bootstrap expects this when forming its own output.
Best Answer