You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: udmakepdfs.m
    path of file: ./repos/acycle/code/package/undatable/private
    
    the code of the file until where you have to start completion: function [medians, p68_2, p95_4, probtoplot, rundepth, rundepth1, rundepth2, rundepthpdf, runprob2sig, runboot, runncaldepth, udrunshuffle] = udmakepdfs(depth, depth1, depth2, age, ageerr, calcurve, resage, reserr, dateboot, depthcombine)

yeartype='Cal BP'; % for matcal

%---CREATE DEPTH PDFs

depthpdf = cell(length(depth1),1);
for i = 1:length(depth1)
	if depth2(i) > depth1(i) % standard core depth interval --> equal probability
		depthpdf{i}(:,1) = linspace(depth1(i), depth2(i), 10^4);
		depthpdf{i}(:,2) = ones(size(linspace(depth1(i), depth2(i), 10^4)));

    
function [medians, p68_2, p95_4, probtoplot, rundepth, rundepth1, rundepth2, rundepthpdf, runprob2sig, runboot, runncaldepth, udrunshuffle] = udmakepdfs(depth, depth1, depth2, age, ageerr, calcurve, resage, reserr, dateboot, depthcombine)

yeartype='Cal BP'; % for matcal

%---CREATE DEPTH PDFs

depthpdf = cell(length(depth1),1);
for i = 1:length(depth1)
	if depth2(i) > depth1(i) % standard core depth interval --> equal probability
		depthpdf{i}(:,1) = linspace(depth1(i), depth2(i), 10^4);
		depthpdf{i}(:,2) = ones(size(linspace(depth1(i), depth2(i), 10^4)));
	elseif depth1(i) == depth2(i) % no depth error given --> no uncertainty
		depthpdf{i}(1,1) = depth(i);
		depthpdf{i}(1,2) = 1;
	elseif depth2(i) < depth1(i) % depth with p/m error --> normdist (trimmed to 2 sig)
		depthpdf{i}(:,1) = linspace(depth(i)-2*depth2(i), depth(i)+2*depth2(i), 10^4);
		depthpdf{i}(:,2) = normpdf(linspace(depth(i)-2*depth2(i), depth(i)+2*depth2(i), 10^4),depth(i),depth2(i));
	end