How to calculate sway area rate for center of pressure
조회 수: 51 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
William Rose
2022년 9월 8일
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
William Rose
2023년 7월 18일
@Mario Yes it is possible, and not difficult. I am traveling now and have only a cell phone. More later.
William Rose
2023년 7월 19일
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)
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)
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.
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!