我的MATLAB积分程序出现错误To RESHAPE the number of elements must not change. 求大神指点,怎么改啊?clcclearsyms 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

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/15 02:12:20

我的MATLAB积分程序出现错误To RESHAPE the number of elements must not change. 求大神指点,怎么改啊?clcclearsyms 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
我的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)

我的MATLAB积分程序出现错误To RESHAPE the number of elements must not change. 求大神指点,怎么改啊?clcclearsyms 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
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.

我的MATLAB积分程序出现错误To RESHAPE the number of elements must not change. 求大神指点,怎么改啊?clcclearsyms 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 Matlab中的符号计算中的积分问题,我遇到的一个问题:int(int(int(x^2+y^2+z^2,z,sqrt(x*y),x^2*y),y,sqrt(x),x^2),x,1,2)积分过程中,出现错误!然后我分开做结果在对y积分的时候,程序竟然无法确定sqrt(x)和x^2的 matlab程序出现Error in ==> fesin at 错误,求高手指导.在使用quad函数求积分时[s,n]=quad('fesin',-100000000000,10000000000)出现一下错误,(我的fesin是这样定义的.function funz=fesin(x)funz=691200.*x./((1+9./0.7.*x^2)^4./3 matlab程序出现Error in ==> fesin at 错误,求高手指导.在使用quad函数求积分时[s,n]=quad('fesin',-100000000000,10000000000)出现一下错误,(我的fesin是这样定义的.function funz=fesin(x)funz=691200.*x./((1+9./0.7.*x^2)^4./3 matlab中拟合曲线的问题 谁能帮我查出为何这个程序是错误的啊? matlab画图时的坐标出现错误? 如何解决 Unable to read XXXX bytes 错误为何我上传的程序会出现以下错误提示,而且同样的程序在别的地方测试都没有问题.Fatal error: Unable to read XXXX bytes matlab 省略号 出现错误 Matlab 计算积分 .matlab 计算积分我需要f是一个变量.以观察f变化值得变化.f=1/4;S= quad(inline('cos(2*pi*f*x)'),0,pi);出现错误Error using ==> inline.subsref at 14Not enough inputs to inline function.请问我该怎 关于matlab绘图时遇到的问题?程序如下:r=0:0.1:10a={0.05,0.1,0.15,0.25,0.5}c={'r','g','b','y','c'}for i=1:5plot(r,((1+(2*a[i]*r).^2)/((1-r.^2).^2+(2*a[i]*r).^2)),c[i])hold onend运行时出现下面错误:plot(r,((1+(2*a[i]*r).^2)/((1- 运行程序出现了错误 用Matlab求解定积分作图时出现Explicit integral could not be found这样一个数 想用matlab画出Φ与e的坐标图,横坐标是e,纵坐标是Φ,Io=1,r=0.01,具体编的程序是:clc;clear all;i=1;r=0.01;e=0:0.01:2;syms x y;y=1/4*i*int 我照着教科书把这个程序输到MATLAB中,为什么它总说Error in ==> Untitled5 at 1 y=randn(1,1000);y=randn(1,1000);x=-2:0.1:2;hist(y,x)我试过其他的程序,居然全部都出现这个错误!这到底是怎么了啊? matlab解方程出现这个错误我matlab重装好多次了,路径也没有空格, matlab符号积分时,结果中出现复数是什么原因?比如y=1/(t+2*(r-sqrt(x*(2*r-x))))对x积分,结果中出现虚数 matlab plot 提示错误:Vectors must be the same lengths!大侠们好,我是一位初学者,但由于工作需要一个编程,这个程序一运行到plot的时候就会出现错误提示.可我不知道怎么才能改正.麻烦大侠们帮帮忙! 怎么样用matlab求定积分?我要求一个f(x)=(x+1)^10*exp(-x)在[0,1]上的定积分,在matlab上应该怎么写程序啊, 请教:怎么用matlab求定积分我要求一个f(x)=(x+1)^10*exp(-x)在[0,1]上的定积分,在matlab上应该怎么写程序啊,谢谢了.