calculate integral of this function

3 次查看(过去 30 天)
Hi guys, could you please help me with this simple integral!! Thanks in advance.
p1= 2e-03 ;
p2= 6e-03 ;
p0=p1+p2;
Pi= p0/2;
theta= deg2rad(60) ;
H0= tan(theta)*p1 ;
syms H V M0 Fi x
Fi = H0-x*tan(theta);
M=H*Fi+V*x-M0;
dM_dH=diff(M,H);
F1= integral(@(x) (dM_dH).^2/cos(theta),0,Pi)

采纳的回答

Torsten
Torsten 2023-4-14
F1 = double(int(dM_dH^2/cos(theta),x,0,Pi))
instead of
F1= integral(@(x) (dM_dH).^2/cos(theta),0,Pi)
  1 个评论
Walter Roberson
Walter Roberson 2023-4-14
I also recommend converting your constants to symbolic
format long g
p1= 2e-03 ;
p2= 6e-03 ;
p0=p1+p2;
Pi= p0/2;
theta= deg2rad(60) ;
H0= tan(theta)*p1 ;
syms H V M0 Fi x
Fi = H0-x*tan(theta);
M=H*Fi+V*x-M0;
dM_dH=diff(M,H);
F1s = int(dM_dH^2/cos(theta),x,0,Pi)
F1s = 
F1 = double(F1s)
F1 =
3.2e-08
Q = @(v) sym(v);
p1= Q(2)*sym(10)^(-03) ;
p2= Q(6)*sym(10)^(-03) ;
p0=p1+p2;
Pi= p0/2;
theta= deg2rad(Q(60)) ;
H0= tan(theta)*p1 ;
syms H V M0 Fi x
Fi = H0-x*tan(theta);
M=H*Fi+V*x-M0;
dM_dH=diff(M,H);
F1s = int(dM_dH^2/cos(theta),x,0,Pi)
F1s = 
F1 = double(F1s)
F1 =
3.2e-08

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by