0

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.

10
  • question, are you viewing FILENAME and displaying rawdata? Commented Sep 25, 2012 at 14:10
  • 1
    wavread samples a dataset. easily probable that this is the source of the differences Commented Sep 25, 2012 at 14:10
  • @AK4749 So which dataset is correct? I.e. I'm trying to do the project in C++ and matching it against what I get in C++.. The output in the variable editor is the exact same as I have in C++ however, it is different to the one in the cmd window. Thanks :) Commented Sep 25, 2012 at 14:12
  • 3
    are you sure this isn't a scrolling issue? Meaning that the top value in the command window ISN'T index 1? Commented Sep 25, 2012 at 14:12
  • 1
    I think @slayton is right. I would check under File>Preferences>Command Window to see how many lines are in the scroll buffer. Mine is set to 5,000, so this variable (length 57884) would definitely fill past that. Commented Sep 25, 2012 at 14:18

1 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.