How to get Simulink block name
    조회 수: 28 (최근 30일)
  
       이전 댓글 표시
    
I have this Simulink sample model

I would like to get the block names (Duty cycle D, Input voltage, PWM etc.).
I know that there is Simulink command like get_param(handle,property); which possibly can return that name but what is the name of the param itself?
댓글 수: 0
답변 (1개)
  Daniel
    
 2023년 8월 4일
        As documented in the get_param documentation, BlockPaths = get_param(gcs,'blocks') will return the list of blocks at the level of gcs. Or you can provide the name of your system directly rather than gcs, e.g. 'mymodel' or 'mymodel/path/to/mysubsystem'.
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

