Wavelet Signal Denoiser approximation save
2 views (last 30 days)
Show older comments
hello,
I use Wavelet Signal Denoiser app, and utilize to my experimental result.
but After the
load signal.txt %% load of my data
signal1 = wdenoise(signal,7, ...
'Wavelet', 'sym4', ...
'DenoisingMethod', 'Bayes', ...
'ThresholdRule', 'Median', ...
'NoiseEstimate', 'LevelIndependent');
command, but it is not save approximation value elsewhere as a txt file.
plz tell me the function to save the approximation value as a txt file.
thank you.
0 Comments
Answers (2)
Akshat
on 2 Nov 2023
Hi Daejin,
As per my understanding of your question, you are trying to save the output of the “wdenoise” function in the form of a text file.
You can achieve the above result by using the “writematrix” function, as the output of the “wdenoise” function is a matrix. Documentation for both the functions is here:
Your updated code will be something as follows:
load signal.txt %% load your data
signal1 = wdenoise(signal, 7, ...
'Wavelet', 'sym4', ...
'DenoisingMethod', 'Bayes', ...
'ThresholdRule', 'Median', ...
'NoiseEstimate', 'LevelIndependent');
% Save approximation values to a text file
writematrix('approximation_values.txt', signal1);
You can change the value of the “Delimiter” field as per your choice. By default it is a comma separated file.
Hope this helps!
Regards,
Akshat Wadhwa
0 Comments
Rangesh
on 3 Nov 2023
Hi Daejin,
I understand that your intention is to save the approximation of the denoised signal. Unfortunately, there is no straightforward approach to directly save the approximate signal using the Wavelet Signal Denoiser app.
Essentially, the app utilizes the denoising function and generates related plots. Therefore, to obtain the values, you can proceed with the following steps:
- To obtain the approximate signal using the wavelet denoising function: https://www.mathworks.com/matlabcentral/answers/475506-how-to-get-the-approximation-from-wdenoise
- Once you have obtained the approximate signal, you can create a table out of the approximate signal using MATLAB's table functionality. table: https://in.mathworks.com/help/matlab/ref/table.html .
- Now, you can write the table onto a text file: https://www.mathworks.com/help/matlab/import_export/write-to-delimited-data-files.html .
For a better understanding of the wavelet signal denoiser, you can refer to the following links:
- wdenoise: https://www.mathworks.com/help/wavelet/ref/wdenoise.html
- wavedec: :https://www.mathworks.com/help/wavelet/ref/wavedec.html
- waverec :https://www.mathworks.com/help/wavelet/ref/waverec.html
I hope this resolves your query.
Thanks,
Rangesh
0 Comments
See Also
Categories
Find more on Denoising 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!