Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Linear Algebra and the C Language/a04g

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

__NOTOC__ Network analysis thumb| We can write: Input = Output A = x1 = 20 + x2 B = x2 + x3 + x5 = 60 C = x4 = 20 + x3 D = 100 = x1 + x4 + x5 We write: x2 = 10 and x5 = 30 A = x1 = 20 + 10 B = 10 + x3 + 30 = 60 C = x4 = 20 + x3 D = 100 = x1 + x4 + 30 Let's rectify the system x1 = 20 + 10 x3 = 60 - 10 -30 x4 - x3 = 20 -x1 - x4 = -100 + 30 Now: x1 +0 +0 +0 20 + 10 // A +0 x3 +0 +0 60 - 10 -30 // B +0 -x3 x4 +0 +20 // C -x1 +0 -x4 +0 -100 + 30 // D The code in C language: double ab[RA*(CA+Cb)]={ // x1 x3 x4 +1, +0, +0, +0, +20+10, // A +0, +1, +0, +0, +60 -10 -30, // B +0, -1, +1, +0, +20, // C -1, +0, -1, +0, -100+30, // D }; thumb| The solution is given by solving the system: x1 x3 x4 +1 +0 +0 +0 +30 +0 +1 +0 +0 +20 +0 +0 +1 +0 +40 +0 +0 +0 +0 +0 x1 = +30; x3 = +20; x4 = +40; With x2 = +10; x5 = +30;