To slice the variable 'a', you need to use a subscript list that contains:
- One instance of the loop variable
- Other subscripts which are either constant literal values or ':'
So, for example, in the following case, 'a' will be a sliced output:
parfor n = 1:35
tmp = 90 * ones(1, 15);
a(n, :) = tmp;
end
which creates 'a' as a 35x15 matrix with each element containing the value 90.
Best Answer