cellfunfun

版本 1.0.0.0 (1.2 KB) 作者: Hanan Shteingart
cellfunfun is identical to cellfun but takes care for uniformOutput parameter
217.0 次下载
更新时间 2013/6/11

查看许可证

cellfunfun is identical to cellfun with one improvement: you don't need to add that annoying (...,'uniformOutput','false') in the end, if it is necessary. In case it is not necessary, the function operates as if 'uniformOutput','true'. You can also explicitly set 'uniformOutput' to the value you wish.

example:
>> a = {'abc','def'};
>> cellfun(@(x)findstr('a',x),a)
Error using cellfun
Non-scalar in Uniform output, at index 2, output 1.
Set 'UniformOutput' to false.
>> cellfunfun(@(x)findstr('a',x),a)

ans =

[1] []

引用格式

Hanan Shteingart (2024). cellfunfun (https://www.mathworks.com/matlabcentral/fileexchange/42180-cellfunfun), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Data Type Identification 的更多信息
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0