The simplest answer is just to call waitbar. It is already in matlab, and will pop up a figure with a status bar that grows as you progress.
Of course, you can also download one of the many tools on the FEX, all subtle variations on waitbar. Or, you can use a text based bar, that shows up in the command window. Sometimes a text bar is what even I will choose.
If you really insist on programming your own tool that shows up in a figure window, it is not difficult. I did one of these recently, where the bar also changed color with progress of my algorithm. One might easily use the changing color to signify one piece of information, and the length of the bar as a second piece of information. So for example, an optimization might have the bar get longer with every iteration, and change color from red to green as the objective itself grows smaller.
As I recall, I simply created a textbox in my window, with the string something like: 'I''m thinking, get some coffee while you wait.' I then made the box invisible until it was time to start processing. Now, at each iteration, change the size of the box, and or the color that fills it. When done, make the box invisible again.