Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Converting set of equations to matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26709] Converting set of equations to matrix
  • From: Helge Kreutzmann <helgek at studserv.stud.uni-hannover.de>
  • Date: Thu, 18 Jan 2001 00:57:15 -0500 (EST)
  • Organization: Universitaet Hannover
  • Sender: owner-wri-mathgroup at wolfram.com

Hello !
I have a set of equations I create following some rules, like

3 a[0,0] + 2 a[0,2] + 4 a[2,0] = 0
-1 a[0,0] + 0.3 a[2,0] = 0
4 a[0,2] - 1 a[0,2] = 0

The numbers of coefficients (the a[i,j]) is different in each run
but fixed. For further calculations I would like to transform the
above equations into the matrix
{{3,2,4 },{-1,0,0.3},{0,4,-1}}


Currently I have a list (called coeffli) where I can get the equations
from. The existing coefficients are stored in a second list (klist).
I also have a list where the values i,j are stored (cplist).

The above list I would create by
For[i = 1, i <= Length[kflist], i++, 
  Print[Collect[coeffli[[cplist[[i]][[1]]]][[cplist[[i]][[2]]]], klist]]]

I can create a list of the equations but I do not know how to tear
apart the sum into matrix elements.


Thanks

        Helge



  • Prev by Date: Re: J/Link
  • Next by Date: Re: 3D-Plots: Coloring edges (simple)
  • Previous by thread: Re: Book
  • Next by thread: Re: Converting set of equations to matrix