Indexing the array: Shift left with variable-sized arrays
Write a statement to shift the contents of array sampleReadings position to the left: Assign the rightmost element with
Ex: If sampleReadings is [12, 85, 43], then sampleReadings becomes [85, 43, -1]
Function
Save
C Reset
Ea MAT
function sampleReadings ShiftArrayLeft(sampleReadings) % sampleReadings: Array of sensor readings
% Write a statement to shift the array contents position to the left
% Assign the rightmost element with sampleReadings(sampleReadings(2:length(sampleReadings))-1);
end
Code to call your function
ShiftArrayLeft([12, 85, 43])