I keep facing: 'Error: This statement is incomplete.'. I am using a simple for-loop to create 12 variables out of previous ones.
I have several matrices of the 'double' type', that are named "year_2017_j", with j from 1 to 12 (resembling months).
The inner function (in purple) works, but something goes wrong with the complete function.
eval(sprintf('factor_2017_%d = trapz(year_2017_%d(:,4))/trapz(year_2017_%d(:,3));', j));