代码拉取完成,页面将自动刷新
同步操作将从 ShiboJiang/toto 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%------------------------------------------------------------------------------
% Simulink scrip for show port names.
% MATLAB version: R2017a
% Author : Shibo Jiang
% Time : 2017/11/29
% Version : 0.2
% Instructions : the blocks include Inport,Outport - 0.1
% Fix bugs - 0.2
%------------------------------------------------------------------------------
function show_port_name_result = show_name_ports()
paraModel = bdroot;
% Original matalb version is R2017a
% 检查Matlab版本是否为R202017a
CorrectVersion_win = '9.2.0.556344 (R2017a)'; % windows
CorrectVersion_linux = '9.2.0.538062 (R2017a)'; % linux
CurrentVersion = version;
if 1 ~= bitor(strcmp(CorrectVersion_win, CurrentVersion),...
strcmp(CorrectVersion_linux, CurrentVersion))
warning('Matlab version mismatch, this scrip should be used for Matlab R2017a');
end
% Original environment character encoding: GBK
% 脚本编码环境是否为GBK
% if ~strcmpi(get_param(0, 'CharacterEncoding'), 'GBK')
% warning('Simulink:EncodingUnMatched', 'The target...
% character encoding (%s) is different from the original (%s).',...
% get_param(0, 'CharacterEncoding'), 'GBK');
% end
% find inport blocks
Inport_blocks = find_system(paraModel,'FindAll','on',...
'BlockType','Inport');
% find Outport blocks
Outport_blocks = find_system(paraModel,'FindAll','on',...
'BlockType','Outport');
% all blocks which need hiding names
show_name_ports = [Inport_blocks',Outport_blocks'];
length_show_name_line = length(show_name_ports);
for i = 1:length_show_name_line
try
set_param(show_name_ports(i),'ShowName','on')
catch
% do nothing
end
end
% report configurate results
show_port_name_result = 'show port name successful';
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。