Phorce
Phorce

Reputation: 2674

Matlab - Command Window and variable editor difference

This is confusing me.. Ok, so I have the same dataset and I'm viewing them in the output window as well as the variable editor and they are completely different. Here is the screenshot: enter image description here

Notice how the 9th element is "0" whereas on the variable editor it is "-0.0078"

The code:

function f = display()
rawdata = wavread('FILENAME', 'double');
f = rawdata;
end 

Any ideas? I don't know which is right and which is wrong.

Upvotes: 0

Views: 988

Answers (1)

Jonas
Jonas

Reputation: 74940

The default scroll buffer in the command window is 5000 lines. Consequently, if you're looking at variables with more than 5000 rows (~60k in your case), you'll only see the last 4999 or so entries.

Consequently, you'll either need to increase the scroll buffer, output the transpose of your vector, or use the variable editor (which is right).

Upvotes: 1

Related Questions