Matlab 函数收集整理

randperm

p = randperm(n),返回从1到n的整数,随机排列

p = randperm(n,k),返回从1到n的数中的k个唯一的整数

    randperm(6)

might be the vector

[3  2  6  4  1  5]
randperm(6,3)
might be the vector
[4 2 5]


max

M = max(A) returns the largest elements of A.

  • If A is a vector, then max(A) returns the largest element of A.

  • If A is a matrix, then max(A) is a row vector containing the maximum value of each column.

  • If A is a multidimensional array, then max(A) operates along the first array dimension whose size does not equal 1, treating the elements as vectors. The size of this dimension becomes 1 while the sizes of all other dimensions remain the same. If A is an empty array whose first dimension has zero length, then max(A)returns an empty array with the same size as A.


M = max(A,[],dim) returns the largest elements along dimension dim. For example, if A is a matrix, then max(A,[],2) is a column vector containing the maximum value of each row.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值