I would like to give i
a value starting by 1 and then increasing to 2000. I have to sum up columns and would like to use i
instead of typing the number every time. To visualize that I mean is as follows:
sumdata=data[[1]] + data[[2]] + data[[3]] + data[[4]] + data[[5]] + data[[6]] + data[[7]] + data[[8]] + data[[9]] + data[[10]];
Now I would used i
to replace 1 to 10 in a function, however, i represents 1,2,3, etc. in increasing order:
sumdata=data[[i]] + data[[i]] + data[[i]] + data[[i]] + data[[i]] + data[[]] + data[[i]] + data[[i]] + data[[i]] + data[[i]];
Still, I am very new to programming in Mathematica. Hence it would be also nice if someone could tell me how to sum up certain columns in a matrix, without adressing each and every column itself. I have a matrix of ~2400 columns/rows and would like to sum up column 1 to 56, 57 to 112 and so on. Maybe someone has a easier approach?
Thank you in advance!
Best regards Alex
Total[Take[data,range]]
$\endgroup$