Cody

Problem 2918. Matlab Basics II - Extract last 3 elements of a vector

Created by Yaz Majeed in Community

Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives those numbers for any vector x

example:

x = [1 2 3 4]

output = [2 3 4]

Solution Stats

49.51% Correct | 50.49% Incorrect
Last solution submitted on Jan 10, 2019

Recent Solvers97

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!