Finding Commented blocks programmatically

37 visualizaciones (últimos 30 días)
Shankar Santhosh
Shankar Santhosh el 5 de Ag. de 2020
Comentada: maiaL el 6 de Ag. de 2020
Though find_system can include the commented blocks along with other blocks, is there any way in find_system or get_param to find only the blocks that were commented? (Both Commented-out or commented-through)
cmtd = find_system(model,'FollowLinks','on','LookUnderMasks','all','IncludeCommented','on')
I was trying to delete the commented blocks in a model.

Respuesta aceptada

maiaL
maiaL el 5 de Ag. de 2020
what about adding 'Commented','on' and 'Commented','through' to the find_system() arguments?
  2 comentarios
Shankar Santhosh
Shankar Santhosh el 6 de Ag. de 2020
This thing worked if I use like below. Thanks.
cmtd = find_system(model,'FollowLinks','on','LookUnderMasks','all','IncludeCommented','on','Commented','on')
However I am wondering if there is any way to have a single find_system for both 'Commented', 'on' & 'through'.
maiaL
maiaL el 6 de Ag. de 2020
I'm not aware that's possible. Perhaps you could run a find_system for each, and then use union(cmtd1,cmtd2) to get a single cell.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by