Using set_param on parameter 'ProdHWDeviceType'
Mostra commenti meno recenti
I need to use set_param on parameter 'ProdHWDeviceType' but it just doesn't work. I've tried it on other parameters and it works. Below is the code that doesn't work and the code that works.
WORKS: set_param(modelNames{i}, 'InlineParams', 'on') set_param(modelNames{i}, 'ArrayBoundsChecking', 'none') set_param(modelNames{i}, 'ModelReferenceNumInstancesAllowed', 'single')
DOESN'T WORK: set_param(modelNames(i), 'ProdHWDeviceType', 'Generic->Unspecified (assume 32-bit Generic)')
error: Invalid Simulink object specifier
From the documentation, 'Generic->Unspecified (assume 32-bit Generic)' is the string that needs to be fed in for the default values. But it just doesn't work. Bug in MATLAB?
Risposte (1)
Kaustubha Govind
il 23 Ago 2012
I think it's because you have a typo while indexing into the cell array modelNames. Instead of using modelNames{i}, you are using modelNames(i) - curly bracket vs. parentheses.
Try:
>> set_param(modelNames{i}, 'ProdHWDeviceType', 'Generic->Unspecified (assume 32-bit Generic)')
Categorie
Scopri di più su Programmatic Model Editing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!