Code covered by the BSD License  

Highlights from
Performance in object-oriented matlab code

image thumbnail

Performance in object-oriented matlab code

by

 

16 Apr 2013 (Updated )

A very simple example to demonstrate an observation of mine regarding the use of classes in matlab.

C1_h
classdef C1_h < handle
    % Written by Dimitrios Korkinof
    % Imperial College London
    % http://www.korkinof.com
    
    properties
        large_mat;
        k;
    end
    
    methods
        function o = C1_h(N)
            o.large_mat = zeros(N,N);
        end
        function o = modify_one(o,i,j)
            o.large_mat(i,j) = rand(1,1); 
        end
    end
    
end

Contact us