What does this syntax mean?
Ältere Kommentare anzeigen
Can you explain to me what does it mean this syntax end-364:end? Thank you
Akzeptierte Antwort
Weitere Antworten (1)
You can index and array with end. End is basically just the length of your variable. So this is saying "index from the 365th from last to the last element of my array."
Example:
>>A = 1:10;
>>A(end-3:end)
ans =
7 8 9 10
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!