in your matlab command window,type
Design your GUI. Subsequently, click
button> button.properties (left hand side)> callback> create call back
In the call back function, get the text from box. Remember convert them to correct format for your code after that.
then run your code, display your result in the label component
How to change colour of Lamp?
if a>=0 || b>=0 || c>=0
app.Lamp.Color = [1 0 0];
[1 0 0] is red colour and [0 1 0] is green colour. Refer to here for colour specification in MATLAB