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/*'}})

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 3 Nov. 2011

0 Stimmen

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)

Kategorien

Mehr zu Multicore Processor Targets finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 3 Nov. 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by