noisevar = normalvar(noiseparam); nsampl = size(data, 2); nsources = size(sources, 1); % the inverses of the variances datavars = (1 ./ noisevar) * ones(1, nsampl); observedvars = datavars - missing .* datavars;