Array slice indexing?
276 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hey
please explain what the following function does :
y=a(i,end:-1:1);
if you could give me an example that would be great! thank you
0 Kommentare
Antworten (2)
the cyclist
am 13 Nov. 2017
Bearbeitet: the cyclist
am 13 Nov. 2017
It returns the ith row of a, in right-to-left order.
0 Kommentare
Mohammed Hamaidi
am 22 Mär. 2022
Take for example:
a=[1 2 3; 5 6 7; 8 9 12]
and
i=2
then
a(i,end:-1:1)
gives: the 2nd row in right to left order (the elements of the 2nd row from right to left)
ie: 7 6 5
0 Kommentare
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!