I have a 3000*3000 matrix. which this matrix is the value of Force. The name of Matrix is 'forceZ1'. First I choose one of the columns ( the 1234th column) now I want to know which row has the value of zero. I tried the method 'find' but the result was nothing( it said that forceZ1 never get the value zero) whereas when I plot the forceZ1 on its 1234th column I see that in two point it is zero. I want to know the exact value of that points! Help me :)
Asked
Active
Viewed 63 times
-1
-
1Duplicate/Relevant: [Why is 24.0000 not equal to 24.0000 in MATLAB?](https://stackoverflow.com/questions/686439/why-is-24-0000-not-equal-to-24-0000-in-matlab) – Sardar Usama Dec 28 '17 at 11:04
1 Answers
0
Maybe it's a small value close to zero but not exactly zero. You can try:
find(abs(forceZ1(:,1234)) < 1e-5)
You can try with different thresholds e.g. 0.1 0.001 until you don't get too many indices, i.e. apply to your situation.

liyuan
- 543
- 3
- 16
-
you know, I got something. in my data I have force=7.0584 E-15 and then the next data is -2.0463 E-14 . so I cannot have the x for the value of zero for forceZ1..it needs interpolation? doesn't? so how can I use interpolation? – hossein.kh Dec 28 '17 at 14:18
-
-
@hossein.kh So are you actually trying to find where the data in the row **crosses** zero? – nekomatic Jan 02 '18 at 10:03