Using wildcards in library ForwardingTable
显示 更早的评论
Is there a way to use "wildcards" in a library's ForwardingTable.
For example, say I reorganize a library by moving a set of blocks from one subsytem to another (or move them up a level eliminating a subsystem). It is cumbersome to add a ForwardingTable entry for each block instead of a wildcard or pattern match.
Example, instead of:
set_param('MyLib', 'ForwardingTable', {{'MyLib/SubSystem/Block1', 'MyLib/Block1'} {'MyLib/SubSystem/Block2', 'MyLib/Block2'} {'MyLib/SubSystem/Block3', 'MyLib/Block3'}})
it would be nice to be able to use something like the following (which doesn't actually work):
set_param('MyLib', 'ForwardingTable', {{'MyLib/SubSystem/*', 'MyLib/*'}})
回答(1 个)
Fangjun Jiang
2011-11-3
I guess not. That's just the way 'ForwardingTable' is designed to do.
If you don't want to duplicate the data entry, you can do a little processing to achieve the goal.
Blocks={'Block1','Block2','Block3'}';
OldLib='MyLib/SubSystem/'
NewLib='MyLib/'
ForwardingTable=[strcat(OldLib,Blocks),strcat(NewLib,Blocks)];
ForwardingTable=mat2cell(ForwardingTable,ones(size(Blocks)),2)
类别
在 帮助中心 和 File Exchange 中查找有关 Multicore Processor Targets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!