gistlib
other matlab categories
linear-algebra code snippets in matlab
. a 4x4 stiffness matrix 𝑲 is given as: 𝑲 = [12 −4 −2 0 −4 10 −3 1 −2 −3 5 −1 0 1 −1 6 ]find the determinant of the matrix 𝑲. in matlab
1) solve, if possible, the system of linear equations and obtain also the matrices l and u ൝ 3 = ݖ2 + ݕ3 + ݔ10 2=ݖ−ݕ+ݔ 0=ݖ+ݔ in matlab
a 4x4 stiffness matrix 𝑲 is given as: 𝑲 = [12 −4 −2 0 −4 10 −3 1 −2 −3 5 −1 0 1 −1 6 ]set all values of 𝑲 below the diagonal to zero to create an upper triangular matrix. in matlab
a = [38 2 13; 5 23 11; 19 3 17] b = [6 17 29; 43 15 8; 1 4 22] c = [14 9 1; 2 31 7; 8 20 6] berechnen sie f = d * et in matlab
a code to verify a matrix is symmetric in matlab
a= (0, 0, 1, 0, · · · , 0)^t, y = (y1, y2, · · · , y21),aa = y. calculate relative error in a if y(5) = y(5) + 0.01 in matlab
ax=b for different b ’s a=[-0.3 -0.5 1.2; -0.9 1.3 -1.4 ; -0.5 -1.8 -1.8]he relative error of the right hand side is at most 0.0028 in ∞ -norm calculate to get the large relative error in matlab
boost matrix in matlab
calculate hessian normal form in matlab
calculate the condition number of a matrix in matlab
calculate the condition number of the matrix in matlab
cholesky decomposition in matlab
compute the best fitting (in the sense of least squares method) function of the form f(t)=at2+bt+c t=[3 -1 7 -3 -1 7]; f=[5 10 9 10 8 -3]; in matlab
compute the rank of a matrix in matlab
create a 4x5 matrix randomly and find its rank. in matlab
create a code that solves matrix a in the following equation: [[2,0][0,3]]*a=[[1,2,3][4,5,6]] in matlab
create a solver for a system of linear simultaneous equations in matlab
create a sparse matrix. in matlab
create sparse diagonal system from 3d matrix in matlab
cross product of vectors a and b in matlab
diagonalise a matrix in matlab
diagonalize a matrix in matlab
dimension of the column space of a matrix in matlab
does a solution to the following system exist? what is it? x − 2y + 3z = 1 x + 4y + 3z = 2 2x + 8y + z = 3 in matlab
dot product in matlab
etermine the intersection point, p, of these three planes (note: your answer should be a row vector containing x,y, and z coordinates of the intersection). in matlab
find a nonsingular matrix p such that p^{-1}ap is a diagonal matrix, use sym(a) to get elements of p. in matlab in matlab
find a nonsingular matrix p such that p^{-1}ap is a diagonal matrix. in matlab
find a solution to the following set of equations x + 2y + 3z = 12 −4x + y + 2z = 13 9y − 8z = −1 in matlab
find a solution to the following set of equations x + 2y + 3z = 12 −4x + y + 2z = 13 9y − 8z = −1 what is the determinant of the coeffi cient matrix? in matlab
find eigenvectors of a matrix in matlab
find rref for matrix a = [1 2 3 4 ; 2 3 4 5 ; 3 4 5 6; 1 2 0 1]; b = [0 0 0 0]'; in matlab
find solution of linear system ax=b in matlab
find the condition number of a matrix in matlab
find the difference between two vectors in each value in matlab
find the inverse of a matrix in matlab
find the inverse using cayley hamilton theorem. use a 3x3 matrix and find the characteristic polynomial in matlab
find the magnitude of the vector in matlab
find the row echelon form of 0 1 3 1 1 0 1 1 3 1 0 2 1 1 2 0 a − − = in matlab
find the set s of all solutions in x of the following inhomogeneous linear systems ax = b, where a and b are defined as follows in matlab
find the size of matrix m such that size(reshape(m,1,1,25))=(25,1,1) in matlab
fit many surfaces to equation by linear in matlab
fit many surfaces to set of linear equations in matlab
gaussian elimination in matlab
gaussian elimination solution method in matlab
gaussseidel in matlab
generate the matrix a of order n=100, whose generic element is a_{ij}=\sin(\max(i,j)). the condition number of a in the 2-norm is: in matlab
given a square matrix a with n columns and a vertical vector b where rank(a)=rank(a|b)<n, solve the system ax=b in matlab
given matrix a and vertical vector b, find if rank(a)=rank(a|b) in matlab
given the matrix a=magic(3), compute its qr factorization and solve the linear system qx=b, with b=[1,2,3]^t. the solution is, approximately: in matlab
given the matrix a=magic(3), compute its qr factorization and solve the linear system rx=b, with b=[1,2,3]^t. the solution is, approximately: in matlab
given three equations and four variables, solve the system in ax = b form in matlab
he eigenvectors of the matrix a are: a space equals space open square brackets table row 4 5 row 2 3 end table close square brackets in matlab
hesse normal form in matlab
how do you find the roots with zero real part of a 1x3001 complex matrix in matlab without using roots function in matlab
how do you find the roots with zero real part of a 1x3001 complex matrix in matlab without using roots or eig functions in matlab
how to calculate product of a matrix and a transpose of another matrix in matlab
how to calculate the svd decomposition of a matrix in matlab
how to cast matrix into parse block diagonal system in matlab
how to create a block diagonal of 3d matrix in matlab
how to do gaussian elimination with partial pivoting in matlab
how to jacobi in matlab
in the cholesky decomposition of the matrix a = 256 64 240 64 20 54 240 54 283 (= llt ) the sum of the diagonal elements of l i in matlab
in the cholesky decomposition of the matrix a = 256 64 240 64 20 54 240 54 283 (= llt ) the sum of the diagonal elements of l is: numerical ✄ ✂ ✁ 1 point 11 ± 1e-4 in matlab
inner product of any two vectors x and y in rn. that is, the inputs are x and y and n; the output is (x, y) = x ^t y. in matlab in matlab
inverse of a matrix in matlab
let a be the hilbert matrix of order 70 (matlab command hilb). the sum of the elements of a that are lower than 0.01 is approximately in matlab
lineari s in matlab
matlab: having generated a krylov space of a[v, h] = arnoldi(a, v1, m) now having only v and h (not a), update them after you had been adding a vector dak to the kth column of a. in matlab
matlab: having generated a krylov space of a[v, h] = arnoldi(a, v1, m) now having only v and h (not a), update them after you had been adding dak to the kth column of a. in matlab
matlab: having generated a krylov space of a[v, h] = arnoldi(a, v1, m) update v and h after adding dak to the kth column of a in matlab
multivariate linear least-squares fitting in matlab
null space of a matrix in matlab
power method eigenvalue and eigenvector in matlab
power method for eigenvalues in matlab
projection of a onto v in matlab
projection of w onto b in matlab
pseudoinverse method to solve overdetermined system of equations in matlab
rotate singular values from svd in matlab
rref of an augmented matrix in matlab
set up coefficient matrix and rhs vector for a 2d unsteady heat conduction equation. use implicit euler in time and central differencing in space. then use jacobi solver in matlab
solve a linear system of equations in matlab
solve a pair of simultaneous equations in matlab
solve a system of equations using gauss-seirdel interation in matlab
solve an underdetermined set of equations with minimum norm from guess in matlab
solve ax=b matrix in matlab
solve linear set of equations of matrix via mldivide and compute confidence intervals in matlab in matlab
solve the following systems of linear equations by using the backslash operator "\". a) 2x = −3y + z + 5 3z = 2y − 4x + 10 y = −x − z + 3 in matlab
solve the system ax = b for different b’s in matlab
take transpose of a matrix in matlab
the vector x which is the solution of the linear system 2*a*(x+b)=c-b in matlab
true or false: eigenvectors of a 2 x 2 matrix are always perpendicular to each other? in matlab
use backslash function to solve the following system of equations: 1c1 + 4c2 -2c3 + 3c4 = 0 , -4c2 + 2c4 = 1 , -3c1 +c2 -c3 = 7 , 2c1 -c3 + 2c4 = 5 in matlab
use lu decomposition to fi nd a solution to the system: x + 7y − 9z = 12 2x − y + 4z = 16 x + y − 7z = 16 in matlab
v1 = x ∥x∥2 , w2 = y − αv1, v2 = w2 ∥w2∥2 . find the formula for α such that (v1, w2) = (v1, v2) = 0. then, v1, v2 form a unit orthogonal basis for the sub-space spanned by x and y in matlab
we are going to solve the system ax = b for different b’s, where a = 1.8 0.1 0.1 −1.0 −2.0 0.2 1.0 −1.3 1.3 we know that the relative error of the right hand side is at most 0.0120 in 1-norm in matlab
we are going to solve the system ax=b for different b ’s, where a=[ -0.6 0.1 -0.1 ;-1.7 -0.8 -0.2; -0.2 -1.8 -1.2]how large can be the relative error of the solution in 2 -norm? in matlab
we are going to solve the system ax=b for different b ’s, where a=[-0.3 -0.5 1.2 ; -0.9 1.3 -1.4 ; -0.5 -1.8 -1.8]how large can be the relative error of the solution in ∞ -norm? in matlab
we are going to solve the system ax=b for different b ’s, where a=[-1.6 -0.9 1.4 ; 1.6 -0.2 0.1;-1.5 0.1 -0.2]calculate the large relative error of the right hand side 1 -norm? in matlab
we are going to solve the system ax=b for different b ’s, where[-0.5 0.1 -2.0 ; 0.6 -1.7 -1.9; 0.3 0.3 0.1 ]how large can be the relative error of the right hand side in 2 -norm? in matlab
what does this do? [v,d] = eig(k,m) in matlab
what is an inconsistent solution in matlab
wie erstellt man eine transponierte matrix in matlab
write a callback code for inverse of a matrix in matlab
write a matlab function called find bases to find basis vectors for the column space and null space of a given matrix. in matlab
write a program that performs the transformation of points induced by a matrix in matlab
write a system of linear equations using gauss sidel interation solver in matlab
write code that determines the normal vector in matlab
write the system of equations in standard form, and solve it with matlab 2a+b-c=1 -a+b+c=2 a+2b=4 in matlab
gistlib
by LogSnag