Subscript assignment mismatch with the use of 'find'
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
The following as commands typed in the command window with the results:
>> X = 0:0.001:1;
>> find(X==0.57)
ans =
Empty matrix: 1-by-0
>> X(571)
ans =
0.5700
I cannot figure out why find doesn't work. I stumbled on it accidentally. This works if choose to find any other number except a special few like 0.47, 0.67, 0.41...
Respuestas (3)
Arturo Moncada-Torres
el 31 de Ag. de 2011
1 voto
1 comentario
Paulo Silva
el 31 de Ag. de 2011
+1 vote for mentioning the FAQ
Fangjun Jiang
el 31 de Ag. de 2011
0 votos
floating point comparison!!!
aditya
el 31 de Ag. de 2011
0 votos
1 comentario
Walter Roberson
el 2 de Sept. de 2011
Using tolerances is the only practical solution unless you have a system that has extensive interval-arithmetic operations built in. Building in that level of interval-arithmetic is hard!!
La pregunta está cerrada.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!