views:

160

answers:

1

hi guys

does anybody knows hot to set the parameters of a from wave device block in a simulink model? i.e. i need to set the "samples per frame" parameter. it must be something like ('Model Name/ From Wave Device','Samples Per Frame',1024) ... but it doesnt work like this. is it even possible to set the parameters of this block???

globe

+1  A: 

Most Simulink blocks use the dialog prompt as the parameter name, but without the spaces. So in this case, you would use,

>> set_param('model/blockName','SamplesPerFrame','1024');

Also, since the block accepts a workspace variable as the value, you should set it as a string, so use '1024', not 1024. One other tip is to use Tab completion, so you could have typed,

>> set_param('model/blockName','S[tab]

and this would have shown you a list of possible parameters that start with S.

MikeT
dear Mike!THANK YOU VERY VERY VERY MUCH!i have been looking for this for a long time yesterday. i have tried so many combinations, but never the one with " '1024' ". and i also didnt find anything about this in the net ... once again thank you!
No problem. I'm glad you got it working.
MikeT