注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Mr.Right

不顾一切的去想,于是我们有了梦想。脚踏实地的去做,于是梦想成了现实。

 
 
 

日志

 
 
关于我

人生一年又一年,只要每年都有所积累,有所成长,都有那么一次自己认为满意的花开时刻就好。即使一时不顺,也要敞开胸怀。生命的荣枯并不是简单的重复,一时的得失不是成败的尺度。花开不是荣耀,而是一个美丽的结束,花谢也不是耻辱,而是一个低调的开始。

网易考拉推荐

matlab RC滤波器仿真  

2012-12-11 21:25:19|  分类: 学习 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |


R = 1000;  %  Resistance value
C = 1e-6;   %  Capacitor value
A = 10;  % Voltage (max amplitude) of input step
co = 2*pi/(R*C); % Compute circuits cut-off frequency (3 dB down point).
%  Time axis Limits in terms of time constants
num_o_co = 3;  % Number of cut_off frequency intervals for length of frequency axis
sample_int = .001;  %  frequency inteval as a fraction of the cut-off frequency
w = [0 : co*sample_int : num_o_co*co];  % Create frequency axis from 0
s = j*w;  %  put frequency on imaginary axis
mvc = abs(A ./ (1+s/co));   % Compute magnitude response
figure %  Open new figure window for plot
plot(w/co, mvc);    %  Normalize frequency axis by cut-off and plot response
xlabel('Frequency in number of 3dB Cut-off Frequency Values')  %  Label x-axis
ylabel('Magnitude')  %  Label y-axis

figure % Open new figure window for plot
pvc = phase(A ./ (1+s/co));   % Compute phase response
plot(w/co, pvc*180/pi);    %  Normalize frequency axis by cut-off, convert radians
                           %  to degress and plot response
xlabel('Frequency in number of 3dB Cut-off Frequency Values')  %  Label x-axis
ylabel('Degrees')  %  Label y-axis


 

 

 

R = 1000;  %  Resistance value
C = 1e-6;   %  Capacitor value
A = 10;  % Voltage (max amplitude) of input step
tc = R*C; % Compute circuits time constant
%  Time axis Limits in terms of time constants
num_o_tc = 5;  % Number of time constants for length of time axis
sample_int = .01;  %  time inteval as a fraction of the time constant
t = [0 : tc*sample_int : num_o_tc*tc];  % Create time axis from 0
vc = A*(1-exp(-t/tc));   % Compute step response
figure   %  Open new figure window put plot
plot(t/tc, vc);    %  Normalize time axis by time constant and plot response
xlabel('Time in Number of Time Constants')  %  Label x-axis
ylabel('Amplitude')  %  Label y-axis

  评论这张
 
阅读(1085)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016