MatLab 2012b sum block with signed/unsigned numbers
Mostrar comentarios más antiguos
If I have a sum block that's taking 2 constants in, one signed the other unsigned, and I add them together I do not get the result that I expect in the picture below: OutDataTypeStr for the sum block is Inherit: Inherit via internal rule, expected is 475.

I noticed that MatLab created a new data type, sfx32_E1, and that the number was 1 off from what I expected it to be. When I changed the sum block to output as an int32, I got the result that I expected it to be.

So I was wondering why the results were different and what that data type that's outting in the first picture means. I'm going to assume that this is the same for the other math operation blocks in MatLab? Thanks!
1 comentario
Lucas
el 8 de Ag. de 2014
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre String en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!