查看单个帖子
旧 2008-05-23, 20:37   #2
Just For Matlab
初级会员
 
注册日期: 2008-05-23
年龄: 38
帖子: 5
声望力: 0
Just For Matlab 正向着好的方向发展
微笑

matlab里面有个求最小值的函数min,具体用户可以查看帮助
在命令窗口输入help min就会列出一系列关于min的用法,不过全是英文
好好钻研吧
help min
MIN Smallest component.
For vectors, MIN(X) is the smallest element in X. For matrices,
MIN(X) is a row vector containing the minimum element from each
column. For N-D arrays, MIN(X) operates along the first
non-singleton dimension.

[Y,I] = MIN(X) returns the indices of the minimum values in vector I.
If the values along the first non-singleton dimension contain more
than one minimal element, the index of the first one is returned.

MIN(X,Y) returns an array the same size as X and Y with the
smallest elements taken from X or Y. Either one can be a scalar.

[Y,I] = MIN(X,[],DIM) operates along the dimension DIM.

When complex, the magnitude MIN(ABS(X)) is used, and the angle
ANGLE(X) is ignored. NaN's are ignored when computing the minimum.

Example: If X = [2 8 4 then min(X,[],1) is [2 3 4],
7 3 9]

min(X,[],2) is [2 and min(X,5) is [2 5 4
3], 5 3 5].
Just For Matlab 当前离线   回复时引用此帖