I am interested to derive the discrete wavelet transform for noise reduction of more than 50,000 data points. I am using wmulden - matlab tool for wavelet tranform. Under this function, wfastmcd, an another function is being called which takes only 50000 data points at a time. It would be highly helpful if anyone suggests how to partition the data point to get the transform of entire data set or if there is any other matlab tool available for these kind of calculations.
Asked
Active
Viewed 175 times
1
-
Consider reading [this](http://stackoverflow.com/help/how-to-ask) to get best possible answers – brainkz Feb 02 '16 at 15:11
-
In my MATLAB there is no `wfastmod`, do you mean `wfastmcd`? – Matthias W. Feb 02 '16 at 15:15
-
Yes it is wfastmcd ! – Mambo Feb 02 '16 at 15:17
-
@MatthiasW. Do you have any idea about this function? – Mambo Feb 02 '16 at 15:21
-
@Mambo: not yet, sorry. Just tried to get help/ documentation about your function and thought about reformatting your post with `code tags`. – Matthias W. Feb 02 '16 at 15:26
-
Maybe you can solve your problem with the answer I provided? – Mauker Jan 15 '17 at 19:06
1 Answers
1
I've used a for
loop to solve that one.
First of all, I've calculated how many "steps" I needed to take on my signal, on a fixed size window of 50000, like:
MAX_SAMPLES = 50000;
% mySignalSize is the size of my samples vector.
steps = ceil(mySignalSize/MAX_SAMPLES);
After that, I've applied the wmulden
function "steps" times, checking every time if my step is not larger than the original signal vector size, like the following:
% Wavelet fields
level = 5;
wname = 'sym4';
tptr = 'sqtwolog';
sorh = 's';
npc_app = 'heur';
npc_fin = 'heur';
den_signal = zeros(mySignalSize,1);
for i=1:steps
if (i*MAX_SAMPLES) <= mySignalSize
x_den = wmulden(originalSignal( (((i-1) * MAX_SAMPLES) + 1) : (i*MAX_SAMPLES) ), level, wname, npc_app, npc_fin, tptr, sorh);
den_signal((((i-1) * MAX_SAMPLES) + 1):i*MAX_SAMPLES) = x_den;
else
old_step = (((i-1) * MAX_SAMPLES) + 1);
new_step = mySignalSize - old_step;
last_step = old_step + new_step;
x_den = wmulden(originalSignal( (((i-1) * MAX_SAMPLES) + 1) : last_step ), level, wname, npc_app, npc_fin, tptr, sorh);
den_signal((((i-1) * MAX_SAMPLES) + 1):last_step) = x_den;
end
end
That should do the trick.

Mauker
- 11,237
- 7
- 58
- 76
-
1i thing you should concatenate the `x_den` variables instead of replace them in every iteration... – kurokirasama Dec 12 '18 at 20:50