Octave/Matlab: Adding new elements to a vector
Having a vector x
and I have to add an element (newElem
) .
Is there any difference between -
x(end+1) = newElem;
and
x = [x newElem];
?
Having a vector x
and I have to add an element (newElem
) .
Is there any difference between -
x(end+1) = newElem;
and
x = [x newElem];
?