18. The lump sum S to be paid when interest on a loan is compounded annually...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
18. The lump sum S to be paid when interest on a loan is compounded annually is given by S=P[1 + i]", where P is the principal invested, i is the interest rate, and n is the number of years. Write a program that will plot the amount S as it increases through the years from 1 to n. The main script will call a function to prompt the user for the number of years (and error-check to make sure that the user enters a positive integer). The script will then call a function that will plot S for years 1 through n. It will use 0.05 for the interest rate and $10,000 for P. 1 2 3 4 in 00 function plot LumpSum(n) int=0.05; 5 S=P*(1+int).^H; 6 plot (H,S,'r-*') xlabel('Year') 7 8 9 0 P=10^4; H=1:n; ylabel('Lump Sum S') title('plot of 5 for years 1 thorugh n') end Command Window Error in Hw_4_Problem_3 (line 4) Y=1:n; >> Hw_4_Problem_3 Not enough input arguments. Error in Hw_4_Problem 3 (line 4) |H=1:n; >> Hw_4_Problem_3 >> Hw_4_Problem_3 Not enough input arguments. Error in Hw_4_Problem_3 (line 4) H=1:n; >> Hw_4_Problem_3 Not enough input arguments. Error in Hw 4 Problem 3 (line 4) H=1:n; 18. The lump sum S to be paid when interest on a loan is compounded annually is given by S=P[1 + i]", where P is the principal invested, i is the interest rate, and n is the number of years. Write a program that will plot the amount S as it increases through the years from 1 to n. The main script will call a function to prompt the user for the number of years (and error-check to make sure that the user enters a positive integer). The script will then call a function that will plot S for years 1 through n. It will use 0.05 for the interest rate and $10,000 for P. 1 2 3 4 in 00 function plot LumpSum(n) int=0.05; 5 S=P*(1+int).^H; 6 plot (H,S,'r-*') xlabel('Year') 7 8 9 0 P=10^4; H=1:n; ylabel('Lump Sum S') title('plot of 5 for years 1 thorugh n') end Command Window Error in Hw_4_Problem_3 (line 4) Y=1:n; >> Hw_4_Problem_3 Not enough input arguments. Error in Hw_4_Problem 3 (line 4) |H=1:n; >> Hw_4_Problem_3 >> Hw_4_Problem_3 Not enough input arguments. Error in Hw_4_Problem_3 (line 4) H=1:n; >> Hw_4_Problem_3 Not enough input arguments. Error in Hw 4 Problem 3 (line 4) H=1:n;
Expert Answer:
Answer rating: 100% (QA)
function plotLumpSumn int 005 P 1e4 10000 H 1n S P 1 int H plotH S r xlabelYear ylabelLump ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Assume one 20% shareholder had purchased 50 of her 100 shares for $1,000 dollars in one year and the remaining 50 for $10,000 fifteen years later. What are the tax consequences to the shareholder...
-
The T-accounts for Equipment and the related Accumulated Depreciation for Lau Pty Ltd at the end of 2015 are shown here. In addition, Lau Pty Ltds statement of profit or loss reported a gain on the...
-
Let's think about an accretion disk: see the Lecture Notes, section 2.1. A disk of gas orbits a central object (mass M), so the gravitational potential everywhere is = GM/r where, in cylindrical...
-
Write a program that takes a start string and a stop string as commandline arguments and prints all substrings of a given string that start with the first, end with the second, and otherwise contain...
-
Determine (a) the capacitance and (b) The maximum potential difference that can be applied to a Teflon-filled parallel-plate capacitor having a plate area of 1.75 cm2 and plate separation of 0.040 0...
-
Find the current in each branch of the circuit. Specify the direction of each. 25.00 V 122 5.6 5.00 V 75
-
Hot gases from the toluene hydrodealkylation reactor are cooled and separated as shown in the flowsheet of Figure 7.37. In a steady-state simulation, can the composition of the recycle stream be...
-
1. Analyze the behavior of each party from the perspective of the Six Pillars of Character. Assess the personal responsibility of Ed Giles and Sue Regas for the relationship that developed between...
-
What advancements in supramolecular chemistry have been instrumental in developing new classes of organocatalysts, and how do these developments influence catalytic efficiency and chiral induction ?
-
Q1. Use the LIFO cost-flow assumption to answer the following questions. YEAR 1: Purchase #1 1,000 units @ $1 = $1,000 Purchase #2 1,000 units @ $1 = $1,000 a. How much is goods available for sale?...
-
For the function f(x)=x+4+3 find the domain, range, formula for the inverse, and the domain and range of the inverse function. Also sketch a graph of both fand f. Domain of f Domain off Range of f...
-
A contract between an insurance company and an individual for which the individual pays a premium in exchange for coverage of specified motor vehicle-related financial losses is called Blank______....
-
Step 1: Answer the following questions 1. What is the structure of the literature review? Is it organised by topic? By source? Else? 2. Can you find an example of a strong paragraph with topic...
-
If we recognize 'the right to life', should active euthanasia be a criminal offence? Note: "from your answer, also provide references from a legal case that support your interpretation of the right...
-
List a popular belief held by the public related to criminal justice that is a 'myth". Explain why it is a 'myth' and the impact the "myth" might have ?
-
Question 3 Please answer the following questions based on the income statement provided below: (1) What was the total amount of direct expenses (including all operated departments)? (2) What was the...
-
Following is the Balance Sheet of Title Machine Ltd. as at March 31, 2017. Particulars Amount . I. Equity and Liabilities 1. Shareholders funds a) Share capital 24,00,000 b) Reserves and surplus...
-
What will be the final value of DI after executing the following piece of code? Execute the instructions dependently one after another. CLD MOU CX,OFOH MOU AX.02874H MOU DI,01000H MOU ES, DI SUB...
-
Teresa is a civil engineer who uses her automobile for business. Teresa drove her automobile a total of 21,732 miles during 2012, of which 95 percent was business mileage. The actual cost of...
-
Sherry rents her vacation home for 6 months and lives in it for 6 months during the year. Her gross rental income during the year is $4,000. Total real estate taxes for the home are $950, and...
-
John Williams (age 42) is a single taxpayer, and he lives at 1324 Forest Dr., Reno, NV 89501. His Social Security number is 555-94-9358. John's earnings and withholdings as the manager of a local...
-
FIFO and average cost flow methods periodic and perpetual inventory systems Non-GST version Clean Air Ltd sells air purifiers. The table below summarises the inventory movements for the most popular...
-
Personal Tech Ltd records its inventory of fitness watches using the FIFO cost allocation for perpetual inventory. The following information summarises the inventory movements for their most popular...
-
Audio Attitude Ltd uses the perpetual inventory system to maintain its inventory records of Play it car stereos. The computerised accounting system identified the closing inventory value was \($245\)...
Study smarter with the SolutionInn App