matlab 定积分程序如下:dx=0.1;x=-pi:dx:pi;y=(sin(x)*(cos(x))^(1/3);sum(y(1:length(x)-1))*dx;t=trapz(x,y);ff=inline('(sin(x)*cos(x)).^(1/3)','x');q=quad(ff,-pi,pi)错误提示是Error:File:C:\matlab7\work\e.m Line:3 Column:25Incomplete or misf

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/18 20:05:23
matlab定积分程序如下:dx=0.1;x=-pi:dx:pi;y=(sin(x)*(cos(x))^(1/3);sum(y(1:length(x)-1))*dx;t=trapz(x,y);ff=i

matlab 定积分程序如下:dx=0.1;x=-pi:dx:pi;y=(sin(x)*(cos(x))^(1/3);sum(y(1:length(x)-1))*dx;t=trapz(x,y);ff=inline('(sin(x)*cos(x)).^(1/3)','x');q=quad(ff,-pi,pi)错误提示是Error:File:C:\matlab7\work\e.m Line:3 Column:25Incomplete or misf
matlab 定积分
程序如下:
dx=0.1;
x=-pi:dx:pi;
y=(sin(x)*(cos(x))^(1/3);
sum(y(1:length(x)-1))*dx;
t=trapz(x,y);
ff=inline('(sin(x)*cos(x)).^(1/3)','x');
q=quad(ff,-pi,pi)
错误提示是
Error:File:C:\matlab7\work\e.m Line:3 Column:25
Incomplete or misformed expression or statement.

matlab 定积分程序如下:dx=0.1;x=-pi:dx:pi;y=(sin(x)*(cos(x))^(1/3);sum(y(1:length(x)-1))*dx;t=trapz(x,y);ff=inline('(sin(x)*cos(x)).^(1/3)','x');q=quad(ff,-pi,pi)错误提示是Error:File:C:\matlab7\work\e.m Line:3 Column:25Incomplete or misf
>> dx=0.1;
x=-pi:dx:pi;
y=(sin(x).*cos(x)).^(1/3);
sum(y(1:length(x)-1))*dx;
t=trapz(x,y);
ff=inline('(sin(x).*cos(x)).^(1/3)','x');
q=quad(ff,-pi,pi)
q =
3.080058338824708 + 1.778272511040197i
程序给你改过来了,错误的确不少啊,我执行的结果见上