# I am implementing hilbert huang transform but i am getting an error in getspline function that the matrix dimensions are not generic.Please someone help .

4 ビュー (過去 30 日間)
GARIMA SOOD 2017 年 6 月 16 日

the code i am using is :
% Empiricial Mode Decomposition (Hilbert-Huang Transform) % imf = emd(x) % Func : findpeaks x = transpose(x(:)); imf = []; while ~ ismonotonic(x) x1 = x; sd = Inf; while (sd > 0.1) | ~ isimf(x1) s1 = getspline(x1); s2 = -getspline(-x1); x2 = x1-(s1+s2)/2;
sd = sum((x1-x2).^2)/sum(x1.^2);
x1 = x2;
end
imf{end+1} = x1;
x = x-x1;
end
imf{end+1} = x;
% FUNCTIONS
function u = ismonotonic(x)
u1 = length(findpeaks(x))*length(findpeaks(-x)); if u1 > 0, u = 0; else, u = 1; end
function u = isimf(x)
N = length(x); u1 = sum(x(1:N-1).*x(2:N) < 0); u2 = length(findpeaks(x))+length(findpeaks(-x)); if abs(u1-u2) > 1, u = 0; else, u = 1; end
function s = getspline(x)
N = length(x); p = findpeaks(x); s = spline([0 p N+1],[0 x(p) 0],1:N);
##### 1 件のコメント表示非表示 なし
Adam 2017 年 6 月 16 日

サインインしてコメントする。

### 回答 (1 件)

Sidharth Pancholi 2017 年 6 月 23 日
lol :P

サインインしてコメントする。

### カテゴリ

Find more on Hilbert and Walsh-Hadamard Transforms 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!