function pushbutton_F3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_F3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global c kk;
if ishandle(c)
delete(c)
end
x1=str2double(get(handles.edit1,'string'));
x2=str2double(get(handles.edit2,'string'));
x3=str2double(get(handles.edit3,'string'));
F3=str2double(get(handles.edit_F3S,'string'));
kk=kk+1;
if mod(kk,2)==1
X=0.1+(x1+x2+x3)*0.5/100;
z=floor(log10(F3))+1; %判断位数
x = [X,X+F3/(10^(z+1))];
y = [0.65,0.65];
c = annotation('arrow',x,y);
elseif mod(kk,2)==0
X=0.1+(x1+x2+x3)*0.5/100;
z=floor(log10(F3))+1; %判断位数
x=[X,X-F3/(10^(z+1))];
y = [0.65,0.65];
c = annotation('arrow',x,y);
end
axes(handles.axes1);
axis([0 100 -50 50]);
title('平面图');
xlabel('轴向长度');
ylabel('直径');
set(gca,'XTick',[0:10:100]);
set(gca,'YTick',[-50:10:50]);
axes(handles.axes2);
axis([0 100 -100 100]);
title('轴力图');
xlabel('X');
ylabel('轴力');
xlim([0 100]);
ylim([-100 100]);
set(gca,'XTick',[0:10:100]);
set(gca,'YTick',[-100:20:100]);
text([100 100],[-11,-11],'x/m','FontSize',14)
text([-9 -9],[90,90],'F/KN','FontSize',11)
从这段代码后面的function下面都有红色的波浪线。路径已经是m文件的路径了。不太清楚是怎么发生的,麻烦各位了
2017-5-9 11:40 上传
2017-5-9 11:40 上传