pwmplot2.m

来自「a program that generates a pulse-width m」· M 代码 · 共 22 行

M
22
字号
% Matlab script file to plot PWM output
% This file plots a two PWM signals
% File: pwmplot2.m
% Created 12/25/95, DM Auslander

load pwm_out.txt  % Read in the general output file
nv = length(pwm_out);
subplot(4,1,1);
plot(pwm_out(:,1),pwm_out(:,2),'k');
ylabel('Duty Cycle');
subplot(4,1,2);
plot(pwm_out(:,1),pwm_out(:,3),'k');
axis([0 pwm_out(nv,1)  0 1.5]);
ylabel('PWM Out');
subplot(4,1,3);
plot(pwm_out(:,1),pwm_out(:,4),'k');
ylabel('Duty Cycle');
subplot(4,1,4);
plot(pwm_out(:,1),pwm_out(:,5),'k');
axis([0 pwm_out(nv,1)  0 1.5]);
xlabel('Time'); ylabel('PWM Out');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?