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!