Replicating Matlab YEARFRAC function in excel or vice versa
Show older comments
I am wondering why the following code in matlab generate
yearfrac(datenum('31/05/2015','dd/mm/yyyy'),datenum('07/02/2025','dd/mm/yyyy')) = 9.672131147540984
yearfrac(datenum('31/05/2015','dd/mm/yyyy'),datenum('07/02/2025','dd/mm/yyyy'),12) = 9.690410958904067
However, in excel, using actual/actual, it gives a slightly different answer?
YEARFRAC(31/05/2015,07/02/2025,1) = 9.69138875062
Thanks
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!