MATLAB: Addition of numbers in array

additionarray

Lets' say I have 2 vectors:
x = [7 4 6];
y = [1 4 4];
But these are not just vector consider them as A number, i.e., 746 and 144. Now I want to add these numbers (as we do on paper, carry method).
so the answer should be 890.
and want display like:
7 4 6
1 4 4
-----
8 9 0
Please help me to code.
Thanks

Best Answer

This is one way
x = [7 4 6];
y = [1 4 4];
z = sscanf(sprintf('%d',x),'%d')+sscanf(sprintf('%d',y),'%d')