Effacer les filtres
Effacer les filtres

is this a bug because it definitely looks like

1 vue (au cours des 30 derniers jours)
Ioan Alexandru
Ioan Alexandru le 8 Juil 2014
Commenté : Ioan Alexandru le 8 Juil 2014
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

Réponse acceptée

Sean de Wolski
Sean de Wolski le 8 Juil 2014

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by