Can not envelope my data
2 次查看(过去 30 天)
显示 更早的评论
I was looking to envelope my data so I can get the peaks and do some FFT on the data but when I go to envelope my signal I get an error
**Error using envelope (line 63)
Expected input to be one of
these types:
single, double
Instead its type was int16.
My array is 1x 2688 int 16
I am not sure what int 16 means or how to get around this>
Any help would be appreciated.
0 个评论
采纳的回答
Star Strider
2022-8-29
2 个评论
Star Strider
2022-8-29
编辑:Star Strider
2022-8-29
My pleasure!
That is complicated to explain, so I will defer instead to the documentation on Numeric Types and specifically here, Integers. The int16 numeirc type is a 16-bit signed integer, meaning that the first bit is a sign bit and the other 15 bits express the numeric value. So the range is:
int16_range = [intmin('int16') intmax('int16')]
while for unsigned 16-bit integers it would be:
uint16_range = [intmin('uint16') intmax('uint16')]
Double precision values are discussed in the documentation on Floating-Point Numbers. There are important concepts here that are necessary to understand in order to use them effectively. The most important of these (in my opinion) is that binary representations of decimal fractions (however not integer values that can, within the limits of their representation, be represented exactly) are always approximate. The easiest way to illustrate this in the context of decimal numbers is the difference between the fraction and its decimal equivalent, 0.333333333... since no matter how many places that is extended to, multiplying it by 3 will never exactly equal 1, only 0.999999999..., similarly discussed in some detail with respect to binary numeric representation in Why is 0.3 - 0.2 - 0.1 (or similar) not equal to zero?
This is a short discussion of a much broader topic, however I hope it will serve as an introduction.
EDIT — Corrected typographical error.
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!