image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

Go Back   Physics Forums > Mathematics > General Math


Reply

image Mathematica calculator Share It Thread Tools Search this Thread image
Old Jun19-09, 12:13 AM                  #1
Lobotomy

Lobotomy is Offline:
Posts: 5
Mathematica calculator

Hello. I just started to learn mathematica a few days ago. Im trying
to make a calculator that can graphically represent the relationship
between:

savings
interest
time

the mathematical formula im using you can see below.

this is what I've written sofar...







Manipulate[


**%% Here i would like to make a "ListLinePlot" using this function:
(this is the formula for my calculations)

(#1*(1 + #2/#3)^(#3*#4) - 1)/(#2/#3) &[d, g, f, n]


then I would like to use the below controlls to manipulate the values
of d,g,f and n. How is this done?

I understand that there has to be some kind of list or table that
contains the accumulated sum at certain times. But I have no clue how
to make this list. The problem with my function is that it only
calculates the correct final answer. for example

"if i invest 1000€ per month with 5% interest for 8 years, what is the
accumulated sum?"



GridLines -> Automatic,



{{f, 1, "Frequency"}, {1 -> "Annually", 1/4 -> "Quarterly",
1/12 -> "Monthly"}},
Delimiter,



{{a, 5000, "Initial Investment"}, 0, 10000000, 1000,
Appearance -> {"Open", "Labeled"}},

{{d, 0, "Added Contributions/yr"}, -500000, 500000, 1000,
Appearance -> {"Open", "Labeled"}},

{{g, 0.05, "Growth(%/100)"}, 0, 1, 0.05,
Appearance -> {"Open", "Labeled"}},

{{n, 5, "Years"}, 1, 100, 1, Appearance -> {"Open", "Labeled"}},



ControlPlacement -> Left]
  Reply With Quote
Old Jun19-09, 03:01 AM                  #2
Lobotomy

Lobotomy is Offline:
Posts: 5
Re: Mathematica calculator

I've added this into at the top, just below Manipulate in the code:


L1 = Table[(#1*((1 + (#2/#3))^(#3*x) - 1))/(#2/#3) &[a, g, f, x], {x,
0, n}]
L2 = Table[x, {x, 0, n}]

ListLinePlot[{L1, L2}, DataRange -> {0, n},


I think im on the way to the right solution but it doesn't really work... this is my entire code:

Manipulate[

L1 = Table[(#1*((1 + (#2/#3))^(#3*x) - 1))/(#2/#3) &[a, g, f, x], {x,
0, n}]
L2 = Table[x, {x, 0, n}]

ListLinePlot[{L1, L2}, DataRange -> {0, n},



GridLines -> Automatic,


Delimiter,



{{f, 12, "Frequency of contributions"}, {1 -> "Annually",
1/4 -> "Quarterly", 1/12 -> "Monthly"}},
Delimiter,



{{d, 5000, "Initial Deposit"}, 0, 10000000, 1000,
Appearance -> {"Open", "Labeled"}},

{{a, 100, "Added Contributions"}, -500000, 500000, 1000,
Appearance -> {"Open", "Labeled"}},

{{g, 0.05, "Growth(%/100)"}, 0, 1, 0.05,
Appearance -> {"Open", "Labeled"}},

{{n, 5, "Years"}, 1, 100, 1, Appearance -> {"Open", "Labeled"}},



ControlPlacement -> Left]
  Reply With Quote
image image
Reply
Thread Tools


Similar Threads for: Mathematica calculator
Thread Thread Starter Forum Replies Last Post
TI-89 Calculator TSN79 Computing & Technology 5 Jan1-09 09:50 AM
Calculator? trajan22 General Discussion 22 Jun6-07 08:00 PM
Without using a calculator ToxicBug Brain Teasers 18 Mar9-05 09:32 PM
exp in calculator skan General Math 3 Oct26-04 01:15 PM
What Calculator do you use? Euphoriet General Discussion 26 May7-04 08:57 PM

Powered by vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image