Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Manoj Kumar
Manoj Kumar el 9 de Mayo de 2019
Comentada: David Goodmanson el 11 de Mayo de 2019
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 comentarios
Manoj Kumar
Manoj Kumar el 11 de Mayo de 2019
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 el 11 de Mayo de 2019
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
.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 11 de Mayo de 2019
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

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by