I have a simple question:
If i take a range of values in google apps script:
//For Example
var matrix=SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getRange("A1:D4").getValues();
matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]];
Is it possible to get some rows or submatrix like in Matlab Notation? Something like this:
var submatrix= matrix[1:3]; //to take last three rows: submatrix = [[5,6,7,8],[9,10,11,12],[13,14,15,16]];
// or
var submatrix= matrix[1:2][1:2]; //to take: submatrix = [[6,7],[10,11]];`
I can't find a similar notation. It's frustrating to use concat and similar functions or acting previously on the range. Do you know a simplier way to work with matrix and submatix quickly?
Thank you in Advance.