?? msf2c.m
字號(hào):
% msf2c.m
% Scope: This MATLAB macro determines the real symmetric matrix stored as
% columnwise upper triangular part as a one-dimensional array from
% its two-dimensional array.
% Usage: xout = msc2f(n,a)
% Description of parameters:
% n - input, real scalar, number of rows and columns of the
% symmetric matrix
% a - input, two-dimensional array storing the full symmetric
% matrix
% xout - output, one-dimensional array of length n*(n+1)/2, storing
% columnwise the upper triangular part of the symmetric matrix
% Last update: 08/06/00
% Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.
function xout = msf2c(n,a)
nn1 = n*(n+1)/2;
xout = zeros(1,nn1);
kt = 0;
for k = 1:n
for kk = 1:k
kt = kt + 1;
xout(kt) = a(kk,k);
end
end
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -