Octave/Matlab: Adding new elements to a vector
Asked 07 September, 2021
Viewed 772 times
  • 66
Votes

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];

?

3 Answer