how can i implement the Gaussian potential value code?

1 vue (au cours des 30 derniers jours)
Pamela AL ALam
Pamela AL ALam le 11 Fév 2020
Modifié(e) : Adam Danz le 13 Fév 2020
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?

Réponses (1)

Adam Danz
Adam Danz le 12 Fév 2020
Modifié(e) : Adam Danz le 13 Fév 2020
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).

Catégories

En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by