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, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
question
Computers and Technology, 24.06.2019 00:50
3. what is the output of the following statements? temporary object1; temporary object2("rectangle", 8.5, 5); temporary object3("circle", 6, 0); temporary object4("cylinder", 6, 3.5); cout < < fixed < < showpoint < < setprecision(2); object1.print(); object2.print(); object3.print(); object4.print(); object1.set("sphere", 4.5, 0); object1.print();
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
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
World Languages, 04.12.2020 06:10
question
Mathematics, 04.12.2020 06:10
question
World Languages, 04.12.2020 06:10
Questions on the website: 13722359