|
楼主 |
发表于 2006-3-31 09:27
|
显示全部楼层
[求助]请教数组求导的问题
<P>A=[1 0.3 0.5 1];B=[0.6 0.5 0.4 0.7];C=[];<BR>for i=(1:length(A))<BR> C=[C,abs(B.^2/(1-B.^2))];<BR> l=ceil(max(C));<BR> n=length(A)*(l+1)-1;<BR>end;l,n<BR>product=1,y2=[],<BR>syms b;<BR>for i=1:length(A) <BR> y1=A(i).*((B(i)-b).^l);<BR> for j=1:length(A)<BR> if (j~=i)<BR> product=product.*((1-b.*B(j)).^(l+1)); <BR> y2=[y2,y1.*product];<BR> end<BR> end;y2<BR> end<BR> sun=0; F=[]; <BR>for i=1:length(A), m=0:n <BR> f=diff(y2(i),b,m);<BR> sum=sum+f;<BR> end;sum<BR> for b=0;<BR> F=[F,(1/prod(m)*sum)]; <BR> end;F<BR><BR><BR>出现以下错误??? ??? Error using ==> sym/diff<BR>Do not recognize argument number 3</P>
<P>Error in ==> E:\study\filter\laguerrenew1.m<BR>On line 20 ==> f=diff(y2(i),b,m);</P> |
|