>> A=B(:,[1 3 2 4]) % สามารถนำสลับ column หรือ row ได้

A =

    16     3     2    13
     5    10    11     8
     9     6     7     12
     4    15    14     1

% การคูณ matric

>> A=[1 2;3 4]

A =

     1     2
     3     4

>> B=[2 3;4 5]

B =

     2     3
     4     5

>> A+B

ans =

     3     5
     7     9

>> A-B

ans =

    -1    -1
    -1    -1

>> A*B

ans =

    10    13
    22    29

>> A.*B

ans =

     2     6
    12    20

 

 

Comment



smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry

Tweet