MATLAB: Length of sum of vectors

lengthMATLABnumericsumvectors

Can anyone tell me how to get the value/answer of this command below without using MATLAB of course.
What is the numeric result of using the command length(x+y)?
x=[1 4 5 6 7]
y=[3 2 15 6 8]
I know the answer is 5, but how would I get that without MATLAB?
Thank you!

Best Answer

Well, ‘x’ has 5 elements and ‘y’ has 5 elements, and by their dimensions they are conformable to addition. The sum will also be a 5-element vector, so the length of the sum will be 5.
I hope you would get the same result doing it manually.
Related Question