Extendable, but bacward compatible M code.
Mostrar comentarios más antiguos
What is the best way of creating M code that can easily be extended, but will remain backward compatible? When creating code, it is beneficial to try to predict future use along with the present use, e.g., which parameters could potentially be of interest to the user.?
It is not possible to predict all parameters that potentially will be changed by future users. How can my M code deal with this problem and still be simple and easy to read?
One solution is to include a struct as parameter to the function. This struct can be extended by new fields, if required.
Respuesta aceptada
Más respuestas (1)
Jesper
el 28 de Feb. de 2011
0 votos
Categorías
Más información sobre Variables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!