Witam,

zrobiłem program kreślący wykres 2 prostych, w którym można wprowadzić na jakim zakresie x ma być rysowany wykres, i to działa, ale tylko raz lub 2 razy, później po naciśnięciu przycisku 'Rysuj' program nie reaguje, co robię nie tak? Fragment programu:
[code]
A1=get(handles.a1,'string');
A1m=str2num(A1);
A2=get(handles.a2,'string');
A2m=str2num(A2);
B1=get(handles.b1,'string');
B1m=str2num(B1);
B2=get(handles.b2,'string');
B2m=str2num(B2);
Xmin=get(handles.xmin,'string');
Xmax=get(handles.xmax,'string');
sXmin=str2num(Xmin);
sXmax=str2num(Xmax);
%if sXmin>sXmax;
%pom=sXmin;
%sXmin=sXmax;
%sXmax=pom;
%end
x=sXminsXmax;
y=A1mx+B1m;
handles.wykres=plot(x,y,'k');
hold on;
y=A2m
x+B2m;
handles.wykres=plot(x,y,'r');
grid on;
hold on;
title('WYKRES');
xlabel('Oś X');
ylabel('Oś y');
D=[A1m B1m;A2m B2m];
Am=[A1m -1;A2m -1];
Bm=[-B1m ;-B2m];
Cm=[-1 1;-A2m A1m];
At=inv(Am);
M=At * Bm;
X=M(1);
Y=M(2);

handles.wykres=text(X,Y,['x= ',num2str(X),'y= ',num2str(Y)]);
[/code]

pzdr,