An open exchange for the MATLAB and Simulink user community |
Hosted by The MathWorks |
|
| Related Topics |
| New Products | Support | Documentation | Training | Webinars | Jobs | Newsletters |
| Problems? Suggestions? Contact us at files@mathworks.com | © 1994-2008 The MathWorks, Inc. Trademarks Privacy Policy |
Nice, but there seems to be a bug in the included files. On line 19 you look for a (presumed) property countSelf, which doesn’t exist. Adding countSelf = false; (or countSelf=true;) in the property section fixes this.
For an alternative implementation, see:
http://blogs.mathworks.com/steve/2008/05/20/lookup-tables-conway-game-life/
Steve used binary lookup tables and the image processing toolbox for a “vectorized” approach which would presumably be faster.
Thank you. I must have “cleaned up” my code accidentally. Problem has been solved and updated in the File Exchange!
Doug
Doug,
A very nice and timely blog, since I’m just starting the learning of MatLab OOP this week. I would like to mention one glaring hole in the documentation, etc. which is that there are virtually no examples of classes where the methods are not contained in the classdef file. The project which I’m now applying OOP to has something like 30 subfunctions with about 8,000 lines of code, so I don’t want to try to stick it all in one monster file. Likewise I was most unsatisfied with the documentation on packages. Overall, I think it will take me a while to get used to thinking in OOP, but I see potential benefits, and this blog did provide some help in terms of a framework.
Thanks,
Dan