MATLAB: What does this syntax mean syntax;end-364:end;merton;kmv Can you explain to me what does it mean this syntax end-364:end? Thank you Best Answer It looks like it would be inside an array and mean that it's taking the last 365 elements of the array. E.g.last365elements = data(end-364:end); Related SolutionsMATLAB: A is a matrix , what does this statement A([1,end],[1,end]) mean That's equivalent to:[A(1,1), A(1,end);... A(1,end), A(end,end)] https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html - read above linear indexing. MATLAB: Insert underscore into the string Using regexprep, this would be one of the many ways to do it:a = regexprep(datestr(now, 31), '..(..)-(..)-(..) (..):(..):(..)', '$1$2$3_$4$5$6')But even simpler, why not ask datestr to output exactly what you want directly:a = datestr(now, 'yymmdd_HHMMSS') Related Question“V = V.’;” What Does This Syntax MeanWhat does a “~” mean in the following codeWhat is the use of /begin…../end in regexWhat Does Each Element of This Syntax Mean
Best Answer