Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个时间序列数据向量,每个元素代表 X(t) 值。我想计算矢量数据曲线下的面积(曲线以矩形脉冲形式表示)。
例如,X = [0 2 2 2 0 1 1 1 0];数据的每个元素是 1 秒间隔。绘制曲线后,其面积应为 6 个单位。
我希望 Matlab 代码如何计算这项工作?(我发现 trapz() 可以做,但使用梯形形式(不是矩形脉冲),所以它的输出更大)
谢谢你。外滩