-
大小: 636KB文件类型: .zip金币: 2下载: 0 次发布日期: 2024-01-27
- 语言: Matlab
- 标签: 四元数 Matlab quaternion
资源简介
Quaternion toolbox for Matlab is a toolbox that extends Matlab to handle matrices of quaternions with real and complex components. Many Matlab operators and functions are overloaded to work for real quaternion and complexified quaternion matrices.
代码片段和文件信息
function [U B V] = bidiagonalize(A)
% Bidiagonalize A such that U * A * V = B and U‘ * B * V‘ = A. B is the
% same size as A has no vector part and is upper or lower bidiagonal
% depending on its shape. U and V are unitary quaternion matrices.
% Copyright ?2005 2008 Stephen J. Sangwine and Nicolas Le Bihan.
% See the file : Copyright.m for further details.
error(nargchk(1 1 nargin)) error(nargoutchk(3 3 nargout))
% References:
%
% Sangwine S. J. and Le Bihan N.
% Quaternion singular value decomposition based on bidiagonalization
% to a real or complex matrix using quaternion Householder transformations
% Applied Mathematics and Computation 182(1) 1 November 2006 727-738
% DOI:10.1016/j.amc.2006.04.032.
%
% Sangwine S. J. and Le Bihan N.
% Quaternion Singular Value Decomposition based on Bidiagonalization
% to a Real Matrix using Quaternion Householder Transformations
% arXiv:math.NA/0603251 10 March 2006 available at http://www.arxiv.org/
%
% Gene H. Golub and Charles van Loan ‘Matrix Computations‘ 3rd edition
% Johns Hopkins University Press 1996 section 5.1.4. ISBN 0-8018-5414-8.
% (This describes how to implement a Householder transformation without an
% explicit Householder matrix.)
[r c] = size(A);
if prod([r c]) == 1
error(‘Cannot bidiagonalize a matrix of one element.‘);
end
if c <= r
[U B V] = internal_bidiagonalizer(A); % Upper bidiagonal result.
else
% This requires a lower bidiagonal result. We handle this by operating
% on the Hermitian transpose of A. The results require some swapping
% and transposition to get the correct results.
[V B U] = internal_bidiagonalizer(A‘); U = U‘; B = B.‘; V = V‘;
end
B = check(B); % Verify the result and convert to exactly bidiagonal form
% with a real or complex B.
% -------------------------------------------------------------------------
function [U B V] = internal_bidiagonalizer(A)
[r c] = size(A); assert(c <= r);
% Iterate over the whole matrix dealing with one column and one row on
% each pass through the loop. See Figure 1 in the Applied Mathematics and
% Computation paper cited above for a diagrammatic representation of this
% process.
U = eyeq(r); % Initialise the three matrix results to appropriately sized
B = A; % quaternion matrices. These are conformant so that U * B * V
V = eyeq(c); % has the same size as A.
for i = 1:c
% Compute and apply a left Householder transformation to the ith
% column (part of the column for the second and subsequent columns).
[h zeta] = householder_vector(B(i:end i) eye(r - i + 1 1));
T = B(i:end i:end); B(i:end i:end) = (1./zeta) .* (T - h * (T‘ * h)‘);
T = U(i:end : ); U(i:end : ) = (1./zeta) .* (T - h * (T‘ * h)‘);
if i == c return; end % On the last column we are done since there
% is no corresponding row. See Figure 1 in the
% Applied Mathematics
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 369 2010-05-24 21:02 qtfm\DEsc
文件 269 2010-05-24 20:43 qtfm\COPYING
文件 155 2010-05-24 20:56 qtfm\INDEX
文件 1531 2010-07-05 20:41 qtfm\set_octave_path.m
文件 637 2010-12-19 17:06 qtfm\@quaternion\abs.m
文件 916 2009-02-08 18:35 qtfm\@quaternion\acos.m
文件 943 2009-02-08 18:35 qtfm\@quaternion\acosh.m
文件 9034 2010-06-28 20:08 qtfm\@quaternion\adjoint.m
文件 5291 2010-11-04 21:49 qtfm\@quaternion\angle.m
文件 569 2009-12-23 18:21 qtfm\@quaternion\arrayfun.m
文件 912 2009-02-08 18:35 qtfm\@quaternion\asin.m
文件 939 2009-02-08 18:35 qtfm\@quaternion\asinh.m
文件 918 2009-02-08 18:35 qtfm\@quaternion\atan.m
文件 945 2009-02-08 18:35 qtfm\@quaternion\atanh.m
文件 1532 2009-11-12 19:45 qtfm\@quaternion\axis.m
文件 1785 2010-12-19 17:42 qtfm\@quaternion\blkdiag.m
文件 2405 2010-05-13 20:22 qtfm\@quaternion\bsxfun.m
文件 490 2009-02-08 18:35 qtfm\@quaternion\cast.m
文件 2320 2010-12-19 17:07 qtfm\@quaternion\cat.m
文件 916 2009-02-08 18:35 qtfm\@quaternion\cd.m
文件 6595 2010-12-19 17:08 qtfm\@quaternion\cdpolar.m
文件 378 2009-02-08 18:35 qtfm\@quaternion\ceil.m
文件 1384 2010-11-04 21:49 qtfm\@quaternion\change_basis.m
文件 2711 2010-11-04 21:50 qtfm\@quaternion\char.m
文件 650 2009-12-10 17:11 qtfm\@quaternion\complex.m
文件 1179 2009-02-08 18:35 qtfm\@quaternion\conj.m
文件 8847 2009-02-08 18:35 qtfm\@quaternion\conv.m
文件 7751 2009-02-08 18:35 qtfm\@quaternion\conv2.m
文件 925 2010-12-19 17:09 qtfm\@quaternion\convert.m
文件 943 2011-01-08 21:14 qtfm\@quaternion\cos.m
文件 947 2009-02-08 18:35 qtfm\@quaternion\cosh.m
............此处省略518个文件信息
- 上一篇:madgwick_传感器融合算法_matlab
- 下一篇:ieee14节点的潮流计算
相关资源
- ieee14节点的潮流计算
- madgwick_传感器融合算法_matlab
- 灰狼优化算法求解柔性作业车间问题
- 遗传算法GA车间调度Matlab代码
- EMD matlab实现源码
- 贝叶斯分类器Matlab实现113478
- matlab模板匹配车牌识别
- 刘慧颖 MATLAB R2007基础教程
- MATLAB电机仿真精华50例源代码
- zw_支持向量机与朴素贝叶斯算法matl
- 循环码编码
- jnd算法,最小可觉差
- 基于matlab的手势识别系统
- 空间面板计量
- matlab编写的有限元杆的计算
- 关于通过功率谱分析提取信号周期的
- 功率谱MATLAB程序
- 信息论大作业 LZ78算法编译码 matlab仿
- 语音增强—matlab
- 果蝇参数寻优FOA-LSSVM的完整程序
- MATLAB超声传感阵列仿真
- 利用WOA算法优化libsvm中SVDD算法的参数
- 跳频通信系统MATLAB仿真
- 蚁群算法实现三维路径规划Matlab源码
- UR5机械臂MATLAB下轨迹规划
- ViBe背景建模Matlab代码
- 机械臂SEA柔顺控制matlab仿真
- 基于MATLAB人民币识别系统.zip
- 科研常用代码预测分类评价
- 产生泊松过程Matlab源码
评论
共有 条评论