integral calculus of timeseries data
67 ビュー (過去 30 日間)
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?
回答 (1 件)
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.
Please refer the following MathWorks documentation for your future reference.
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!