MATLAB Answers


scaling a vector from 352800x1 to 300000x1 by cutting last 52800 row elements?

Asked by MD.FAISAL
on 12 Feb 2013

i have a 352800x1 vector . now i want to take only 300000 row elements .how can i cut last 352800-300000=52800 elements and make it a 300000x1 vector ??




1 Answer

Answer by Jonathan Sullivan on 12 Feb 2013
 Accepted answer

x = rand(352800,1);
x(300001:end) = [];

  1 Comment

it can also be done by using

y=X(1:300000) ; thx anyway :)

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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!