필터 지우기
필터 지우기

How do I find the std of a specific range of data?

조회 수: 2 (최근 30일)
Shawn
Shawn 2012년 8월 1일
I need to determine the standard deviation of the noise in a seismic signal Time domain. The data is in the form of time vs amplitude. I wish to find the standard deviation of the amplitude between time=0.1 and time=0.6. I need to know how to take the std of a range of the data set as opposed to the whole data set.
  댓글 수: 3
Rick Rosson
Rick Rosson 2012년 8월 2일
How many rows does the data set contain?
size(a,1)
Also, are the time steps uniformly spaced, or variably spaced? If uniform, what is the time increment?
at(2) - at(1)
Shawn
Shawn 2012년 8월 2일
Total rows of entire data set = 189857
Time steps are uniformly spaced at 9.06 micro seconds

댓글을 달려면 로그인하십시오.

채택된 답변

Rick Rosson
Rick Rosson 2012년 8월 2일
편집: Rick Rosson 2012년 8월 2일
Please try:
tic;
data = load('a.mat'); % this form is faster than
% command syntax
t = data.A16(:,1); % eliminate unnecessary data copies
a = data.A16(:,2);
a = a - mean(a);
idx = (0.2 < t & t < 0.6); % this operation is time consuming
% compute once, use result twice
Q = a(idx);
W = t(idx);
elTime = toc; % elapsed time
HTH.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Seismology에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by