By adding time
which is of type string
to Correction
which is a number you won't get anything reasonable.
datenum
can help you here. It can converts a date vector to date number. I am no expert on this issue. But I know that the data format the command now
returns is called a date number. (See here for other functions and see their input and output types)
However in your case it's easier to deal with date vector representation of time:
A full date vector has six elements, specifying year, month, day, hour, minute, and second, in that order. .... Example:
[2003,10,24,12,45,07]
So, you can convert the Correction
time to date number using datenum
and then add it to value acquired from now
(here d
):
datestr(d + datenum([0 0 0 0 0 Correction]))
This is considering Correction
to be in seconds.
Hope it helps.