Rank: 16099 based on 0 downloads (last 30 days) and 0 file submitted
photo

Kun-Chul

E-mail
Company/University
Agency for Defense Development, Korea

Personal Profile:
Professional Interests:
Modeling and Simulation

 

Watch this Author's files

 

Comments and Ratings by Kun-Chul View all
Updated File Comments Rating
18 Sep 2009 Design Pattern: Iterator (Behavioural) A MATLABĀ® OOP implementation of the Iterator Behavioural Design Pattern Author: Bobby Nedelkovski

good implementation for the oo design principle: polymorphism!!

I also used cell array for the objects container ( list container)
for the objects from different classes (but, those different classes inhereted from a same super class)

cell list class is more useful and powerful for the object list container.

however, try this code for the 'locationOf' method (much faster):
locs = find(cellfun('isclass',obj.list,class(elt))
, since cellfun is slow when suing function handle
(but, know the limitation of the code above:
if obj.list contains the object from a same class, then 'find' function returns matching index array.

I hope Mathworks to develop cell array vectorization for matlab oop

for example, objList is cell array contain

find(objList==obj) %this function does not support for cell array

while find(objArray==obj) is supported when objArray is array container of the object from a same class.

18 Sep 2009 Data Structure: A Cell Array List Container Provides a useful 1D container for storing an ordered heterogeneous set of elements Author: Bobby Nedelkovski

good implementation for the oo design principle: polymorphism!!

I also used cell array for the objects container ( list container)
for the objects from different classes (but, those different classes inhereted from a same super class)

cell list class is more useful and powerful for the object list container.

however, try this code for the 'locationOf' method (much faster):
locs = find(cellfun('isclass',obj.list,class(elt))
, since cellfun is slow when suing function handle
(but, know the limitation of the code above:
if obj.list contains the object from a same class, then 'find' function returns matching index array.

I hope Mathworks to develop cell array vectorization for matlab oop

for example, objList is cell array contain

find(objList==obj) %this function does not support for cell array

while find(objArray==obj) is supported when objArray is array container of the object from a same class.

Contact us