matlab求dtft,哪里错了?L=200;N=200;w0=0.1*pi;w = (0:N-1) * 0.2 *pi/N;n = 0:(L-1);wh = 0.54 - 0.46 * cos(2*pi*n/(L-1));xrec = cos(w0*n);xham = wh.*xrec;Xrec = abs(dtft(xrec,w));Xham = abs(dtft(xham,w));save xrec.dat xrec/ascii;save xham.dat xhamc/

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 23:35:05
matlab求dtft,哪里错了?L=200;N=200;w0=0.1*pi;w = (0:N-1) * 0.2 *pi/N;n = 0:(L-1);wh = 0.54 - 0.46 * cos(2*pi*n/(L-1));xrec = cos(w0*n);xham = wh.*xrec;Xrec = abs(dtft(xrec,w));Xham = abs(dtft(xham,w));save xrec.dat xrec/ascii;save xham.dat xhamc/
xj@_e/ŲbKk` ZZ JH) 4Җ &:o]vKҦ炐f1QO^+ã|6j7[yp5= 5jt:X tڠ[YO4MT3a!3Sf .Ąa#} rTtM, +zi$%E"fx$ bʀ5nl@ +}4בc_ԿcbZse/Xcz4H~ dȁ5ՊJ=o*'j:"/bvq,~#6«@c%R |<'mQ?`C~^%T ,J9"Nڧ'(ߏ(D´GKeobt]efԲkqx>>Kه|r0|O?|!pMqfEgm3k ?

matlab求dtft,哪里错了?L=200;N=200;w0=0.1*pi;w = (0:N-1) * 0.2 *pi/N;n = 0:(L-1);wh = 0.54 - 0.46 * cos(2*pi*n/(L-1));xrec = cos(w0*n);xham = wh.*xrec;Xrec = abs(dtft(xrec,w));Xham = abs(dtft(xham,w));save xrec.dat xrec/ascii;save xham.dat xhamc/
matlab求dtft,哪里错了?
L=200;N=200;
w0=0.1*pi;
w = (0:N-1) * 0.2 *pi/N;
n = 0:(L-1);
wh = 0.54 - 0.46 * cos(2*pi*n/(L-1));
xrec = cos(w0*n);xham = wh.*xrec;
Xrec = abs(dtft(xrec,w));Xham = abs(dtft(xham,w));
save xrec.dat xrec/ascii;
save xham.dat xhamc/ascii;
save frec.dat Xrec/ascii;
save fham.dat Xham/ascii;
where
fuction X = dtft(x,w);
[L1,L] = size(x);
z = exp(-j*w);
X = 0;
for n = L-1:-1:0;
X = x(n+1)+z.*X;
end;
%错误为Undefined function 'dtft' for input arguments of type 'double'
怎么解决呢?.

matlab求dtft,哪里错了?L=200;N=200;w0=0.1*pi;w = (0:N-1) * 0.2 *pi/N;n = 0:(L-1);wh = 0.54 - 0.46 * cos(2*pi*n/(L-1));xrec = cos(w0*n);xham = wh.*xrec;Xrec = abs(dtft(xrec,w));Xham = abs(dtft(xham,w));save xrec.dat xrec/ascii;save xham.dat xhamc/
fuction应该为function
文件第一行也写上function test,并存为test.m

matlab求dtft,哪里错了?L=200;N=200;w0=0.1*pi;w = (0:N-1) * 0.2 *pi/N;n = 0:(L-1);wh = 0.54 - 0.46 * cos(2*pi*n/(L-1));xrec = cos(w0*n);xham = wh.*xrec;Xrec = abs(dtft(xrec,w));Xham = abs(dtft(xham,w));save xrec.dat xrec/ascii;save xham.dat xhamc/ matlab 求DTFT编程问题,请教高手哪里错了?function testL = 200; N = 200;w0 = 0.1*pi;w = (0:N-1) * 0.2 * pi / N; % frequency rangen = 0:(L-1);wh = 0.54 - 0.46 * cos(2*pi*n/(L-1)); % Hamming windowxrec = cos(w0 * n);xham = wh .* xrec; % windo 数字信号处理B DTFT已知DTFT[x(n)]=X(e^jw),求DTFT[x(2n)] 如何用matlab实现sin(pi*n/2)的DTFT 数字信号处理DTFT问题x(n)的DTFT时X(e^jw),求y(n)=x(2n)的DTFT是什么,用X(e^jw)表示?应该怎么理解?急求~~~ 关于matlab对于信号的FT,DTFT,DFT的提问x(t)=sin(2pi*f1*t)+sin(2pi*f2*t)+sin(2pi*f3*t)f1=2HZ f2=2.05HZ f3=1.9hz确定合适的采样频率,对信号采样画出 FT,DTFT,DFT,并进行对比 对于有限长序列,如何用MATLAB计算其DTFT? y=sqrt(1-x^2)在MATLAB中哪里错了 matlab 序列的傅里叶变换matlab序列的傅里叶变换(1)设x(n)是有限长的因果序列,编写求x(n)傅立叶变换X(e^(jω))的函数:function [X]=dtft(x,w),其中X代表x(n),w代表ω;(提示:matlab函数length(x)可以计算出 急求数字信号处理实验思考题答案 1)对于有限长序列,如何用MATLAB计算其DTFT1)对于有限长序列,如何用MATLAB计算其DTFT?2)对于由两个子系统级联或并联的系统,如何用MATLAB计算它们的幅频响应与相 matlab画图x = 0:0.01:10; y =sin(2*x)*cos(100*x)/(2*x); plot(x, y)这个程序为什么matlab总是报错?哪里错了?求大神赐教 matlab中y=(0.5+3.*sin(x*pi/180)./(1+x^2)).*cos(x*pi/180);哪里错了? matlab index=l(2)+1:l(7)是什么意思 for i=1:1:201 if(y(i)0.95),m=i;end break end ts=(m-1)*0.01;哪里错了?matlab求调节时间 用matlab求线性方程组的解matlab学得不怎么好,请问各位高人如下方程组如何用matlab求解?未知量为fa fb fc ma)fa-q*2*l-fc=0,-ma-m+fb*l-q*2*l*2*l-fc*3*l=0,-ma-fa*l-m-q*2*l*l-fc*a*l=0,-ma-fa*3*l-m-fb*2*l+q*2*l*l=0不好意 matlab a=[-3.0:0.1:3.0];exp((-0.3)*a)*sin(a+0.3)哪里错了 matlab a=[-3.0:0.1:3.0];exp((-0.3)*a)*sin(a+0.3)哪里错了 怎么用matlab画频谱图?就是dtft的幅度吗?