필터 지우기
필터 지우기

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

조회 수: 6 (최근 30일)
Don
Don 2013년 4월 18일
'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에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by