相关代码 |
|
例6-62 使用median函数求中位数。 >> A=linspace(1,9,9) A = 1 2 3 4 5 6 7 8 9 >> a=median(A) a = 5 >> >> B=linspace(1,10,10) B = 1 2 3 4 5 6 7 8 9 10 >> a=median(B) a = 5.5000 >> >> B=magic(4) B = 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1 >> b=median(B) b = 7 9 8 10 >>