필터 지우기
필터 지우기

calculate integral of this function

조회 수: 3 (최근 30일)
mary m
mary m 2023년 4월 14일
댓글: Walter Roberson 2023년 4월 14일
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