is this a bug because it definitely looks like

2 views (last 30 days)
Hi everyone,
So I'm trying to do quite a simple task with matlab. I have an array defined as array=[-5:0.1:5] and I want to find the position of a particular element using find. for example find(-0.1==array) should return me the position of the element -0.1 in the array, but it doesn't. What's more strange is that if I ask matlab (-0.1==array(50)) it will return FALSE! I tried defining the array as [-5:0.1:5], (-5:0.1:5) or with no brackets whatsoever but nothing worked. Help please?
Thank you very much and I look forward to your comments.
Kind Regards, Alex

Accepted Answer

Sean de Wolski
Sean de Wolski on 8 Jul 2014

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!