how to calculate variance of a signal after it reaches a steady state value...
조회 수: 5 (최근 30일)
이전 댓글 표시
The signal for which the variance is to be calculated is in the base workspace in timeseries format. i want to calculate the variance only after 0.5 seconds. How to do it?
댓글 수: 3
Image Analyst
2013년 9월 29일
firstIndex = find(speed >= 20000, 1, 'first');
theVariance = var(speed(firstIndex : end));
채택된 답변
Image Analyst
2013년 9월 27일
편집: Image Analyst
2013년 9월 27일
What element does 0.5 seconds occur at? Let's say it's element 42, so then you do
varSteadyState = var(yourSignal(42:end));
Let's say you have a vector t with the times, and a vector yourSignal with the signal value. You can find the index for which t equals or passes 0.5 seconds like this:
startingElement = find(t>=0.5, 1, 'first');
varSteadyState = var(yourSignal(startingElement :end));
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!