Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Strange rounding errors?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a matrix A(7,7) with different real values.
If I do:
Test1=sum(sum(40*A));
Test2=40*sum(sum(A));
I get slightly different values for Test1 and Test2 (Test1-Test2=1e-8 or so)
In cases of simple matrix elements like numbers 1,2,3,etc. this doesn't happen. With my entries though, which are different in size...
Now I suppose this behaviour is due to rounding errors...What would be best? If I use Test2 for calculations?
Or is there something I misunderstood?
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!