Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- classdef MyClass < handle
- properties
- % big matrices
- M1; %sparse
- M2;
- M3;
- end %properties
- methods
- function obj = MyClass(...)
- ...
- obj.InitializeM1(...);
- obj.CreateM2(...);
- ...
- end
- function Heavy(obj)
- ....
- for i=1:N
- obj.M3(:,i) = obj.UseM1(obj.M2(:,i))
- end
- end % Heavy
- function out = UseM1(in)
- %....
- end % UseM2
- end % methods
- end % MyClass
- parfor i=1:N
- tmp(:,i) = UseM2(obj,obj.M2(:,i))
- end
- obj.M3 = tmp;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement