function start_Callback(hObject, eventdata, handles)
% hObject handle to start (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
delete(allchild(handles.axes1));
end
x1=str2num(get(handles.edit_x,‘string’));
y1=str2num(get(handles.edit_y,‘string’));
jc=str2num(get(handles.edit_jc,‘string’));
rst=polyfit(x1,y1,jc(1));
as=poly2sym(rst)
xmax=max(x1);
xmin=min(x1);
xnum=2*length(x1)+100;
x2=linspace(xmin,xmax,xnum);
y2=polyval(rst,x2);
plot(x1,y1,‘o’,x2,y2);
set(handles.edit_rst,‘string’,num2str(rst));
08-19
734
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-09
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-09
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-02
6878
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)