基于MATLAB的连续性信号的采样与重构
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/12 03:09:44
基于MATLAB的连续性信号的采样与重构
对于一个连续性周期函数如cos(a*pi*t)+sin(b*pi*t),如何利用matlab实现它的采样与重构,希望大家给出重构公式以及matlab中具体的程序做法.
对于一个连续性周期函数如cos(a*pi*t)+sin(b*pi*t),如何利用matlab实现它的采样与重构,希望大家给出重构公式以及matlab中具体的程序做法.
程度如下:
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject,eventdata,handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a=str2double(get(handles.a,'String'));
b=str2double(get(handles.b,'String'));
t=0:0.01:10;
x=cos(a*pi*t)+sin(b*pi*t);
axes(handles.axes1);
plot(t,x);
xlabel('t'),ylabel('f1');
grid on;
y=fft(x);
f=(0:length(y)-1)'/length(y);
axes(handles.axes2);
plot(f,y);
xlabel('ω'),ylabel('F(ω)');
grid on;
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject,eventdata,handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%set(handles.a,'String','');
%set(handles.b,'String','');
axes(handles.axes1);
cla reset;
axes(handles.axes2);
cla reset;
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject,eventdata,handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
cai2;
delete(handles.figure1);
% --------------------------------------------------------------------
function cai1_Callback(hObject,eventdata,handles)
% hObject handle to cai1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function cai2_Callback(hObject,eventdata,handles)
% hObject handle to cai2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject,eventdata,handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a=str2double(get(handles.a,'String'));
b=str2double(get(handles.b,'String'));
t=0:0.01:10;
x=cos(a*pi*t)+sin(b*pi*t);
axes(handles.axes1);
plot(t,x);
xlabel('t'),ylabel('f1');
grid on;
y=fft(x);
f=(0:length(y)-1)'/length(y);
axes(handles.axes2);
plot(f,y);
xlabel('ω'),ylabel('F(ω)');
grid on;
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject,eventdata,handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%set(handles.a,'String','');
%set(handles.b,'String','');
axes(handles.axes1);
cla reset;
axes(handles.axes2);
cla reset;
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject,eventdata,handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
cai2;
delete(handles.figure1);
% --------------------------------------------------------------------
function cai1_Callback(hObject,eventdata,handles)
% hObject handle to cai1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function cai2_Callback(hObject,eventdata,handles)
% hObject handle to cai2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
下面的matlab代码该怎么理解?是求采样信号重构的函数
matlab 信号处理,采样频率fs的设定,与实际AD采样数据时的采样频率有什么关系?
基于matlab的连续信号的频谱分析
关于采样信号的采样频率的问题,求matlab程序!
请教关于信号采样的问题与fft的问题.
基于MATLAB信号处理工具箱的数字滤波器设计 论文的展望怎么写
matlab采样问题我的信号长度是600,离散的,我需要重新采样点数是1024,matlab怎么做
基于matlab数字滤波器的设计
信号的采样有什么作用
采样信号的最高频率-数字信号处理
DSP 2407 AD采样信号的问题
求正弦信号的采样恢复后信号频率