How can I access the last values of a list using end?

2 views (last 30 days)
I have a list, let's say length(list) = 40 how can I access the value which indice is 37 using end ?
(in my case I don't know the length of the list,that was just an example)
Thank you in advance for your answers.

Accepted Answer

Bruno Luong
Bruno Luong on 15 Sep 2020
list(end-3)

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!