Why can't I see parameters when I use get_param?

6 views (last 30 days)
Hello all!
I need to get values from simulink blocks. In order to do that, I need to use get_param i.e get_param( sys, 'ParameterName') but, when I write "Value" for "ParameterName", I get "block(mask) does not have a parameter named 'Value'.
Ok. So I wanted to know, what are the parameter names for this block. I used, get_param(sys , 'ObjectParameters') -also I used 'DialogParameters'- but I did'nt get any parameter names. just theese;
[1x1 struct]
[1x1 struct]
[1x1 struct]
Note: I am working with different library other than default in simulink library.
Also, if it is any help; the block has 2 parameters when I double-click it on simulink; "Variable Name" and "Value" and these are linked to a .mat file. Like Variable Name = Example, Value = CAL.Example.dat and from the workspace when you open CAL.Example you can see several of parameters like name, data_unit, data... I need to get these data value exactly.
Thanks in advance, also sorry in advance I am new at matlab also new at here, I hope I didn't mess this up.

Accepted Answer

Burak Bayram
Burak Bayram on 13 Oct 2017
Okay I found it, but it does not make any sense for me right now.
I used get_param('sys/BlockPath', 'DialogParameters') : which gave me the exact paramaters for only that block. but all blocks of that type uses the same parameters so all is well.

More Answers (0)

Categories

Find more on Programmatic Model Editing 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!