Unexpected is not wrong
- It could be the MATLAB code you wrote
- It could be the MATLAB code you got from someone else
- It could be your data
- It could be the MATLAB code we wrote
This was distressing, I looked through the code for a long time until I noticed in the workspace browser:
It turns out that there was one data point in the middle of the sphere with a very high value. So, due to the interpolation that MATLAB is supposed to do for isosurface, there must be a sphere in the inside too because there will be a sharp gradient from this high outlier to the low values surrounding it.
MATLAB was doing exactly what it was supposed to do.
I never found out if that outlier was important. The right answer might be to NaN out that outlier and carry on with the expected results, or it that ‘extra’ isosurface might point to something important that would have been otherwise missed.
Have you had MATLAB give unexpected results, only to find out that there was something unexpected in your data?
댓글
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.