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)
댓글 수: 0
채택된 답변
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
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)
F1 = double(F1s)
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)
F1 = double(F1s)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!