Gistlib Logo

gistlib

calculate (bc)×(−ad + 3d) for 𝑨 = [ 4 −1 −2 1 ], 𝑩 = [2 1 −1], 𝑪 = [−1 2 3 0 0 1], 𝑫 = [7 4] in matlab

main.m
A = [4, -1, -2, 1];
B = [2, 1, -1];
C = [-1, 2, 3, 0, 0, 1];
D = [7, 4];

result = (B*C)*(-A*D + 3.*D);
disp(result);
118 chars
8 lines

similar matlab code snippets

how to calculate the trace of a matrix in matlab
how to calculate the rank of a matrix in matlab
how to calculate the eigenvectors of a matrix in matlab
how to calculate the transpose of a matrix in matlab
how to calculate the maximum of a matrix in matlab
how to calculate the eigenvalues of a matrix in matlab
how to calculate the qr decomposition of a matrix in matlab
how to calculate the lu decomposition of a matrix in matlab
how to calculate the determinant of a matrix in matlab
how to calculate the product of a matrix in matlab

related categories

matrices
matlab

gistlibby LogSnag