matlab矩阵相乘

matlab矩阵相乘

>> 
>> A=[1,2,3]

A =

     1     2     3

>> 
>> B=[3;2;1]

B =

     3
     2
     1

>> 
>> 
>> A*B

ans =

    10

>> 
>> 
>> 
>> B*A

ans =

     3     6     9
     2     4     6
     1     2     3

>> 
>> 

 

posted @ 2020-08-15 13:03  西北逍遥  阅读(1605)  评论(0编辑  收藏  举报