subject

2. (Roots of unity revisited: adapted from LM 3.1–24) In Problem 2, Homework 1, we calculated all five roots of x 5 + 1, but it required a number of lines of code. In this problem, we will do this more compactly for a more general x n + 1. Recall that −1 = e πi = e 3πi = e 5πi = · · · , but, if we take the nth root, we obtain n distinct values e πi/n, e3πi/n, e5πi/n , . . . , due to the periodicity of the complex exponentials; think Euler. (a) Write a script which, given a positive integer n, finds all n roots of x n + 1 at once, using ONE statement. It must also print out all n of these roots neatly using either disp or fprintf in tabular form. A loop may be used for printing results, but is not allowed in the calculation of the roots. (b) Run the script with n = 3, 5, 7, and 1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
In this lab, you complete a python program that calculates an employee's annual bonus. input is an employee's first name, last name, salary, and numeric performance rating. if the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. if the rating is 4 or higher, the rate is 0. the employee bonus is calculated by multiplying the bonus rate by the annual salary.
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 11:30
Why is body language an important factor in a business meeting
Answers: 1
You know the right answer?
2. (Roots of unity revisited: adapted from LM 3.1–24) In Problem 2, Homework 1, we calculated all fi...
Questions
question
Geography, 13.01.2021 19:20
question
History, 13.01.2021 19:20
question
Chemistry, 13.01.2021 19:20
Questions on the website: 13722363