Solving the scaling problem.
조회 수: 2 (최근 30일)
이전 댓글 표시
So I have a problem with finding out scaling. I have a vector x1 and a vector x2. I suspect that some elements of x2 might be scaled versions of x1.
I need to see if they are indeed scaled.
so A.x1 = x2, and I need to solve A = x1^-1.x2.
Any ideas how to implement that?
댓글 수: 0
채택된 답변
Matt Fig
2011년 2월 14일
If
A = [a 0;0 b] % a and b unknowns
Ax = y % The governing relation between known col vects x and y.
then
A = diag(y./x)
댓글 수: 0
추가 답변 (2개)
Matt Tearle
2011년 2월 14일
If it's just two vectors then you could do
A = x2(1)/x1(1)
norm(A*x1 - x2)
A slightly more generalizable way is
A = x1\x2
norm(A*x1 - x2)
Check to see if the result is on the order of machine roundoff.
댓글 수: 2
Doug Hull
2011년 2월 14일
Abhilash said: "Thanks! I tried that, but it doesn't really solve my purpose.
Here's a link form Wiki...this is actually what I need to implement -
http://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors#Examples_in_the_plane
Unequal scaling is the one I'm looking at."
Matt Tearle
2011년 2월 14일
OK, in that case, Matt Fig's answer is the simplest (A = diag(x2./x1))... but I'm confused by the use of the words "I suspect", "might be", and "if they are indeed scaled". Two vectors will always be related by such an unequal scaling (unless elements of x1 are zero).
참고 항목
카테고리
Help Center 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!