what is happening here?
Mostrar comentarios más antiguos
for j = 1:6 - 1
if sign(i(j,1)) * sign(i(j+1,1)) == -1
m = m + 1;
end
end
in this code what does "1:6-1" means?
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 22 de Oct. de 2019
Try it in the command window:
>> 1:6-1
ans =
1 2 3 4 5
First it does (6-1) to create a scalar 5, then it goes from 1 to (6-1) or 1 to 5 to give [1,2,3,4,5].
Categorías
Más información sobre Data Types en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!