%% Convert Character Vector to Function Handle
% Convert the character vector 'ones' to a function handle, and call the ones function using the handle.

c = 'ones';
fh = str2func(c)

fh(1,5)

% Copyright 2012 The MathWorks, Inc.