Why can't I instanciate, create, construct class objects via cellfun?
조회 수: 4 (최근 30일)
이전 댓글 표시
This is an example class file:
classdef tmp < handle
properties
str
end
methods
function self = tmp(str)
self.str = str;
end
end
end
Then
cellfun(@tmp,{'a','b'})
produces the error:
Error using cellfun
tmp output type is not currently implemented.
댓글 수: 0
채택된 답변
Walter Roberson
2014년 4월 8일
Use 'uniform', 0 for cellfun. If you need to convert to a matrix afterwards you can cell2mat()
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Assembly에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!