Message Boards Message Boards

0
|
3649 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Could any one plz help me out?

Posted 10 years ago

Hi, i'm not able to convert the system of linear equations into an augmented matrix. Could you please help me out? Regards

eqns = {Subscript[x, 1] + Subscript[x, 2] - 2 Subscript[x, 3] == 1,

3 Subscript[x, 1] + 2 Subscript[x, 2] + 4 Subscript[x, 3] == -4,

4 Subscript[x, 1] + 3 Subscript[x, 2] + 3 Subscript[x, 3] == -4 };

Attachments:
POSTED BY: Muzahoo jee
2 Replies

Hi there,

I am not quite sure what you want to achieve. But this command might be useful:

Normal /@ CoefficientArrays[eqns]
(*{{-1, 4, 4}, {{1, 1, -2}, {3, 2, 4}, {4, 3, 3}}}*)

You can of course get all in one matrix:

Append[Transpose[#[[2]]], #[[1]]] &@ Normal[CoefficientArrays[eqns]]
(*{{1, 3, 4}, {1, 2, 3}, {-2, 4, 3}, {-1, 4, 4}}*)

Or, finally:

Transpose@Append[Transpose[#[[2]]], #[[1]]] & @ Normal[CoefficientArrays[eqns]]

enter image description here

Cheers,

M.

POSTED BY: Marco Thiel
Posted 10 years ago

Thanks a lot Marco I've found my desired result with your help. Regards

POSTED BY: Muzahoo jee
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract