?? find_blocksets.m
字號(hào):
function [blocksets]=find_blocksets()
% Open the model of interest before running this file.
%
% This function will output what blocksets are used in the model you
% currently have selected.
%
% J. Kluza 10/30/03
clear
blocks=find_system(gcs, 'followlinks', 'on');
for i=1:length(blocks)
if not(isequal('block_diagram',char(get_param(blocks(i), 'type'))))
sources(i)=get_param(blocks(i), 'referenceblock');
if isempty(sources(i))
sources(i)=get_param(blocks{i}, 'ancestorblock');
end
if not(isequal(sources{i}, ''))
allblocksets(i)=cellstr(strtok(sources{i}, '/')) ;
end
end
end
if (isequal(sources{:}, ''))
disp('No blocksets were found.')
else
%disp('The blocksets used in this model are: ')
blocksets=unique(cellstr(strvcat(allblocksets{:})));
end
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -