To calculate the matrix product a · at
and at · a
in MATLAB, you can use the matrix multiplication operator *
. Here's the code to do it:
main.m202 chars15 lines
Output:
main.m124 chars11 lines
In the code above, a'
represents the transpose of matrix a
. The *
operator is used for matrix multiplication. product1
represents the result of a · at
and product2
represents the result of at · a
. The disp()
function is used to display the results.
gistlibby LogSnag