For Loop in Data
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
How can I convert those y's in just one FOR loop?
x= [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0 ];
y1=x(2:end) - x(1:end-1)
y2=x(3:end) - x(1:end-2)
y3=x(4:end) - x(1:end-3)
y4=x(5:end) - x(1:end-4)
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!