subject

Recall that a geometric sum is a sum of the form a + ar + ar2 + ar3 + (a) Write a function file called geomsum1 which accepts the values of r, a and n (in that order) as input arguments and uses a for loop to return the sum of the first n terms of the geometric series. Test your function for r = 1/9, a = 4, n = 11. (b) Write a function file called geomsum2 which accepts the values of r, a and n (in that order) as input arguments and uses the built in command sum to find the sum of the first n terms of the geometric series. Test your function for r = 1/9, a = 4, n = 11. Hint: Start by defining the vector e = [0:n-1] and then evaluate the vector R = r.^e. It should be easy to figure out how to find the sum from there.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 24.06.2019 00:50
Which of the following is not a key player in the sale of travel products?
Answers: 2
You know the right answer?
Recall that a geometric sum is a sum of the form a + ar + ar2 + ar3 + (a) Write a function file call...
Questions
question
Mathematics, 30.03.2021 18:10
question
Mathematics, 30.03.2021 18:10
question
Mathematics, 30.03.2021 18:10
question
Mathematics, 30.03.2021 18:10
question
Arts, 30.03.2021 18:10
Questions on the website: 13722361