MATLAB Answers

How to calculate the value of the vector A in equation AXA' = b?

4 views (last 30 days)
Adi Nor
Adi Nor on 25 Nov 2020
Commented: KSSV on 25 Nov 2020
If I have
A*X*A' = b;
where:
A is a (1x2) unknown vector whose elements must be integers
A' is the transpose of A,
X is a (2x2) diagonal matrix (given)
b is a given scaler value.
How can I calculate the value of vector A?

  0 Comments

Sign in to comment.

Accepted Answer

KSSV
KSSV on 25 Nov 2020
Edited: KSSV on 25 Nov 2020
syms x y
A = [x y] ;
X = rand(2) ;
b = rand ;
eqn1 = A*X*X'- b ==0
s = solve(eqn1,x,y) ;
x = double(s.x)
y = double(s.y)

  5 Comments

Show 2 older comments
Adi Nor
Adi Nor on 25 Nov 2020
If I want the obtained values of A to be integers, what should I do?
KSSV
KSSV on 25 Nov 2020
It depends on what your X, b values are. If you want them to be integers, use round.
KSSV
KSSV on 25 Nov 2020
Hey please check the answer properly.....and see does it fit your requirement?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!