matlab 函数的一些常用函数

squeeze  函数

给的例子是:

 rand(2,1,3)


ans(:,:,1) =


    0.8491
    0.9340




ans(:,:,2) =


    0.6787
    0.7577

squeeze(rand(2,1,3))


ans =


    0.4218    0.7922    0.6557
    0.9157    0.9595    0.0357

   feature = flipud(fliplr(squeeze(feature)));


flipud 函数 help 的结果:

 help flipud 
 FLIPUD Flip matrix in up/down direction.
    FLIPUD(X) returns X with columns preserved and rows flipped
    in the up/down direction.  For example,
    
    X = 1 4      becomes  3 6
        2 5               2 5
        3 6               1 4
 

fliplr 函数的help 的结果:

FLIPLR Flip matrix in left/right direction.
    FLIPLR(X) returns X with row preserved and columns flipped
    in the left/right direction.
    
    X = 1 2 3     becomes  3 2 1
        4 5 6              6 5 4

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值