Problem with mean function
Show older comments
If I try to calculate a simple mean say A=[1,2,3]; M=mean(A) I get an error message saying 'Undefined function 'mean' for input arguments of type 'double' I checked if I have overwritten mean with which mean -all and get the following answer:
C:\Program Files\MATLAB\R2016A\Research\toolbox\matlab\timefun\@duration\mean.m % duration method
C:\Program Files\MATLAB\R2016A\Research\toolbox\matlab\timefun\@datetime\mean.m % datetime method
C:\Program Files\MATLAB\R2016A\Research\toolbox\distcomp\parallel\@codistributed\mean.m % codistributed method
C:\Program Files\MATLAB\R2016A\Research\toolbox\distcomp\gpu\@gpuArray\mean.m % gpuArray method
C:\Program Files\MATLAB\R2016A\Research\toolbox\stats\stats\@ProbDistUnivParam\mean.m % ProbDistUnivParam method
C:\Program Files\MATLAB\R2016A\Research\toolbox\matlab\timeseries\@timeseries\mean.m % timeseries method
Accepted Answer
More Answers (1)
RobF
on 18 Jul 2018
Two commands that might always help when having path issues are the following:
>> restoredefaultpath
and
>> rehash
respectively
>> rehash path
>> rehash toolbox
>> rehash toolboxcache
Just enter them at your Matlab command prompt and check, if the functions are now available. More information:
>> doc restoredefaultpath
>> doc rehash
1 Comment
carsten
on 18 Jul 2018
The command
>> rehash toolbox
worked for me. Many thanks!!!
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!