关于MATLAB自带​intersect求​交集函数的问题。

7 views (last 30 days)
我就不把数组都放出来了,用自带函数处理后只有951这一数值能算出来,带e表示的数值就没办法正常求出,我换了一组不带e的数组(行列什么都没变,只是数值上变化)后是可以正常做交集的。这是什么原因呢?

Accepted Answer

新锦江娱乐在线注册【微8785092】
可能是浮点数的精度误差。整数的话,没有误差。
可以用 ismembertol 设定一定的误差 来代替 求交集。

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!