I can recommend the software package ACADO developed by Moritz Diehl and his group. There exists also a MATLAB implementation, which (in my eyes) is very user friendly.
You are welcome, Saeed! Check out www.acadotoolkit.org, look for 'Matlab Interface' and you will find a step-by-step guide how to install it. Good luck and best regards, Christoph
Thanks for the great suggestion for the NMPC book. Do you know if there is a solution manual for the theoretical examples in the book so that I can verify my answers.