I first entered the code
function k=mymedian(p)
Now I have to sort the vecotr and find out how to type it out so that I can receive the median of a vector.
Does anybody understand this problem?
you may also be interested in this if you dont want to use the standard matlab "sort" function.
http://www.mathhelpforum.com/math-he...or-matlab.html
Regards Elbarto
This will return a sorted matrix for "w". The orginal code uses the length function so not all values will be included will they?
@OP, when finding the median of the matrix, do you only want the median of the entire matrix or the median of each column like matlab calculates?
Regards Elbarto