I have the following array in Matlab:
x = [15.618, 6.758, 4.273, 6.328, 94.995, 3.966, 6.334, 21.821, 5.402]
If I call mean(x)
it works but when I call median(x)
I'm getting the following error message:
Subscript indices must either be real positive integers or logicals.
Does somebody see the reason for it?