1

Im programming a function but I just cant structure the equation. I think this is the right place to ask since the problem is completely mathematics.

Let me explain three scenarios.

There are 4 variables.

X, Y, Z and P. They all depend on each other.
X is the sum of Y * 1200.
So if Y is 3, X = 3600.
Z is known, decreasing by -1200. 0, -1200, -3600, -4800 etc..
P is unknown

Im trying to solve P, but first i need to structure the equation. Ill give it 3 scenarios with these variables:

X = 3600
Y = 3
  • If Z = 0 P = 1.
  • If Z = -1200 P = 2
  • If Z = -2400 P = 3

So I want a equation that sets P to a number as above.

God this is hard to explain. I hope someone gets it! Please comment if u have any questions.

Im also new to this community so please let me know if Im doing something wrong in my question!

Thanks in advance!

Jacob
  • 111
  • 1
    $P(Z) = -\frac{Z}{1200} + 1$? How do $Z$ and $P$ depend on $X$ and $Y$, or are $X$ and $Y$ completely unrelated to them? – d125q Jul 17 '14 at 14:44
  • I guess they are! Ill try that function, thanks! Ill let you know if it worked. You are a genius! That worked! Thanks alot! Have a very nice day! – Jacob Jul 17 '14 at 14:45

0 Answers0