function ModelPorts = LoadModelPorts(model) %LOADMODELPORT 此处显示有关此函数的摘要 % 此处显示详细说明 ModelPorts.Physical = get_phy_channels(model); ModelPorts.Software = get_sw_channels(model); end function channels = get_sw_channels(model) % 获取模型的软件信号注入接口 % 返回注入接口模型句柄 channels = find_system(model, 'FindAll', 'on', 'MaskType', 'InjectionChannel', 'InjectionType', 'Software'); end function channels = get_phy_channels(model) % 获取模型的物理信号注入接口 % 返回注入接口模型句柄 channels = find_system(model, 'FindAll', 'on', 'MaskType', 'InjectionChannel', 'InjectionType', 'Physical'); end