Almost finished - my first calculator!
- To: mathgroup at smc.vnet.net
- Subject: [mg101086] Almost finished - my first calculator!
- From: Lobotomy <labbman at gmail.com>
- Date: Wed, 24 Jun 2009 06:27:46 -0400 (EDT)
Hello My first Calculator is soon finished, though there are some problems still with it which I have not been able to solve. There's one bigger problem and a few smaller: Big problem: The "Target amount" is not working so well. The point with this is when you want to know how long time it takes until this amount is accumulated. All other parameters is the same except the time parameter of course. The idea is then when target amount is set to more than "initial deposit" it should calculate the time (i know how to do that) and then adjust the time parameter to that value, showing that plot in the same way when not using "target amount" with another Plotlabel. A perhaps easier alternative is when using target amount, fuck the plot and just present the amount of years required, but even this i dont know how to do. When changing another parameter after the target amount is set the target amount should be set to 0 again. otherwise it fucks up! Try it yourself, this is hard to explain. Smaller problems: *i want the PieChart showing % in the legend *I want the piechart and the listlineplot to be closer together *I want the "Accumulated amount" to be before the amount, not after! *I dont want the number to be presented without any decimals. *Is there any way to remove the sliders? My computer is anyway to slow. I just want to keep the boxes below where i can enter the numbers It would be nice if someone could help me solve this now when I've come so close to finishing my first masterpiece!THX Here's the code, try it! everything but the target amount works well Manipulate[ GraphicsColumn[{ ListLinePlot[#, DataRange -> {0, \[Psi]}, PlotRange -> All, GridLines -> Automatic, Frame -> {True, True, False, True}, AxesOrigin -> {0, 0}, Filling -> Axis, ImageSize -> {400}, ColorFunction -> "BlueGreenYellow", FillingStyle -> {Opacity[ 0.2, Blue]}, PlotStyle -> Thick, Mesh -> All, MeshStyle -> Directive[Blue, PointSize[0.01]], PlotLabel -> "Accumulated amount: " NumberForm[Last[#], ExponentFunction -> (If[Abs[#] <= 15, Null, #] &)] ] &@(Table[ If[\[CapitalOmega] > \[Lambda], {\[Psi] = Log[(\[Alpha] \[Zeta] + E^\[Delta] \[CapitalOmega] - E^\[Mu] \[CapitalOmega])/(\[Alpha] \[Zeta] + E^\[Delta] \[Lambda] - E^\[Mu] \[Lambda])]/(\[Zeta] Log[ 1 + (E^\[Delta] - E^\[Mu])/\[Zeta]]), f, PlotLabel -> "Years" NumberForm[\[Psi], 2]}, If[\[Delta] == \[Mu], \[Lambda] + \[Alpha]*x*\[Zeta], f = #5 (1 + ((E^#2 - 1) - (E^#6 - 1))/#3)^(#3*#4) + (#1*((1 + (((E^#2 - 1) - (E^#6 - 1))/#3))^(#3*#4) - 1))/(((E^#2 - 1) - (E^#6 - 1))/#3) &[\[Alpha], \[Delta], \[Zeta], x, \[Lambda], \[Mu]]]], {x, 0, \[Psi], 1}]), PieChart3D[{\[Alpha]*\[Zeta]*\[Psi], \[Lambda], f - \[Alpha]*\[Zeta]*\[Psi] - \[Lambda]}, ChartStyle -> "DarkRainbow", ChartElementFunction -> "ProfileSector3D", ChartLegends -> {"Added Contributions", "Initial Investment", "Growth", "Target Amount"}]}], {{\[Zeta], 1, "Frequency of Contributions"}, {1 -> "Annually", 4 -> "Quarterly", 12 -> "Monthly"}}, Delimiter, {{\[Lambda], 5000, "Initial Deposit"}, 0, 1000000, 1000, Appearance -> {"Open", "Labeled"}}, {{\[Alpha], 1543, "Added Contributions"}, 0, 50000, 1000, Appearance -> {"Open", "Labeled"}}, {{\[Delta], 0.073, "Growth(%/100)"}, 0, 0.5, 0.01, Appearance -> {"Open", "Labeled"}}, {{\[Mu], 0.03, "Inflation(%/100)"}, 0, \[Delta], 0.01, Appearance -> {"Open", "Labeled"}}, {{\[Psi], 8, "Years"}, 0, 100, 1, Appearance -> {"Open", "Labeled"}}, {{\[CapitalOmega], 0, "Target amount"}, 0, 10000000, 10000, Appearance -> {"Open", "Labeled"}}]