how to change name of simulink blocks through matlab code
조회 수: 8 (최근 30일)
표시 이전 댓글
exl = actxserver('excel.application');
exlWkbk = exl.workbooks.Add;
new1= readtable('names.xlsx');
list_of_block_in_subsystem = find_system('Auto_Script','type', 'block');
for i = 1:length(list_of_block_in_subsystem)
old_name = get_param(list_of_block_in_subsystem{i},'Name');
new_name = new1.aa{i};
set_param(list_of_block_in_subsystem{i}, 'Name', new_name);
end
%code is not running completely only half of the names changes and also code is executing only ones.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!