Message Boards Message Boards

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

[?] Calculate matrix constants given all values for the matrices variables?

Posted 5 years ago

I have a matrix G, H, and J

[

enter image description here

I have given all the values for the varibales given in the matrices

I want to calculate for H matrix constants.

k = MatrixForm[
  Solve[{G.H == J}, {Subscript[C, 1], Subscript[C, 2], Subscript[C, 
    4], Subscript[C, 5], Subscript[C, 6], Subscript[C, 7], Subscript[
    C, 10], Subscript[C, 11]}]]

Output:

(Subscript[C, 1]->0. -0.0000809814 P+0.0043219 V    Subscript[C, 2]->3.83204*10^-9 P-7.80102*10^-7 V   Subscript[C, 4]->2.24561*10^-8 P-4.02257*10^-6 V  Subscript[C, 5]->4.65722*10^-10 P-1.10168*10^-7 V    Subscript[C, 6]->-4.20314*10^-14 P+9.94267*10^-12 V    Subscript[C, 7]->-0.0000161671 P-0.00309882 V  Subscript[C, 10]->9.15123*10^-10 P+2.10854*10^-7 V   Subscript[C, 11]->-9.43931*10^-10 P+7.89909*10^-8 V)

If I have to use the constant C1 in other expression, what command should I use? If I use simply C1 it is not considering the numerical value from it. It takes the element as C1.

POSTED BY: Gowtham A
6 Replies

Mathematica should give an estimate of the significant digits of the results. If that is not enough for you, you can try to increase the precision first in solving the differential equations.

POSTED BY: Gianluca Gorni
Posted 5 years ago

That is not possible to give exact values since all those variables are calculated from other different equations.

POSTED BY: Gowtham A

Perhaps your matrix G is badly conditioned numerically. Can you give exact values to the entries?

POSTED BY: Gianluca Gorni
Posted 5 years ago

Could you let me know why I get this error?

RowReduce::luc: Result for RowReduce of badly conditioned matrix {{0.,0.,0.,0.,0.,1.,-4.65646,0.00009025,0.},{0.,0.,0.,0.,0.,0.,105.263,0.019,0.},<<4>>,{-2708.16,0.,0.920204,0.,0.,0.,655.536,-0.11989,0.04095},{5.61087*10^7,0.,-5416.31,4.01349*10^11,-3.67011*10^7,0.,0.,0.,-292.5}} may contain significant numerical errors.
POSTED BY: Gowtham A
Posted 5 years ago

Thank you very much.

It worked perfectly. I will read further about Solve commands.

Regards, Gowtham

POSTED BY: Gowtham A

Remove the MatrixForm from the definition of k:

k = 
  First@Solve[{G.H == J}, {Subscript[C, 1], Subscript[C, 2], Subscript[C, 
    4], Subscript[C, 5], Subscript[C, 6], Subscript[C, 7], Subscript[
    C, 10], Subscript[C, 11]}]

Then you extract the value of Subscript[C, 1] with

Subscript[C, 1]/.k

Look up how to use the output of Solve, which is not intuitive at all.

POSTED BY: Gianluca Gorni
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