I don't know why 'mean' function couldn't run with 'double'

조회 수: 6 (최근 30일)
Jiyeon Kim
Jiyeon Kim 2018년 12월 21일
댓글: madhan ravi 2018년 12월 21일
I want to use 'mean' function in a code, but it results the error:Undefined function 'mean' for input arguments of type 'double'.
So I checked the funtion with the example on matlab website (https://www.mathworks.com/help/matlab/ref/mean.html)
>> A = [0 1 1; 2 3 2; 1 3 2; 4 2 2]
A =
0 1 1
2 3 2
1 3 2
4 2 2
>> a=mean(A)
Undefined function 'mean' for input arguments of type 'double'.
It shows the same error message, even I use the example on Matlab website.
I don't know what's wrong with it..

채택된 답변

madhan ravi
madhan ravi 2018년 12월 21일
편집: madhan ravi 2018년 12월 21일
Maybe the case that you have a file named mean.m if so change it's name or delete it .
which mean -all % what shows up?
  댓글 수: 7
Jiyeon Kim
Jiyeon Kim 2018년 12월 21일
Okay Thank you so much :)
madhan ravi
madhan ravi 2018년 12월 21일
Anytime :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by