It is certainly not clear to me that this is convex. By all means, I would like to see a proof. If it is indeed convex, then your proof will likely serve as the beginning of an answer to your question, so it is a worthwhile exercise.
The function f(\nu)=\sum_i|\nu_i-median(\nu)| can be written as $$f(\nu)=\min_x g(x,\nu)$$ where g(x,\nu)=\sum_i|\nu_i-x|, which is jointly convex in x and \nu. I think this is what foucault means by nested minimization. If you look at Section 5.2 of the CVX user guide, it describes how you can define a function via incomplete specification. In your case, I think this should do the trick:
function cvx_optval = diff_med( x )
Now you can use diff_med within CVX, and it will recognize it as a convex function.
I’m very glad you found an answer. In fact, I’m going to add this function to CVX, and call it AVG_ABS_DEV_MED (average absolute deviation about the median). I’m also adding AVG_ABS_DEV (average absolute deviation, about the mean) for completeness.