MATLAB Answers

K E
0

How to extract user entered properties from Simulink Lowpass Filter block?

K E
さんによって質問されました 2015 年 10 月 21 日
最新アクティビティ K E
さんによって コメントされました 2015 年 10 月 28 日
My colleague has a simulink model ('DataFiltering') which contains a block called 'Lowpass' where the user can enter values for passband frequency and stopband frequency. From the Matlab command line, I would like to extract those user-entered values (for example, 10Hz) and assign them to a variable in the Matlab workspace. I know I need to use get_params to do it, but that returns a list of 182 parameters and none seem to contain the user-entered values. How can I extract the passband and stopband frequency values?

  0 件のコメント

サインイン to comment.

タグ

製品

1 件の回答

Answer by @Johannes on 23 Oct 2015
 Accepted Answer

Hello, you can try to extrcat the Dialog Parameters of your Lowpass block. Type the following command in your Matlab Command Window.
p = get_param('DataFiltering/Lowpass','DialogParameters')
This will return a list with the parameters of your choosen block. Now you should find your required parameters and you can directly extract them.
More informations about get_param:
Best Regards, Johannes

  1 件のコメント

Thanks. All a little unfamiliar to a primary Matlab user so I appreciate it!

サインイン to comment.



Translated by