MATLAB: Hey can someone have a look at this for me

descriptive statsMATLAB and Simulink Student Suiteoverwriting built-in function name

I'm trying to writing a function that will return some properties of a descriptive statistic. When I run, I get an error message which reads "Undefined function 'summary' for input arguments of type 'double'". Here is the function:
function results=summary(array)
results.meth = 'summary';
results.nobs = nobs(array);
results.mean= mean(array);
results.se=sem(array);
results.count=numel(array);
results.name=gname(array);
results.std=std(array);
results.var=var(array);
results.min=min(array);
results.max=max(array);
results.range=range(array);
results.skewness=skewness(array);
results.CI=meanci(array);
results.PI= predci(array);

Best Answer

Hi,
summary is a predefined Matlab function which works on tables. This causes problems. Choose another name for your function.
Change
function results=summary(array)
to for example:
function results=summarize(array)
Best regards
Stephan