Why do functions in MATLAB 7.8 (R2009a) execute faster than methods of objects for the same computation?

1 view (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 Dec 2012
The ability to run methods of objects at the same speed as the functions is not available in MATLAB 7.8 (R2009a). This is because method calls and object property accesses have overhead which slow the execution of the class method call.
As a workaround, perform the operation in a normal function instead of in a object method call.

More Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Products


Release

R2009a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!