How to receive the inverse of the diff(x) array calculation ?

2 次查看(过去 30 天)
For example ,if x=[a,b,c,d] and diff(x)=[b-a,c-b,d-c],
is there any possible way for [a-b,b-c,c-d].

采纳的回答

Torsten
Torsten 2022-11-15
x = [4 6 9 13];
s1 = -diff(x)
s1 = 1×3
-2 -3 -4
s2 = [x(1)-x(2),x(2)-x(3),x(3)-x(4)]
s2 = 1×3
-2 -3 -4

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by