function radiobutton1_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of radiobutton1
hold off
global t
t=2250;
x=[810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960
970
980
990
1000
1010
1020
1030
1040
1050
1060
1070
1080
1090
1100
1110
1120
1130
1140
1150
1160
1170
1180
1190
1200
1210
1220
1230
1240
1250
1260
1270
1280
1288
1290
1300
1310
1320
1330
1340
1350
1360
1370
1380
1390
1400
1420
1440
1460
1480
1500
1520
1540
1560
1580
1600
1620
1640
1660
1680
1700
1720
1740
1760
1780
1800
1820
1840
1860
1880
1900
1920
1940
1960
1980
2000
2020
2040
2060
2080
2100
2120
2140
2160
2180
2200
2220
2240
2260
2280
2300
2320
2340
2360
2380
2400
2420
2440
2460
2480
2500
];
y=[401.71
415.98
430.08
443.99
457.69
471.15
484.37
497.33
510
522.38
534.46
546.22
557.65
568.75
579.51
589.92
599.98
609.69
619.03
628.02
636.64
644.9
654.8
660.34
667.51
674.33
680.79
686.91
692.67
698.09
703.18
707.93
712.35
716.45
720.23
723.7
726.87
729.74
732.32
734.62
736.63
738.38
739.86
741.09
742.06
742.8
743.3
743.57
743.62
743.61
743.45
743.07
742.5
741.73
740.77
739.63
738.32
736.84
735.2
733.4
731.45
727.13
722.27
716.94
711.15
704.97
698.41
691.53
684.35
675.91
669.23
661.35
653.29
645.07
636.72
628.26
619.71
611.1
602.42
593.71
584.98
576.24
567.5
558.78
550.09
541.43
532.81
524.25
515.75
507.32
498.96
490.67
482.47
474.36
466.34
458.42
450.59
442.86
435.23
427.71
420.3
412.99
405.79
398.7
391.72
384.87
378.08
371.43
364.88
358.45
352.12
345.91
339.8
333.79
327.89
322.1
];
for i=1:length(x )
drawnow
a=x(1:i);
b=y(1:i);
plot(a,b,'Color',[0.2,0.5,0]);
axis([800 2500 250 800]);
hold on
pause(1)
end
msgbox('试验曲线显示完毕!');
legend T=2250;
这是我的曲线动画的代码