Hello, friends.
Today we discuss how to find out the compound interest using math script window.
So first of all, I just go to structures math script window or here, this is my math script window.
So for the compound interest, we have a formula A is equal to P into parenthesis in between one plus
R divided by 100 whole P.
So first I have to calculate the power of one plus r divided by 100 which raise to t so for that purpose
I just use a variable h that is equal to one plus.
Or divide by 100.
Or here are is my add input or is my interest.
Okay, so now I want to calculate the power because t is raised to one plus r raise to 100.
So to calculate this, let's say I have another variable G that is equal to power.
This is my function that is used in math script window.
So power of H into t h comma t.
Okay.
So it will give me the power.
One plus r divided by 100 raised to T.
So now my formula is amount.
It is equal to principal into G.
So now I just add input.
That is my principal.
I want to just add input.
That is my time.
T.
And over here I just add output.
That is my amount.
This is my output.
So over here I just create indicator.
So this is complex value.
So I just change it to value.
So over here I just create control for rate of interest.
Create control for principal.
Create control for the time.
So control t control u.
It will minimize my function.
Let's say I want to find out also the compound interest.
So C is my compound interest.
It is equal to amount minus principal.
So I just add one more output over here.
That is my compound interest.
So it will give me the compound interest.
Again, I just change it to double precision.
So as you see over here in this case, so when I put some value inside it, let's say rate of interest
is 10%.
Principal amount is 100.
And rate of time is one.
So in this case, amount should be 110 and the compound interest should be ten.
So as you see.
So if you want to go for multiple more then one year it is now it is two year.
So check the output is 121 and compound interest is 21.
So this is how you can work with math script window in LabVIEW.
Thank you.