フィルターのクリア

How to get a constant multiplier of any matrix using same matrix ???

2 ビュー (過去 30 日間)
Manoj Kumar
Manoj Kumar 2019 年 5 月 9 日
コメント済み: David Goodmanson 2019 年 5 月 11 日
Let A be the m x n matrix.
I need a matrix such that B = k.A or det(B) = k.det(A)
where k is defined as 1 < k < infinite . It can be both integer and non-integer.
  15 件のコメント
Manoj Kumar
Manoj Kumar 2019 年 5 月 11 日
S. Lord,
I'm truely saying it's not any assignment work given by anybody.
It is my thinking, requirement , when I ploting a matlab code.
I also need such a problem solution. Why I'm asking? Because I thinking anyone who has well understanding of matlab can suggest its solution.
If we able to design such a function using single matrix, in the same time we able to control the response by allowing all matrix properties.
David Goodmanson
David Goodmanson 2019 年 5 月 11 日
per Walter's query, some matrices that are proportional to their inverse.
a) all 2x2 traceless matrices with nonzero determinant
b) rotation matrices by 180 degrees about an arbitrary axis
c) in the following example, to avoid numerical innacuracy (which turned out to be very small anyway) in taking the inverse,
% M*M = k*I --> M = k*inv(M) (assuming inverse exists)
M = [263 106 54 -196 -106
368 -87 12 -132 -112
286 -86 5 -254 86
274 118 -30 -267 -118
286 -86 204 -254 -113]
M*M
ans = 39601 0 0 0 0
0 39601 0 0 0
0 0 39601 0 0
0 0 0 39601 0
0 0 0 0 39601
.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 5 月 11 日
function B = generate_B(A)
maxval = realmax ./ max(abs(A(:)));
while true
k = typecast(randi([0 255], 1, 8, 'uint8'), 'double');
if isfinite(k) && abs(k) <= maxval; break; end
end
B = k * A;
end

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by