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

Extract data at regular intervals

Asked by Dirk on 21 Jun 2013

Hi There,

I have 2 columns of data, time and concentration. The time data are at intervals of about 5 seconds and there is a corresponding concentration measurement at each time. There are about 20,000 time measurements and I want to reduce this to a more manageable amount. How can I obtain say every 10th time x concentration value?

Thanks

0 Comments

Dirk

Products

No products are associated with this question.

1 Answer

Answer by Wayne King on 21 Jun 2013
Edited by Wayne King on 21 Jun 2013
Accepted answer

Are you asking for just

X = ones(2e4,2);
Y = X(1:10:end,:);

Y is a two-column matrix containing every 10-th measurement (or measurements taken every 50 seconds).

1 Comment

Dirk on 21 Jun 2013

Thanks

Wayne King

Contact us