modelling code

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

17 Terms

1
New cards

a,b,c,d = symbols(‘a b c d’)

Defines variables

2
New cards

A = np.array ([[…], [ ….]., [….]])

defines matrix using an array (numpy)

3
New cards

P = A*B

defines product

4
New cards

sp.pprint

prints sympy result for matricies

5
New cards

P_substitued = P.subs({a: …, B: … etc.

assign values to symbolic variables

6
New cards

P_result = P_substituted.evalf

evaluates using new values assinged to variables

7
New cards

A_transpose = A.Transpose()

transposes the matrix using sympy

8
New cards

A_Transpose = A.T

transpose of a matrix using numpy

9
New cards

det_A = A.det

finds determinant sympy

10
New cards

det_A = np.linalg.det(A)

find determinant numpy

11
New cards

inv_A = A.inv()

find inverse of matrix sympy

12
New cards

inv_A = np.linalg.inv(A)

find inverse numpy

13
New cards

U S VT = np.linalg.svd(A)

finding SVD factorisations

14
New cards

cond_num = np.linalg.cond(A)

condition number

15
New cards

np.linalg.solve(A,b)

solves system in the form Ax = b

16
New cards

x, residuals, rank, singular values = np.linalg.lstsq(A, b, rcond = None)

finds particular solution of smallest magnitude of a consistent system with infinite solutions

17
New cards

eigenvalues, eigenvectors = np.linalg.eig(A)

finds eigenvalues and eigenvectors of A