Borrar filtros
Borrar filtros

Values in array seem to be divided by 1000. Why?

15 visualizaciones (últimos 30 días)
Don
Don el 18 de Abr. de 2013
'RatioResults' is a 9X181 double precision array in workspace. 'thispass' is vector created each iteration through a While loop (181 iterations), then concatenated onto a matrix RatioResults. Original values are as shown with fprintf:
At command line:
>>fprintf(' %4.2f\n',thispass)
181.00
1.37
-0.82
-1.13
2.34
9.25
-5.93
-11.24
-2.53
>>RatioResults
Column 181
0.1810
0.0014
-0.0008
-0.0011
0.0023
0.0092
-0.0059
-0.0112
-0.0025
Questiion: Why are values contained in RatioResults divided by 1000?

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Abr. de 2013
Try giving the command
format long g
before displaying RatioResults
My guess is that if you look at the very beginning of the display of results, you will see something like
RatioResults = 1000.000 *
and then the output. That "1000 *" indicates that all the values further down are to be multiplied by 1000 to interpret them properly. This kind of output format is more compact than adding "E+003" to the end of every entry.

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by