⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vgg_vec.m

📁 实现了几何多视的功能
💻 M
字号:
% vgg_vec  De-/vectorization of a matrix.
%
% For a matrix X, vgg_vec(X) = X(:).
% For a N^2-vector x, vgg_vec(x) = reshape(x,N,N).
%
% Classical matrix re-arrangement operator, see book Magnus-Neudecker.
% Trivial function, included mainly for consistency with notation in literature.
%
% Useful for rearranging matrix equations. Matrix from the middle of a product can be put to the right as
%
%    vgg_vec(A*B*C) = kron(C',A)*vgg_vec(B)
%
% See also vgg_vec_swap, vgg_commut_matrix, vgg_duplic_matrix.

function v = vgg_vec(A)

if any(size(A)==1)
  v = reshape(A,[1 1]*sqrt(prod(size(A))));
else
  v = A(:);
end
  
return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -