Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please i need help on programming. anybody?? Due Jan 23 1. For your computer system write a program to estimate the number of floating point

please i need help on programming. anybody?? image text in transcribed
Due Jan 23 1. For your computer system write a program to estimate the number of floating point operations (e.g., multiplications) that can bep be performed in one second. You can use the time.time() function as a stop watch. 2. Modify the orthog program so that it can handle vectors of any length. Your program should detect and gracefully handle erroneous inputs such as vectors of unequal length. 3. Modify the orthog program so that it accepts a pair of theree-dimensional vectors and outputs a unit vector that is orthogonal to the input vectors. 4. Modify the orthog program so that if the second vector is not orthogonal to the first, the program computes a new vector that is orthogonal to the first vector, has the same length as the second vector, and is in the same plane as the two input vectors. This orthogonalization is often used with eigenvectors and is commonly performed using the Gram-Schmidt procedure. 5. Write a function that is similar to intrpf but that returns the estimated derivative at the interpolation point. The function will accept three (x, y) pairs, fit a quadratic to the data, then return the value of the derivative of the quadratic at the desired point. 6. Newman 2.9 7. Newman 2.10 8. Newman 3.1 9. Newman 3.6 10. Newman 3.7 In [1]: #example import time t1 = time.time() # do some stuff t2 = time.time() print("elapsed = ", t2-ti) elapsed - 1.9073486328125e-05 In 1]: Due Jan 23 1. For your computer system write a program to estimate the number of floating point operations (e.g., multiplications) that can bep be performed in one second. You can use the time.time() function as a stop watch. 2. Modify the orthog program so that it can handle vectors of any length. Your program should detect and gracefully handle erroneous inputs such as vectors of unequal length. 3. Modify the orthog program so that it accepts a pair of theree-dimensional vectors and outputs a unit vector that is orthogonal to the input vectors. 4. Modify the orthog program so that if the second vector is not orthogonal to the first, the program computes a new vector that is orthogonal to the first vector, has the same length as the second vector, and is in the same plane as the two input vectors. This orthogonalization is often used with eigenvectors and is commonly performed using the Gram-Schmidt procedure. 5. Write a function that is similar to intrpf but that returns the estimated derivative at the interpolation point. The function will accept three (x, y) pairs, fit a quadratic to the data, then return the value of the derivative of the quadratic at the desired point. 6. Newman 2.9 7. Newman 2.10 8. Newman 3.1 9. Newman 3.6 10. Newman 3.7 In [1]: #example import time t1 = time.time() # do some stuff t2 = time.time() print("elapsed = ", t2-ti) elapsed - 1.9073486328125e-05 In 1]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions