大神求救有关matlab 递推公式!function result=pintaun(theta,alpha)n_stop=fun_nstop(alpha);pi(1)=0;pi(2)=1;for n=3:n_stoppi(n)=(2*n-1)*cos(theta)*pi(n-1)/(n-1)-n*p1(n-2)/(n-1);tau(n)=n*cos(theta)*pi(n)-(n+1)*pi(n-1);end;pi(n)=pi(n-1);tau(n)=ta
来源:学生作业学帮网 编辑:学帮网 时间:2024/05/05 06:31:31
大神求救有关matlab 递推公式!
function result=pintaun(theta,alpha)
n_stop=fun_nstop(alpha);
pi(1)=0;
pi(2)=1;
for n=3:n_stop
pi(n)=(2*n-1)*cos(theta)*pi(n-1)/(n-1)-n*p1(n-2)/(n-1);
tau(n)=n*cos(theta)*pi(n)-(n+1)*pi(n-1);
end;
pi(n)=pi(n-1);
tau(n)=tau(n-1);
result=[pi(n),tau(n)];
我是菜鸟,这个程序为什么是错的啊?
(n_stop=fun_nstop(alpha);这个有子程序且无错)
matlab提示错误:
>> result=pintaun(0.5,5)?Undefined function or method 'p1' for input arguments of type 'double'.
Error in ==> pintaun at 6
pi(n)=(2*n-1)*cos(theta)*pi(n-1)/(n-1)-n*p1(n-2)/(n-1);
出错的地方电脑都告诉你了,就是这个
pi(n)=(2*n-1)*cos(theta)*pi(n-1)/(n-1)-n*p1(n-2)/(n-1);
这里面最后一项里的p1没有定义,要不就是你把pi输成了p1.
大神求救有关matlab 递推公式!function result=pintaun(theta,alpha)n_stop=fun_nstop(alpha);pi(1)=0;pi(2)=1;for n=3:n_stoppi(n)=(2*n-1)*cos(theta)*pi(n-1)/(n-1)-n*p1(n-2)/(n-1);tau(n)=n*cos(theta)*pi(n)-(n+1)*pi(n-1);end;pi(n)=pi(n-1);tau(n)=ta
高数求救!求高数帝!求不定积分∫(lnx)∧n dx的递推公式.
递推公式怎么推?
数列,递推公式:
递推公式
有关数学等差等比数列递推公式如何换成通项公式啊,急等~,
有关数学等差等比数列递推公式如何换成通项公式啊,急等~...
求大神编写一个matlab公式!
ku fu fu fu 可能和动漫有关
已知数列前五项1,9,73,585,4681,求通项公式,不是递推公式!求大神,谢谢
递推公式怎么求
数列递推公式是什么意思?
高中数学数列递推公式
求数列递推公式
怎么由递推公式求通项公式
推公式
斐波那契数列的通项公式推导过程求大神帮助如何从他的递推公式推导至通项公式?
有关电功率和欧姆定律的公式.包括推出来的