How to calculate sway area rate for center of pressure

35 views (last 30 days)
Hello, i want to calculate sway area (mm2 /s) which is defined as the area enclosed by the center-of-pressure trajectory per unit time. Some useful paper (find below). Please find attached the CoPx and CoPy data.
Hufschmidt A, Dichgans J, Mauritz H, Hufschmidt M (1980) Some methods and parameters of body sway quantifcation and their neurological applications. Arch Psyc Nervenkr 228:135–150
Prieto TE, Myklebust JB, Hofman RG, Lovett EG, Myklebust BM (1996) Measures of postural steadiness: differences between healthy young and elderly adults. IEEE Trans Biomed Eng 43:956–966

Accepted Answer

William Rose
William Rose on 8 Sep 2022
Since you already have the data in Excel. there is no need for Matlab. Do the calculation in Excel, using equation 19 of Prieto et al., 1996.
When I opened the file you attached, I received a warning message: "External links have beeen disabled", and the data do not look like COP data. There are no headers and the first row is at time=0.006. Therefore I have not analyzed the data in the spreadsheet you uploaded.
I am attaching an Excel file that demonstrates the calculation of Sway Area using equation 19 of Prieto et al., 1996.
Good luck.
  7 Comments
William Rose
William Rose on 18 Jul 2023
@Mario Yes it is possible, and not difficult. I am traveling now and have only a cell phone. More later.
William Rose
William Rose on 19 Jul 2023
This uses a two-column array data which has the x,y coordinates of the center of pressure. In this example, the COP path consists of 100 points around the unit circle.
data=[cos(2*pi*(0:100)/100);sin(2*pi*(0:100)/100)]';
%plot(data(:,1),data(:,2),'-r.') %view the path
n=length(data);
pL1=0;
for i=2:n
pL1=pL1+sqrt((data(i,1)-data(i-1,1))^2+(data(i,2)-data(i-1,2))^2);
end
fprintf('Path length 1=%.3f.\n',pL1)
Path length 1=6.282.
The length is 2*pi, as expected for this path.*
In Matlab it is a point of pride to eliminate for loops. You can compute the path length without a for loop:
pL2=sum(((diff(data(:,1)).^2+diff(data(:,2)).^2).^0.5));
fprintf('Path length 2=%.3f.\n',pL2)
Path length 2=6.282.
The pL2 code does not use n, so you can eliminate the line n=length(data); also.
Try it. Good luck.
*Not exactly, since the path is a 100-gon, not a perfect circle.

Sign in to comment.

More Answers (1)

William Rose
William Rose on 9 Sep 2022
@chris pamp, You are welcome. Best wishes for your research.

Categories

Find more on Animation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!