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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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