登录论坛

查看完整版本 : [MATLAB基础] 【求助】matlab一段求积分的程序哪错了


adams8431
2009-06-09, 20:39
我做调频仿真的时候用到信号的积分

clear;clc

fs=100
dt=1/fs;
t=0:dt:10-dt;
x=cos(2*pi*t);
subplot(211);plot(t,x);grid
y=cumsum(x)/fs;
subplot(212);plot(t,y);grid

但是积分好像不正确,幅度变小了,请各位帮我看看哪里错了?谢谢了