For 3-D MINIMIZATION Problems
You should adapt the code for multi-dimensional (N-D) problems.
The code use anonymous functions for the optimization. Some test functions are provide for tests.
de Castro, L. N., and Von Zuben, F. J. Learning and Optimization Using the Clonal Selection Principle. IEEE Transactions on Evolutionary Computation. v. 6(3). 2002. DOI: 10.1109/TEVC.2002.1011539
David Franco (2020). CLONALG - Clonal Selection Algorithm for Optimization Problems (https://www.mathworks.com/matlabcentral/fileexchange/67010-clonalg-clonal-selection-algorithm-for-optimization-problems), MATLAB Central File Exchange. Retrieved .
Optimized and corrected some serious problems. Maximization code removed.