The current function definition is incomplete, and you need to write statements that will:
- Move each element one position to the left.
- Set the last element to -1 after shifting.
You need to use array indexing to assign values to the appropriate positions in the array. If you are not sure how to do this, I recommend checking out the official MATLAB documentation
These resources should help you understand how to access and modify specific elements in an array. Once you are comfortable with that, you should be able to write the three required statements to shift the values as described in the problem.
If you want to learn more about MATLAB basics, including arrays and indexing, you should try MATLAB Onramp — a free, interactive tutorial provided by MathWorks.
Hope this helps!