Stuart’s MATLAB Videos

Hide implementation in functions 1

Posted by Doug Hull,

I am working on a large scale project that involves many broad topics like loading data, and visualizing. Both of these are important, but I needed to work on the visualizing immediately. I knew I would be passing around a large dataset into lots of different functions. Eventually, I would want a very efficient method for loading the data. However, to get me to the point where I could develop the visuzation I simply loaded the data in from a .MAT file. Eventually I would change to something better than loading from a file. Using a function to hide where the data comes from allows me to switch implementation easily in the future.

1 CommentsOldest to Newest

This video is so useful!! – it is such a simple concept but when you start building code that does alot of things and client needs change around this is so important. It is good reminder to go back to architecture and planning which can save time and allow for better code reuse in the long run, it is something I have struggled with in the “just get it done’ world.

Add A Comment

What is 1 + 9?

Preview: hide

These postings are the author's and don't necessarily represent the opinions of MathWorks.