I have a know 2x2 array (3 0; 0 2)that get multiplied by array A and the answer is a known array C(1 2 3; 4 5 6), how can I solve all the elements in array A?

답변 (1개)

the cyclist
the cyclist 2021년 11월 6일

1 개 추천

% Input
B = [3 0; 0 2];
C = [1 2 3; 4 5 6];
% Solve for A
A = B\C
A = 2×3
0.3333 0.6667 1.0000 2.0000 2.5000 3.0000
% Verify
B * A
ans = 2×3
1 2 3 4 5 6

댓글 수: 1

John D'Errico
John D'Errico 2021년 11월 6일
Yes, of course. With only the caveat that an exact solution need not always exist. If B does not have full rank, then SOME of the time, there will be no solution.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

태그

질문:

2021년 11월 6일

댓글:

2021년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by