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 comentarios

Mili Goyal
Mili Goyal el 5 de Jul. de 2021
Could you give more clarity as to what is required maybe via an example?
Christian Joshua Lee
Christian Joshua Lee el 7 de Jul. de 2021
Christian Joshua Lee
Christian Joshua Lee el 7 de Jul. de 2021
It is like this, I need to use the iterations in z for my equation in r.

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 5 de Jul. de 2021

0 votos

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) ;

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 5 de Jul. de 2021

Comentada:

el 7 de Jul. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by