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!