MATLAB: Date strings with vector results

date strings with vector resultsMATLAB

Hi,
I have two vectors that I subtracted from each other and a string of dates that I would like to display in column form like the example below.
Humidity difference for 20/5/18: 54
Humidity difference for 21/5/18: 11
Humidity difference for 22/5/18: 7
Humidity difference for 25/5/18: 29
.
my vectors are;
A=[19.7, 21, 21.4, 26.3, 25.7];
B = [2.2, 2, 4.9, 1.9, 6.6];
C = A-B;
I can display the strings and the vector C individually but they don't relate to each other. If there is an easier way to display this please let me know.
Thanks for the help.

Best Answer

DateList = {'20/5/18', '21/5/18'}; % GUESSED input
A = [19.7, 21];
B = [2.2, 2];
C = A - B;
Data = cat(1, DateList, num2cell(C));
sprintf('Humidity difference for %s: %g\n', Data{:});
Result:
Humidity difference for 20/5/18: 17.5
Humidity difference for 21/5/18: 19