How do i reverse the order of this

2 visualizzazioni (ultimi 30 giorni)
Blair Hall
Blair Hall il 2 Ott 2017
Commentato: Jan il 2 Ott 2017
how do i reverse the order of this
  2 Commenti
KSSV
KSSV il 2 Ott 2017
It is a homework problem...don't attach code snippet as an image.
Jan
Jan il 2 Ott 2017
@Blair: Your screenshot does not even contain the question, but it is very easy to guess the solution: Why do you use "1:1:3"? Where is the "startingIndex"? It is obvious, that it is required to use it.
It will not help, if the forum solves your homework. You cannot learn programming by letting others find these very easy solutions for you. Try it by your own until you have success.

Accedi per commentare.

Risposta accettata

Andrei Bobrov
Andrei Bobrov il 2 Ott 2017
indexArray = startingIndex:-1:1;

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by