matrix transpose multiplication precision
古いコメントを表示
Hi everyone,
Forgive me if this is a stupid question. Is there a loss of precision when Matlab calculates the multiplication of the transpose of a matrix and itself?
for example, set variable q to a 2d matrix of size 6x6 with value 0.9 for each element. The result of q'*q is different than (q+0)'*q.
if true
% code
q = .9*ones(6,6);
norm((q+0)'*q - q'*q)
end
returns:
ans =
5.3291e-015
However a 5x5 matrix is alright:
if true
% code
q = .9*ones(5,5);
norm((q+0)'*q - q'*q)
end
A "whos" of q reveals:
whos qq Name Size Bytes Class Attributes
qq 6x6 288 double
Thanks, Afro
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!