Code duplication

10 次查看(过去 30 天)
Andreas
Andreas 2012-5-7
Hi People,
I'm from the Java / OO - area and I currently work on a Simulink-Model that is full of code duplication.
For example there are some equations for movements in 3 directions. In the current implementation these are 3 copies of the same code (which are went through parallel). I find that really ugly!
Is there an elegant way to surpass such a thing? Maybe like replacing those copies by a reference to a special block?
Greetings, Andy
  2 个评论
TAB
TAB 2012-5-7
Create the Libray block for such group of code which are repeated.
Kaustubha Govind
Kaustubha Govind 2012-5-7
TAB: Perhaps you should post this as an answer, because creating a library is the right solution!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programmatic Model Editing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by