필터 지우기
필터 지우기

How to use 'set_param' command for Sample Time parameter in Bernoulli Binary Generator?

조회 수: 3 (최근 30일)
I am doing my final year project on GUI for WiMAX simulink.So I used Bernoulli generator as the signal input of my simulink.I want to change its Sample Time using a code.I used this code;
set_param([my_model '/Bernoulli Binary Generator'],'Sample Time','value')
but this is not working and give an error that there is no parameter called sample time.please help. Thanks.

채택된 답변

Rob Graessle
Rob Graessle 2011년 3월 5일
The correct parameter name is 'Ts'.
You can view a list of the block's parameters like this:
get_param([my_model '/Bernoulli Binary Generator'],'ObjectParameters')
  댓글 수: 3
Guy Rouleau
Guy Rouleau 2011년 3월 6일
This is very likely because there is a problem with your string. Try splitting your line in pieces:
blk = [ 'make your string here... '];
param_value = [ 'you see what I mean...']
set_param(blk,'Ts',param_value)
It should help identify which part of your script is wrong
Pasindu Wijesekara
Pasindu Wijesekara 2011년 3월 9일
Thank you for your help and it was worked that 'Ts' as the parameter name.The problem was in my code.
thank you.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by