Wavelet Signal Denoiser approximation save

4 次查看(过去 30 天)
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.

回答(2 个)

Akshat
Akshat 2023-11-2
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

Rangesh
Rangesh 2023-11-3
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:
  1. To obtain the approximate signal using the wavelet denoising function: https://www.mathworks.com/matlabcentral/answers/475506-how-to-get-the-approximation-from-wdenoise
  2. 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 .
  3.  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:
I hope this resolves your query.
Thanks,
Rangesh

类别

Help CenterFile Exchange 中查找有关 Denoising 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by