Round down to nearest 100
43 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Grant Brown
el 14 de Dic. de 2023
Comentada: Voss
el 14 de Dic. de 2023
Hello I am doing timing phase correction in a QPSK system. Given a maximum power timing phase I need to round down to nearest 100.
Example:
If I get 568, I want to get 500.
Round(568,-2) gives 600. I need to always round down. What do you all suggest?
0 comentarios
Respuesta aceptada
Voss
el 14 de Dic. de 2023
Divide by 100, then floor() or fix() (depending on how you want to handle negative numbers), then multiply by 100.
x = 568;
floor(x/100)*100
fix(x/100)*100
x = -568;
floor(x/100)*100
fix(x/100)*100
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Elementary Math 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!