3軸加速度の結果から体積を求めたいです
Show older comments
3軸加速度計の結果から、以下の式で3次元にプロットした結果の95%を含む体積を求めようとしています。
4pi / 3×(中心から楕円までの最大長)×(最小長)×(2軸に直行する軸の長さ)
こちらの最大長、最小長、2軸に直行する軸の長さを求める方法の模索に苦慮しています。
これらを求める方法を教えて頂けると幸いです。
4 Comments
Hernia Baby
on 5 Mar 2022
どういう形式で数値が入るのでしょうか? 場合によってはmax使うだけでよさそうです
daiki naito
on 5 Mar 2022
ありがとうございます
楕円体が回転体なのか等でアプローチが変わると思います
楕円体が原点とx,y,z軸を通るなら以下に近いアプローチが取れますがいかがですか?
clc,clear
[X,Y,Z]=ellipsoid(0,0,0,6,3.25,3.25);
plot3(X(:),Y(:),Z(:),'--k')
hold on
surf(X,Y,Z,'EdgeColor','none','FaceAlpha',.2)
xline(0)
yline(0)
idx(:,:,1) = abs(X) == max(abs(X),[],'all');
idx(:,:,2) = abs(Y) == max(abs(Y),[],'all');
idx(:,:,3) = abs(Z) == max(abs(Z),[],'all');
for ii = 1:length(idx(1,1,:))
scatter3(X(idx(:,:,ii)),Y(idx(:,:,ii)),Z(idx(:,:,ii)),'red','filled')
end
daiki naito
on 5 Mar 2022
Accepted Answer
More Answers (0)
Categories
Find more on 表面プロットとメッシュ プロット 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!

