How to get the coefficients from FDA Tool block (Simulink) using Matlab Command?

조회 수: 5 (최근 30일)
Is it possible to extract the coefficients from FDA Tool block (Simulink)to Matlab workspace using Matlab Command? For a special reason, I would not like to use Menu => File => Export. I can use get_param to get value from most of blocks but not FDA Tool.
Also, is it possible to set the parameters of the FDA Tool block (Simulink) from Matlab. For example, - Response Type = Low Pass - Design Method = FIR - Window - Filter Order = 10 - Options = Window = Hann - Frequency Spec = Fs = 48k, Fc = 10k ?
Again, set_param would do in most blocks but FDA, I could not.
  댓글 수: 3
Raymond Le
Raymond Le 2011년 4월 15일
A block in Signal Processing Blocksets, used for FIlter Design
Fangjun Jiang
Fangjun Jiang 2011년 4월 15일
I can't find it. What version of Matlab are you using? What is the full name of the block?

댓글을 달려면 로그인하십시오.

채택된 답변

Rob Graessle
Rob Graessle 2011년 4월 15일
If you right-click on the Digital Filter Design block (FDATool block) and 'Look Under Mask', you will see that the block contains a Digital Filter block. Do a get_param(gcb, 'ObjectParameters') on this block and you will be able to see the coefficients.
I do not think it is possible to use set_param to change the FDATool values from MATLAB.
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2011년 4월 15일
To add to Rob's answer: fdatool is supposed to be an interactive MATLAB GUI, which is basically invoked by the FDATool block. Since the GUI itself does not directly correspond to a block, you cannot perform set_param and get_param on it. However, you can generate MATLAB code from the given parameters (File->Generate MATLAB Code), and then change parameters there to change filter coefficients.
Raymond Le
Raymond Le 2011년 4월 15일
Thank you very much. Working with Matlab/Simulink for period of time but I still do not know this under mask.
By the way, the returns value is string, I can use str2num to convert the answer to vector, however, it rounds the answer to certain digits. I could use format long or longeng to fix but still not all digits are showed.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by