I have a loop which generates random samples from the chi-square distribution with different degrees of freedom (df1, df2, df3, df4) and saves it to a cell array:
for k=1:N
x{k} = chi2rnd([df1 df2 df3 df4]);
end
Is there any way to do this without any iterations? I tried to use cellfun, but it didn't work.