MATLAB: How to find the firs numeric data in varargin

functioninputnumbernumericvarargin

How to find the firs numeric data in varargin?

Best Answer

If the below code is not the answer you want, please elaborate on your question.
function MrM(varargin)
firstnum=find(cellfun(@(s)isnumeric(s),varargin),1,'first');
disp(firstnum);
end