关于MATLAB自带intersect求交集函数的问题。
7 views (last 30 days)
Show older comments
新锦江娱乐app下载【微8785092】
on 21 May 2023
Answered: 新锦江娱乐在线注册【微8785092】
on 21 May 2023

我就不把数组都放出来了,用自带函数处理后只有951这一数值能算出来,带e表示的数值就没办法正常求出,我换了一组不带e的数组(行列什么都没变,只是数值上变化)后是可以正常做交集的。这是什么原因呢?0 Comments
Accepted Answer
新锦江娱乐在线注册【微8785092】
on 21 May 2023
可能是浮点数的精度误差。整数的话,没有误差。
可以用 ismembertol 设定一定的误差 来代替 求交集。
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!