it doesn't work .so,what is the problem?
Mostrar comentarios más antiguos
function w= flip_it(v)
w = v(end:-1:1);
end
2 comentarios
Matt J
el 24 de Dic. de 2017
It does work, but I can't see why you don't just use the flip() command provided by MATLAB.
sagar sarwar
el 24 de Dic. de 2017
Respuestas (1)
Star Strider
el 24 de Dic. de 2017
You did not say what the problem actually is. My guess is that you are not calling it correctly. You have to have ‘v’ in your workspace, then call your function as:
v = some_vector;
w = flip_it(v)
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!