我的MATLAB积分程序出现错误To RESHAPE the number of elements must not c
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/19 13:26:28
我的MATLAB积分程序出现错误To RESHAPE the number of elements must not change. 求大神指点,怎么改啊?
clc
clear
syms n T L1 L2 S1 S2 S3 S4 S5 S6 S7 S8 S9 S10
%(L1为L,L2为L一撇)
m=[n,15*n,2.564*n,3*n,24.3*n,6*n];
U1=[0.002152*sqrt(L1),1.3*sqrt(L1),1.224*sqrt(L1),0.5896*sqrt(L1),1.1465*sqrt(L1),1.1465*sqrt(L1)];
%(L1)(行星架,太阳轮,行星轮,内齿圈,齿轮g3,齿轮g4)
U2=[0.002152*sqrt(L2),1.3*sqrt(L2),1.224*sqrt(L2),0.5896*sqrt(L2),1.1465*sqrt(L2),1.1465*sqrt(L2)];%(L2)
M=[4.73,6.54,5.46,5.46,6.25,5.46];
C=[2.58e15,2.8e21,2.54e18,2.4e18,4.26e20,8.3e18];
S0=[650,1400,1400,1080,1400,1400];
SM=S0-((S0-(S0.*(U2-U1)./(S0-U1))).*log(1-m.*((S0.*(U2-U1)./(S0-U1)).^M)./C))./(log(C)-M.*log((S0.*(U2-U1))./(S0-U1)));
%以上是强度退化规律
Smu=[SM(1),656.12,SM(2),SM(3),SM(4),598.16,260.65,656.12,SM(5),SM(6)];
Ssigma=[0.03*SM(1),26.2448,0.04*SM(2),0.04*SM(3),0.03*SM(4),23.9264,10.426,26.2448,0.04*SM(5),0.04*SM(6)];
fSmu=log(Smu)-0.5.*log((Ssigma./Smu).^2+1);
fSsigma=sqrt(log((Ssigma./Smu).^2+1));
S=[S1,S2,S3,S4,S5,S6,S7,S8,S9,S10];
fS=(1./(S.*fSsigma.*sqrt(2*pi))).*exp((-0.5).*((log(S)-fSmu)./fSsigma).^2);
%以上是强度的概率密度函数
UT=[0.002152*sqrt(T),10.88,1.3*sqrt(T),1.224*sqrt(T),0.5896*sqrt(T),0.56*sqrt((0.225633*T+8.559522)^2+(-0.041198*T)^2)+0.117259*T-1.7176,sqrt((0.108513*T+7.600488)^2+(-0.083623*T)^2),11.77,1.1465*sqrt(T),1.1465*sqrt(T)];
%上述T和L1,L2都是以牛毫米为单位
PII=1;
for i=1:10
I1(i)=int(fS(i),S(i),UT(i),inf);
PII=PII*I1(i);
end
%求第一个积分和连乘,第二个连乘算不出来,下面就是
%PIJ=1;
%for n=1:864000
%PIJ=PIJ*PII;
%end
k=(1/(0.05*L1*sqrt(2*pi)))*exp((-0.5)*((T-L1)/0.05*L1)^2);
A=PII*k;
%maple('kernelopts(gcfreq=10000)');
I2=int(A,T,400,1400);
%以上是第二次积分,积分区域设的不对,处于试验中
g2=(1/(52.843*sqrt(2*pi)))*exp((-0.5)*((L2-1056.86)/52.843)^2);
B=I2*g2;
I3=int(B,L2,600,1600);
%以上为第三次积分,未验证
g1=(1/(44.036*sqrt(2*pi)))*exp((-0.5)*((L1-880.72)/44.036)^2);
D=I3*g1;
R=int(A,L1,400,1400)
clc
clear
syms n T L1 L2 S1 S2 S3 S4 S5 S6 S7 S8 S9 S10
%(L1为L,L2为L一撇)
m=[n,15*n,2.564*n,3*n,24.3*n,6*n];
U1=[0.002152*sqrt(L1),1.3*sqrt(L1),1.224*sqrt(L1),0.5896*sqrt(L1),1.1465*sqrt(L1),1.1465*sqrt(L1)];
%(L1)(行星架,太阳轮,行星轮,内齿圈,齿轮g3,齿轮g4)
U2=[0.002152*sqrt(L2),1.3*sqrt(L2),1.224*sqrt(L2),0.5896*sqrt(L2),1.1465*sqrt(L2),1.1465*sqrt(L2)];%(L2)
M=[4.73,6.54,5.46,5.46,6.25,5.46];
C=[2.58e15,2.8e21,2.54e18,2.4e18,4.26e20,8.3e18];
S0=[650,1400,1400,1080,1400,1400];
SM=S0-((S0-(S0.*(U2-U1)./(S0-U1))).*log(1-m.*((S0.*(U2-U1)./(S0-U1)).^M)./C))./(log(C)-M.*log((S0.*(U2-U1))./(S0-U1)));
%以上是强度退化规律
Smu=[SM(1),656.12,SM(2),SM(3),SM(4),598.16,260.65,656.12,SM(5),SM(6)];
Ssigma=[0.03*SM(1),26.2448,0.04*SM(2),0.04*SM(3),0.03*SM(4),23.9264,10.426,26.2448,0.04*SM(5),0.04*SM(6)];
fSmu=log(Smu)-0.5.*log((Ssigma./Smu).^2+1);
fSsigma=sqrt(log((Ssigma./Smu).^2+1));
S=[S1,S2,S3,S4,S5,S6,S7,S8,S9,S10];
fS=(1./(S.*fSsigma.*sqrt(2*pi))).*exp((-0.5).*((log(S)-fSmu)./fSsigma).^2);
%以上是强度的概率密度函数
UT=[0.002152*sqrt(T),10.88,1.3*sqrt(T),1.224*sqrt(T),0.5896*sqrt(T),0.56*sqrt((0.225633*T+8.559522)^2+(-0.041198*T)^2)+0.117259*T-1.7176,sqrt((0.108513*T+7.600488)^2+(-0.083623*T)^2),11.77,1.1465*sqrt(T),1.1465*sqrt(T)];
%上述T和L1,L2都是以牛毫米为单位
PII=1;
for i=1:10
I1(i)=int(fS(i),S(i),UT(i),inf);
PII=PII*I1(i);
end
%求第一个积分和连乘,第二个连乘算不出来,下面就是
%PIJ=1;
%for n=1:864000
%PIJ=PIJ*PII;
%end
k=(1/(0.05*L1*sqrt(2*pi)))*exp((-0.5)*((T-L1)/0.05*L1)^2);
A=PII*k;
%maple('kernelopts(gcfreq=10000)');
I2=int(A,T,400,1400);
%以上是第二次积分,积分区域设的不对,处于试验中
g2=(1/(52.843*sqrt(2*pi)))*exp((-0.5)*((L2-1056.86)/52.843)^2);
B=I2*g2;
I3=int(B,L2,600,1600);
%以上为第三次积分,未验证
g1=(1/(44.036*sqrt(2*pi)))*exp((-0.5)*((L1-880.72)/44.036)^2);
D=I3*g1;
R=int(A,L1,400,1400)
![我的MATLAB积分程序出现错误To RESHAPE the number of elements must not c](/uploads/image/z/2374632-0-2.jpg?t=%E6%88%91%E7%9A%84MATLAB%E7%A7%AF%E5%88%86%E7%A8%8B%E5%BA%8F%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AFTo+RESHAPE+the+number+of+elements+must+not+c)
To RESHAPE the number of elements must not change的1.向,往,到
She lives in the house to the right.
她住在右边的房子里.
This road leads to Paris.
这条路通往巴黎.
2.(表示距离)离
3.(表示时间)直到,在...之前
He wrote from morning to night.
他从早到晚写东西.
4.(表示程度、范围)到,达
He was wet to the skin.
他浑身湿透了.
5.趋于;(变)成,(变)到
Things are going from bad to worse.
情形每况愈下.
6.(表示位置)对,面对
7.(表示接近、接触)在,于,紧贴着
8.(表示对象)对,向
Excessive drinking did harm to his health.
She lives in the house to the right.
她住在右边的房子里.
This road leads to Paris.
这条路通往巴黎.
2.(表示距离)离
3.(表示时间)直到,在...之前
He wrote from morning to night.
他从早到晚写东西.
4.(表示程度、范围)到,达
He was wet to the skin.
他浑身湿透了.
5.趋于;(变)成,(变)到
Things are going from bad to worse.
情形每况愈下.
6.(表示位置)对,面对
7.(表示接近、接触)在,于,紧贴着
8.(表示对象)对,向
Excessive drinking did harm to his health.
我的MATLAB积分程序出现错误To RESHAPE the number of elements must not c
matlab运行程序时出现To RESHAPE the number of elements must not chan
reshape matlab To RESHAPE the number of elements must not ch
MAtlab中To RESHAPE the number of elements must not change.
MATLAB提示Error using reshape To RESHAPE the number of element
Matlab中,运行程序出现The length of X must match the number of rows
matlab中出现?In an assignment A(I) = B,the number of elements i
求问matlab 的 In an assignment A(I) = B,the number of elements
matlab进行数值积分时出现 Reached the maximum number of function evalu
Matlab绘图In an assignment A(I) = B,the number of elements in
matlab问题求救 In an assignment A(I) = B,the number of elements
matlab程序运行出现the statement is incomplete的错误,下面是程序,请问怎样解决