필터 지우기
필터 지우기

integral calculus of timeseries data

조회 수: 37 (최근 30일)
주희 박
주희 박 2022년 10월 5일
답변: Sai 2022년 10월 11일
Hi! I attached time data (t) & values(Value). And when i plotting these data, I gat a plot looks like trigonometrical function.
I want to intergal this and maybe i will looks like the opposite shape. Like relationship of sin & -cos.
(I don't know how to use int properly, so I just draw sin and -cos graph respectively)
How can I intergral thhat data?
  댓글 수: 2
KSSV
KSSV 2022년 10월 5일
Read about trapz
Walter Roberson
Walter Roberson 2022년 10월 5일
cumtrapz() would probably be more appropriate.

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

답변 (1개)

Sai
Sai 2022년 10월 11일
I understand that you are trying to plot the integral of available data at corresponding time instants.
You can use the MATLAB function “cumtrapz(Value)” which will accept the data(“Value” is the data in this case) as an argument and returns the cumulative integral of the data which can be plotted against the corresponding time instants.
I hope this code snippet helps you resolve the issue.
plot(t, Value);
hold on;
plot(t, cumtrapz(Value));
hold off;
Please refer the following MathWorks documentation for your future reference.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by