improved hint on Problem 1
If you are having MATLAB trouble with the Student-t quantile, this version will accept vectors in the first argument and converges a bit quicker by starting at the normal quantile.
Q=@(u,nu)arrayfun(@(u)fzero(@(x)u-...
betainc((1+sign(x)./sqrt(1+nu./x.^2))/2,nu/2,nu/2),...
sqrt(2)*erfinv(2*u-1)),u);