Create a sum called s2 that adds up all the terms

Assignment Help Computer Engineering
Reference no: EM132171725

Using Octave

Define: [m, d] = your birthday in the month [m] and on the day [d]

If m + d < 10, set n = m + d + 10. Otherwise, set n = m + d.

Program a FOR loop for the index i varying from 2 to n to create a sum called s1 that adds up all the terms in the form of 1/i^d. After the loop, write ‘s1' on a line by itself to print out the final value of s1.

Next, we ‘vectorize' the problem. Create a vector that is a set of numbers represented by a variable j varying from 2 to n increasing by an increment of one.

When you create this vector, the increment of one must be specified in that line of code. Use the ‘sum' command in Octave to create a sum called s2 that adds up all the terms in the form of 1/j^d.

You will need to use periods to tell Octave to take each value of j in the vector one at a time to form the corresponding term 1/j^d. Afterwards the ‘sum' command will add up all of the resulting terms. At the end, write ‘s2' on a line by itself to print out the final value of s2.

In the end, s2 should equal s1.

Reference no: EM132171725

Questions Cloud

Normal distribution with a standard deviation : A survey reported that the mean starting salary for college graduates after a three year program was $35,000.
List the films title and films release year : List the film's title, film's release year, and actor's last name Use implicit inner join syntax across three tables in the first query.
What is the probability that a college student expresses : The relative frequency distribution of the number of phobias reported by a hypothetical sample of 500 college students is given as follows.
Distribution of the number of phobias : The relative frequency distribution of the number of phobias reported by a hypothetical sample of 500 college students is given as follows.
Create a sum called s2 that adds up all the terms : Program a FOR loop for the index i varying from 2 to n to create a sum called s1 that adds up all the terms in the form of 1/i^d.
What proportion of the population is less : A normal population has a mean of 11.2 and a standard deviation of 3.4. a). Compute the Z associated with 14.3
What will be the playfair keyword : Using Playfair cipher, encrypt the following plaintext Pt. The Playfair's keyword was encrypted using simple substitution.
Probability of getting an odd number : 1) From the sample space S = {13, 94, 25, 72, 88}, what is the probability of getting an odd number?
Calculate the average score for each student in the class : Your program will ask the user to enter the number of students in the class and the each student has 3 exams taken.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What must be saved before the isr is run

Is the interrupted task expected to resume after the ISR runs? What must be saved before the ISR is run?

  Consider how to resolve a collision

In other words, instead of storing Person objects in a binary search tree, the PhoneBook class will store these Person objects in a hash table.

  Revise the program to reflect the given changes

Revise the program to reflect the following changes: Use a for loop to prompt the student for the price of each book based upon number of classes being taken.

  Determine legal requirements for penetration testing

Determine Legal Requirements for Penetration Testing - Write a brief report to your instructor outlining the steps you should take before beginning

  Count the number of coins in the bag and record the value

Count the number of coins in the bag and record the value as P in Table II. (Note: an example of how Table II is supposed to look like has been provided to you at the bottom of the document.

  Cost benefits to cloud computing

discuss whether or not there are cost benefits to cloud computing using specific examples. Be sure to include at least three reference sources.

  What protocol information would be in one packet

Will the protocol packet used to transfer the video be identical to the protocol packet used for data transmission? What protocol information would be in one packet and not the other?

  Digital equipment and media that would have been seized

What additional sources of evidence might there be besides the digital equipment and media that would have been seized

  Create a work breakdown structure code for each task

This assignment consists of two (2) sections: a Work Breakdown Structure (WBS) and a summary document. You must submit the two (2) sections as separate files for the completion of this assignment.

  Describe physical security plans and processes

Describe physical security plans and processes. Evaluate the ethical concerns inherent in cybersecurity and how these concerns affect organizational policies.

  How cloud makes dlp more difficult

What do you think about how cloud makes DLP (Data Loss Prevention) more difficult?

  What is the waiting time of each process for each algorithms

What is the waiting time of each process for each of these scheduling algorithms? Which of the algorithms results in the minimum average waiting time?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd