Unable to fetch more decimal points for values stored in sldd
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Vishnu
el 23 de Oct. de 2025 a las 19:06
Editada: John D'Errico
el 23 de Oct. de 2025 a las 20:02
I have a variable (name : dummyVar) in sldd with value 132.99525
When i fetch this variable from sldd using matlab code and checked the value.
The value fetched using matlab code was 132.9952.
Not all decimal points fetched here. I would like to understand the reason behind this behaviour !!
0 comentarios
Respuestas (2)
John D'Errico
el 23 de Oct. de 2025 a las 20:01
Editada: John D'Errico
el 23 de Oct. de 2025 a las 20:02
You need to learn about the format command. All of the digits are still there, they were just not reported. I'll add a few digits.
x = 132.9952512345
The default for format is short.
help format
F = format
However, you want to see more digits. long g is generally a good choice.
format long g
x
If you want even more control, you can always use tools like sprintf.
0 comentarios
Ver también
Categorías
Más información sobre Analysis of Variance and Covariance 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!