Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function x = ttsolve(h,y)
- n = size(h,1);
- l = floor(log2(n));
- m = 2^l;
- y1 = y(1:m);
- y2 = y(m+1:n);
- h1 = h(1:m);
- h2 = h(m+1:n);
- x1 = ttrecsolve(h1,y1,l);
- if (m < n)
- A = zeros(n-m,m);
- for i=1:m
- A(:,i) = h(m-i+2:n-i+1);
- end
- x2 = ttsolve(h2,y2-A*x1);
- x = [x1;x2];
- else
- x = x1;
- end
- end
Add Comment
Please, Sign In to add comment