You need first to design your cost function of the system you need to optimize, and define your limits. Then, you can simply perform the optimization using the GA toolbox available in the Matlab. For more information about the GA optimization procedure, you can refer to Matlab help.
Hopefully , this can help you in solving your problem