Iterations in an equation

Hi, how do I use my iterations with delta z for example. z = [0:0.1:100] and I need to have the z prior to the one I would use.

3 个评论

Could you give more clarity as to what is required maybe via an example?
It is like this, I need to use the iterations in z for my equation in r.

请先登录,再进行评论。

回答(1 个)

z = [0:0.1:100] ;
nz = length(z) ;
for i = 2:n
dz = z(n-1)-z(n)
end
The above can also be achieved using:
dz = diff(z) ;

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by