📄 qq1.m
字号:
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
aa=get(handles.pushbutton1,'userdata');
t=str2num(get(handles.edit3,'string'));
step=get(handles.pushbutton3,'userdata');
T=t+step:1/100:t+3*step;
T1=T';
[r c]=size(T1);
yy=aa((t+step)*100+1:r+(t+step)*100);
draw=plot(T1,yy);
set(handles.axes1,'color','yellow','xlim',[t+step t+3*step],'ylim',[-100 100]);
set(draw,'color','red');
set(handles.pushbutton3,'userdata',step*2);
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)%前移
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%finame=filname.Data;
aa=get(handles.pushbutton1,'userdata');
%set(handles.pushbutton5,'userdata',aa);
bb=get(handles.pushbutton5,'userdata');
t=str2num(get(handles.edit3,'string'));
T=t:1/100:10000+t;
T1=T';
[r c]=size(T1);
if bb<=100
bb=100;
end
xx=(bb-10000)/100:1/100:bb/100;
yy=aa((bb-10000):bb);
draw=plot(xx,yy);
set(draw,'color','red');
set(handles.axes1,'color','yellow','xlim',[(bb-10000)/100 bb/100],'ylim',[-100.0 100.0]);
bb=bb-10000;
set(handles.pushbutton5,'userdata',bb);
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)%后移
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
aa=get(handles.pushbutton1,'userdata');
%set(handles.pushbutton5,'userdata',aa);
bb=get(handles.pushbutton5,'userdata');
t=str2num(get(handles.edit3,'string'));
T=t:1/100:10000+t;
T1=T';
[r c]=size(T1);
if bb>=100000;
bb=100000;
end
xx=(bb+10000)/100:1/100:bb/100;
yy=aa(bb+10000:bb);
draw=plot(xx,yy);
set(draw,'color','red');
set(handles.axes1,'color','yellow','xlim',[bb/100 (bb+10000)/100],'ylim',[-100.0 100.0]);
bb=bb+10000;
set(handles.pushbutton5,'userdata',bb);
% --- Executes on slider movement.
function slider1_Callback(hObject, eventdata, handles)
% hObject handle to slider1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
%set(handles.slider1,'Min',t,'Max',80+t);
global T1;
[r c]=size(T1);
tt=1;
if tt>r;
tt=r;
end;
xx=T1(tt:tt+900);
yy=finame(xx);
draw=plot(xx,yy);
tt=tt+100;
% --- Executes during object creation, after setting all properties.
function slider1_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
% --------------------------------------------------------------------
function Untitled_1_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global filname;
myname=get(handles.edit2,'string')
filname=load(myname)
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a double
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit4 as text
% str2double(get(hObject,'String')) returns contents of edit4 as a double
% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%t=str2num(get(handles.edit3,'string'));
% finame=filname.Data;
aa=get(handles.pushbutton1,'userdata');
%set(handles.pushbutton8,'userdata',aa);
axes(handles.axes1);
t=0;
T=t:1/100:600+t;
T1=T';
[r,c]=size(T1);
YY=aa(1:r);
fi=plot(T1,YY);
grid on
set(handles.axes1,'color','yellow','xlim',[t 600+t],'ylim',[-100 100]);
set(fi,'color','red');
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit5 as text
% str2double(get(hObject,'String')) returns contents of edit5 as a double
% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -