本文介绍了min和Nanmin的区别是什么? Matlab中的max和Nanmax吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Matlab这样描述nanminnanmax:

Matlab describes nanmin and nanmax like this:

NANMAX 最大值,忽略NaN s.

但是实际上,minmax也会忽略NaN s.

But in fact, min and max ignore NaNs too.

那我该用哪个?

根据我的测试,nanminnanmax更快.总是这样吗?

According to my tests, nanmin and nanmax are faster. Is it always like this?

推荐答案

nanmin仅调用min:

[varargout{1:nargout}]=min(varargin{:});

nanmax类似.就是这样!

在过去的某些发行版中,内置的minmax已使用相同的功能进行了更新,而忽略了NaN,并且工具箱只是开始指向它们而不是维护其自己的实现.除非您正在使用可能具有这些功能自己的实现的特殊类型,否则只需使用maxmin.

In some past release, the built-in min and max were updated with the same functionality, ignoring NaN, and the toolboxes just started pointing to them instead of maintaining their own implementations. Just use max and min, unless you are working on special types that might have their own implementations of these functions.

这篇关于min和Nanmin的区别是什么? Matlab中的max和Nanmax吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 04:03