measure the Center of mass

3 visualizaciones (últimos 30 días)
Mingde
Mingde el 14 de Jul. de 2022
Respondida: Shlok el 28 de Ag. de 2024
Hello all,
I collected the data from pressure mapping (matrix 16x10).
my data collection has matrix 25952x10 = (1622 x 16 x 10) = 27 x 60 x 16 x 10
16 is a row, 10 is a column, 27 is the sampling rate, 60 is sec(T) 1622 is an array.
I want to convert 27 arrays(16x10x27) to 1 segmentation(16x10) to find the center of mass.
finally, I want to average segmentation of 1 to 60 segmentation(16x10) to find the center of mass.
T = readmatrix('dataset.csv')
R = reshape(T.',size(T,2), 16, [])
P = permute(R,[2 1 3])
F = P(:,:,1:27)
szf= size(F);
Ft = sum(sum(F,1),2)
cy = sum((1:szf(1)).'.*sum(F,2))./Ft
cx = sum((1:szf(2)).*sum(F,1))./Ft
I was completed some code. some part not yet to convert from 27 arrays to 1 segmentation and average 60 segmentation.
I want to ask one question, Can you explain to me the Window length, sampling rate, and time? ( is it different or the same?).
Thank you in advance.

Respuestas (1)

Shlok
Shlok el 28 de Ag. de 2024
Hi Mingde,
The terms Window Length, Sampling Rate, and Time are related but represent different aspects of data analysis. Let me explain each term using the data you provided above:
  • Window Length: The window length refers to the size of the segment of data you are analyzing at one time. It seems like you are analyzing segments of size 16x10 in your data, where each segment corresponds to one instance in your time series.
  • Sampling Rate: The sampling rate is the frequency at which data points are collected or sampled. In the above-mentioned dataset, you have a sampling rate of 27, which means you collect 27 data points per second.
  • Time: Time is the duration over which data is collected or analyzed. In your context, the time span you're working with is 60 seconds. This means you have data collected for each second over a period of 60 seconds.
Each of these terms plays a unique role in shaping how we analyze and interpret the data collected over a period. I believe this clears up any confusion.

Community Treasure Hunt

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

Start Hunting!

Translated by