为什么matlab里面调用function以后结果不对啊??请大家来帮忙~~谢谢...答:function f=fval(k,x,v,w,p,n)if nargin==2 v=50;w=[30,25,18,15];p=[9,7,6,4];n=4;end;if nargin==3 w=[30,25,18,15];p=[9,7,6,4];n=4;end;if nargin==4 p=[9,7,6,4];n=4;end;if nargin==5 n=4;end;temp1=0;temp2=0;for h=1:n temp1=temp1+w...