Re: Table of Values
- To: mathgroup at smc.vnet.net
- Subject: [mg109565] Re: Table of Values
- From: Alexei Boulbitch <alexei.boulbitch at iee.lu>
- Date: Wed, 5 May 2010 06:07:07 -0400 (EDT)
Nikolas,
it is not much to add to your code. Try the following:
tradecomission = 9.99;
feepercontract = 0.75;
totalcost = 8484;
tab = Table[{0.72 + 0.01*i,
Solve[x == (totalcost - tradecomission)/((0.72 + 0.01*i)*100 +
feepercontract), x][[1, 1, 2]]
}, {i, 1, 12}];
Grid[Prepend[
tab, {Style["price per contract", 14],
Style["number of contracts", 14]}],
Dividers -> Directive[Blue, Thickness[2]], ItemSize -> Automatic]
If you do not need the table dividers you should omit options in Grid[].
Have fun. Alexei
The Mathematica mini-program below has been useful for solving for x,
given the other inputs. It is analogous to a single-shot rifle:
x =.
tradecomission := 9.99
feepercontract := .75
pricepercontract := .73
numbercontracts := x
totalcost := 8484
Solve[numbercontracts == (totalcost -
tradecomission)/(pricepercontract*100 + feepercontract), x]
What I'd like to somehow obtain now, however, is a rifle with a clip
or magazine --- in other words, a TABLE of values. Below would be an
example of such a table:
pricepercontract numbercontracts
.73 114
.74 113
.75 111
.76 110
.77 108
.78 107
.79 106
.80 104
.81 103
.82 102
.83 101
.84 99
Does anyone know if there is a fairly easy and straightforward way of
setting this up?
Thanks,
Nicholas