Effacer les filtres
Effacer les filtres

how to acces blocks using iteration variable

2 vues (au cours des 30 derniers jours)
Stalin Samuel
Stalin Samuel le 12 Déc 2014
Commenté : Sujoy Paul le 17 Fév 2022
how to change this code in single line using for loop..
set_param('system/sub1','Commented','OFF') set_param('system/sub2','Commented','OFF') set_param('system/sub3','Commented','OFF') set_param('system/sub4','Commented','OFF') set_param('system/sub5','Commented','OFF') set_param('system/sub6','Commented','OFF')

Réponse acceptée

Orion
Orion le 12 Déc 2014
for i = 1:6
set_param(['system/sub' num2str(i)],'Commented','OFF');
end

Plus de réponses (0)

Catégories

En savoir plus sur Troubleshooting dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by