你可以编写一个函数程序,用来实现这个功能! function B=sx(A,c) if nargin==1 [m,n]=size(A); if m==1&n==1 B=A; else max1=max(A(1,:)); min1=min(A(1,:)); ave=mean(A(1,:)); mid=median(A(1,:)); B=[max1,min1,ave,mid]; end elseif nargin==2 max1=max(A(c,:)); min1=min(A(c,:)); ave=mean(A(c,:)); mid=median(A(c,:)); B=[max1,min1,ave,mid]; end