fork download
  1. @(s)char(arrayfun(@(n)repmat('*',1,n),diff([0 find([s 32]==32)])-1,'un',0))
  2.  
  3. ans('This is an example histogram of word length')
Success #stdin #stdout 0.19s 65048KB
stdin
Standard input is empty
stdout
ans =

@(s) char (arrayfun (@(n) repmat ('*', 1, n), diff ([0, find([s, 32] == 32)]) - 1, 'un', 0))

ans =

****     
**       
**       
*******  
*********
**       
****     
******