Why can't I instanciate, create, construct class objects via cellfun?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Walter Roberson
le 8 Avr 2014
Use 'uniform', 0 for cellfun. If you need to convert to a matrix afterwards you can cell2mat()
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Structures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!