You can remove the fractions...
This should be ok.
N=
I was wondering if this could be simplified. W ranges from 0 to 1, P, L, and N are all positive. I'd also like to create a table or a graph of N in terms of P, L or W, given we know the other 2 but I don't know how to do that in MatLab, any tips?.
> W ranges from 0 to 1.....
W cannot equal 0, 1 or .5 since each of these will create a division by 0
> P, L, and N are all positive.
N is negative in many cases; as example, if W = .8, L = 15 and P = 2, then N = -6.
So if you want only cases where N > 0, then you need a condition in your program.
> I was wondering if this could be simplified
WHY do you want/need it simplified?
From what I can see, you're calculating N through some program; like:
Get W,L,P
Calculate N (using your given formula)
If what you mean is in order to "reduce" the physical size of the formula,
then you'd be better off with stuff like:
let A = 1/(1 - W) and B = 2 - 1/W ; then formula becomes:
N = (A - 2) / B - L / (PB)
Get my drift?
Thanks for the answer. It's a bit complicated, I'm using this formula for poker and wanted to simplify it in order to do better calculations in my head. Here W is a percent, that's why I said 0 to 1, what I should have said was a percent 0<W<0.5 , which should make N always positive, N is also a percentage but it can go over 100% and there's no real cap to it. P and L are pot and stack sizes. Thanks for the tip on reducing the physical size of the formula, It could make graphing it easier. I could set certain values as known like P, L and graph N in terms of W or switch them around and graph in terms of P or L.