Gistlib Logo

gistlib

a 4x4 stiffness matrix 𝑲 is given as: 𝑲 = [12 −4 −2 0 −4 10 −3 1 −2 −3 5 −1 0 1 −1 6 ] extract the top-left 2x2 submatrix of 𝑲. in matlab

main.m
K = [12, -4, -2, 0; -4, 10, -3, 1; -2, -3, 5, -1; 0, 1, -1, 6];
K_sub = K(1:2, 1:2);
disp(K_sub);
98 chars
4 lines

similar matlab code snippets

extract submatrix around (25,25) size (10,10) from a (50,50) matrix in matlab
extract submatrix around (25,25) from a (50,50) matrix in matlab
extract submatrix from a (50,50) matrix in matlab
how to calculate the variance of a matrix in matlab
how to calculate the sum of a matrix in matlab
how to calculate the inverse of a matrix in matlab
average 2 matrices in matlab
how to calculate the standard deviation of a matrix in matlab
how to calculate the median of a matrix in matlab
for loop for a matrix in matlab

related categories

matlab
matrix
submatrix

gistlibby LogSnag