matlab - How to write a function that accepts a cell array of strings and builds a vector of numbers of the same lenght -


i'm trying write function accepts cell array of strings , builds vector of numbers of same length. each item in output vector length of strings in each cell array. if please me or show me written example of appreciate much. i'm new matlab , have been working on getting work long time , cant on own. thank you.

a more succinct version of zellus's answer:

s = {'one', 'two', 'three'}; numbers = cellfun(@length, s) 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -