Search code examples
matlabfindzero

how can i find the value of 'X' which 'Y' is zero in it?


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 :)


Solution

  • 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.