compute the indefinite integral

조회 수: 7 (최근 30일)
William Lancelot
William Lancelot 2022년 10월 23일
답변: Torsten 2022년 10월 23일
how can I compute the indefinite integral of an anonymous function?
f=1010;
d= 0:0.0001:8;
z = @(d) sawtooth(2*pi*f*d+pi,0);
  댓글 수: 3
William Lancelot
William Lancelot 2022년 10월 23일
thank you for your reply
I did compute the integral of the above function symbolically using syms and int and a bunch of heavisides. However, I can't use anything symbolic when I try to import the result in Simulink. I converted the symbolic expression with matlabFunction, but I do not know how to use it in Simulink
William Lancelot
William Lancelot 2022년 10월 23일
I am trying to plot the above function and its integral in Simulink

댓글을 달려면 로그인하십시오.

채택된 답변

Torsten
Torsten 2022년 10월 23일
f = 1010;
z = @(d) sawtooth(2*pi*f*d+pi,0);
dstart = 0.0;
dend = 0.01;
delta_d = 1e-5;
d = dstart:delta_d:dend;
intz = cumtrapz(d,z(d));
hold on
yyaxis left
plot(d,z(d))
yyaxis right
plot(d,intz)
hold off

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by