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

Thread Subject:
read a specific interval of signal

Subject: read a specific interval of signal

From: angelo

Date: 25 Apr, 2010 13:00:05

Message: 1 of 2

i've a matrix 1x2560 (10 seconds of an eeg signal for the first channel). If i want to read a specific interval of this matrix how can i do??........
I want to read to 2 seconds from 5 seconds...or an oter interval ...

Subject: read a specific interval of signal

From: Sadik

Date: 26 Apr, 2010 03:08:04

Message: 2 of 2

Hi Angelo,

It seems you have 256 samples per second.

The 2nd second starts from sample 257 and the 5th second ends at 1280.

Then, the signal at this specific interval will be

dataSpecific = data(257:1280);

If you want something more general, you can say:

tStart = 2;
tEnd = 5;
sampleStart = 256*(tStart-1)+1;
sampleEnd = 256*tEnd;
dataSpecific = data(sampleStart:sampleEnd);

Best.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us