1

I have a gerneral question on php. Hope its ok to ask here.

How would you solve a linear Equation with multiple variables in the web? maybe using Gaussian elimination or ... ? Is it possible with php and recommendable?

1500 + 100 w = 10,000 s 3000 + 1000 s = 3000 w 5000 + 2000 s + 100 w + 30 r = 150 r => s = 0,16 | w = 1,05 | r = 45,21 

2 Answers 2

1

It doesn't really matter whether you're doing it on the web or not, it's the same sort of thing. Gaussian elimination (possibly with some pivoting) is what comes to mind, having been the first unit of my numerical analysis course.

I assume PHP has at least one-dimensional arrays and floating-point numbers, so it should work. Obviously, C or Fortran would give you better performance, if that's an issue.

Sign up to request clarification or add additional context in comments.

2 Comments

Does exist a php-math-libery or can buy such a script somewhere?
Googling for 'php gaussian elimination' gave this as the first hit : phpmath.com/home?op=perm&nid=82
0

See Looking for actively maintained matrix math library for php

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.