Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Define a set of 5 4x4 matrices containing random floating-point numbers between 0 and 1. Use the appropriate routines in numpy.linalg and scipy.linalg to

a) Define a set of 5 4x4 matrices containing random floating-point numbers between 0 and 1. Use the appropriate routines in numpy.linalg and scipy.linalg to find the determinants of each matrix, in the case of numpy without using a loop. Make a quantitative comparison of the results between the two methods.

b)We want to write the above equations in matrix form as F = Kx - b. Write a function that takes the ki and Li values as inputs in 1-D arrays and returns the arrays corresponding to K and b.

c)Use the function from part b and the linalg functions to solve for the equilibrium positions of the masses (where Fi=0) for the cases

(i) k = [1 2 3 4], L = [1 1 1 1], Lw=10

(ii) k = [0 1 1 0], L = [2 2 1 1], Lw=4

d)Write the appropriate code needed to solve this system of equations using scipy.integrate.solve_ivp. (Hint: your state vector in this case should have 6 components, 3 for x_i and 3 for v_i. Your derivative function will need the vectors k and L as additional arguments). Compute the solutions using as initial values the equilibrium positions x_i for the 2 cases you computed in part 3, and v_i=0. Are the results as you might expect?

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

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

3. What strategies might you use?

Answered: 1 week ago