www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregcovariance/unstruct.m
function [w]= unstruct(c,varargin); % COVMODEL/UNSTRUCT unstructured covariance model % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. nw= length(c.cparam); % size of matrix nc= ( -1 + sqrt(1+8*nw) )/2; % turn into upper triangular U= triu( ones(nc) ) ; U(U~=0)= c.cparam; w= U'*U;