how can i implement the Gaussian potential value code?

1 回表示 (過去 30 日間)
Pamela AL ALam
Pamela AL ALam 2020 年 2 月 11 日
編集済み: Adam Danz 2020 年 2 月 13 日
If there exists an arbitrary point x={x1,x2,...,xn}, the equation to calculate the potential function of data field on xi is:
potentialOfPoints.PNG
my question is: how can i implement this equation in matlab?

回答 (1 件)

Adam Danz
Adam Danz 2020 年 2 月 12 日
編集済み: Adam Danz 2020 年 2 月 13 日
x is a vector of length n.
I'm assuming sigma is std(x)
phi = sum(exp(-(vecnorm(x(:)-x(:).',2,1) / std(x)).^2));
phi(i) is the output for x(i).

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by