矩阵操作

reshape(a, m, n)

a是一个含有m*n个元素的数组

如reshape(1:9, 3, 3)

findstr(str1, str2)

在str2中查找str1片段

b = [0111001000100110111];

a = length(findstr(01,  b)

矩阵的翻转

flipud()   

flip a matrix up to down.上下

a = reshape(1:9, 3 , 3)

>>a=[ 1 2 3      

4 5 6

7 8 9]

>>flipup(a)

7 8 9

4 5 6

1 2 3

fliplr

flip a matrix left to right

fliplr(a)

>>3 2 1

6 5 4

9 8 7

rot90(a)

旋转90度

原文地址:https://www.cnblogs.com/jiangkejie/p/5815655.html