File Exchange

image thumbnail

Find & Replace System

version 1.0 (2.27 KB) by

Searches any block/annotation/signal property in a model and replaces with the new value.

1 Download

Updated

View License

This function "find_replace_system" will search and replace almost any
block/annotation/signal property in Simulink.
Only one property can be searched at a time, the value of the property
that is matched will be replaced with a new value.

Please refer the syntax and examples below.

Syntax:
  >>find_replace_system('<model name/subsystem name>','<property name>','<property value>','<replace value>','prompt')
  >>find_replace_system('<model name/subsystem name>','<property name>','<property value>','<replace value>')
      - 'prompt' is an optional keyword.

Example:
  >>find_replace_system('sldemo_autotrans','Gain','60/5280','60/1000','prompt')
  >>find_replace_system('sldemo_autotrans/Vehicle','Name','Speed','Force','prompt')
  >>find_replace_system('sldemo_autotrans','ForegroundColor','Red','Blue')
  >>find_replace_system('sldemo_clutch','Position',[150 306 185 354],[140 296 195 364],'prompt')
  >>find_replace_system(gcs,'SampleTime','-1','0.1','prompt')

Please share your comments and suggestions.

Comments and Ratings (0)

MATLAB Release
MATLAB 7.11 (R2010b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video