How come I keep getting this error message?
1 view (last 30 days)
Show older comments
6 Comments
Image Analyst
on 30 Apr 2014
The other data-clipped, sound file question was http://www.mathworks.com/matlabcentral/answers/127672-how-come-i-keep-getting-data-clipped-in-my-command-window, but if you say that they're different, that's okay.
Star Strider
on 30 Apr 2014
Edited: Star Strider
on 30 Apr 2014
The ‘song’ variable magically appears as an argument to var in line 35, and again in 39 and 40.
FWIW, we seem to have successfully resolved the clipping problem in How come I keep getting "Data Clipped" in my Command Window?.
The solution there was to scale it by:
s = s/max(abs(x)+1E-4);
Nothing less than 1E-4 works for some reason.
Answers (1)
Walter Roberson
on 30 Apr 2014
You will get that error if song+noise is less than -1, or is greater than or equal to +1. You need to either clip the data or rescale it.
2 Comments
Walter Roberson
on 30 Apr 2014
Geoff's comment about using "fur" was a good point; I was looking at the warning message and thinking it corresponded to the wavwrite() that is on the screen. The hidden wavewrite() has the same problem, though: the values in fur(), being constructed from sin(), sometimes assume the value 1.0 which is out of range.
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!