The Bridge pattern is used when we need to decouple an abstraction from its implementation so that the two can vary independently. In Matlab, this can be implemented as follows:
main.m343 chars17 linesmain.m94 chars6 lines
BridgeInterface:main.m347 chars16 linesmain.m307 chars8 lines
This way, if we need to change an implementation, we can do it without affecting the abstraction code.
gistlibby LogSnag