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!