View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
cellfunfun

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 1.25 KB File ID: #42180 Version: 1.0

cellfunfun

by

 

cellfunfun is identical to cellfun but takes care for uniformOutput parameter

| Watch this File

File Information
Description

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] []

MATLAB release MATLAB 8.0 (R2012b)
Other requirements none
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us