How to align the center of mass of two density functions?
1 回表示 (過去 30 日間)
古いコメントを表示
Dear all,
I have two density functions which I would like to align their x-axis.
I was thinking to align then using the barycenters but I don't know how to do it in matlab.
I would like to do this to multiply later these two density functions.
Can anyone give me a clue on this?
Thank you in advance
3 件のコメント
回答 (1 件)
Catalytic
2022 年 2 月 12 日
xa=1:length(Na);
xb=1:length(Nb);
Nb=Nb + trapz(xa,Na.*xa) - trapz(xa,Na.*xa);
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!