comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » help to resolve a intricate equation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
help to resolve a intricate equation [message #55649] Tue, 28 August 2007 19:12 Go to next message
highstone is currently offline  highstone
Messages: 10
Registered: August 2007
Junior Member
hello all
there is a equation like
X^2+A*X=C+A
where X is a matrix to resolve, A is a known matrix, C is a constant
(actually X,A is a grid image)

is there any method can resolve this type equation such as least-
squares method or others? can be based on IDL ?

I am not well up in maths, please as particular as possible, thank
you.
Re: help to resolve a intricate equation [message #55742 is a reply to message #55649] Sun, 09 September 2007 09:38 Go to previous message
Sven Geier is currently offline  Sven Geier
Messages: 17
Registered: July 2002
Junior Member
kuyper wrote:
>
> I believe so. He indicated that the value of 'A' is known; it is 'X'
> that he describes as "a matrix to resolve". For scalars, the quadratic
> equation could be used to solve such an equation; but that doesn't
> work with matrices. I seem to remember learning an approach that can
> be used, but I don't remember what it was.


Oh, duh. You're right, of course: e did say that A was known.

I had taken the phrase "X,A are grid images" as indication that the poster
wasn't clear on how IDL handles math with arrays in the same way as
scalars. In this case, of course, this would be a quadratic equation to
solve, not the simple thing I wrote.

If we're talking real matrix algebra, then it isn't clear to me what
the "C+A" would be about: if C is a matrix then why is it called "a
constant", but if it isn't then "C+A" isn't really a valid operation. Hum.


-- S


--
http://www.sgeier.net
My real email address does not contain any "Z"s.
Re: help to resolve a intricate equation [message #55743 is a reply to message #55649] Sun, 09 September 2007 06:48 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Sven Geier wrote:
> highstone wrote:
>
>> hello all
>> there is a equation like
>> X^2+A*X=C+A
>> where X is a matrix to resolve, A is a known matrix, C is a constant
>> (actually X,A is a grid image)
>>
>> is there any method can resolve this type equation such as least-
>> squares method or others? can be based on IDL ?
>>
>> I am not well up in maths, please as particular as possible, thank
>> you.
>
>
> I am probably completely misunderstanding what you're trying to do, but...
>
> X^2 + A*X = C+A
>
> => X^2 -C = A (1-X)
>
> => A = (X^2 -C)/(1-X)

Please note that X and A are matrices; C might be as well - he wasn't
clear on that point. If X^2 and A*X are to be interpreted as element-
by-element multiplication of two matrices, then your approach works.
However, if they refer to true matrix multiplications, then you have
to do something different. If X is a square matrix, and I is the
identity matrix of the same size, and if (I-X) is invertible, then
what you can do is:

A = (X^2 - C)*inverse(I-X)

> but you probably meant something entirely different...

I believe so. He indicated that the value of 'A' is known; it is 'X'
that he describes as "a matrix to resolve". For scalars, the quadratic
equation could be used to solve such an equation; but that doesn't
work with matrices. I seem to remember learning an approach that can
be used, but I don't remember what it was.
Re: help to resolve a intricate equation [message #55746 is a reply to message #55649] Sat, 08 September 2007 22:09 Go to previous message
Sven Geier is currently offline  Sven Geier
Messages: 17
Registered: July 2002
Junior Member
highstone wrote:

> hello all
> there is a equation like
> X^2+A*X=C+A
> where X is a matrix to resolve, A is a known matrix, C is a constant
> (actually X,A is a grid image)
>
> is there any method can resolve this type equation such as least-
> squares method or others? can be based on IDL ?
>
> I am not well up in maths, please as particular as possible, thank
> you.


I am probably completely misunderstanding what you're trying to do, but...

X^2 + A*X = C+A

=> X^2 -C = A (1-X)

=> A = (X^2 -C)/(1-X)



but you probably meant something entirely different...


-- S

--
http://www.sgeier.net
My real email address does not contain any "Z"s.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: David's TVSCALE
Next Topic: If you really want lauf, cklick down on the link:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:16:04 PDT 2025

Total time taken to generate the page: 0.00742 seconds