For example, if I was given vec[-5 4 -4 6 8 -3], how could it become vec[-5 4 -4 6 8 0 -3]? In addition, the code could work for any size vector.
MATLAB: How could I add a zero before the last element in any size vector
vector
Related Question
- Divide an array in n different arrays
- How to get the first and last element to switch for a vector
- Help running Matlab script
- How to modify a matrix to change the entries >=0 and multiply it by 5 AND to change the entries <0 and add 2 to those entries
- How to add zeros column and row at the beginning of matrix
Best Answer