Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Replacing `find` with logical indexing
Replies: 6   Last Post: Jul 10, 2013 1:47 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,300
Registered: 6/7/07
Re: Replacing `find` with logical indexing
Posted: Jul 10, 2013 1:47 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 7/10/2013 9:55 AM, Jeff wrote:
...

> ... The inner parenthesis comparison, D~=0, is
> comparing floating point numbers in D to 0. If there is a very, very
> small value of D, say 1e-20, which really should be zero, I don't want
> that value returned. In your case, since I didn't specify how D was
> created, shouldn't you have included that?


Well, if that is the issue then yes. I presumed that ~=0 was intended
to be that by design/intent.

If you're indeed trying to exclude for some tolerance then indeed you do
need to make the comparison based on that.

Whether that's a constant or a percentage of the magnitude or just what
it is then is dependent upon the objectives.

--






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.