I know nothing about matlab so I'm no help there. Just a clarification for anyone else though, are you looking for those specific examples (1234,4321) or are you looking for something that will find ...
The singleton design pattern provides a global point of access to a single instance on an object. This pattern is particularly useful in MATLAB® for managing resources such as file handles, database ...