Hey all,
I have a 1 x 8 cell which includes tables. In each table, there is the date column and the results column. In each row, I want to multiply results values by the number of days in the month from the date column (considering leap and non-leap years).
For example:
date results new_results
———- ————- —————
1989-01-01 0.2 31 * 0.2 = 6.2
1989-02-01 0.8 30 * 0.8 = 24
. . .
. . .
. . .
2018-12-01 0.4 31*0.4 = 12.4
I read matlab help and tried to use this code:
calculations = arrayfun(@(x) test{x}.results*days(test{x}.date));
But it not working and say not enough inputs.
I attached my data. Any help is highly appreciated.
Thank you !
Best Answer