Matlab新手程序求大神帮忙?clcx0=[3.6,3.7,3.8,3.9,4.0,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5.0,5.1,5.2,5.3,5.4,5.5]y0=[4006,4060,4120,4165,4231,4276,4307,4349,4360,4386,4391,4407,4425,4454,4467,4486,4492,4523,4590,4629]x1=cumsum(x0) %累加B1=[

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 01:20:54
Matlab新手程序求大神帮忙?clcx0=[3.6,3.7,3.8,3.9,4.0,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5.0,5.1,5.2,5.3,5.4,5.5]y0=[4006,4060,4120,4165,4231,4276,4307,4349,4360,4386,4391,4407,4425,4454,4467,4486,4492,4523,4590,4629]x1=cumsum(x0) %累加B1=[
xT]OP+ܐlkOAeB%6.2VVL ŀ|J(ĩ &239ɞ}sf}ӝ1Kpu=\> >ELJA4f,O$9Crf0АdP90`!t*TЩSAfx*b1N2a(" %S

Matlab新手程序求大神帮忙?clcx0=[3.6,3.7,3.8,3.9,4.0,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5.0,5.1,5.2,5.3,5.4,5.5]y0=[4006,4060,4120,4165,4231,4276,4307,4349,4360,4386,4391,4407,4425,4454,4467,4486,4492,4523,4590,4629]x1=cumsum(x0) %累加B1=[
Matlab新手程序求大神帮忙?
clc
x0=[3.6,3.7,3.8,3.9,4.0,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5.0,5.1,5.2,5.3,5.4,5.5]
y0=[4006,4060,4120,4165,4231,4276,4307,4349,4360,4386,4391,4407,4425,4454,4467,4486,4492,4523,4590,4629]
x1=cumsum(x0) %累加
B1=[]
[m,n]=size(x0)
for k=1:n-1
B1(k)=-0.5*(x1(k)+x1(k+1))
B32(k)=y0(k+1)
Yn(k)=x1(k+1)
end
B2=ones(n-1,1)
B=[B1',B2]
for i=1:n-1
y01(i)=y0(i+1)
end
B3=diag(y01)
BB=B3*B %求矩阵B
YN=Yn'%求矩阵YN
A=inv(BB'*BB)*BB'*YN
a=A(1)
b=A(2)
c=b/a
d=y0(1)-c
e=x0(1)
Y=[num2str(d),'exp','(',num2str(-a),'(','x0(k+1)-',num2str(e),')',')',num2str(c)];
strcat('Y(k+1)=',Y)
for t=1:length(y0)-1
k(1,t)=x0(t+1)-x0(1);
end
for i=1:length(y0)-1
YP(i)=(y01(i)-c)*exp(-a*k(i))+c
end
运行完后能出结果,但是YP里面怎么是22个数啊,根据最后一个循环不应该是19个数吗?后面三个数都是重复多余的.

Matlab新手程序求大神帮忙?clcx0=[3.6,3.7,3.8,3.9,4.0,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5.0,5.1,5.2,5.3,5.4,5.5]y0=[4006,4060,4120,4165,4231,4276,4307,4349,4360,4386,4391,4407,4425,4454,4467,4486,4492,4523,4590,4629]x1=cumsum(x0) %累加B1=[
运行你的代码后,YP是19个数,不是22个数

新手谢了一个matlab程序,求大神花几秒看看t=0;x=10000;while (x-10000 matlab高手帮忙看程序!我要画matlab图,f 随x,y变化,怎么不会出现图形呢,程序如下,请大师帮忙看程序哪里出错了,clcx=0:0.2:10;y=x;f=x.^5.*y.^5.*0.1.^(y-1).*0.3.^(y-1).*0.5.^(y-1).*0.8.^(y-1).*0.9.^(y-1).*exp(-x.*(0.1.^y 求大神用matlab帮忙做三维图,求程序x,y的取值范围0-5000 matlab编程问题,求大神帮忙! Matlab新手程序求大神帮忙?clcx0=[3.6,3.7,3.8,3.9,4.0,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5.0,5.1,5.2,5.3,5.4,5.5]y0=[4006,4060,4120,4165,4231,4276,4307,4349,4360,4386,4391,4407,4425,4454,4467,4486,4492,4523,4590,4629]x1=cumsum(x0) %累加B1=[ 我是MATLAB初学者,求MATLAB大神帮忙运行程序.源程序素材我我都有 就是不知道怎么运行起来 大神可以留下联系方式传给你,帮忙解决 matlab牛顿迭代法求方程根程序求大神帮写个牛顿迭代法解方程的程序. 关于matlab求最小值最小值点的问题求大神附上matlab程序 求大神帮忙用matlab求解微分方程的数值解 求大神帮忙解答两道MATLAB题目 求大神帮写matlab优化程序,题目见下图:帮写个m文件, 利用matlab解电路题 求大神编写matbal程序解答,最好有文字说明. 编写java程序,求13-23+33-43...+973-983+993-1003的值.小弟新手刚学求大神们帮个忙搞下下! 求MATLAB大神 matlab新手求大神解答 Dijkstra标号算法中有这么一句:if a(u,v)+distance(u) 求帮忙用matlab写一个程序来解这个四元二次方程. 求大神帮忙写个matlab小球自由落体然后向右弹跳运动的程序,记得在程序语言后面加上必要的解释啊,因为要写成实验报告的 matlab ode45 求解二阶常微分方程新手想用ode45求解上述二阶三元常微分方程组,几次尝试均未成功,请大神帮忙编写matlab代码,最好有图,