How to deal with 32 bit and 64 bit integers in matlab?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
kalpana
el 16 de Feb. de 2014
Comentada: kalpana
el 27 de Feb. de 2014
I want to find out correlation coefficient. It need to do 64 or 32 bit integer addition,multiplication and square root. sqrt() doesn't support 32 bit integer. What is solution?
0 comentarios
Respuesta aceptada
David Young
el 16 de Feb. de 2014
Just convert to double or single, using for example
y = sqrt(double(x));
Round the result and convert back to an integer if necessary.
Alternatively, write a square root function that uses purely integer arithmetic. It will probably be slow though. I'd do the conversion.
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!