MATLAB: How to plot graph in gui

Dear users…. I have a program like this.
function exgui
fh = figure( 'units','pixels',... 'position',[50 ,50 , 600, 500]);
X=[2 4 7] Y=[4 6 8] h=plot(X,Y,'--r','LineWidth',1) ;
end
But above program excute in matlab R2013 ,, it shows error like' the expression to the left of the equals sign is not a valid target for an assignment' .

Best Answer

X=[2 4 7]
Y=[4 6 8]
h=plot(X,Y,'--r','LineWidth',1)