Problem with the mean function
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mr LE
am 31 Jan. 2015
Kommentiert: Star Strider
am 31 Jan. 2015
Hi,
I have a problem with the mean function. I want to have the mean of a matrix A (129x1)
but the function : c= mean (A) doesn't work.
How could I solve this Problem ?
2 Kommentare
Akzeptierte Antwort
Star Strider
am 31 Jan. 2015
Bearbeitet: Star Strider
am 31 Jan. 2015
In the Command Window, type:
which mean -all
I suspect it will result with the first line being:
mean is a variable.
If it does, you will have to rename whatever your ‘mean’ variable is. (This is the most common problem when built-in functions abruptly fail to work correctly.)
EDIT —
You didn’t mention that ‘A’ was a cell. You can convert it easily to a double array by using the ‘{:}’ notation:
A = {rand(10,1)};
c = mean(A{:});
7 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!