How can I transform 3 dimensional data into 1 dimensional data?

조회 수: 9 (최근 30일)
Jonathan Collins
Jonathan Collins 2015년 4월 17일
답변: Star Strider 2015년 4월 18일
I have a bunch of data acquired using an iPhone seismometer app that I need to analayze.
It is presented as (accelerations relative to g), in three dimensions x, y and z. The accelerations oscillate around a baseline close to zero.
I need to be able to somehow integrate these numbers to form a 'tremor intensity' value (which can be dimensionless if necessary), which I could then use to plot a single moving average of the signal's energy.
I am a Matlab newbie.

답변 (1개)

Star Strider
Star Strider 2015년 4월 18일
The simplest way may be to take the Euclidean norm of the three channels by row:
S = randi(10, 10, 3); % Random (10x3) matrix
TI = sqrt(sum(S.^2,2)); % Tremor Intensity
where ‘TI’ is sqrt(x^2+y^2+z^2) for each row of ‘S’

카테고리

Help CenterFile Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by