필터 지우기
필터 지우기

when i want to modify the input number of certain component through script,error happens

조회 수: 1 (최근 30일)
if i replace num with real num, like 17, it works, any one who knows why?

채택된 답변

drummer
drummer 2023년 3월 24일
Please take a look here.
I'm not familiar with this function, but as you declared num before, try to call it without ' '.
set_param('text/BC1', 'Inputs', num);
Cheers
  댓글 수: 1
wenchao zhang
wenchao zhang 2023년 3월 25일
thanks for your suggestion, i try it but still not working, but when i update the command as following, it works well. (i do it with matlab 2020b)
set_param('text/BC1', 'Inputs', num2str(num));
NOTE:set_param('text/BC1', 'Inputs', num) can works in matlbR2018b

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by