Saving filter coefficients from the Filter Visualization tool
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 4 de Mayo de 2023
Respondida: MathWorks Support Team
el 4 de Mayo de 2023
I have opened a filter in the Filter Visualization tool. I can view the filter coefficients but am not able to save the coefficients to a file. How can I accomplish this workflow in R2023a?
Respuesta aceptada
MathWorks Support Team
el 4 de Mayo de 2023
As of R2023a, the Filter Visualization tool does not directly support exporting the filter coefficients.
As a workaround, you can use the ‘coeffs’ function to store the coefficients to a workspace variable and then use the ‘writematrix’ function to write the stored coefficients to a file.
As an example, suppose you want to save the coefficients of the shipped filter 'dsp.CICCompensationInterpolator'. The filter coefficients can then be saved to a file using following code snippet:
storedCoefficients = coeffs(dsp.CICCompensationInterpolator); %extract the filter coefficients as structure
writematrix(storedCoefficients.Numerator,'CoefficientData.txt'); %save the numerator coefficients to a text file
This code snippet will save the filter coefficients in a text file ‘CoefficientData.txt’ (you can choose any file formats as per your requirement). Please refer to the following documentation on ‘writematrix’ function for more information:
For more information on the ‘coeffs’ function, please refer to the following documentation:
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Filter Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!