I wrote
array = linspace(0, 1); sliceSize = 10; sliceBegin = 1 + length(array) - sliceSize; slice = array(sliceBegin: length(array));
which is too verbose. How to make it shorter?
a = rand(100,1); %# vector a(end-5+1:end) %# last five elements
Source: https://habr.com/ru/post/1777314/More articles:Additional rewrite rule for AST in ANTLR - antlrNew version instead of internationalization? - iosmongodb php gets unique field values - phpРеализация С++ - c++Linux assembly; Is bss partition memory initialized to 0? - assemblyOpen Source Paid Email Schedule - .netPackaging an Android library in a JAR that uses JNI - javajQuery get json response empty - jsongenerate random number in Haskell - randomdead end in process, Unix team? - multithreadingAll Articles