📄 test_halfwave.m
字号:
% M-file: test_halfwave.m
% M-file to calculate the ripple on the output of a half-wave
% rectifier.
% First, generate the output of a half-wave rectifier
waveform = zeros(1,128);
for ii = 1:128
waveform(ii) = halfwave(ii*pi/64);
end
% Now calculate the ripple factor
r = ripple(waveform);
% Print out the result
string = ['The ripple is ' num2str(r) '%.'];
disp(string);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -