Is it an integer value?
Mostrar comentarios más antiguos
1.7008e+05. IS this value considers as an integer in matlab.I found such values and when performing bitxor operation there occurs some error. So i doubted whether those value are the problem. Please help me with this.
Respuesta aceptada
Más respuestas (1)
Steven Lord
el 6 de Abr. de 2018
The isinteger function checks if the class of the value is one of the eight integer types, not if the value is an integer value.
>> isinteger(1)
ans =
logical
0
The number 1 is stored by default in MATLAB as a double, so that's correct.
One way of checking the value is to use round.
>> A = [1 pi 5.5 17 -3];
>> A == round(A)
ans =
1×5 logical array
1 0 0 1 1
1 comentario
Sneha P S
el 11 de Abr. de 2018
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!