필터 지우기
필터 지우기

Why can't I instanciate, create, construct class objects via cellfun?

조회 수: 4 (최근 30일)
Roland
Roland 2014년 4월 8일
댓글: Roland 2014년 4월 9일
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.

채택된 답변

Walter Roberson
Walter Roberson 2014년 4월 8일
Use 'uniform', 0 for cellfun. If you need to convert to a matrix afterwards you can cell2mat()

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by