Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: read a specific interval of signal
Date: Mon, 26 Apr 2010 03:08:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <hr302k$q7u$1@fred.mathworks.com>
References: <hr1ecl$fdv$1@fred.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1272251284 26878 172.30.248.38 (26 Apr 2010 03:08:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 26 Apr 2010 03:08:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com comp.soft-sys.matlab:629748

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.