3
코드에 직접 들어가 봅시다. 두 가지 수업이 있습니다. 수퍼 클래스는 하위 클래스는MATLAB : parfor에서 수퍼 클래스 메서드 호출
classdef Child < Parent
methods
function this = Child()
this = [email protected]();
end
function say(this, message)
for i = 1
% This one works...
[email protected](this, message);
end
parfor i = 1
% ... but this one does not.
[email protected](this, message);
end
end
end
end
질문입니다
classdef Parent
methods
function this = Parent()
end
function say(this, message)
fprintf('%s\n', message);
end
end
end
입니다 : 어떻게 추가 방법을 도입하지 않고 초 루프를 작동하게하는? 현재로서는 "기본 클래스 메서드는 같은 이름의 하위 클래스 메서드에서만 명시 적으로 호출 할 수 있습니다."라는 오류가 발생합니다. 고맙습니다.
감사합니다, 이반