Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
grpstats

Subject: grpstats

From: Jessica

Date: 9 May, 2013 17:09:08

Message: 1 of 3

I recently reinstalled Matlab and now one of my codes does not work (it used to run without any errors). In particular, I am running this script:

[mean groupname N] = grpstats(AnalysisLatency,AnalysisGroup,{'mean','gname','numel'});

??? Undefined function or method 'grpstats' for input arguments of type ''cell'.

But, my variable is not a cell:

whos Analysis Latency
Name Size Bytes Class Attributes

  AnalysisLatency 192x1 1536 double

Subject: grpstats

From: Tom Lane

Date: 9 May, 2013 18:22:15

Message: 2 of 3

> [mean groupname N] =
> grpstats(AnalysisLatency,AnalysisGroup,{'mean','gname','numel'});
>
> ??? Undefined function or method 'grpstats' for input arguments of type
> ''cell'.

Type "which grpstats -all" and I suspect you will find grpstats is not on
your path. Type "ver" and I suspect you will find you don't have the
Statistics Toolbox in your new installation.

I agree the message you saw seems odd. MATLAB doesn't look only at the type
of the first input when it looks for a function or method. You have a cell
array of statistics names as your third input. If there had been a cell
method grpstats, it would have been used in preference to a plain function.

-- Tom

Subject: grpstats

From: Jessica

Date: 9 May, 2013 19:05:10

Message: 3 of 3

"Tom Lane" <tlane@mathworks.com> wrote in message <kmgpgn$fhs$1@newscl01ah.mathworks.com>...
> > [mean groupname N] =
> > grpstats(AnalysisLatency,AnalysisGroup,{'mean','gname','numel'});
> >
> > ??? Undefined function or method 'grpstats' for input arguments of type
> > ''cell'.
>
> Type "which grpstats -all" and I suspect you will find grpstats is not on
> your path. Type "ver" and I suspect you will find you don't have the
> Statistics Toolbox in your new installation.
>
> I agree the message you saw seems odd. MATLAB doesn't look only at the type
> of the first input when it looks for a function or method. You have a cell
> array of statistics names as your third input. If there had been a cell
> method grpstats, it would have been used in preference to a plain function.
>
> -- Tom

Thanks so much--- you were right that the reinstallation did not include the stats toolbox.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us