求大神支招,编下面递推函数的matlab编程
f0(x)=e^(-(x-6600)/1133)^5;f1(x)=0.818f0(x)+0.182f0(x-4000);f2(x)=0.847f1(x)+0.153f1(...
f0(x)=e^(-(x-6600)/1133)^5;
f1(x)=0.818f0(x)+0.182f0(x-4000);
f2(x)=0.847f1(x)+0.153f1(x-1200);
f3(x)=0.899f2(x)+0.101f2(x-1800);
f4(x)=0.868f3(x)+0.132f3(x-1000);
f5(x)=0.88f4(x)+0.12f4(x-3000);
求f5(10000)=?
初始函数是分段函数:
f0(x)=e^(-(x-6600)/1133)^5; 6600<x<8300
f0(x)=0; x>8300
f0(x)=1;x<6600 展开
f1(x)=0.818f0(x)+0.182f0(x-4000);
f2(x)=0.847f1(x)+0.153f1(x-1200);
f3(x)=0.899f2(x)+0.101f2(x-1800);
f4(x)=0.868f3(x)+0.132f3(x-1000);
f5(x)=0.88f4(x)+0.12f4(x-3000);
求f5(10000)=?
初始函数是分段函数:
f0(x)=e^(-(x-6600)/1133)^5; 6600<x<8300
f0(x)=0; x>8300
f0(x)=1;x<6600 展开
1个回答
展开全部
步骤一:先新建个“script”文件 然后以函数名“f5.m“命名保存 , 函数编辑页面如图1所示,其代码如下:
function [y]=f5(x)
y=0.88*f4(x)+0.12*f4(x-3000);
end
function y=f4(x)
y=0.868*f3(x)+0.132*f3(x-1000);
end
function y=f3(x)
y=0.899*f2(x)+0.101*f2(x-1800);
end
function y=f2(x)
y=0.847*f1(x)+0.153*f1(x-1200);
end
function y=f1(x)
y=0.818*f0(x)+0.182*f0(x-4000);
end
function [y]=f0(x)
y=exp(-(x-6600)/1133)^5;
end
图1 函数f5(x)编辑页面
步骤二:调用函数即可,如图2 所示 为命令窗口调用结果.
图2 令窗口调用函数f5(x)
希望对你有所帮助。。。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询