Using wildcards in library ForwardingTable
Show older comments
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/*'}})
Answers (1)
Fangjun Jiang
on 3 Nov 2011
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)
Categories
Find more on Multicore Processor Targets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!