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

11 次查看(过去 30 天)
'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?

回答(1 个)

Walter Roberson
Walter Roberson 2013-4-18
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.

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by