Vector sum of forces
古いコメントを表示
I am given a 1468x3 matrix. The columns represnt Fx, Fy, and Fz (components of force in x, y, z directions)
I need to find the resultant force.
I know that the formula for this would be (Fx^2+Fy^2+Fz^2)^.5, but how do I do this in matlab, for all 1468 columns?
The result should be a 1468x1 matrix.
回答 (2 件)
James Tursa
2021 年 5 月 6 日
sqrt(sum(F.*F,2))
Steven Lord
2021 年 5 月 6 日
0 投票
Use the vecnorm function.
カテゴリ
ヘルプ センター および File Exchange で Simscape についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!