Coulomb Particle Optimization

Version 1.0.0 (1.85 KB) by Moreno, M.
Produce quasi-uniform distributions with minimum potential energy of N samples in P dimensions as per Coulomb's law, within the [0, 1] range
15 Downloads
Updated 26 Jun 2024

View License

Description
[x,e] = coulomb(n,p): Returns a point cloud x with n samples and p dimensions that have minimum potential energy in the [0,1] range and thus approximating a uniform distribution. Passing the parameter e returns the potential energy of the system x.
The optimizer runs 'A' cycles of 'B' iterations per cycle, seeking the minimun total potential energy in the resulting point cloud. It uses a constant 'C' to scale down the inverse squared distance calculations
Examples
% 1D generation
[x1,e1] = coulomb(12,1);
figure
plot(x1,'o')
% 2D generation
[x2,e2] = coulomb(70,2);
figure
plot(x2(:,1),x2(:,2),'o')
% 3D generation
[x3,e3] = coulomb(100,3);
figure
plot3(x3(:,1),x3(:,2),x3(:,3),'o')
% Multidimensional
[xN,eN] = coulomb(40,5);
figure
hist(xN)
Miguel Moreno, June 2024

Cite As

Moreno, M. (2024). Coulomb Particle Optimization (https://www.mathworks.com/matlabcentral/fileexchange/168901-coulomb-particle-optimization), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0