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 CenterFile Exchange에서 Numerical 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