function obj=MDLTPC_design_opt(para, rho, M, N, bitrate,lostprob)
% Routine called by MDLTPC_design.m
% Guoqian Sun, Jie Liang, Simon Fraser University, Canada, June 10, 2007

M2 =M /2;
IM = eye(M2);
JM = fliplr(IM);
Bf = [IM, JM; JM, -IM] / sqrt(2);
V = reshape(para, M2, M2);
Preflt = Bf * blkdiag(IM, V) * Bf;

[D_side, D_central,D_average, codinggain, R0,R1] = MDLTPC_design_build(Preflt, rho, M, N, bitrate, lostprob);

obj = 10*log10(D_average);